Skip to content

Commit 100ad99

Browse files
fix allocation
1 parent ff5673f commit 100ad99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_multiprocessing/semaphore.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ static PyObject *
454454
newsemlockobject(PyTypeObject *type, SEM_HANDLE handle, int kind, int maxvalue,
455455
char *name)
456456
{
457-
SemLockObject *self = PyObject_GC_New(SemLockObject, type);
457+
SemLockObject *self = (SemLockObject *)type->tp_alloc(type, 0);
458458
if (!self)
459459
return NULL;
460460
self->handle = handle;

0 commit comments

Comments
 (0)