mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-128262: Allow specialization of calls to classes with __slots__ (GH-128263)
This commit is contained in:
parent
dafe7a4463
commit
7ef4907412
5 changed files with 17 additions and 11 deletions
|
@ -2002,10 +2002,6 @@ get_init_for_simple_managed_python_class(PyTypeObject *tp, unsigned int *tp_vers
|
|||
return NULL;
|
||||
}
|
||||
unsigned long tp_flags = PyType_GetFlags(tp);
|
||||
if ((tp_flags & Py_TPFLAGS_INLINE_VALUES) == 0) {
|
||||
SPECIALIZATION_FAIL(CALL, SPEC_FAIL_CALL_INIT_NOT_INLINE_VALUES);
|
||||
return NULL;
|
||||
}
|
||||
if (!(tp_flags & Py_TPFLAGS_HEAPTYPE)) {
|
||||
/* Is this possible? */
|
||||
SPECIALIZATION_FAIL(CALL, SPEC_FAIL_EXPECTED_ERROR);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue