diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-30 06:15:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-30 06:15:31 (GMT) |
commit | 762bf40438a572a398e500c74e38f9894ea20a45 (patch) | |
tree | e3cec204dd4f633631650bf10222344a2c605929 /Include | |
parent | ea720fe7e99d68924deab38de955fe97f87e2b29 (diff) | |
download | cpython-762bf40438a572a398e500c74e38f9894ea20a45.zip cpython-762bf40438a572a398e500c74e38f9894ea20a45.tar.gz cpython-762bf40438a572a398e500c74e38f9894ea20a45.tar.bz2 |
bpo-29852: Argument Clinic Py_ssize_t converter now supports None (#716)
if pass `accept={int, NoneType}`.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/abstract.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index cd963af..fe089dc 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -1097,6 +1097,9 @@ PyAPI_FUNC(void) _Py_add_one_to_index_F(int nd, Py_ssize_t *index, const Py_ssize_t *shape); PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index, const Py_ssize_t *shape); + +/* Convert Python int to Py_ssize_t. Do nothing if the argument is None. */ +PyAPI_FUNC(int) _Py_convert_optional_to_ssize_t(PyObject *, void *); #endif /* !Py_LIMITED_API */ |