Skip to content
Closed
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
6 changes: 6 additions & 0 deletions Include/cpython/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ struct _specialization_cache {
// *args nor **kwargs (as required by BINARY_OP_SUBSCR_GETITEM):
PyObject *getitem;
uint32_t getitem_version;
// The same contract applies to setitem, except that it is the Python
// function that PyType_Lookup(cls, "__setitem__") would return, and it is
// called with three positional arguments (as required by
// STORE_SUBSCR_PY_DUNDER):
PyObject *setitem;
uint32_t setitem_version;
PyObject *init;
};

Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ extern PyObject *_PyInstrumentation_BranchesIterator(PyCodeObject *code);
struct _PyCode8 _PyCode_DEF(8);

PyAPI_DATA(const struct _PyCode8) _Py_InitCleanup;
PyAPI_DATA(const struct _PyCode8) _Py_SetItemCleanup;

#ifdef Py_GIL_DISABLED

Expand Down
3 changes: 2 additions & 1 deletion Include/internal/pycore_magic_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ Known values:
Python 3.16a1 3703 (Replace DELETE_GLOBAL with PUSH_NULL; STORE_GLOBAL)
Python 3.16a1 3704 (Replace DELETE_ATTR with PUSH_NULL; STORE_ATTR)
Python 3.16a1 3705 (Add INTRINSIC_ADD_CONDITIONAL_ANNOTATION)
Python 3.16a1 3706 (Add STORE_SUBSCR_PY_DUNDER and EXIT_SETITEM)

Python 3.17 will start with 3750

Expand All @@ -312,7 +313,7 @@ Known values:

*/

#define PYC_MAGIC_NUMBER 3705
#define PYC_MAGIC_NUMBER 3706
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
Expand Down
18 changes: 14 additions & 4 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Include/internal/pycore_typeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ typedef int (*_py_validate_type)(PyTypeObject *);
// Exported for external JIT support
int _PyType_Validate(PyTypeObject *ty, _py_validate_type validate, unsigned int *tp_version);
int _PyType_CacheGetItemForSpecialization(PyHeapTypeObject *ht, PyObject *descriptor, uint32_t tp_version);
int _PyType_CacheSetItemForSpecialization(PyHeapTypeObject *ht, PyObject *descriptor, uint32_t tp_version);

// Precalculates count of non-unique slots and fills wrapperbase.name_count.
extern int _PyType_InitSlotDefs(PyInterpreterState *interp);
Expand Down
Loading
Loading