summaryrefslogtreecommitdiff
path: root/lib/talloc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-21 00:37:31 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-21 00:37:31 +0100
commitc1a9b68623a663c36451df31aa44fe5f0e22af17 (patch)
treec71fb34b1fa9c050e93d38d97e37280dc9ea4d0f /lib/talloc
parent64419f47daa3d28587fd29f5c4217755acac7e4f (diff)
downloadsamba-c1a9b68623a663c36451df31aa44fe5f0e22af17.tar.gz
samba-c1a9b68623a663c36451df31aa44fe5f0e22af17.tar.bz2
samba-c1a9b68623a663c36451df31aa44fe5f0e22af17.zip
Create and use convenience function for creating new talloc-wrapping Python Objects, support subtypes of DCE/RPC interfaces properly
Diffstat (limited to 'lib/talloc')
-rw-r--r--lib/talloc/pytalloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/talloc/pytalloc.h b/lib/talloc/pytalloc.h
index bff6f31d27..e6745f937d 100644
--- a/lib/talloc/pytalloc.h
+++ b/lib/talloc/pytalloc.h
@@ -48,4 +48,6 @@ PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *
/* Sane default implementation of reprfunc. */
PyObject *py_talloc_default_repr(PyObject *py_obj);
+#define py_talloc_new(type, typeobj) py_talloc_import(typeobj, talloc_zero(NULL, type))
+
#endif /* _PY_TALLOC_H_ */