summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-01-21 22:30:17 (GMT)
committerGitHub <noreply@github.com>2022-01-21 22:30:17 (GMT)
commit7835cbf949c413a746324721a352cc72670a8a36 (patch)
tree73b9f3e21924552bb745c2062ae59981c266c7d8 /Python/specialize.c
parent8ee07dda139f3fa1d7c58a29532a98efc790568d (diff)
downloadcpython-7835cbf949c413a746324721a352cc72670a8a36.zip
cpython-7835cbf949c413a746324721a352cc72670a8a36.tar.gz
cpython-7835cbf949c413a746324721a352cc72670a8a36.tar.bz2
bpo-46417: Use _PyType_CAST() in Python directory (GH-30769)
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index e32986a..8daeaa6 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -1339,8 +1339,7 @@ specialize_class_call(
PyObject *callable, _Py_CODEUNIT *instr,
int nargs, SpecializedCacheEntry *cache)
{
- assert(PyType_Check(callable));
- PyTypeObject *tp = (PyTypeObject *)callable;
+ PyTypeObject *tp = _PyType_CAST(callable);
if (_Py_OPCODE(instr[-1]) == PRECALL_METHOD) {
SPECIALIZATION_FAIL(CALL_NO_KW, SPEC_FAIL_METHOD_CALL_CLASS);
return -1;