2022-12-19 14:37:51 +00:00
|
|
|
[info]
|
2023-05-23 22:26:38 +01:00
|
|
|
type_name = "folly::IOBufQueue"
|
2022-12-19 14:37:51 +00:00
|
|
|
ctype = "FOLLY_IOBUFQUEUE_TYPE"
|
|
|
|
header = "folly/io/IOBufQueue.h"
|
2023-05-23 22:26:38 +01:00
|
|
|
|
|
|
|
# Old:
|
|
|
|
typeName = "folly::IOBufQueue"
|
|
|
|
matcher = "^folly::IOBufQueue$"
|
2022-12-19 14:37:51 +00:00
|
|
|
ns = ["folly::IOBufQueue"]
|
2023-05-23 22:26:38 +01:00
|
|
|
numTemplateParams = 0
|
2022-12-19 14:37:51 +00:00
|
|
|
replaceTemplateParamIndex = []
|
|
|
|
|
|
|
|
[codegen]
|
|
|
|
decl = """
|
2023-05-23 22:26:38 +01:00
|
|
|
void getSizeType(const %1% &container, size_t& returnArg);
|
2022-12-19 14:37:51 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
func = """
|
2023-05-23 22:26:38 +01:00
|
|
|
void getSizeType(const %1% &container, size_t& returnArg)
|
2022-12-19 14:37:51 +00:00
|
|
|
{
|
|
|
|
SAVE_SIZE(sizeof(%1%));
|
|
|
|
|
2023-07-19 00:59:36 +01:00
|
|
|
const folly::IOBuf *head = container.front();
|
2022-12-19 14:37:51 +00:00
|
|
|
SAVE_DATA((uintptr_t)head);
|
2023-11-16 15:34:03 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
"""
|