fix a bug

This commit is contained in:
blueloveTH 2024-05-11 13:02:21 +08:00
parent 7623542a47
commit e56e58c917

View File

@ -70,19 +70,19 @@ PyObject* VM::bind(PyObject* obj, const char* sig, Ret(*func)(Params...), BindTy
template<typename Ret, typename T, typename... Params>
PyObject* VM::bind(PyObject* obj, const char* sig, Ret(T::*func)(Params...), BindType bt){
auto proxy = new NativeProxyMethodC<Ret, T, Params...>(func);
NativeProxyFuncCBase* proxy = new NativeProxyMethodC<Ret, T, Params...>(func);
return vm->bind(obj, sig, __proxy_wrapper, proxy, bt);
}
template<typename Ret, typename... Params>
PyObject* VM::bind(PyObject* obj, const char* sig, const char* docstring, Ret(*func)(Params...), BindType bt){
auto proxy = new NativeProxyFuncC<Ret, Params...>(func);
NativeProxyFuncCBase* proxy = new NativeProxyFuncC<Ret, Params...>(func);
return vm->bind(obj, sig, docstring, __proxy_wrapper, proxy, bt);
}
template<typename Ret, typename T, typename... Params>
PyObject* VM::bind(PyObject* obj, const char* sig, const char* docstring, Ret(T::*func)(Params...), BindType bt){
auto proxy = new NativeProxyMethodC<Ret, T, Params...>(func);
NativeProxyFuncCBase* proxy = new NativeProxyMethodC<Ret, T, Params...>(func);
return vm->bind(obj, sig, docstring, __proxy_wrapper, proxy, bt);
}