if (argc != 2)
return 1;
- if (strcmp(argv[1], "depends") == 0)
+ if (strcmp(argv[1], "depends") == 0) {
+ printf("typesafe_cb\n");
return 0;
+ }
return 1;
}
#include <stdio.h>
#include <stdarg.h>
#include "config.h"
+#include "typesafe_cb/typesafe_cb.h"
/*
this uses a little trick to allow __LINE__ to be stringified
* talloc, talloc_free
*/
#define talloc_set_destructor(ptr, function) \
- do { \
- int (*_talloc_destructor_fn)(_TALLOC_TYPEOF(ptr)) = (function); \
- _talloc_set_destructor((ptr), (int (*)(void *))_talloc_destructor_fn); \
- } while(0)
+ _talloc_set_destructor((ptr), typesafe_cb(int, (function), (ptr)))
/**
* talloc_zero - allocate zeroed dynamic memory for a type