From 9c71710dbc99efc066324d1b6aa783368eef4735 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Fri, 29 Sep 2023 20:03:43 +0800 Subject: [PATCH] ... --- include/pocketpy/cffi.h | 2 +- include/pocketpy/vm.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) 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);