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 } |