Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
721a6b51
Commit
721a6b51
authored
Mar 29, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dusty debugging macros
parent
d8a58929
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
Include/object.h
Include/object.h
+5
-5
Objects/object.c
Objects/object.c
+1
-1
Objects/stringobject.c
Objects/stringobject.c
+1
-1
Objects/tupleobject.c
Objects/tupleobject.c
+1
-1
Python/ceval.c
Python/ceval.c
+1
-1
Python/pythonrun.c
Python/pythonrun.c
+2
-2
No files found.
Include/object.h
View file @
721a6b51
...
...
@@ -306,17 +306,17 @@ extern void inc_count Py_PROTO((PyTypeObject *));
#endif
#ifdef Py_REF_DEBUG
extern
long
ref_t
otal
;
extern
long
_Py_RefT
otal
;
#ifndef Py_TRACE_REFS
#ifdef COUNT_ALLOCS
#define _Py_NewReference(op) (inc_count((op)->ob_type),
ref_t
otal++, (op)->ob_refcnt = 1)
#define _Py_NewReference(op) (inc_count((op)->ob_type),
_Py_RefT
otal++, (op)->ob_refcnt = 1)
#else
#define _Py_NewReference(op) (
ref_t
otal++, (op)->ob_refcnt = 1)
#define _Py_NewReference(op) (
_Py_RefT
otal++, (op)->ob_refcnt = 1)
#endif
#endif
#define Py_INCREF(op) (
ref_t
otal++, (op)->ob_refcnt++)
#define Py_INCREF(op) (
_Py_RefT
otal++, (op)->ob_refcnt++)
#define Py_DECREF(op) \
if (--
ref_t
otal, --(op)->ob_refcnt != 0) \
if (--
_Py_RefT
otal, --(op)->ob_refcnt != 0) \
; \
else \
_Py_Dealloc(op)
...
...
Objects/object.c
View file @
721a6b51
...
...
@@ -26,7 +26,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "allobjects.h"
#if
def REF_DEBUG
#if
defined( Py_TRACE_REFS ) || defined( Py_REF_DEBUG )
long
ref_total
;
#endif
...
...
Objects/stringobject.c
View file @
721a6b51
...
...
@@ -508,7 +508,7 @@ resizestring(pv, newsize)
}
/* XXX UNREF/NEWREF interface should be more symmetrical */
#ifdef REF_DEBUG
--
ref_t
otal
;
--
_Py_RefT
otal
;
#endif
UNREF
(
v
);
*
pv
=
(
object
*
)
...
...
Objects/tupleobject.c
View file @
721a6b51
...
...
@@ -419,7 +419,7 @@ resizetuple(pv, newsize, last_is_sticky)
return
0
;
/* XXX UNREF/NEWREF interface should be more symmetrical */
#ifdef REF_DEBUG
--
ref_t
otal
;
--
_Py_RefT
otal
;
#endif
UNREF
(
v
);
if
(
last_is_sticky
&&
sizediff
<
0
)
{
...
...
Python/ceval.c
View file @
721a6b51
...
...
@@ -288,7 +288,7 @@ eval_code(co, globals, locals, owner, arg)
#ifdef LLTRACE
int
lltrace
;
#endif
#if
def DEBUG
#if
defined( DEBUG ) || defined( LLTRACE )
/* Make it easier to find out where we are with dbx */
char
*
filename
=
getstringvalue
(
co
->
co_filename
);
#endif
...
...
Python/pythonrun.c
View file @
721a6b51
...
...
@@ -155,7 +155,7 @@ run_tty_loop(fp, filename)
for
(;;)
{
ret
=
run_tty_1
(
fp
,
filename
);
#ifdef REF_DEBUG
fprintf
(
stderr
,
"[%ld refs]
\n
"
,
ref_t
otal
);
fprintf
(
stderr
,
"[%ld refs]
\n
"
,
_Py_RefT
otal
);
#endif
if
(
ret
==
E_EOF
)
return
0
;
...
...
@@ -664,7 +664,7 @@ goaway(sts)
err_clear
();
#ifdef REF_DEBUG
fprintf
(
stderr
,
"[%ld refs]
\n
"
,
ref_t
otal
);
fprintf
(
stderr
,
"[%ld refs]
\n
"
,
_Py_RefT
otal
);
#endif
#ifdef TRACE_REFS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment