265:5c915d01bdc0 | 266:a73674e99e62 |
---|---|
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) { | 34 cxmutstr asc_util_gen_name(const char *prefix) { |
35 assert(obj != NULL); | 35 static unsigned counter = 0; |
36 return cx_asprintf("%" PRIxPTR, (uintptr_t)obj); | 36 return cx_asprintf("%s_gen%u", prefix, ++counter); |
37 } | 37 } |