Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco-Sulla committed Nov 20, 2021
1 parent c2ec3fc commit 59d5b6b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion frozendict/src/3_6/frozendictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,7 @@ PyTypeObject PyCoold_Type = {
coold_mapp_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
&PyFrozenDict_Type, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
Expand Down Expand Up @@ -2641,6 +2641,10 @@ static PyObject* frozendictiter_iternextitem(dictiterobject* di) {
Py_INCREF(result);
Py_DECREF(oldkey);
Py_DECREF(oldvalue);

if (!_PyObject_GC_IS_TRACKED(result)) {
_PyObject_GC_TRACK(result);
}
}
else {
result = PyTuple_New(2);
Expand Down
6 changes: 5 additions & 1 deletion frozendict/src/3_7/frozendictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@ PyTypeObject PyCoold_Type = {
coold_mapp_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
&PyFrozenDict_Type, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
Expand Down Expand Up @@ -2674,6 +2674,10 @@ static PyObject* frozendictiter_iternextitem(dictiterobject* di) {
Py_INCREF(result);
Py_DECREF(oldkey);
Py_DECREF(oldvalue);

if (!_PyObject_GC_IS_TRACKED(result)) {
_PyObject_GC_TRACK(result);
}
}
else {
result = PyTuple_New(2);
Expand Down
6 changes: 5 additions & 1 deletion frozendict/src/3_8/frozendictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ PyTypeObject PyCoold_Type = {
coold_mapp_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
&PyFrozenDict_Type, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
Expand Down Expand Up @@ -2800,6 +2800,10 @@ static PyObject* frozendictiter_iternextitem(dictiterobject* di) {
Py_INCREF(result);
Py_DECREF(oldkey);
Py_DECREF(oldvalue);

if (!_PyObject_GC_IS_TRACKED(result)) {
_PyObject_GC_TRACK(result);
}
}
else {
result = PyTuple_New(2);
Expand Down
6 changes: 5 additions & 1 deletion frozendict/src/3_9/frozendictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,7 @@ PyTypeObject PyCoold_Type = {
coold_mapp_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
&PyFrozenDict_Type, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
Expand Down Expand Up @@ -2784,6 +2784,10 @@ static PyObject* frozendictiter_iternextitem(dictiterobject* di) {
Py_INCREF(result);
Py_DECREF(oldkey);
Py_DECREF(oldvalue);

if (!_PyObject_GC_IS_TRACKED(result)) {
_PyObject_GC_TRACK(result);
}
}
else {
result = PyTuple_New(2);
Expand Down

0 comments on commit 59d5b6b

Please sign in to comment.