From 28a967de75ebd97d44a78b6af4a83183222bd004 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Thu, 30 Sep 2004 14:12:10 +0200 Subject: [PATCH] Use sub_ref in some places to play nice with dmalloc. Rev: src/gc.c:1.261 --- src/gc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gc.c b/src/gc.c index fd1817ce91..ac9052458c 100644 --- a/src/gc.c +++ b/src/gc.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: gc.c,v 1.260 2004/09/28 16:56:00 mast Exp $ +|| $Id: gc.c,v 1.261 2004/09/30 12:12:10 mast Exp $ */ #include "global.h" @@ -2438,7 +2438,7 @@ live_recurse: /* A thing previously popped as dead is now being marked live. * Have to remove the extra ref added by gc_cycle_pop(). */ gc_free_extra_ref(x); - if (!--*(INT32 *) x) { + if (!sub_ref ((struct ref_dummy *) x)) { #ifdef PIKE_DEBUG gc_fatal(x, 0, "Thing got zero refs after removing the dead gc ref.\n"); #endif @@ -2605,7 +2605,7 @@ int gc_do_free(void *a) return 1; else { gc_free_extra_ref (a); - --*(INT32 *) a; + sub_ref ((struct ref_dummy *) a); } } return 0; -- GitLab