8000 bpo-41746: Add type information to asdl_seq objects by pablogsal · Pull Request #22223 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-41746: Add type information to asdl_seq objects #22223

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 9 commits into from
Sep 16, 2020
Prev Previous commit
Next Next commit
Rename asdl_seq_SET_GENERIC to asdl_seq_SET_UNTYPED
  • Loading branch information
pablogsal committed Sep 14, 2020
commit 982042855802d7bdee106195364efe4711b536ea
4 changes: 2 additions & 2 deletions Include/asdl.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *a
#endif

#ifdef Py_DEBUG
#define asdl_seq_SET_GENERIC(S, I, V) \
#define asdl_seq_SET_UNTYPED(S, I, V) \
do { \
Py_ssize_t _asdl_i = (I); \
assert((S) != NULL); \
assert(0 <= _asdl_i && _asdl_i < (S)->size); \
(S)->elements[_asdl_i] = (V); \
} while (0)
#else
#define asdl_seq_SET_GENERIC(S, I, V) (S)->elements[I] = (V)
#define asdl_seq_SET_UNTYPED(S, I, V) (S)->elements[I] = (V)
#endif

#endif /* !Py_ASDL_H */
Expand Down
Loading
0