Commit [r12611] Maximize Restore History

Fix bindings/python/plplotcmodule.i so that all -Wuninitialized (with

no optimization) warnings for the C code generated by swig are
removed. The trick was to initialize the appropriate variables to
NULL, and then use Py_CLEAR (which is a no-op if there is a NULL
argument) rather than the old-fashioned and error-prone Py_DECREF and
Py_XDECREF (see http://docs.python.org/2/c-api/refcounting.html) to
adjust the reference count properly in both the normal return path and
in the return path that cleans up after an error.

ToDo. I have since discovered that -O3 -Wuninitialized finds more
uninitialized issues than the -O0 case. I plan to fix those warnings
in a later commit.

airwin 2013-10-20

changed /trunk/bindings/python/plplotcmodule.i
/trunk/bindings/python/plplotcmodule.i Diff Switch to side-by-side view
Loading...