Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6938997

Browse files
committed
fix
1 parenta9952ac commit6938997

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Objects/typeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ _PyType_AllocNoTrack(PyTypeObject *type, Py_ssize_t nitems)
12901290
{
12911291
PyObject*obj;
12921292
size_textra=0;
1293-
if (type->tp_flags&Py_TPFLAGS_TYPE_SUBCLASS) {
1293+
if (type->tp_flags&Py_TPFLAGS_TYPE_SUBCLASS||type->tp_vectorcall!=NULL) {
12941294
/* note that we need to add one, for the sentinel */
12951295
extra=1;
12961296
}
@@ -1312,7 +1312,7 @@ _PyType_AllocNoTrack(PyTypeObject *type, Py_ssize_t nitems)
13121312
_PyObject_Init(obj,type);
13131313
}
13141314
else {
1315-
_PyObject_InitVar((PyVarObject*)obj,type,nitems);
1315+
_PyObject_InitVar((PyVarObject*)obj,type,nitems+extra);
13161316
}
13171317
returnobj;
13181318
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp