mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
...
This commit is contained in:
parent
d6a96d4701
commit
c41f3649ee
4
src/vm.h
4
src/vm.h
@ -1561,7 +1561,9 @@ inline PyObject* VM::bind(PyObject* obj, const char* sig, const char* docstring,
|
||||
throw std::runtime_error("expected 1 function declaration");
|
||||
}
|
||||
FuncDecl_ decl = co->func_decls[0];
|
||||
return VAR(NativeFunc(fn, decl, docstring));
|
||||
PyObject* f_obj = VAR(NativeFunc(fn, decl, docstring));
|
||||
obj->attr().set(decl->code->name, f_obj);
|
||||
return f_obj;
|
||||
}
|
||||
|
||||
inline void VM::_error(Exception e){
|
||||
|
Loading…
x
Reference in New Issue
Block a user