src/util.c

changeset 181
fa550b550072
parent 178
d581ba87fe2a
equal deleted inserted replaced
180:d942f48dc83a 181:fa550b550072
29 29
30 #include <cx/printf.h> 30 #include <cx/printf.h>
31 #include <inttypes.h> 31 #include <inttypes.h>
32 #include <assert.h> 32 #include <assert.h>
33 33
34 cxmutstr asc_util_gen_name(void *obj, const char *type) { 34 cxmutstr asc_util_gen_name(void *obj) {
35 if (type == NULL) type = "object";
36 assert(obj != NULL); 35 assert(obj != NULL);
37 return cx_asprintf("%s_%" PRIxPTR, type, (uintptr_t)obj); 36 return cx_asprintf("%" PRIxPTR, (uintptr_t)obj);
38 } 37 }

mercurial