Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.13 support #296

Merged
merged 2 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading