Skip to content

Commit

Permalink
Attempt to fix PyPy/CPython 3.8+ compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Nov 2, 2022
1 parent db2697e commit a611b17
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions aggdraw.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ static PyTypeObject DrawType = {
"Draw", sizeof(DrawObject), 0,
/* methods */
(destructor) draw_dealloc, /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
(printfunc)0, /* tp_print */
#else
(Py_ssize_t)0, /* tp_vectorcall_offset */
#endif
(getattrfunc)draw_getattr, /* tp_getattr */
0, /* tp_setattr */
};
Expand Down Expand Up @@ -263,7 +267,11 @@ static PyTypeObject FontType = {
"Font", sizeof(FontObject), 0,
/* methods */
(destructor) font_dealloc, /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
(printfunc)0, /* tp_print */
#else
(Py_ssize_t)0, /* tp_vectorcall_offset */
#endif
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
Expand Down Expand Up @@ -304,7 +312,11 @@ static PyTypeObject PathType = {
"Path", sizeof(PathObject), 0,
/* methods */
(destructor) path_dealloc, /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
(printfunc)0, /* tp_print */
#else
(Py_ssize_t)0, /* tp_vectorcall_offset */
#endif
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
Expand Down

0 comments on commit a611b17

Please sign in to comment.