1 /*
2  * Copyright (C) 1996-2021 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 
cbdataRegisterWithCacheManager(void)15 void cbdataRegisterWithCacheManager(void) STUB
16 void *cbdataInternalAlloc(cbdata_type type, const char *, int sz) {
17 //STUB_RETVAL(NULL)
18     return xcalloc(1, sz);
19 }
cbdataInternalFree(void * p,const char *,int)20 void *cbdataInternalFree(void *p, const char *, int) {
21     xfree(p);
22     return nullptr;
23 }
24 #if USE_CBDATA_DEBUG
25 void cbdataInternalLockDbg(const void *p, const char *, int) STUB
26 void cbdataInternalUnlockDbg(const void *p, const char *, int) STUB
27 int cbdataInternalReferenceDoneValidDbg(void **p, void **tp, const char *, int) STUB_RETVAL(0)
28 #else
29 void cbdataInternalLock(const void *p) STUB
30 void cbdataInternalUnlock(const void *p) STUB
31 int cbdataInternalReferenceDoneValid(void **p, void **tp) STUB_RETVAL(0)
32 #endif
33 
34 int cbdataReferenceValid(const void *p) STUB_RETVAL(0)
35 cbdata_type cbdataInternalAddType(cbdata_type, const char *, int) STUB_RETVAL(CBDATA_UNKNOWN)
36 
37