Permalink
Browse files

Make gc_handle a non-pointer type and fix some tagging bugs.

  • Loading branch information...
1 parent 2eafef3 commit bbc7d34f8cbaf3ec24ee6d95aad1e8c58ab4d531 @nelhage committed Jan 2, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 gc.c
  2. +2 −2 gc.h
View
@@ -231,7 +231,7 @@ void gc_relocate(gc_handle *v) {
reloc = _gc_alloc(len);
memcpy(reloc, val, sizeof(uintptr_t) * len);
val->ops = BROKEN_HEART;
- *v = val->data[0] = reloc;
+ *v = val->data[0] = TAG_POINTER(reloc);
}
void gc_relocate_root() {
View
@@ -11,11 +11,11 @@ struct gc_ops;
struct gc_chunk;
typedef intptr_t gc_int;
-typedef struct gc_chunk* gc_handle;
+typedef uint32_t gc_handle;
typedef struct gc_chunk {
struct gc_ops * ops;
- void *data[0];
+ gc_handle data[0];
} gc_chunk;
typedef void (*gc_relocate_op)(gc_chunk*);

0 comments on commit bbc7d34

Please sign in to comment.