46 #define SU_HOME_T struct su_home_s
51 typedef struct su_block_s su_block_t;
59 su_block_t *suh_blocks;
63 #define SU_HOME_INIT(obj) { 0, NULL, NULL }
66 __attribute__((__malloc__));
74 SU_DLL
int su_home_desctructor(
su_home_t *,
void (*)(
void *));
75 #ifndef su_home_desctructor
77 #define su_home_desctructor(home, destructor) \
78 su_home_destructor((home), (destructor))
82 __attribute__((__malloc__));
92 #define SU_HOME_AUTO_SIZE(n) \
93 (((n) + ((sizeof(su_home_t) + 7) & (size_t)~8) + \
94 ((3 * sizeof (void *) + 4 * sizeof(unsigned) + \
95 7 * (sizeof (long) + sizeof(void *)) + 7) & (size_t)~8)) \
119 __attribute__((__malloc__));
121 __attribute__((__malloc__));
123 __attribute__((__malloc__));
125 __attribute__((__malloc__));
129 __attribute__((__malloc__));
131 __attribute__((__malloc__));
133 __attribute__((__malloc__));
136 __attribute__((__malloc__, __sentinel__ (0)));
138 SU_DLL
char *su_sprintf(
su_home_t *home,
char const *fmt, ...)
139 __attribute__ ((__malloc__, __format__ (printf, 2, 3)));
141 SU_DLL
char *su_vsprintf(
su_home_t *home,
char const *fmt, va_list ap)
142 __attribute__((__malloc__));
145 SU_DLL
void su_free(
su_home_t *h,
void *);
148 SU_DLL
int su_home_is_threadsafe(
su_home_t const *home);
154 __attribute__((__malloc__));
155 SU_DLL
void su_home_destroy(
su_home_t *h);
157 #define su_home_zap(h) su_home_unref((h))