Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b5d8d5

Browse files
committed
The py_decref macro was incorrect and unnecessary.
1 parent 03efcf2 commit 5b5d8d5

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

Misc/gdbinit

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging
1616
# and http://bugs.python.org/issue8032 for more gdb 7 python information.
1717

18-
# gdb version of Py_DECREF(obj) macro
19-
define py_decref
20-
set $__obj = $arg0
21-
set $__obj->ob_refcnt -= 1
22-
if ($__obj->ob_refcnt == 0)
23-
set $__obj = _Py_Dealloc($__obj)
24-
end
25-
end
26-
2718
# Prints a representation of the object to stderr, along with the
2819
# number of reference counts it current has and the hex address the
2920
# object is allocated at. The argument must be a PyObject*
@@ -49,7 +40,6 @@ define pylocals
4940
set $_names = co->co_varnames
5041
set $_name = _PyUnicode_AsString(PyTuple_GetItem($_names, $_i))
5142
printf "%s:\n", $_name
52-
py_decref $_name
5343
pyo f->f_localsplus[$_i]
5444
end
5545
set $_i = $_i + 1

0 commit comments

Comments
 (0)