diff --git a/include/pocketpy/cffi.h b/include/pocketpy/cffi.h index 89a7f12e..94c9bfa9 100644 --- a/include/pocketpy/cffi.h +++ b/include/pocketpy/cffi.h @@ -55,7 +55,7 @@ struct VoidP{ static void _register(VM* vm, PyObject* mod, PyObject* type); }; -inline PyObject* py_var(VM* vm, void* p){ +inline PyObject* py_var(VM* vm, const void* p){ return VAR_T(VoidP, p); } diff --git a/include/pocketpy/vm.h b/include/pocketpy/vm.h index 8c3e82a1..65949835 100644 --- a/include/pocketpy/vm.h +++ b/include/pocketpy/vm.h @@ -608,11 +608,6 @@ inline PyObject* py_var(VM* vm, NoReturn val){ return vm->None; } -inline PyObject* py_var(VM* vm, PyObject* val){ - PK_UNUSED(vm); - return val; -} - template PyObject* VM::bind_method(PyObject* obj, Str name, NativeFuncC fn) { check_non_tagged_type(obj, tp_type);