Created
December 2, 2019 02:18
-
-
Save dpogue/983555417b9b4a0edcc981b063aaf988 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Python/PyPlasma.h b/Python/PyPlasma.h | |
index 59d8c1b4..1b5e8480 100644 | |
--- a/Python/PyPlasma.h | |
+++ b/Python/PyPlasma.h | |
@@ -588,12 +588,22 @@ template <> inline size_t pyPlasma_get(PyObject* value) { return (size_t)(unsign | |
#define _TP_FINALIZE_INIT | |
#endif | |
+#if (PY_MAJOR_VERSION >= 4) || ((PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION >= 8)) | |
+ #define _TP_PRINT 0, | |
+ #define _TP_VECTORCALL nullptr, nullptr, | |
+#else | |
+ #define _TP_PRINT nullptr, | |
+ #define _TP_VECTORCALL | |
+#endif | |
+ | |
#define PY_PLASMA_TYPE(pyType, classname, doctext) \ | |
PyTypeObject py##pyType##_Type = { \ | |
PyVarObject_HEAD_INIT(nullptr, 0) \ | |
"PyHSPlasma." #classname, \ | |
sizeof(py##pyType), 0, \ | |
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, \ | |
+ nullptr, \ | |
+ _TP_PRINT \ | |
+ nullptr, nullptr, nullptr, nullptr, \ | |
nullptr, nullptr, nullptr, \ | |
nullptr, nullptr, nullptr, nullptr, nullptr, \ | |
nullptr, \ | |
@@ -607,6 +617,7 @@ template <> inline size_t pyPlasma_get(PyObject* value) { return (size_t)(unsign | |
nullptr, \ | |
_TP_VERSION_TAG_INIT \ | |
_TP_FINALIZE_INIT \ | |
+ _TP_VECTORCALL \ | |
}; | |
#if (PY_MAJOR_VERSION < 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment