Skip to content

Commit 742d283

Browse files
committed
Import suggestions from kumaraditya303 from previous PR
1 parent e4a72b4 commit 742d283

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Objects/genericaliasobject.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#include "pycore_unionobject.h" // _Py_union_type_or, _PyGenericAlias_Check
66
#include "structmember.h" // PyMemberDef
77

8+
#include <stdbool.h>
9+
810
typedef struct {
911
PyObject_HEAD
1012
PyObject *origin;
@@ -13,7 +15,7 @@ typedef struct {
1315
PyObject* weakreflist;
1416
// Whether we're a starred type, e.g. *tuple[int].
1517
// Only supported for `tuple`.
16-
int starred;
18+
bool starred;
1719
} gaobject;
1820

1921
typedef struct {
@@ -649,7 +651,7 @@ ga_iternext(gaiterobject *gi) {
649651
if (starred_tuple == NULL) {
650652
return NULL;
651653
}
652-
((gaobject *)starred_tuple)->starred = 1;
654+
((gaobject *)starred_tuple)->starred = true;
653655
Py_SETREF(gi->obj, NULL);
654656
return starred_tuple;
655657
}

0 commit comments

Comments
 (0)