cpython: 4bfbb2714ae9 (original) (raw)

Mercurial > cpython

changeset 99687:4bfbb2714ae9 3.5

Issue #20440: More use of Py_SETREF. This patch is manually crafted and contains changes that couldn't be handled automatically. [#20440]

Serhiy Storchaka storchaka@gmail.com
date Sun, 27 Dec 2015 15:41:34 +0200
parents 9fb57c0209ea
children 539ba7267701 5114871a3ac6
files Modules/_ctypes/_ctypes.c Modules/_elementtree.c Modules/_sqlite/cursor.c Modules/zlibmodule.c Objects/exceptions.c Objects/unicodeobject.c Python/errors.c
diffstat 7 files changed, 39 insertions(+), 58 deletions(-)[+] [-] Modules/_ctypes/_ctypes.c 3 Modules/_elementtree.c 38 Modules/_sqlite/cursor.c 4 Modules/zlibmodule.c 18 Objects/exceptions.c 19 Objects/unicodeobject.c 2 Python/errors.c 13

line wrap: on

line diff

--- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -2983,10 +2983,9 @@ PyCFuncPtr_set_restype(PyCFuncPtrObject "restype must be a type, a callable, or None"); return -1; }

--- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -935,9 +935,8 @@ element_setstate_from_attributes(Element return NULL; }

_clear_joined_ptr(&self->text); self->text = text ? JOIN_SET(text, PyList_CheckExact(text)) : Py_None; @@ -980,9 +979,8 @@ element_setstate_from_attributes(Element /* Stash attrib. */ if (attrib) {

if (strcmp(name, "tag") == 0) {

@@ -1960,9 +1957,8 @@ element_setattro(ElementObject* self, Py if (create_extra(self, NULL) < 0) return -1; }

@@ -2554,13 +2550,10 @@ treebuilder_handle_start(TreeBuilderObje } self->index++;

-

if (treebuilder_append_event(self, self->start_event_obj, node) < 0) goto error; @@ -2633,15 +2626,12 @@ treebuilder_handle_end(TreeBuilderObject return NULL; }

-

-

if (treebuilder_append_event(self, self->end_event_obj, self->last) < 0) return NULL;

--- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -524,10 +524,10 @@ PyObject* _pysqlite_query_execute(pysqli if (self->statement) { (void)pysqlite_statement_reset(self->statement);

--- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -961,14 +961,11 @@ zlib_Compress_copy_impl(compobject *self goto error; } Py_INCREF(self->unused_data);

--- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -561,12 +561,14 @@ SystemExit_init(PySystemExitObject *self if (size == 0) return 0;

@@ -625,9 +627,8 @@ ImportError_init(PyImportErrorObject *se #define GET_KWD(kwd) { [](#l5.25) kwd = PyDict_GetItemString(kwds, #kwd); [](#l5.26) if (kwd) { [](#l5.27)

--- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -14191,8 +14191,8 @@ unicode_format_arg_parse(struct unicode_ if (key == NULL) return -1; if (ctx->args_owned) {

--- a/Python/errors.c +++ b/Python/errors.c @@ -315,14 +315,11 @@ finally: tstate = PyThreadState_GET(); if (++tstate->recursion_depth > Py_GetRecursionLimit()) { --tstate->recursion_depth;