@@ -196,23 +196,17 @@ _PyRefchain_Remove(PyInterpreterState *interp, PyObject *obj)
196196}
197197
198198
199- /* Insert op at the front of the list of all objects. If force is true,
200- * op is added even if _ob_prev and _ob_next are non-NULL already. If
201- * force is false amd _ob_prev or _ob_next are non-NULL, do nothing.
202- * force should be true if and only if op points to freshly allocated,
203- * uninitialized memory, or you've unlinked op from the list and are
204- * relinking it into the front.
205- * Note that objects are normally added to the list via _Py_NewReference,
206- * which is called by PyObject_Init. Not all objects are initialized that
207- * way, though; exceptions include statically allocated type objects, and
208- * statically allocated singletons (like Py_True and Py_None).
209- */
199+ /* Add an object to the refchain hash table.
200+ *
201+ * Note that objects are normally added to the list by PyObject_Init()
202+ * indirectly. Not all objects are initialized that way, though; exceptions
203+ * include statically allocated type objects, and statically allocated
204+ * singletons (like Py_True and Py_None). */
210205void
211- _Py_AddToAllObjects (PyObject * op , int force )
206+ _Py_AddToAllObjects (PyObject * op )
212207{
213208 PyInterpreterState * interp = _PyInterpreterState_GET ();
214- bool traced = _PyRefchain_IsTraced (interp , op );
215- if (force || !traced ) {
209+ if (!_PyRefchain_IsTraced (interp , op )) {
216210 _PyRefchain_Trace (interp , op );
217211 }
218212}
@@ -2250,7 +2244,7 @@ new_reference(PyObject *op)
22502244 // Skip the immortal object check in Py_SET_REFCNT; always set refcnt to 1
22512245 op -> ob_refcnt = 1 ;
22522246#ifdef Py_TRACE_REFS
2253- _Py_AddToAllObjects (op , 1 );
2247+ _Py_AddToAllObjects (op );
22542248#endif
22552249}
22562250
0 commit comments