File: stub_cbdata.cc

package info (click to toggle)
squid3 3.4.8-6+deb8u5
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 32,116 kB
  • sloc: cpp: 165,380; ansic: 21,998; sh: 12,166; makefile: 5,974; perl: 2,153; sql: 322; awk: 118
file content (30 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "squid.h"
#include "cbdata.h"

#define STUB_API "cbdata.cc"
#include "tests/STUB.h"

void cbdataRegisterWithCacheManager(void) STUB
void *cbdataInternalAlloc(cbdata_type type, const char *, int sz) {
    return xcalloc(1, sz);
}
void *cbdataInternalFree(void *p, const char *, int) {
    xfree(p);
    return nullptr;
}
#if USE_CBDATA_DEBUG
void *cbdataInternalAllocDbg(cbdata_type type, const char *, int) STUB_RETVAL(NULL)
void *cbdataInternalFreeDbg(void *p, const char *, int) STUB_RETVAL(NULL)
void cbdataInternalLockDbg(const void *p, const char *, int) STUB
void cbdataInternalUnlockDbg(const void *p, const char *, int) STUB
int cbdataInternalReferenceDoneValidDbg(void **p, void **tp, const char *, int) STUB_RETVAL(0)
#else
void *cbdataInternalAlloc(cbdata_type type) STUB_RETVAL(NULL)
void *cbdataInternalFree(void *p) STUB_RETVAL(NULL)
void cbdataInternalLock(const void *p) STUB
void cbdataInternalUnlock(const void *p) STUB
int cbdataInternalReferenceDoneValid(void **p, void **tp) STUB_RETVAL(0)
#endif

int cbdataReferenceValid(const void *p) STUB_RETVAL(0)
cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size, FREE * free_func) STUB_RETVAL(CBDATA_UNKNOWN)