object-introspection/types/folly_iobuf_queue_type.toml
2023-04-18 16:04:47 +02:00

32 lines
662 B
TOML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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);
}
}
"""