object-introspection/types/folly_iobuf_queue_type.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
684 B
TOML
Raw Permalink Normal View History

2022-12-19 14:37:51 +00:00
[info]
type_name = "folly::IOBufQueue"
2022-12-19 14:37:51 +00:00
ctype = "FOLLY_IOBUFQUEUE_TYPE"
header = "folly/io/IOBufQueue.h"
# Old:
typeName = "folly::IOBufQueue"
matcher = "^folly::IOBufQueue$"
2022-12-19 14:37:51 +00:00
ns = ["folly::IOBufQueue"]
numTemplateParams = 0
2022-12-19 14:37:51 +00:00
replaceTemplateParamIndex = []
[codegen]
decl = """
void getSizeType(const %1% &container, size_t& returnArg);
2022-12-19 14:37:51 +00:00
"""
func = """
void getSizeType(const %1% &container, size_t& returnArg)
2022-12-19 14:37:51 +00:00
{
SAVE_SIZE(sizeof(%1%));
const folly::IOBuf *head = container.front();
2022-12-19 14:37:51 +00:00
SAVE_DATA((uintptr_t)head);
if (head && ctx.pointers.add((uintptr_t)head)) {
2023-04-05 20:55:40 +01:00
SAVE_DATA(1);
getSizeType(*head, returnArg);
} else {
SAVE_DATA(0);
}
2022-12-19 14:37:51 +00:00
}
"""