diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2012-05-15 12:45:03 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2012-05-15 12:45:03 (GMT) |
commit | cc10a37ef0e05906c0f1c93bea646f3521b84a76 (patch) | |
tree | 1fc5f7b5853db5490f382ff90c6469b02d537a66 /Include | |
parent | 33cac8578bede2e9d6688ff46e849df7c2897a26 (diff) | |
download | cpython-cc10a37ef0e05906c0f1c93bea646f3521b84a76.zip cpython-cc10a37ef0e05906c0f1c93bea646f3521b84a76.tar.gz cpython-cc10a37ef0e05906c0f1c93bea646f3521b84a76.tar.bz2 |
Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/asdl.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/asdl.h b/Include/asdl.h index 42bbbf8..6bf618f 100644 --- a/Include/asdl.h +++ b/Include/asdl.h @@ -15,17 +15,17 @@ typedef PyObject * object; /* XXX A sequence should be typed so that its use can be typechecked. */ typedef struct { - int size; + Py_ssize_t size; void *elements[1]; } asdl_seq; typedef struct { - int size; + Py_ssize_t size; int elements[1]; } asdl_int_seq; -asdl_seq *asdl_seq_new(int size, PyArena *arena); -asdl_int_seq *asdl_int_seq_new(int size, PyArena *arena); +asdl_seq *asdl_seq_new(Py_ssize_t size, PyArena *arena); +asdl_int_seq *asdl_int_seq_new(Py_ssize_t size, PyArena *arena); #define asdl_seq_GET(S, I) (S)->elements[(I)] #define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size) |