GC_API void GC_CALL GC_debug_change_stubborn(const void *p)
{
- const void * q = GC_base((void *)p);
+ const void * q = GC_base_C(p);
hdr * hhdr;
if (q == 0) {
GC_API void GC_CALL GC_debug_end_stubborn_change(const void *p)
{
- const void * q = GC_base((void *)p);
+ const void * q = GC_base_C(p);
hdr * hhdr;
if (q == 0) {
{
ptr_t base;
- base = (ptr_t)GC_base((void *)link);
+ base = (ptr_t)GC_base(link);
if (base == 0)
ABORT("Bad arg to GC_register_disappearing_link");
return(GC_general_register_disappearing_link(link, base));
if (((word)link & (ALIGNMENT-1)) || link == NULL)
ABORT("Bad arg to GC_general_register_disappearing_link");
LOCK();
- GC_ASSERT(obj != NULL && GC_base((void *)obj) == obj);
+ GC_ASSERT(obj != NULL && GC_base_C(obj) == obj);
if (log_dl_table_size == -1
|| GC_dl_entries > ((word)1 << log_dl_table_size)) {
GC_grow_table((struct hash_chain_entry ***)(&dl_head),
GC_bytes_finalized +=
curr_fo -> fo_object_size
+ sizeof(struct finalizable_object);
- GC_ASSERT(GC_is_marked(GC_base((ptr_t)curr_fo)));
+ GC_ASSERT(GC_is_marked(GC_base(curr_fo)));
curr_fo = next_fo;
} else {
prev_fo = curr_fo;
GC_INNER void GC_dirty_init(void);
#endif /* !GC_DISABLE_INCREMENTAL */
+/* Same as GC_base but excepts and returns a pointer to const object. */
+#define GC_base_C(p) ((const void *)GC_base((/* no const */ void *)(p)))
+
/* Stubborn objects: */
void GC_read_changed(void); /* Analogous to GC_read_dirty */
GC_bool GC_page_was_changed(struct hblk * h);