mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
lib: move all UNITTEST prototypes to C files
- make extract-unit-protos handle multi-line prototypes - but they need
to be above the implementation
- Prototypes for static functions we use in unit tests should not be in
header files. We generate lib/unitprotos.h for this purpose
- Removed some function wrappers written for unit tests and make them
use UNITTEST function directly.
- Renamed time2str() in the tool to timebuf() since we have the same
name in lib/ and in unit tests they can both be used non-static in a
build.
This reverts commit f95fadd116.
Follow-up to #21010
Closes #21014
This commit is contained in:
parent
7242cea7f6
commit
98d8e82c74
42 changed files with 109 additions and 149 deletions
|
|
@ -181,7 +181,8 @@ void *Curl_uint32_hash_get(struct uint_hash *h, uint32_t id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void uint_hash_clear(struct uint_hash *h)
|
||||
UNITTEST void uint_hash_clear(struct uint_hash *h);
|
||||
UNITTEST void uint_hash_clear(struct uint_hash *h)
|
||||
{
|
||||
if(h && h->table) {
|
||||
struct uint_hash_entry *he, **he_anchor;
|
||||
|
|
@ -198,13 +199,6 @@ static void uint_hash_clear(struct uint_hash *h)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef UNITTESTS
|
||||
UNITTEST void Curl_uint32_hash_clear(struct uint_hash *h)
|
||||
{
|
||||
uint_hash_clear(h);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Curl_uint32_hash_destroy(struct uint_hash *h)
|
||||
{
|
||||
DEBUGASSERT(h->init == CURL_UINT32_HASHINIT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue