diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-05-26 15:43:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 15:43:38 (GMT) |
commit | 578c3955e0222ec7b3146197467fbb0fcfae12fe (patch) | |
tree | 1314ca1eb6153feaf3fb1cae341784270ce24c32 /Modules/_multiprocessing/clinic | |
parent | 8ad052464a4e0aef9a11663b80f187087b773592 (diff) | |
download | cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.zip cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.gz cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.bz2 |
bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)
Only __index__ should be used to make integer conversions lossless.
Diffstat (limited to 'Modules/_multiprocessing/clinic')
-rw-r--r-- | Modules/_multiprocessing/clinic/posixshmem.c.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Modules/_multiprocessing/clinic/posixshmem.c.h b/Modules/_multiprocessing/clinic/posixshmem.c.h index a99f0d2..3424b10 100644 --- a/Modules/_multiprocessing/clinic/posixshmem.c.h +++ b/Modules/_multiprocessing/clinic/posixshmem.c.h @@ -42,11 +42,6 @@ _posixshmem_shm_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto exit; } path = args[0]; - if (PyFloat_Check(args[1])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } flags = _PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -54,11 +49,6 @@ _posixshmem_shm_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - if (PyFloat_Check(args[2])) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - goto exit; - } mode = _PyLong_AsInt(args[2]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -130,4 +120,4 @@ exit: #ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF #define _POSIXSHMEM_SHM_UNLINK_METHODDEF #endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */ -/*[clinic end generated code: output=9132861c61d8c2d8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bca8e78d0f43ef1a input=a9049054013a1b77]*/ |