summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-03-01 15:17:44 +1300
committerKarolin Seeger <kseeger@samba.org>2016-03-15 20:29:40 +0100
commit4b29e7bf2ee85df0e2c31116b14983e7490c9d80 (patch)
treed01b3c7b1b364598a1d6b47553bf9d283c90e8f0
parentf7c7cbd68090663c3262aaa24e1d8ca05f5818e7 (diff)
downloadsamba-4b29e7bf2ee85df0e2c31116b14983e7490c9d80.tar.gz
pysmb: Use pytalloc_BaseObject_PyType_Ready()
This changes pysmb to use talloc.BaseObject() just like the PIDL output Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (cherry picked from commit 8440dda3cbc747f18148e52e6875055148438267)
-rw-r--r--source4/libcli/pysmb.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source4/libcli/pysmb.c b/source4/libcli/pysmb.c
index 8c8ca424fcd..edddd17a24c 100644
--- a/source4/libcli/pysmb.c
+++ b/source4/libcli/pysmb.c
@@ -620,7 +620,6 @@ static PyObject *py_smb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs
static PyTypeObject PySMB = {
.tp_name = "smb.SMB",
- .tp_basicsize = sizeof(pytalloc_Object),
.tp_new = py_smb_new,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_methods = py_smb_methods,
@@ -631,14 +630,8 @@ static PyTypeObject PySMB = {
void initsmb(void)
{
PyObject *m;
- PyTypeObject *talloc_type = pytalloc_GetObjectType();
- if (talloc_type == NULL) {
- return;
- }
-
- PySMB.tp_base = talloc_type;
- if (PyType_Ready(&PySMB) < 0) {
+ if (pytalloc_BaseObject_PyType_Ready(&PySMB) < 0) {
return;
}