FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Change GC refcount to Py_ssize_t. · python/cpython@6db0e00 · GitHub

Repository navigation

Commit 6db0e00

Browse files
committed
Change GC refcount to Py_ssize_t.
1 parent 056a69c commit 6db0e00

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎Include/objimpl.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ typedef union _gc_head {
250250
struct {
251251
union _gc_head *gc_next;
252252
union _gc_head *gc_prev;
253-
int gc_refs;
253+
Py_ssize_t gc_refs;
254254
} gc;
255255
long double dummy; /* force worst-case alignment */
256256
} PyGC_Head;

‎Modules/gcmodule.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ visit_reachable(PyObject *op, PyGC_Head *reachable)
303303
{
304304
if (PyObject_IS_GC(op)) {
305305
PyGC_Head *gc = AS_GC(op);
306-
const int gc_refs = gc->gc.gc_refs;
306+
const Py_ssize_t gc_refs = gc->gc.gc_refs;
307307

308308
if (gc_refs == 0) {
309309
/* This is in move_unreachable's 'young' list, but

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL