This commit is contained in:
blueloveTH 2024-06-01 12:59:14 +08:00
parent 58cd2eb78c
commit eb7d63edd2
2 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@ public:
#endif
#if PK_REGION("General Bindings")
PyObject* bind_func(PyObject*obj, StrName name, int argc, NativeFuncC fn, any userdata={}, BindType bt=BindType::DEFAULT);
PyObject* bind_func(PyObject* obj, StrName name, int argc, NativeFuncC fn, any userdata={}, BindType bt=BindType::DEFAULT);
PyObject* bind_func(Type type, StrName name, int argc, NativeFuncC fn, any userdata={}, BindType bt=BindType::DEFAULT){
return bind_func(_t(type), name, argc, fn, std::move(userdata), bt);
}

View File

@ -154,7 +154,7 @@ void add_module_io(VM* vm){
void add_module_os(VM* vm){
PyObject* mod = vm->new_module("os");
PyVar path_obj = vm->new_object<DummyInstance>(vm->tp_object);
PyObject* path_obj = vm->heap.gcnew<DummyInstance>(VM::tp_object);
mod->attr().set("path", path_obj);
// Working directory is shared by all VMs!!