diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-20 06:20:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:47 -0500 |
commit | 240ca36cf2a3ceb89e46b73486865a4a57339c89 (patch) | |
tree | 7b6bd88d310719d197103a6fb2eae7f8980243ff /source4/build/pidl/Parse/Pidl/Samba | |
parent | a4428c814ad90884ac0b442233d318f061f221bc (diff) | |
download | samba-240ca36cf2a3ceb89e46b73486865a4a57339c89.tar.gz samba-240ca36cf2a3ceb89e46b73486865a4a57339c89.tar.bz2 samba-240ca36cf2a3ceb89e46b73486865a4a57339c89.zip |
r8635: make object inheritance with the builtin objects easy by allowing
callers to optionally supply an existing object to add the properties
to. So you can do:
var rpc = samr_init();
lsa_init(rpc);
and you end up with 'rpc' having both the samr and lsa functions and
constants available.
(This used to be commit 6a1ed328e27769bd52899fc2437a43fc17104eff)
Diffstat (limited to 'source4/build/pidl/Parse/Pidl/Samba')
-rw-r--r-- | source4/build/pidl/Parse/Pidl/Samba/EJS.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/build/pidl/Parse/Pidl/Samba/EJS.pm b/source4/build/pidl/Parse/Pidl/Samba/EJS.pm index 0aa8de7c93..370db6d0e4 100644 --- a/source4/build/pidl/Parse/Pidl/Samba/EJS.pm +++ b/source4/build/pidl/Parse/Pidl/Samba/EJS.pm @@ -692,19 +692,18 @@ sub EjsInterface($$) pidl "static int ejs_$name\_init(int eid, int argc, struct MprVar **argv)"; pidl "{"; indent; - pidl "struct MprVar obj = mprObject(\"$name\");"; + pidl "struct MprVar *obj = mprInitObject(eid, \"$name\", argc, argv);"; foreach (@fns) { - pidl "mprSetCFunction(&obj, \"$_\", ejs_$_);"; + pidl "mprSetCFunction(obj, \"$_\", ejs_$_);"; } foreach my $v (keys %constants) { my $value = $constants{$v}; if (substr($value, 0, 1) eq "\"") { - pidl "mprSetVar(&obj, \"$v\", mprString($value));"; + pidl "mprSetVar(obj, \"$v\", mprString($value));"; } else { - pidl "mprSetVar(&obj, \"$v\", mprCreateNumberVar($value));"; + pidl "mprSetVar(obj, \"$v\", mprCreateNumberVar($value));"; } } - pidl "mpr_Return(eid, obj);"; pidl "return 0;"; deindent; pidl "}\n"; |