summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-03-07 18:26:24 +0000
committerSimo Sorce <idra@samba.org>2003-03-07 18:26:24 +0000
commit8a751c019c21b1925fd352639f8237cf0a6ebac9 (patch)
treec2a906c5500c2386e17e058f6899e64ef8eda54e /source3/script
parent04858cd7025bb4c3fdb34a2795568a6b52004c3b (diff)
downloadsamba-8a751c019c21b1925fd352639f8237cf0a6ebac9.tar.gz
samba-8a751c019c21b1925fd352639f8237cf0a6ebac9.tar.bz2
samba-8a751c019c21b1925fd352639f8237cf0a6ebac9.zip
Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :) (This used to be commit 4c6d461a8572f03cd33cba95500cc837638b732c)
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);
}
";