diff options
author | Stefan Krah <skrah@bytereef.org> | 2017-01-09 12:53:32 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2017-01-09 12:53:32 (GMT) |
commit | 3c29fd00747467f738ab23343b7f79abb721744a (patch) | |
tree | 9dc9e4068a62f04b4aa06cecaad52544bb524557 /Modules/_decimal/_decimal.c | |
parent | a40a3f35ebd1c99d7ee4b884f1508fa4136a5fd6 (diff) | |
download | cpython-3c29fd00747467f738ab23343b7f79abb721744a.zip cpython-3c29fd00747467f738ab23343b7f79abb721744a.tar.gz cpython-3c29fd00747467f738ab23343b7f79abb721744a.tar.bz2 |
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.
Diffstat (limited to 'Modules/_decimal/_decimal.c')
-rw-r--r-- | Modules/_decimal/_decimal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 88ca87c..fcc1f15 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -1194,13 +1194,13 @@ context_new(PyTypeObject *type, PyObject *args UNUSED, PyObject *kwds UNUSED) 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 @@ ieee_context(PyObject *dummy UNUSED, PyObject *v) goto error; } - context = _PyObject_CallNoArg((PyObject *)&PyDecContext_Type); + context = PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL); if (context == NULL) { return NULL; } @@ -1417,7 +1417,7 @@ context_copy(PyObject *self, PyObject *args UNUSED) { PyObject *copy; - copy = _PyObject_CallNoArg((PyObject *)&PyDecContext_Type); + copy = PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL); if (copy == NULL) { return NULL; } |