summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-01 00:02:19 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-01 01:48:25 +0100
commit00251d9e5627f041b9585dbe6c380f88f796e3b9 (patch)
tree85cadfcb16af273b1de83e33d62ee8bc0faf1a63 /source4
parent5891e9863c87c8a03fef2671be0572187404afa5 (diff)
downloadsamba-00251d9e5627f041b9585dbe6c380f88f796e3b9.tar.gz
samba-00251d9e5627f041b9585dbe6c380f88f796e3b9.tar.bz2
samba-00251d9e5627f041b9585dbe6c380f88f796e3b9.zip
pycredentials: Use talloc.Object.
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/pycredentials.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c
index b7de7545ec..c51e5e1f45 100644
--- a/source4/auth/credentials/pycredentials.c
+++ b/source4/auth/credentials/pycredentials.c
@@ -420,7 +420,6 @@ static PyMethodDef py_creds_methods[] = {
PyTypeObject PyCredentials = {
.tp_name = "Credentials",
.tp_basicsize = sizeof(py_talloc_Object),
- .tp_dealloc = py_talloc_dealloc,
.tp_new = py_creds_new,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_methods = py_creds_methods,
@@ -430,13 +429,17 @@ PyTypeObject PyCredentials = {
PyTypeObject PyCredentialCacheContainer = {
.tp_name = "CredentialCacheContainer",
.tp_basicsize = sizeof(py_talloc_Object),
- .tp_dealloc = py_talloc_dealloc,
.tp_flags = Py_TPFLAGS_DEFAULT,
};
void initcredentials(void)
{
PyObject *m;
+ PyTypeObject *talloc_type = PyTalloc_GetObjectType();
+ if (talloc_type == NULL)
+ return;
+
+ PyCredentials.tp_base = PyCredentialCacheContainer.tp_base = talloc_type;
if (PyType_Ready(&PyCredentials) < 0)
return;