summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index 5892f54..1669ce1 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -9,7 +9,7 @@
#include "pycore_object.h"
#include "pycore_opcode.h" // _PyOpcode_Caches
#include "pycore_pylifecycle.h" // _PyOS_URandomNonblock()
-#include "structmember.h" // struct PyMemberDef, T_OFFSET_EX
+
#include <stdlib.h> // rand()
@@ -621,7 +621,7 @@ analyze_descriptor(PyTypeObject *type, PyObject *name, PyObject **descr, int sto
if (desc_cls == &PyMemberDescr_Type) {
PyMemberDescrObject *member = (PyMemberDescrObject *)descriptor;
struct PyMemberDef *dmem = member->d_member;
- if (dmem->type == T_OBJECT_EX) {
+ if (dmem->type == Py_T_OBJECT_EX) {
return OBJECT_SLOT;
}
return OTHER_SLOT;
@@ -803,7 +803,7 @@ _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_EXPECTED_ERROR);
goto fail;
}
- if (dmem->flags & PY_AUDIT_READ) {
+ if (dmem->flags & Py_AUDIT_READ) {
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_AUDITED_SLOT);
goto fail;
}
@@ -811,7 +811,7 @@ _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_OUT_OF_RANGE);
goto fail;
}
- assert(dmem->type == T_OBJECT_EX);
+ assert(dmem->type == Py_T_OBJECT_EX);
assert(offset > 0);
cache->index = (uint16_t)offset;
write_u32(cache->version, type->tp_version_tag);
@@ -939,7 +939,7 @@ _Py_Specialize_StoreAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
SPECIALIZATION_FAIL(STORE_ATTR, SPEC_FAIL_EXPECTED_ERROR);
goto fail;
}
- if (dmem->flags & READONLY) {
+ if (dmem->flags & Py_READONLY) {
SPECIALIZATION_FAIL(STORE_ATTR, SPEC_FAIL_ATTR_READ_ONLY);
goto fail;
}
@@ -947,7 +947,7 @@ _Py_Specialize_StoreAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name)
SPECIALIZATION_FAIL(STORE_ATTR, SPEC_FAIL_OUT_OF_RANGE);
goto fail;
}
- assert(dmem->type == T_OBJECT_EX);
+ assert(dmem->type == Py_T_OBJECT_EX);
assert(offset > 0);
cache->index = (uint16_t)offset;
write_u32(cache->version, type->tp_version_tag);