diff options
author | Larry Hastings <larry@hastings.org> | 2014-01-18 01:47:17 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-01-18 01:47:17 (GMT) |
commit | bebf73511a1250fc768bcb7192b5b3c3fd04d8f2 (patch) | |
tree | 1566a4813db5454e821d702e7a42fbd3221f8c79 /Modules | |
parent | 601d3668444f7bbe73a3aecc7109c6f471dc3c16 (diff) | |
download | cpython-bebf73511a1250fc768bcb7192b5b3c3fd04d8f2.zip cpython-bebf73511a1250fc768bcb7192b5b3c3fd04d8f2.tar.gz cpython-bebf73511a1250fc768bcb7192b5b3c3fd04d8f2.tar.bz2 |
Issue #20287: Argument Clinic's output is now configurable, allowing
delaying its output or even redirecting it to a separate file.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_pickle.c | 70 | ||||
-rw-r--r-- | Modules/_weakref.c | 3 | ||||
-rw-r--r-- | Modules/zlibmodule.c | 8 |
3 files changed, 23 insertions, 58 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index e687a1e..13c3ae9 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -3906,16 +3906,12 @@ _pickle_Pickler_clear_memo_impl(PicklerObject *self); static PyObject * _pickle_Pickler_clear_memo(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_Pickler_clear_memo_impl((PicklerObject *)self); - - return return_value; + return _pickle_Pickler_clear_memo_impl((PicklerObject *)self); } static PyObject * _pickle_Pickler_clear_memo_impl(PicklerObject *self) -/*[clinic end generated code: checksum=0574593b102fffb8e781d7bb9b536ceffc525ac1]*/ +/*[clinic end generated code: checksum=015cc3c5befea86cb08b9396938477bebbea4157]*/ { if (self->memo) PyMemoTable_Clear(self->memo); @@ -4191,16 +4187,12 @@ _pickle_PicklerMemoProxy_clear_impl(PicklerMemoProxyObject *self); static PyObject * _pickle_PicklerMemoProxy_clear(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_PicklerMemoProxy_clear_impl((PicklerMemoProxyObject *)self); - - return return_value; + return _pickle_PicklerMemoProxy_clear_impl((PicklerMemoProxyObject *)self); } static PyObject * _pickle_PicklerMemoProxy_clear_impl(PicklerMemoProxyObject *self) -/*[clinic end generated code: checksum=c6ca252530ccb3ea2f4b33507b51b183f23b24c7]*/ +/*[clinic end generated code: checksum=bf8dd8c8688d0c0f7a2e59a804c47375b740f2f0]*/ { if (self->pickler->memo) PyMemoTable_Clear(self->pickler->memo); @@ -4228,16 +4220,12 @@ _pickle_PicklerMemoProxy_copy_impl(PicklerMemoProxyObject *self); static PyObject * _pickle_PicklerMemoProxy_copy(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_PicklerMemoProxy_copy_impl((PicklerMemoProxyObject *)self); - - return return_value; + return _pickle_PicklerMemoProxy_copy_impl((PicklerMemoProxyObject *)self); } static PyObject * _pickle_PicklerMemoProxy_copy_impl(PicklerMemoProxyObject *self) -/*[clinic end generated code: checksum=808c4d5a37359ed5fb2efe81dbe5ff480719f470]*/ +/*[clinic end generated code: checksum=72d46879dc658adbd3d28b5c82dd8dcfa6b9b124]*/ { Py_ssize_t i; PyMemoTable *memo; @@ -4295,16 +4283,12 @@ _pickle_PicklerMemoProxy___reduce___impl(PicklerMemoProxyObject *self); static PyObject * _pickle_PicklerMemoProxy___reduce__(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_PicklerMemoProxy___reduce___impl((PicklerMemoProxyObject *)self); - - return return_value; + return _pickle_PicklerMemoProxy___reduce___impl((PicklerMemoProxyObject *)self); } static PyObject * _pickle_PicklerMemoProxy___reduce___impl(PicklerMemoProxyObject *self) -/*[clinic end generated code: checksum=2293152bdf53951a012d430767b608f5fb4213b5]*/ +/*[clinic end generated code: checksum=aad71c4d81d1ed8bf0d32362dd80a29b9f3b0d03]*/ { PyObject *reduce_value, *dict_args; PyObject *contents = _pickle_PicklerMemoProxy_copy_impl(self); @@ -6342,16 +6326,12 @@ _pickle_Unpickler_load_impl(PyObject *self); static PyObject * _pickle_Unpickler_load(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_Unpickler_load_impl(self); - - return return_value; + return _pickle_Unpickler_load_impl(self); } static PyObject * _pickle_Unpickler_load_impl(PyObject *self) -/*[clinic end generated code: checksum=55f35fcaf034817e75c355ec50b7878577355899]*/ +/*[clinic end generated code: checksum=9477099fe6a90748c13ff1a6dd92ba7ab7a89602]*/ { UnpicklerObject *unpickler = (UnpicklerObject*)self; @@ -6417,8 +6397,8 @@ _pickle_Unpickler_find_class(PyObject *self, PyObject *args) PyObject *module_name; PyObject *global_name; - if (!PyArg_ParseTuple(args, - "OO:find_class", + if (!PyArg_UnpackTuple(args, "find_class", + 2, 2, &module_name, &global_name)) goto exit; return_value = _pickle_Unpickler_find_class_impl((UnpicklerObject *)self, module_name, global_name); @@ -6429,7 +6409,7 @@ exit: static PyObject * _pickle_Unpickler_find_class_impl(UnpicklerObject *self, PyObject *module_name, PyObject *global_name) -/*[clinic end generated code: checksum=1f353d13a32c9d94feb1466b3c2d0529a7e5650e]*/ +/*[clinic end generated code: checksum=15ed4836fd5860425fff9ea7855d4f1f4413c170]*/ { PyObject *global; PyObject *modules_dict; @@ -6752,16 +6732,12 @@ _pickle_UnpicklerMemoProxy_clear_impl(UnpicklerMemoProxyObject *self); static PyObject * _pickle_UnpicklerMemoProxy_clear(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_UnpicklerMemoProxy_clear_impl((UnpicklerMemoProxyObject *)self); - - return return_value; + return _pickle_UnpicklerMemoProxy_clear_impl((UnpicklerMemoProxyObject *)self); } static PyObject * _pickle_UnpicklerMemoProxy_clear_impl(UnpicklerMemoProxyObject *self) -/*[clinic end generated code: checksum=e0f99c26d48444a3f58f598bec3190c66595fce7]*/ +/*[clinic end generated code: checksum=07adecee2181e5e268b2ff184360b1d88ad947f2]*/ { _Unpickler_MemoCleanup(self->unpickler); self->unpickler->memo = _Unpickler_NewMemo(self->unpickler->memo_size); @@ -6791,16 +6767,12 @@ _pickle_UnpicklerMemoProxy_copy_impl(UnpicklerMemoProxyObject *self); static PyObject * _pickle_UnpicklerMemoProxy_copy(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_UnpicklerMemoProxy_copy_impl((UnpicklerMemoProxyObject *)self); - - return return_value; + return _pickle_UnpicklerMemoProxy_copy_impl((UnpicklerMemoProxyObject *)self); } static PyObject * _pickle_UnpicklerMemoProxy_copy_impl(UnpicklerMemoProxyObject *self) -/*[clinic end generated code: checksum=8c0ab91c0b694ea71a1774650898a760d1ab4765]*/ +/*[clinic end generated code: checksum=47b9f0cc12c5a54004252e1b4916822cdfa8a881]*/ { Py_ssize_t i; PyObject *new_memo = PyDict_New(); @@ -6851,16 +6823,12 @@ _pickle_UnpicklerMemoProxy___reduce___impl(UnpicklerMemoProxyObject *self); static PyObject * _pickle_UnpicklerMemoProxy___reduce__(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = _pickle_UnpicklerMemoProxy___reduce___impl((UnpicklerMemoProxyObject *)self); - - return return_value; + return _pickle_UnpicklerMemoProxy___reduce___impl((UnpicklerMemoProxyObject *)self); } static PyObject * _pickle_UnpicklerMemoProxy___reduce___impl(UnpicklerMemoProxyObject *self) -/*[clinic end generated code: checksum=4ee76a65511291f0de2e9e63db395d2e5d6d8df6]*/ +/*[clinic end generated code: checksum=2f061bb9ecd9ee8500184c135148a131c46a3b88]*/ { PyObject *reduce_value; PyObject *constructor_args; diff --git a/Modules/_weakref.c b/Modules/_weakref.c index a73dcdb..e5d6519 100644 --- a/Modules/_weakref.c +++ b/Modules/_weakref.c @@ -34,6 +34,7 @@ _weakref_getweakrefcount(PyModuleDef *module, PyObject *object) { PyObject *return_value = NULL; Py_ssize_t _return_value; + _return_value = _weakref_getweakrefcount_impl(module, object); if ((_return_value == -1) && PyErr_Occurred()) goto exit; @@ -45,7 +46,7 @@ exit: static Py_ssize_t _weakref_getweakrefcount_impl(PyModuleDef *module, PyObject *object) -/*[clinic end generated code: checksum=436e8fbe0297434375f039d8c2d9fc3a9bbe773c]*/ +/*[clinic end generated code: checksum=744fa73ba68c0ee89567e9cb9bea11863270d516]*/ { PyWeakReference **list; diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index 59fc620..efa95e9 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -1047,16 +1047,12 @@ zlib_Compress_copy_impl(compobject *self); static PyObject * zlib_Compress_copy(PyObject *self, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - - return_value = zlib_Compress_copy_impl((compobject *)self); - - return return_value; + return zlib_Compress_copy_impl((compobject *)self); } static PyObject * zlib_Compress_copy_impl(compobject *self) -/*[clinic end generated code: checksum=2f454ee15be3bc53cfb4e845c3f891f68be4c8e4]*/ +/*[clinic end generated code: checksum=d57a7911deb7940e85a8d7e65af20b6e2df69000]*/ { compobject *retval = NULL; int err; |