提交 a085b71c 编写于 作者: M Megvii Engine Team

fix(mge/imperative): fix compilation for python3.6

GitOrigin-RevId: 3628a619ce6e773adde5bc7cc1f581e83237fe2d
上级 989f3e62
......@@ -132,7 +132,7 @@ public:
PyObject* tp_vectorcall(PyObject*const* args, Py_ssize_t nargs) {
if (!prepare_call(args, nargs)) return nullptr;
return do_call([=](PyObject* func){return _PyObject_FastCall(func, args, nargs);});
return do_call([=](PyObject* func){return _PyObject_FastCall(func, const_cast<PyObject**>(args), nargs);});
}
PyObject* tp_call(PyObject* args, PyObject* kwargs) {
......@@ -146,7 +146,7 @@ public:
return nullptr;
}
stack.emplace_back(stack.back()).mro_offset++;
return do_call([=](PyObject* func){return _PyObject_FastCall(func, args, nargs);});
return do_call([=](PyObject* func){return _PyObject_FastCall(func, const_cast<PyObject**>(args), nargs);});
}
void enable(PyObject* func) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册