mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 19:19:05 +01:00
1334e08d05
Things can fail if there are only IOBufQueue objects but no IOBuf object. Just specify the namespace too.
33 lines
680 B
TOML
33 lines
680 B
TOML
[info]
|
|
type_name = "folly::IOBufQueue"
|
|
ctype = "FOLLY_IOBUFQUEUE_TYPE"
|
|
header = "folly/io/IOBufQueue.h"
|
|
|
|
# Old:
|
|
typeName = "folly::IOBufQueue"
|
|
matcher = "^folly::IOBufQueue$"
|
|
ns = ["folly::IOBufQueue"]
|
|
numTemplateParams = 0
|
|
replaceTemplateParamIndex = []
|
|
|
|
[codegen]
|
|
decl = """
|
|
void getSizeType(const %1% &container, size_t& returnArg);
|
|
"""
|
|
|
|
func = """
|
|
void getSizeType(const %1% &container, size_t& returnArg)
|
|
{
|
|
SAVE_SIZE(sizeof(%1%));
|
|
|
|
const folly::IOBuf *head = container.front();
|
|
SAVE_DATA((uintptr_t)head);
|
|
if (head && pointers.add((uintptr_t)head)) {
|
|
SAVE_DATA(1);
|
|
getSizeType(*head, returnArg);
|
|
} else {
|
|
SAVE_DATA(0);
|
|
}
|
|
}
|
|
"""
|