[Python-checkins] peps: PEP 510: adjust API of functions removing specialized code
victor.stinner
python-checkins at python.org
Wed Jan 27 05:55:18 EST 2016
https://hg.python.org/peps/rev/30775037bd14
changeset: 6211:30775037bd14
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Jan 27 11:55:10 2016 +0100
summary:
PEP 510: adjust API of functions removing specialized code
files:
pep-0510.txt | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pep-0510.txt b/pep-0510.txt
--- a/pep-0510.txt
+++ b/pep-0510.txt
@@ -393,7 +393,8 @@
int PyFunction_RemoveSpecialized(PyObject *func, Py_ssize_t index)
-Return ``0`` on sucess. Raise an exception and return ``-1`` on error.
+Return ``0`` on sucess or if the index does not exist. Raise an exception and
+return ``-1`` on error.
PyFunction_RemoveAllSpecialized
@@ -402,7 +403,10 @@
Add a function method to remove all specialized codes and guards of a
function::
- void PyFunction_RemoveAllSpecialized(PyObject *func)
+ int PyFunction_RemoveAllSpecialized(PyObject *func)
+
+Return ``0`` on success. Raise an exception and return ``-1`` if *func* is not
+a function.
Benchmark
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list