Skip to content

Commit 4910b30

Browse files
buciuMTyouknowone
authored andcommitted
Fix compile error when using vm-tracing-logging
1 parent 98d09e7 commit 4910b30

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

vm/src/frame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ impl ExecutingFrame<'_> {
382382
let next = exception.traceback();
383383
let new_traceback =
384384
PyTraceback::new(next, frame.object.to_owned(), frame.lasti(), loc.row);
385-
vm_trace!("Adding to traceback: {:?} {:?}", new_traceback, loc.row());
385+
vm_trace!("Adding to traceback: {:?} {:?}", new_traceback, loc.row);
386386
exception.set_traceback(Some(new_traceback.into_ref(&vm.ctx)));
387387

388388
vm.contextualize_exception(&exception);

vm/src/protocol/callable.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ impl PyObject {
2424

2525
/// PyObject_Call
2626
pub fn call_with_args(&self, args: FuncArgs, vm: &VirtualMachine) -> PyResult {
27-
vm_trace!("Invoke: {:?} {:?}", callable, args);
2827
let Some(callable) = self.to_callable() else {
2928
return Err(
3029
vm.new_type_error(format!("'{}' object is not callable", self.class().name()))
3130
);
3231
};
32+
vm_trace!("Invoke: {:?} {:?}", callable, args);
3333
callable.invoke(args, vm)
3434
}
3535
}
3636

37+
#[derive(Debug)]
3738
pub struct PyCallable<'a> {
3839
pub obj: &'a PyObject,
3940
pub call: GenericMethod,

0 commit comments

Comments
 (0)