1 | /* |
---|
2 | * Copyright (C) 1996-2015 The Squid Software Foundation and contributors |
---|
3 | * |
---|
4 | * Squid software is distributed under GPLv2+ license and includes |
---|
5 | * contributions from numerous individuals and organizations. |
---|
6 | * Please see the COPYING and CONTRIBUTORS files for details. |
---|
7 | */ |
---|
8 | |
---|
9 | #include "squid.h" |
---|
10 | #include "cbdata.h" |
---|
11 | |
---|
12 | #define STUB_API "cbdata.cc" |
---|
13 | #include "tests/STUB.h" |
---|
14 | |
---|
15 | void cbdataRegisterWithCacheManager(void) STUB |
---|
16 | void *cbdataInternalAlloc(cbdata_type type, const char *, int sz) { |
---|
17 | return xcalloc(1, sz); |
---|
18 | } |
---|
19 | void *cbdataInternalFree(void *p, const char *, int) { |
---|
20 | xfree(p); |
---|
21 | return NULL; |
---|
22 | } |
---|
23 | #if USE_CBDATA_DEBUG |
---|
24 | void *cbdataInternalAllocDbg(cbdata_type type, const char *, int) STUB_RETVAL(NULL) |
---|
25 | void *cbdataInternalFreeDbg(void *p, const char *, int) STUB_RETVAL(NULL) |
---|
26 | void cbdataInternalLockDbg(const void *p, const char *, int) STUB |
---|
27 | void cbdataInternalUnlockDbg(const void *p, const char *, int) STUB |
---|
28 | int cbdataInternalReferenceDoneValidDbg(void **p, void **tp, const char *, int) STUB_RETVAL(0) |
---|
29 | #else |
---|
30 | void *cbdataInternalAlloc(cbdata_type type) STUB_RETVAL(NULL) |
---|
31 | void *cbdataInternalFree(void *p) STUB_RETVAL(NULL) |
---|
32 | void cbdataInternalLock(const void *p) STUB |
---|
33 | void cbdataInternalUnlock(const void *p) STUB |
---|
34 | int cbdataInternalReferenceDoneValid(void **p, void **tp) STUB_RETVAL(0) |
---|
35 | #endif |
---|
36 | |
---|
37 | int cbdataReferenceValid(const void *p) STUB_RETVAL(0) |
---|
38 | cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, FREE * free_func) STUB_RETVAL(CBDATA_UNKNOWN) |
---|
39 | |
---|