]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
The py_decref macro was incorrect and unnecessary.
authorGregory P. Smith <greg@mad-scientist.com>
Sun, 17 Oct 2010 18:59:56 +0000 (18:59 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Sun, 17 Oct 2010 18:59:56 +0000 (18:59 +0000)
Misc/gdbinit

index f87881e8d697762f1df3c87db6a3eec8b3d94f27..ba60a7a2aae8f0e454f3eb9997d85b65e30fbafa 100644 (file)
 # See https://fedoraproject.org/wiki/Features/EasierPythonDebugging
 # and http://bugs.python.org/issue8032 for more gdb 7 python information.
 
-# gdb version of Py_DECREF(obj) macro
-define py_decref
-    set $__obj = $arg0
-    set $__obj->ob_refcnt -= 1
-    if ($__obj->ob_refcnt == 0)
-        set $__obj = _Py_Dealloc($__obj)
-    end
-end
-
 # Prints a representation of the object to stderr, along with the
 # number of reference counts it current has and the hex address the
 # object is allocated at.  The argument must be a PyObject*
@@ -49,7 +40,6 @@ define pylocals
            set $_names = co->co_varnames
            set $_name = _PyUnicode_AsString(PyTuple_GetItem($_names, $_i))
            printf "%s:\n", $_name
-            py_decref $_name
             pyo f->f_localsplus[$_i]
        end
         set $_i = $_i + 1