Avoid the use of PyAPI_DATA, which is for internal Python API's.
authorArnaud Faucher <arnaud.faucher@gmail.com>
Sun, 21 Nov 2010 23:07:21 +0000 (00:07 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 21 Nov 2010 23:52:56 +0000 (00:52 +0100)
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104

lib/tdb/pytdb.c
libcli/nbt/pynbt.c
source4/auth/credentials/pycredentials.h
source4/lib/ldb/pyldb.c
source4/lib/messaging/pymessaging.c
source4/lib/registry/pyregistry.c
source4/librpc/rpc/pyrpc_util.h
source4/param/pyparam.c

index b857438e16ec0ef6185be78f0a28275be512f6a1..82407e14b0ae25ec8834d0983e63f82551d4f7ce 100644 (file)
@@ -41,7 +41,7 @@ typedef struct {
        bool closed;
 } PyTdbObject;
 
-PyAPI_DATA(PyTypeObject) PyTdb;
+extern PyTypeObject PyTdb;
 
 static void PyErr_SetTDBError(TDB_CONTEXT *tdb)
 {
index dbb4d18237e81a727729c0875bc3aa3a7b649d08..452ae3a1a2b876cdc2d63c968ed2b66aee89baf7 100644 (file)
@@ -28,7 +28,7 @@
 #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
 #endif
 
-PyAPI_DATA(PyTypeObject) nbt_node_Type;
+extern PyTypeObject nbt_node_Type;
 
 typedef struct {
        PyObject_HEAD
index 09deb05e58eb59f44c3c8c78c64bbaf6a658ad85..5c3a9b2ebbf7e409a699b30b3b5879141926608f 100644 (file)
@@ -22,8 +22,8 @@
 #include "auth/credentials/credentials.h"
 #include "lib/talloc/pytalloc.h"
 
-PyAPI_DATA(PyTypeObject) PyCredentials;
-PyAPI_DATA(PyTypeObject) PyCredentialCacheContainer;
+extern PyTypeObject PyCredentials;
+extern PyTypeObject PyCredentialCacheContainer;
 typedef struct {
        PyObject_HEAD
        TALLOC_CTX *mem_ctx;
index d4b63008f8dd4fa7559591647d03e333914d71fe..3bee9abcc9e90a87e6e35c15efaec414ad9dfb67 100644 (file)
@@ -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);
 
index ba9770da34c453e686ed979cc759c07d86bbed1c..20e1d761645a2eb5d58df4cccf0ad58f39d14adc 100644 (file)
@@ -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)
 {
index 9952ed349467d1417a1dbac34d77531d1a02a314..8b75bbb60da18179b078d4596f8dfe87cc1f763a 100644 (file)
@@ -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))
index 1efe112a11232739f6d88b06baaee39113d20007..f102014147c499cc2843eb764e713e6c5d9d4a8a 100644 (file)
 
 #include "librpc/rpc/pyrpc.h"
 
-/* This macro is only provided by Python >= 2.3 */
-#ifndef PyAPI_DATA
-#   define PyAPI_DATA(RTYPE) extern RTYPE
-#endif
-
 #define PyErr_FromNdrError(err) Py_BuildValue("(is)", err, ndr_map_error2string(err))
 
 #define PyErr_SetNdrError(err) \
index b1e0d7df0e092154c4057a6dd119e0be21a14677..cb7169e68db8af8ecd548bc47a3d270682ee9604 100644 (file)
@@ -32,8 +32,8 @@ typedef inquiry lenfunc;
 #define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_type(obj, struct loadparm_context)
 #define PyLoadparmService_AsLoadparmService(obj) py_talloc_get_type(obj, struct loadparm_service)
 
-PyAPI_DATA(PyTypeObject) PyLoadparmContext;
-PyAPI_DATA(PyTypeObject) PyLoadparmService;
+extern PyTypeObject PyLoadparmContext;
+extern PyTypeObject PyLoadparmService;
 
 PyObject *PyLoadparmService_FromService(struct loadparm_service *service)
 {