summaryrefslogtreecommitdiff
path: root/ptr_chck.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2008-08-26 23:11:47 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:43 +0400
commit60e21c3690bf4e30c9e082a887580d603115f7d5 (patch)
tree3cc7ef90e78cf1152d18a4c4c53a5d5afbd0e460 /ptr_chck.c
parente1c47cb7d70756e93a1f43b7ac9593d4425f8e9a (diff)
downloadbdwgc-60e21c3690bf4e30c9e082a887580d603115f7d5.tar.gz
2008-08-26 Hans Boehm <Hans.Boehm@hp.com> (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.
Diffstat (limited to 'ptr_chck.c')
-rw-r--r--ptr_chck.c8
1 files changed, 4 insertions, 4 deletions
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);