Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
# TODO: Enable this once fixed https://github.com/jcrist/msgspec/issues/910
# - "3.13"
- "3.13"
- "3.14"

steps:
Expand Down
10 changes: 10 additions & 0 deletions src/msgspec/_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
#define PY313_PLUS (PY_VERSION_HEX >= 0x030d0000)
#define PY314_PLUS (PY_VERSION_HEX >= 0x030e0000)

#if PY313_PLUS && !PY314_PLUS
#define Py_BUILD_CORE
#include "internal/pycore_frame.h"
#endif

/* Hint to the compiler not to store `x` in a register since it is likely to
* change. Results in much higher performance on GCC, with smaller benefits on
* clang */
Expand Down Expand Up @@ -5337,6 +5342,11 @@ Struct_alloc(PyTypeObject *type) {
if (obj == NULL) return NULL;
/* Zero out slot fields */
memset((char *)obj + sizeof(PyObject), '\0', type->tp_basicsize - sizeof(PyObject));
#if PY313_PLUS && !PY314_PLUS
if (type->tp_flags & Py_TPFLAGS_INLINE_VALUES) {
_PyObject_InitInlineValues(obj, type);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth asking upstream about how to deal with this without relying on private APIs?

Not like we don't rely on private APIs elsewhere, so I wouldn't consider it a blocker, but if there's a way, that might be nice?

}
#endif
return obj;
}

Expand Down
Loading