summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/genstruct.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/script/genstruct.pl b/source3/script/genstruct.pl
index 081b81f510..a6abd718c9 100755
--- a/source3/script/genstruct.pl
+++ b/source3/script/genstruct.pl
@@ -131,12 +131,13 @@ sub parse_elements($$)
print ", $name";
}
- print OFILE "int gen_dump_struct_$name(struct parse_string *, const char *, unsigned);\n";
- print OFILE "int gen_parse_struct_$name(char *, const char *);\n";
+ print OFILE "int gen_dump_struct_$name(TALLOC_CTX *mem_ctx, struct parse_string *, const char *, unsigned);\n";
+ print OFILE "int gen_parse_struct_$name(TALLOC_CTX *mem_ctx, char *, const char *);\n";
print OFILE "static const struct parse_struct pinfo_" . $name . "[] = {\n";
- while ($elements =~ /^.*?([a-z].*?);\s*?(\S*?)\s*?\$(.*)/msi) {
+
+ while ($elements =~ /^.*?([a-z].*?);\s*?(\S*?)\s*?$(.*)/msi) {
my($element) = $1;
my($flags) = $2;
$elements = $3;
@@ -146,11 +147,11 @@ sub parse_elements($$)
print OFILE "{NULL, 0, 0, 0, 0, NULL, 0, NULL, NULL}};\n";
print OFILE "
-int gen_dump_struct_$name(struct parse_string *p, const char *ptr, unsigned indent) {
- return gen_dump_struct(pinfo_$name, p, ptr, indent);
+int gen_dump_struct_$name(TALLOC_CTX *mem_ctx, struct parse_string *p, const char *ptr, unsigned indent) {
+ return gen_dump_struct(mem_ctx, pinfo_$name, p, ptr, indent);
}
-int gen_parse_struct_$name(char *ptr, const char *str) {
- return gen_parse_struct(pinfo_$name, ptr, str);
+int gen_parse_struct_$name(TALLOC_CTX *mem_ctx, char *ptr, const char *str) {
+ return gen_parse_struct(mem_ctx, pinfo_$name, ptr, str);
}
";