git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
804aaad
)
pidl: Factor out generation of interface type name.
author
Jelmer Vernooij
<jelmer@samba.org>
Thu, 2 Sep 2010 22:35:29 +0000
(
00:35
+0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Thu, 2 Sep 2010 22:35:29 +0000
(
00:35
+0200)
pidl/lib/Parse/Pidl/Samba4/Python.pm
patch
|
blob
|
history
diff --git
a/pidl/lib/Parse/Pidl/Samba4/Python.pm
b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index e9956d32d97eeb0d890591ecff7c29ef9487b52b..64ddf4a925e27b3ae56f8d4639d71e92f2a7b1f7 100644
(file)
--- a/
pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/
pidl/lib/Parse/Pidl/Samba4/Python.pm
@@
-712,12
+712,13
@@
sub Interface($$$)
$docstring = $signature;
}
$docstring = $signature;
}
- $self->pidl("static PyTypeObject $interface->{NAME}_InterfaceType = {");
+ my $if_typename = "$interface->{NAME}_InterfaceType";
+
+ $self->pidl("static PyTypeObject $if_typename = {");
$self->indent;
$self->pidl("PyObject_HEAD_INIT(NULL) 0,");
$self->pidl(".tp_name = \"$basename.$interface->{NAME}\",");
$self->pidl(".tp_basicsize = sizeof(dcerpc_InterfaceObject),");
$self->indent;
$self->pidl("PyObject_HEAD_INIT(NULL) 0,");
$self->pidl(".tp_name = \"$basename.$interface->{NAME}\",");
$self->pidl(".tp_basicsize = sizeof(dcerpc_InterfaceObject),");
- $self->pidl(".tp_base = &dcerpc_InterfaceType,");
$self->pidl(".tp_doc = $docstring,");
$self->pidl(".tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,");
$self->pidl(".tp_new = interface_$interface->{NAME}_new,");
$self->pidl(".tp_doc = $docstring,");
$self->pidl(".tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,");
$self->pidl(".tp_new = interface_$interface->{NAME}_new,");
@@
-726,8
+727,8
@@
sub Interface($$$)
$self->pidl("");
$self->pidl("");
- $self->register_module_typeobject($interface->{NAME}, "&$i
nterface->{NAME}_InterfaceTyp
e");
- $self->register_module_readycode(["if (!PyInterface_AddNdrRpcMethods(&$i
nterface->{NAME}_InterfaceTyp
e, py_ndr_$interface->{NAME}\_methods))", "\treturn;", ""]);
+ $self->register_module_typeobject($interface->{NAME}, "&$i
f_typenam
e");
+ $self->register_module_readycode(["if (!PyInterface_AddNdrRpcMethods(&$i
f_typenam
e, py_ndr_$interface->{NAME}\_methods))", "\treturn;", ""]);
}
$self->pidl_hdr("\n");
}
$self->pidl_hdr("\n");