mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Make buf_datalen() mockable
This commit is contained in:
parent
8719f8ff09
commit
a2de0a1034
@ -559,8 +559,8 @@ buf_clear(buf_t *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Return the number of bytes stored in <b>buf</b> */
|
/** Return the number of bytes stored in <b>buf</b> */
|
||||||
size_t
|
MOCK_IMPL(size_t,
|
||||||
buf_datalen(const buf_t *buf)
|
buf_datalen, (const buf_t *buf))
|
||||||
{
|
{
|
||||||
return buf->datalen;
|
return buf->datalen;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ void buf_shrink(buf_t *buf);
|
|||||||
size_t buf_shrink_freelists(int free_all);
|
size_t buf_shrink_freelists(int free_all);
|
||||||
void buf_dump_freelist_sizes(int severity);
|
void buf_dump_freelist_sizes(int severity);
|
||||||
|
|
||||||
size_t buf_datalen(const buf_t *buf);
|
MOCK_DECL(size_t, buf_datalen, (const buf_t *buf));
|
||||||
size_t buf_allocation(const buf_t *buf);
|
size_t buf_allocation(const buf_t *buf);
|
||||||
size_t buf_slack(const buf_t *buf);
|
size_t buf_slack(const buf_t *buf);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user