mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Fix compile error when using ``vm-tracing-logging``
This commit is contained in:
committed by
Jeong, YunWon
parent
98d09e7816
commit
4910b308ee
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user