Skip to content

Commit

Permalink
Merge pull request #296 from dpogue/py3.13
Browse files Browse the repository at this point in the history
Python 3.13 support
  • Loading branch information
zrax authored Dec 25, 2024
2 parents 341ca00 + 993dee3 commit 8354800
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Python/PyPlasma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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))
Expand Down
1 change: 0 additions & 1 deletion Python/Util/pyJPEG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include <Util/plJPEG.h>

PY_PLASMA_EMPTY_INIT(JPEG)
PY_PLASMA_NEW_MSG(JPEG, "plJPEG cannot be constructed")

PY_METHOD_STATIC_VA(JPEG, DecompressJPEG,
Expand Down
1 change: 0 additions & 1 deletion Python/Util/pyPNG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include <Util/plPNG.h>

PY_PLASMA_EMPTY_INIT(PNG)
PY_PLASMA_NEW_MSG(PNG, "plPNG cannot be constructed")

PY_METHOD_STATIC_VA(PNG, DecompressPNG,
Expand Down

0 comments on commit 8354800

Please sign in to comment.