Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix compile error when using vm-tracing-logging
  • Loading branch information
buciuMT committed Nov 10, 2024
commit f3f572d8d79b55c39f6b552ba2b3ee73f2502575
2 changes: 1 addition & 1 deletion vm/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl ExecutingFrame<'_> {
let next = exception.traceback();
let new_traceback =
PyTraceback::new(next, frame.object.to_owned(), frame.lasti(), loc.row);
vm_trace!("Adding to traceback: {:?} {:?}", new_traceback, loc.row());
vm_trace!("Adding to traceback: {:?} {:?}", new_traceback, loc.row);
exception.set_traceback(Some(new_traceback.into_ref(&vm.ctx)));

vm.contextualize_exception(&exception);
Expand Down
3 changes: 2 additions & 1 deletion vm/src/protocol/callable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ impl PyObject {

/// PyObject_Call
pub fn call_with_args(&self, args: FuncArgs, vm: &VirtualMachine) -> PyResult {
vm_trace!("Invoke: {:?} {:?}", callable, args);
let Some(callable) = self.to_callable() else {
return Err(
vm.new_type_error(format!("'{}' object is not callable", self.class().name()))
);
};
vm_trace!("Invoke: {:?} {:?}", callable, args);
callable.invoke(args, vm)
}
}

#[derive(Debug)]
pub struct PyCallable<'a> {
pub obj: &'a PyObject,
pub call: GenericMethod,
Expand Down