diff options
Diffstat (limited to 'fitz/base_object.c')
-rw-r--r-- | fitz/base_object.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fitz/base_object.c b/fitz/base_object.c index ced40414..a0e3ecc0 100644 --- a/fitz/base_object.c +++ b/fitz/base_object.c @@ -57,6 +57,7 @@ fz_obj * fz_new_null(fz_context *ctx) { fz_obj *obj = fz_malloc(ctx, sizeof(fz_obj)); + Memento_label(obj, "fz_obj(null)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_NULL; @@ -67,6 +68,7 @@ fz_obj * fz_new_bool(fz_context *ctx, int b) { fz_obj *obj = fz_malloc(ctx, sizeof(fz_obj)); + Memento_label(obj, "fz_obj(bool)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_BOOL; @@ -78,6 +80,7 @@ fz_obj * fz_new_int(fz_context *ctx, int i) { fz_obj *obj = fz_malloc(ctx, sizeof(fz_obj)); + Memento_label(obj, "fz_obj(int)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_INT; @@ -89,6 +92,7 @@ fz_obj * fz_new_real(fz_context *ctx, float f) { fz_obj *obj = fz_malloc(ctx, sizeof(fz_obj)); + Memento_label(obj, "fz_obj(real)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_REAL; @@ -100,6 +104,7 @@ fz_obj * fz_new_string(fz_context *ctx, char *str, int len) { fz_obj *obj = fz_malloc(ctx, offsetof(fz_obj, u.s.buf) + len + 1); + Memento_label(obj, "fz_obj(string)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_STRING; @@ -113,6 +118,7 @@ fz_obj * fz_new_name(fz_context *ctx, char *str) { fz_obj *obj = fz_malloc(ctx, offsetof(fz_obj, u.n) + strlen(str) + 1); + Memento_label(obj, "fz_obj(name)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_NAME; @@ -124,6 +130,7 @@ fz_obj * fz_new_indirect(fz_context *ctx, int num, int gen, void *xref) { fz_obj *obj = fz_malloc(ctx, sizeof(fz_obj)); + Memento_label(obj, "fz_obj(indirect)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_INDIRECT; @@ -382,6 +389,7 @@ fz_new_array(fz_context *ctx, int initialcap) int i; obj = fz_malloc(ctx, sizeof(fz_obj)); + Memento_label(obj, "fz_obj(array)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_ARRAY; @@ -392,6 +400,7 @@ fz_new_array(fz_context *ctx, int initialcap) fz_try(ctx) { obj->u.a.items = fz_malloc_array(ctx, obj->u.a.cap, sizeof(fz_obj*)); + Memento_label(obj->u.a.items, "fz_obj(array items)"); } fz_catch(ctx) { @@ -537,6 +546,7 @@ fz_new_dict(fz_context *ctx, int initialcap) int i; obj = fz_malloc(ctx, sizeof(fz_obj)); + Memento_label(obj, "fz_obj(dict)"); obj->ctx = ctx; obj->refs = 1; obj->kind = FZ_DICT; @@ -548,6 +558,7 @@ fz_new_dict(fz_context *ctx, int initialcap) fz_try(ctx) { obj->u.d.items = fz_malloc_array(ctx, obj->u.d.cap, sizeof(struct keyval)); + Memento_label(obj->u.d.items, "fz_obj(dict items)"); } fz_catch(ctx) { |