]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_cbdata.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / tests / stub_cbdata.cc
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
15 void cbdataRegisterWithCacheManager(void) STUB
16 void *cbdataInternalAlloc(cbdata_type, const char *, int sz) {
17 return xcalloc(1, sz);
18 }
19 void *cbdataInternalFree(void *p, const char *, int) {
20 xfree(p);
21 return nullptr;
22 }
23 #if USE_CBDATA_DEBUG
24 void cbdataInternalLockDbg(const void *, const char *, int) STUB
25 void cbdataInternalUnlockDbg(const void *, const char *, int) STUB
26 int cbdataInternalReferenceDoneValidDbg(void **, void **, const char *, int) STUB_RETVAL(0)
27 #else
28 void cbdataInternalLock(const void *) STUB
29 void cbdataInternalUnlock(const void *) STUB
30 int cbdataInternalReferenceDoneValid(void **, void **) STUB_RETVAL(0)
31 #endif
32
33 int cbdataReferenceValid(const void *) STUB_RETVAL(0)
34 cbdata_type cbdataInternalAddType(cbdata_type, const char *, int) STUB_RETVAL(CBDATA_UNKNOWN)
35