diff --git a/Python/PyPlasma.h b/Python/PyPlasma.h index d728d711..024450a9 100644 --- a/Python/PyPlasma.h +++ b/Python/PyPlasma.h @@ -582,6 +582,12 @@ template <> inline plKeyDef pyPlasma_get(PyObject* value) { return (plKeyDef)PyL #define _TP_WATCHED_INIT #endif +#if (PY_MAJOR_VERSION >= 4) || ((PY_MAJOR_VERSION == 3) && (PY_MINOR_VERSION >= 13)) + #define _TP_VERSIONS_USED 0, +#else + #define _TP_VERSIONS_USED +#endif + #define PY_PLASMA_TYPE(pyType, classname, doctext) \ PyTypeObject py##pyType##_Type = { \ PyVarObject_HEAD_INIT(nullptr, 0) \ @@ -603,6 +609,7 @@ template <> inline plKeyDef pyPlasma_get(PyObject* value) { return (plKeyDef)PyL _TP_FINALIZE_INIT \ _TP_VECTORCALL_PRINT \ _TP_WATCHED_INIT \ + _TP_VERSIONS_USED \ }; #if ((PY_MAJOR_VERSION > 3) || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 5)) diff --git a/Python/Util/pyJPEG.cpp b/Python/Util/pyJPEG.cpp index 8f8e946f..8bda4b0e 100644 --- a/Python/Util/pyJPEG.cpp +++ b/Python/Util/pyJPEG.cpp @@ -21,7 +21,6 @@ #include -PY_PLASMA_EMPTY_INIT(JPEG) PY_PLASMA_NEW_MSG(JPEG, "plJPEG cannot be constructed") PY_METHOD_STATIC_VA(JPEG, DecompressJPEG, diff --git a/Python/Util/pyPNG.cpp b/Python/Util/pyPNG.cpp index 5f9b5386..34d34d92 100644 --- a/Python/Util/pyPNG.cpp +++ b/Python/Util/pyPNG.cpp @@ -21,7 +21,6 @@ #include -PY_PLASMA_EMPTY_INIT(PNG) PY_PLASMA_NEW_MSG(PNG, "plPNG cannot be constructed") PY_METHOD_STATIC_VA(PNG, DecompressPNG,