diff --git a/include/pocketpy/bindings.h b/include/pocketpy/bindings.h index c76e283e..d0649f17 100644 --- a/include/pocketpy/bindings.h +++ b/include/pocketpy/bindings.h @@ -46,7 +46,7 @@ struct NativeProxyMethodC final: NativeProxyFuncCBase { template PyObject* call(VM* vm, ArgsView args, std::index_sequence){ - T& self = py_cast(vm, args[0]); + T& self = PK_OBJ_GET(T, args[0]); // use unsafe cast for derived classes if constexpr(std::is_void_v<__Ret>){ (self.*func)(py_cast(vm, args[Is+1])...); return vm->None;