From: Yann Collet Date: Fri, 2 Jun 2017 18:36:47 +0000 (-0700) Subject: added POOL_sizeof() for single-thread X-Git-Tag: v1.3.0~1^2~17^2~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6056e4c3eb55ab7c5000818a4457241b9ccb2019;p=thirdparty%2Fzstd.git added POOL_sizeof() for single-thread --- diff --git a/lib/common/pool.c b/lib/common/pool.c index 05adcf1ce..749fa4f2f 100644 --- a/lib/common/pool.c +++ b/lib/common/pool.c @@ -198,4 +198,9 @@ void POOL_add(void *ctx, POOL_function function, void *opaque) { function(opaque); } +size_t POOL_sizeof(POOL_ctx *ctx) { + if (ctx==NULL) return 0; /* supports sizeof NULL */ + return sizeof(*ctx); +} + #endif /* ZSTD_MULTITHREAD */