OLD | NEW |
1 /* zutil.c -- target dependent utility functions for the compression library | 1 /* zutil.c -- target dependent utility functions for the compression library |
2 * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly. | 2 * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly. |
3 * For conditions of distribution and use, see copyright notice in zlib.h | 3 * For conditions of distribution and use, see copyright notice in zlib.h |
4 */ | 4 */ |
5 | 5 |
6 /* @(#) $Id$ */ | 6 /* @(#) $Id$ */ |
7 | 7 |
8 #include "zutil.h" | 8 #include "zutil.h" |
9 #ifndef Z_SOLO | 9 #ifndef Z_SOLO |
10 # include "gzguts.h" | 10 # include "gzguts.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 { | 319 { |
320 free(ptr); | 320 free(ptr); |
321 if (opaque) return; /* make compiler happy */ | 321 if (opaque) return; /* make compiler happy */ |
322 } | 322 } |
323 | 323 |
324 #endif /* MY_ZCALLOC */ | 324 #endif /* MY_ZCALLOC */ |
325 | 325 |
326 #endif /* !Z_SOLO */ | 326 #endif /* !Z_SOLO */ |
327 #endif /* 0 */ | 327 #endif /* 0 */ |
328 | 328 |
329 #if defined(_FX_MANAGED_CODE_) && defined(__cplusplus) | |
330 extern "C" { | |
331 #endif | |
332 | |
333 extern void* FXMEM_DefaultAlloc(size_t, int); | 329 extern void* FXMEM_DefaultAlloc(size_t, int); |
334 extern void FXMEM_DefaultFree(void*, int); | 330 extern void FXMEM_DefaultFree(void*, int); |
335 | 331 |
336 #if defined(_FX_MANAGED_CODE_) && defined(__cplusplus) | |
337 } | |
338 #endif | |
339 | |
340 /* XYQ 2007-1-19 */ | 332 /* XYQ 2007-1-19 */ |
341 voidpf zcalloc(voidpf opaque, unsigned items, unsigned size) | 333 voidpf zcalloc(voidpf opaque, unsigned items, unsigned size) |
342 { | 334 { |
343 return FXMEM_DefaultAlloc(items * size, 0); | 335 return FXMEM_DefaultAlloc(items * size, 0); |
344 } | 336 } |
345 | 337 |
346 void zcfree(voidpf opaque, voidpf ptr) | 338 void zcfree(voidpf opaque, voidpf ptr) |
347 { | 339 { |
348 FXMEM_DefaultFree(ptr, 0); | 340 FXMEM_DefaultFree(ptr, 0); |
349 } | 341 } |
OLD | NEW |