1 extern void *malloc(__SIZE_TYPE__);
2 typedef struct T T;
3 struct T {
4     void (*destroy)(void *);
5 };
6 void destroy(union { void *this; } __attribute__((transparent_union)));
7 static const typeof(destroy) *_destroy  = (const typeof(destroy)*)destroy;
8 void destroy(void *this);
create_empty(void)9 static T *create_empty(void)
10 {
11   T *this = malloc(sizeof(*this));
12   *this = (typeof(*this)){ _destroy };
13   return this;
14 }
openssl_crl_load(void)15 void openssl_crl_load(void)
16 {
17   T *this = create_empty();
18   destroy(this);
19 }
20