Skip to content

Commit f8a2778

Browse files
Address review
1 parent 8757207 commit f8a2778

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3765,7 +3765,9 @@ dummy_func(
37653765
DEOPT_IF(!PyType_Check(callable_o));
37663766
PyTypeObject *tp = (PyTypeObject *)callable_o;
37673767
DEOPT_IF(FT_ATOMIC_LOAD_UINT32_RELAXED(tp->tp_version_tag) != type_version);
3768+
assert(tp->tp_new == PyBaseObject_Type.tp_new);
37683769
assert(tp->tp_flags & Py_TPFLAGS_HEAPTYPE);
3770+
assert(tp->tp_alloc == PyType_GenericAlloc);
37693771
PyHeapTypeObject *cls = (PyHeapTypeObject *)callable_o;
37703772
PyFunctionObject *init_func = (PyFunctionObject *)FT_ATOMIC_LOAD_PTR_ACQUIRE(cls->_spec_cache.init);
37713773
PyCodeObject *code = (PyCodeObject *)init_func->func_code;

Python/executor_cases.c.h

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)