From: Rudolf Polzer Date: Tue, 25 Oct 2011 14:10:05 +0000 (+0200) Subject: export setmallocfuncs properly X-Git-Tag: v0.5~11 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fd0_blind_id.git;a=commitdiff_plain;h=f6aeffa5a621516e73fa72d2471c2a77d8a831a2 export setmallocfuncs properly --- diff --git a/d0.h b/d0.h index 9ccf540..a6b551b 100644 --- a/d0.h +++ b/d0.h @@ -56,8 +56,8 @@ extern d0_destroymutex_t *d0_destroymutex; extern d0_lockmutex_t *d0_lockmutex; extern d0_unlockmutex_t *d0_unlockmutex; -D0_EXPORT void d0_setmallocfuncs(d0_malloc_t *m, d0_free_t *f); -D0_EXPORT void d0_setmutexfuncs(d0_createmutex_t *c, d0_destroymutex_t *d, d0_lockmutex_t *l, d0_unlockmutex_t *u); +void d0_setmallocfuncs(d0_malloc_t *m, d0_free_t *f); +void d0_setmutexfuncs(d0_createmutex_t *c, d0_destroymutex_t *d, d0_lockmutex_t *l, d0_unlockmutex_t *u); extern const char *d0_bsd_license_notice; diff --git a/d0_blind_id.c b/d0_blind_id.c index 58cdd5e..f33084c 100644 --- a/d0_blind_id.c +++ b/d0_blind_id.c @@ -1417,3 +1417,12 @@ void d0_blind_id_util_sha256(char *out, const char *in, size_t n) SHA256_Update(&context, (const unsigned char *) in, n); return SHA256_Final((unsigned char *) out, &context); } + +void d0_blind_id_setmallocfuncs(d0_malloc_t *m, d0_free_t *f) +{ + d0_setmallocfuncs(m, f); +} +void d0_blind_id_setmutexfuncs(d0_createmutex_t *c, d0_destroymutex_t *d, d0_lockmutex_t *l, d0_unlockmutex_t *u) +{ + d0_setmutexfuncs(c, d, l, u); +} diff --git a/d0_blind_id.h b/d0_blind_id.h index bea9245..cbb0b2c 100644 --- a/d0_blind_id.h +++ b/d0_blind_id.h @@ -82,4 +82,8 @@ D0_EXPORT void d0_blind_id_SHUTDOWN(void); D0_EXPORT void d0_blind_id_util_sha256(char *out, const char *in, size_t n); +// for exporting +D0_EXPORT void d0_blind_id_setmallocfuncs(d0_malloc_t *m, d0_free_t *f); +D0_EXPORT void d0_blind_id_setmutexfuncs(d0_createmutex_t *c, d0_destroymutex_t *d, d0_lockmutex_t *l, d0_unlockmutex_t *u); + #endif