Commit 44381929 authored by Ondřej Surý's avatar Ondřej Surý

We need to wrap isc__mem_putanddetach in tkey_test.c unit too now

parent a6dcdc53
......@@ -234,7 +234,12 @@ time_test@EXEEXT@: time_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LDFLAGS} -o $@ time_test.@O@ dnstest.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
WRAP_OPTIONS = -Wl,--wrap=isc__mem_put,--wrap=isc__mem_get,--wrap=isc_mem_attach,--wrap=isc_mem_detach
tkey_test@EXEEXT@: WRAP_OPTIONS = \
-Wl,--wrap=isc__mem_put \
-Wl,--wrap=isc__mem_get \
-Wl,--wrap=isc_mem_attach \
-Wl,--wrap=isc_mem_detach \
-Wl,--wrap=isc__mem_putanddetach
tkey_test@EXEEXT@: tkey_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
if test "${LD_WRAP_TESTS}" = true; then WRAP="${WRAP_OPTIONS}"; fi; \
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \
......
......@@ -42,6 +42,8 @@ void
__wrap_isc_mem_attach(isc_mem_t *source0, isc_mem_t **targetp);
void
__wrap_isc_mem_detach(isc_mem_t **ctxp);
void
__wrap_isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size);
void *
__wrap_isc__mem_get(isc_mem_t *mctx, size_t size)
......@@ -74,6 +76,14 @@ __wrap_isc_mem_detach(isc_mem_t **ctxp) {
*ctxp = NULL;
}
void
__wrap_isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size) {
isc_mem_t *ctx = *ctxp;
__wrap_isc__mem_put(ctx, ptr, size);
__wrap_isc_mem_detach(ctxp);
}
#if ISC_MEM_TRACKLINES
#define FLARG , const char *file, unsigned int line
#else
......@@ -106,6 +116,13 @@ isc_mem_detach(isc_mem_t **ctxp) {
__wrap_isc_mem_detach(ctxp);
}
__attribute__((weak)) void
isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG){
UNUSED(file);
UNUSED(line);
__wrap_isc__mem_putanddetach(ctxp, ptr, size);
}
static int
_setup(void **state) {
dns_tkeyctx_t *tctx = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment