From 799d09ef1355b4d5aa76fd8f6d39bb66d057bbf5 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Fri, 4 Sep 2020 18:10:19 +0800 Subject: [PATCH] fix(imperative): fix compile error when vectorcall is enabled GitOrigin-RevId: 7dda34a758dbb67a4f3f116d06b732219199366a --- imperative/python/src/pyext17.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imperative/python/src/pyext17.h b/imperative/python/src/pyext17.h index 41512e163..ee508dcab 100644 --- a/imperative/python/src/pyext17.h +++ b/imperative/python/src/pyext17.h @@ -62,7 +62,7 @@ public: PyObject_HEAD std::aligned_storage_t storage; #ifdef _Py_TPFLAGS_HAVE_VECTORCALL - PyObject* vectorcall_slot; + PyObject* (*vectorcall_slot)(PyObject*, PyObject*const*, size_t, PyObject*); #endif inline T* inst() { @@ -167,7 +167,7 @@ private: struct tp_vectorcall { static constexpr bool valid = HAS_MEMBER(T, tp_vectorcall); static constexpr bool haskw = [](){if constexpr (valid) - if constexpr (std::is_invocable_v) + if constexpr (std::is_invocable_v) return true; return false;}(); -- GitLab