From 2ac5cedb719d220db412d0bdc69e34bad9ab26f1 Mon Sep 17 00:00:00 2001 From: Arnaud Faucher Date: Mon, 22 Nov 2010 00:07:21 +0100 Subject: Avoid the use of PyAPI_DATA, which is for internal Python API's. Signed-off-by: Jelmer Vernooij Autobuild-User: Jelmer Vernooij Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104 --- source4/lib/ldb/pyldb.c | 12 ++++++------ source4/lib/messaging/pymessaging.c | 2 +- source4/lib/registry/pyregistry.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index d4b63008f8..3bee9abcc9 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -54,12 +54,12 @@ static void PyErr_SetLdbError(PyObject *error, int ret, struct ldb_context *ldb_ static PyObject *PyExc_LdbError; -PyAPI_DATA(PyTypeObject) PyLdbMessage; -PyAPI_DATA(PyTypeObject) PyLdbModule; -PyAPI_DATA(PyTypeObject) PyLdbDn; -PyAPI_DATA(PyTypeObject) PyLdb; -PyAPI_DATA(PyTypeObject) PyLdbMessageElement; -PyAPI_DATA(PyTypeObject) PyLdbTree; +extern PyTypeObject PyLdbMessage; +extern PyTypeObject PyLdbModule; +extern PyTypeObject PyLdbDn; +extern PyTypeObject PyLdb; +extern PyTypeObject PyLdbMessageElement; +extern PyTypeObject PyLdbTree; static PyObject *PyLdb_FromLdbContext(struct ldb_context *ldb_ctx); diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c index ba9770da34..20e1d76164 100644 --- a/source4/lib/messaging/pymessaging.c +++ b/source4/lib/messaging/pymessaging.c @@ -33,7 +33,7 @@ #include "librpc/rpc/dcerpc.h" #include "librpc/gen_ndr/server_id.h" -PyAPI_DATA(PyTypeObject) messaging_Type; +extern PyTypeObject messaging_Type; static bool server_id_from_py(PyObject *object, struct server_id *server_id) { diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c index 9952ed3494..8b75bbb60d 100644 --- a/source4/lib/registry/pyregistry.c +++ b/source4/lib/registry/pyregistry.c @@ -27,9 +27,9 @@ #include "auth/credentials/pycredentials.h" #include "param/pyparam.h" -PyAPI_DATA(PyTypeObject) PyRegistryKey; -PyAPI_DATA(PyTypeObject) PyRegistry; -PyAPI_DATA(PyTypeObject) PyHiveKey; +extern PyTypeObject PyRegistryKey; +extern PyTypeObject PyRegistry; +extern PyTypeObject PyHiveKey; /*#define PyRegistryKey_AsRegistryKey(obj) py_talloc_get_type(obj, struct registry_key)*/ #define PyRegistry_AsRegistryContext(obj) ((struct registry_context *)py_talloc_get_ptr(obj)) -- cgit