summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-01 00:01:51 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-01 01:48:25 +0100
commit5891e9863c87c8a03fef2671be0572187404afa5 (patch)
tree89f65eb7923ddfdbee6c119a8c382caff6c699fe
parent3bff03723d8920faece76dd57bcf5d19b84d7b02 (diff)
downloadsamba-5891e9863c87c8a03fef2671be0572187404afa5.tar.gz
samba-5891e9863c87c8a03fef2671be0572187404afa5.tar.bz2
samba-5891e9863c87c8a03fef2671be0572187404afa5.zip
pytalloc: Expose PyTalloc_GetObjectType
-rw-r--r--lib/talloc/pytalloc.h1
-rw-r--r--lib/talloc/pytalloc_util.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/talloc/pytalloc.h b/lib/talloc/pytalloc.h
index be69c4d50c..128208e3f8 100644
--- a/lib/talloc/pytalloc.h
+++ b/lib/talloc/pytalloc.h
@@ -32,6 +32,7 @@ typedef struct {
/* Deallocate a py_talloc_Object */
void py_talloc_dealloc(PyObject* self);
+PyTypeObject *PyTalloc_GetObjectType(void);
int PyTalloc_Check(PyObject *);
/* Retrieve the pointer for a py_talloc_object. Like talloc_get_type()
diff --git a/lib/talloc/pytalloc_util.c b/lib/talloc/pytalloc_util.c
index c485cd1ca3..d6a8da2e59 100644
--- a/lib/talloc/pytalloc_util.c
+++ b/lib/talloc/pytalloc_util.c
@@ -23,7 +23,7 @@
#include "pytalloc.h"
#include <assert.h>
-static PyTypeObject *Get_TallocType(void)
+PyTypeObject *PyTalloc_GetObjectType(void)
{
static PyTypeObject *type = NULL;
PyObject *mod;
@@ -156,7 +156,7 @@ PyObject *PyString_FromString_check_null(const char *ptr)
int PyTalloc_Check(PyObject *obj)
{
- PyTypeObject *tp = Get_TallocType();
+ PyTypeObject *tp = PyTalloc_GetObjectType();
return PyObject_TypeCheck(obj, tp);
}