mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 19:19:05 +01:00
68290655b1
This change is fully backwards compatible with the old ContainerInfo parser, as it is just adding new fields. The old fields will continue to be used by legacy OICodeGen until that is removed. Also add a README to document the format.
33 lines
673 B
TOML
33 lines
673 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 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);
|
|
}
|
|
}
|
|
"""
|