[Python-checkins] cpython: While a speedup of 1% is measurable, contexts aren't created that often,
stefan.krah
python-checkins at python.org
Mon Jan 9 07:53:49 EST 2017
https://hg.python.org/cpython/rev/2c2eb30100b0
changeset: 106067:2c2eb30100b0
user: Stefan Krah <skrah at bytereef.org>
date: Mon Jan 09 13:53:32 2017 +0100
summary:
While a speedup of 1% is measurable, contexts aren't created that often,
so let's defer this until 3.7, 3.8, ... all have this new function.
files:
Modules/_decimal/_decimal.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -1194,13 +1194,13 @@
return NULL;
}
- self->traps = _PyObject_CallNoArg((PyObject *)PyDecSignalDict_Type);
+ self->traps = PyObject_CallObject((PyObject *)PyDecSignalDict_Type, NULL);
if (self->traps == NULL) {
self->flags = NULL;
Py_DECREF(self);
return NULL;
}
- self->flags = _PyObject_CallNoArg((PyObject *)PyDecSignalDict_Type);
+ self->flags = PyObject_CallObject((PyObject *)PyDecSignalDict_Type, NULL);
if (self->flags == NULL) {
Py_DECREF(self);
return NULL;
@@ -1395,7 +1395,7 @@
goto error;
}
- context = _PyObject_CallNoArg((PyObject *)&PyDecContext_Type);
+ context = PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL);
if (context == NULL) {
return NULL;
}
@@ -1417,7 +1417,7 @@
{
PyObject *copy;
- copy = _PyObject_CallNoArg((PyObject *)&PyDecContext_Type);
+ copy = PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL);
if (copy == NULL) {
return NULL;
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list