Skip to content

Commit 8d48e23

Browse files
committed
Update some initializers
1 parent ce2f515 commit 8d48e23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Objects/object.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,12 +2475,16 @@ new_reference(PyObject *op)
24752475
{
24762476
// Skip the immortal object check in Py_SET_REFCNT; always set refcnt to 1
24772477
#if !defined(Py_GIL_DISABLED)
2478+
#if SIZEOF_VOID_P > 4
24782479
op->ob_refcnt_full = 1;
24792480
assert(op->ob_refcnt == 1);
24802481
assert(op->ob_flags == 0);
2482+
#else
2483+
op->ob_refcnt = 1;
2484+
#endif
24812485
#else
24822486
op->ob_tid = _Py_ThreadId();
2483-
op->_padding = 0;
2487+
op->ob_flags = 0;
24842488
op->ob_mutex = (PyMutex){ 0 };
24852489
op->ob_gc_bits = 0;
24862490
op->ob_ref_local = 1;

0 commit comments

Comments
 (0)