blueloveTH 1 rok temu
rodzic
commit
eb7d63edd2
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      include/pocketpy/vm.h
  2. 1 1
      src/io.cpp

+ 1 - 1
include/pocketpy/vm.h

@@ -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);
     }

+ 1 - 1
src/io.cpp

@@ -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!!