adding better debugging for zero-sized object warning

This commit is contained in:
Alex Shinn 2018-02-16 17:01:21 +09:00
parent dc76aee1d6
commit e5f6c1bbba

2
gc.c
View file

@ -99,7 +99,7 @@ SEXP_API sexp_uint_t sexp_allocated_bytes (sexp ctx, sexp x) {
res = sexp_type_size_of_object(t, x) + SEXP_GC_PAD;
#if SEXP_USE_DEBUG_GC
if (res == 0) {
fprintf(stderr, SEXP_BANNER("%p zero-size object: %p"), ctx, x);
fprintf(stderr, SEXP_BANNER("%p zero-size object: %p (type tag: %d)"), ctx, x, sexp_pointer_tag(x));
return 1;
}
#endif