Browse Source

fix a bug

blueloveTH 1 year ago
parent
commit
e56e58c917
1 changed files with 3 additions and 3 deletions
  1. 3 3
      include/pocketpy/bindings.h

+ 3 - 3
include/pocketpy/bindings.h

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