From 60e21c3690bf4e30c9e082a887580d603115f7d5 Mon Sep 17 00:00:00 2001 From: hboehm Date: Tue, 26 Aug 2008 23:11:47 +0000 Subject: 2008-08-26 Hans Boehm (with help from Marco Maggi) * configure.ac: Check for gc-debug earlier; replace remaining full-debug tests. * configure: Regenerate. * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr): Use signed offset type. Use ptr_t internally. * doc/gcinterface.html: Update LOCAL_MALLOC description. * doc/README.autoconf, doc/leak.html, doc/README.DGUX386: Fix full-debug reference. * include/gc.h: Rewrite GC_..._INCR and friends. * tests/test.c: Minimally test GC_..._INCR and friends. --- ptr_chck.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ptr_chck.c') diff --git a/ptr_chck.c b/ptr_chck.c index 6d5637fa..9d8faa00 100644 --- a/ptr_chck.c +++ b/ptr_chck.c @@ -255,10 +255,10 @@ fail: } -GC_API void * GC_pre_incr (void **p, size_t how_much) +GC_API void * GC_pre_incr (void **p, ptrdiff_t how_much) { void * initial = *p; - void * result = GC_same_obj((void *)((word)initial + how_much), initial); + void * result = GC_same_obj((void *)((ptr_t)initial + how_much), initial); if (!GC_all_interior_pointers) { (void) GC_is_valid_displacement(result); @@ -266,10 +266,10 @@ GC_API void * GC_pre_incr (void **p, size_t how_much) return (*p = result); } -GC_API void * GC_post_incr (void **p, size_t how_much) +GC_API void * GC_post_incr (void **p, ptrdiff_t how_much) { void * initial = *p; - void * result = GC_same_obj((void *)((word)initial + how_much), initial); + void * result = GC_same_obj((void *)((ptr_t)initial + how_much), initial); if (!GC_all_interior_pointers) { (void) GC_is_valid_displacement(result); -- cgit v1.2.1