From 7491be12e517d504cef2cf43a6d355ab09a5ee03 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 1 Jul 2013 20:09:31 +0100 Subject: [PATCH] Uninitialized variable fix in SWIG_Python_NonDynamicSetAttr when using -builtin. SF patch #340 --- CHANGES.current | 4 ++++ Lib/python/pyrun.swg | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 1ec767bd7..3f31ce314 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.11 (in progress) ============================ +2013-08-01: wsfulton + [Python] Apply SF patch #340 - Uninitialized variable fix in SWIG_Python_NonDynamicSetAttr + when using -builtin. + 2013-08-01: wsfulton [Python, Ruby, Ocaml] Apply SF patch #341 - fix a const_cast in generated code that was generating a <:: digraph when using the unary scope operator (::) (global scope) in a template type. diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 7cf9c41fa..df87bb317 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -1742,7 +1742,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyObject *descr; PyObject *encoded_name; descrsetfunc f; - int res; + int res = -1; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { @@ -1765,7 +1765,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { goto done; } - res = -1; descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL)