summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-02-16 14:06:28 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-03-08 01:58:26 +0100
commit9e07f3a13b41be1f019887581b2a2bd049039a3d (patch)
treeaeda3d511450482a450d6ebb0483d5b0acde08c4 /source4/librpc
parent627fdf0468e9f575ea1a5de1fd57a87a239a4b96 (diff)
downloadsamba-9e07f3a13b41be1f019887581b2a2bd049039a3d.tar.gz
pidl: Fix our python reference handling
The new talloc.BaseObject allow us to hold a talloc context per python object (there may be many referring to the same C object) and the talloc context that the actual object pointer is under. Another advantage is that talloc.BaseObject(), has less of an ABI surface. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/pyrpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index f1bfc887871..948cad212f6 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -342,7 +342,6 @@ static PyObject *py_transfer_syntax_ndr_new(PyTypeObject *type, PyObject *args,
static PyTypeObject py_transfer_syntax_ndr_SyntaxType = {
PyObject_HEAD_INIT(NULL) 0,
.tp_name = "base.transfer_syntax_ndr",
- .tp_basicsize = sizeof(pytalloc_Object),
.tp_doc = "transfer_syntax_ndr()\n",
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_new = py_transfer_syntax_ndr_new,
@@ -356,7 +355,6 @@ static PyObject *py_transfer_syntax_ndr64_new(PyTypeObject *type, PyObject *args
static PyTypeObject py_transfer_syntax_ndr64_SyntaxType = {
PyObject_HEAD_INIT(NULL) 0,
.tp_name = "base.transfer_syntax_ndr64",
- .tp_basicsize = sizeof(pytalloc_Object),
.tp_doc = "transfer_syntax_ndr64()\n",
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_new = py_transfer_syntax_ndr64_new,
@@ -395,7 +393,6 @@ static PyObject *py_bind_time_features_syntax_new(PyTypeObject *type, PyObject *
static PyTypeObject py_bind_time_features_syntax_SyntaxType = {
PyObject_HEAD_INIT(NULL) 0,
.tp_name = "base.bind_time_features_syntax",
- .tp_basicsize = sizeof(pytalloc_Object),
.tp_doc = "bind_time_features_syntax(features)\n",
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_new = py_bind_time_features_syntax_new,
@@ -415,8 +412,11 @@ void initbase(void)
return;
py_transfer_syntax_ndr_SyntaxType.tp_base = ndr_syntax_id_Type;
+ py_transfer_syntax_ndr_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
py_transfer_syntax_ndr64_SyntaxType.tp_base = ndr_syntax_id_Type;
+ py_transfer_syntax_ndr64_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
py_bind_time_features_syntax_SyntaxType.tp_base = ndr_syntax_id_Type;
+ py_bind_time_features_syntax_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
if (PyType_Ready(&dcerpc_InterfaceType) < 0)
return;