git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5891e98
)
pycredentials: Use talloc.Object.
author
Jelmer Vernooij
<jelmer@samba.org>
Tue, 30 Nov 2010 23:02:19 +0000
(
00:02
+0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Wed, 1 Dec 2010 00:48:25 +0000
(
01:48
+0100)
source4/auth/credentials/pycredentials.c
patch
|
blob
|
history
diff --git
a/source4/auth/credentials/pycredentials.c
b/source4/auth/credentials/pycredentials.c
index b7de7545ecfab613f996b63e43c2c8b13f3fb00c..c51e5e1f45564d8a8c254bc47549b2abcde8b8b5 100644
(file)
--- 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),
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,
.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),
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;
.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;
if (PyType_Ready(&PyCredentials) < 0)
return;