mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 19:19:05 +01:00
32 lines
662 B
TOML
32 lines
662 B
TOML
[info]
|
||
typeName = "folly::IOBufQueue"
|
||
matcher = "^folly::IOBufQueue$"
|
||
numTemplateParams = 0
|
||
ctype = "FOLLY_IOBUFQUEUE_TYPE"
|
||
header = "folly/io/IOBufQueue.h"
|
||
ns = ["folly::IOBufQueue"]
|
||
replaceTemplateParamIndex = []
|
||
# allocatorIndex = 0
|
||
# underlyingContainerIndex = 0
|
||
|
||
[codegen]
|
||
decl = """
|
||
void getSizeType(const %1% &t, size_t& returnArg);
|
||
"""
|
||
|
||
func = """
|
||
void getSizeType(const %1% &t, size_t& returnArg)
|
||
{
|
||
SAVE_SIZE(sizeof(%1%));
|
||
|
||
const IOBuf *head = t.front();
|
||
SAVE_DATA((uintptr_t)head);
|
||
if (head && pointers.add((uintptr_t)head)) {
|
||
SAVE_DATA(1);
|
||
getSizeType(*head, returnArg);
|
||
} else {
|
||
SAVE_DATA(0);
|
||
}
|
||
}
|
||
"""
|