8000 bpo-43224: Implement PEP 646 changes to genericaliasobject.c by mrahtz · Pull Request #31019 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43224: Implement PEP 646 changes to genericaliasobject.c #31019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Mar 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Import suggestions from kumaraditya303 from previous PR
  • Loading branch information
mrahtz committed Feb 1, 2022
commit 742d283952f9ee0243f5f147b12b37ac57c67245
6 changes: 4 additions & 2 deletions Objects/genericaliasobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "pycore_unionobject.h" // _Py_union_type_or, _PyGenericAlias_Check
#include "structmember.h" // PyMemberDef

#include <stdbool.h>

typedef struct {
PyObject_HEAD
PyObject *origin;
Expand All @@ -13,7 +15,7 @@ typedef struct {
PyObject* weakreflist;
// Whether we're a starred type, e.g. *tuple[int].
// Only supported for `tuple`.
int starred;
bool starred;
} gaobject;

typedef struct {
Expand Down Expand Up @@ -649,7 +651,7 @@ ga_iternext(gaiterobject *gi) {
if (starred_tuple == NULL) {
return NULL;
}
((gaobject *)starred_tuple)->starred = 1;
((gaobject *)starred_tuple)->starred = true;
Py_SETREF(gi->obj, NULL);
return starred_tuple;
}
Expand Down
0