Skip to content

Commit

Permalink
Make gc_handle a non-pointer type and fix some tagging bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Jan 2, 2009
1 parent 2eafef3 commit bbc7d34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gc.c
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions gc.h
Expand Up @@ -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*);
Expand Down

0 comments on commit bbc7d34

Please sign in to comment.