summaryrefslogtreecommitdiff
path: root/Modules/clinic/_opcode.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-05-26 18:43:38 +0300
committerGitHub <noreply@github.com>2020-05-26 18:43:38 +0300
commit578c3955e0222ec7b3146197467fbb0fcfae12fe (patch)
tree1314ca1eb6153feaf3fb1cae341784270ce24c32 /Modules/clinic/_opcode.c.h
parent8ad052464a4e0aef9a11663b80f187087b773592 (diff)
downloadcpython-git-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.gz
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/clinic/_opcode.c.h')
-rw-r--r--Modules/clinic/_opcode.c.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h
index 777701ff14..6915f21d64 100644
--- a/Modules/clinic/_opcode.c.h
+++ b/Modules/clinic/_opcode.c.h
@@ -32,11 +32,6 @@ _opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs,
if (!args) {
goto exit;
}
- if (PyFloat_Check(args[0])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
opcode = _PyLong_AsInt(args[0]);
if (opcode == -1 && PyErr_Occurred()) {
goto exit;
@@ -61,4 +56,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
-/*[clinic end generated code: output=7bc08f2835b2cf89 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bcf66d25c2624197 input=a9049054013a1b77]*/