The branch, master has been updated via 2ac5ced Avoid the use of PyAPI_DATA, which is for internal Python API's. from 6534358 selftest: When running on the buildfarm, pipe everything through filter-subunit for the exit code.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 2ac5cedb719d220db412d0bdc69e34bad9ab26f1 Author: Arnaud Faucher <arnaud.fauc...@gmail.com> Date: Mon Nov 22 00:07:21 2010 +0100 Avoid the use of PyAPI_DATA, which is for internal Python API's. Signed-off-by: Jelmer Vernooij <jel...@samba.org> Autobuild-User: Jelmer Vernooij <jel...@samba.org> Autobuild-Date: Mon Nov 22 00:52:56 CET 2010 on sn-devel-104 ----------------------------------------------------------------------- Summary of changes: lib/tdb/pytdb.c | 2 +- libcli/nbt/pynbt.c | 2 +- source4/auth/credentials/pycredentials.h | 4 ++-- source4/lib/ldb/pyldb.c | 12 ++++++------ source4/lib/messaging/pymessaging.c | 2 +- source4/lib/registry/pyregistry.c | 6 +++--- source4/librpc/rpc/pyrpc_util.h | 5 ----- source4/param/pyparam.c | 4 ++-- 8 files changed, 16 insertions(+), 21 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c index b857438..82407e1 100644 --- a/lib/tdb/pytdb.c +++ b/lib/tdb/pytdb.c @@ -41,7 +41,7 @@ typedef struct { bool closed; } PyTdbObject; -PyAPI_DATA(PyTypeObject) PyTdb; +extern PyTypeObject PyTdb; static void PyErr_SetTDBError(TDB_CONTEXT *tdb) { diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c index dbb4d18..452ae3a 100644 --- a/libcli/nbt/pynbt.c +++ b/libcli/nbt/pynbt.c @@ -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 diff --git a/source4/auth/credentials/pycredentials.h b/source4/auth/credentials/pycredentials.h index 09deb05..5c3a9b2 100644 --- a/source4/auth/credentials/pycredentials.h +++ b/source4/auth/credentials/pycredentials.h @@ -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; diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index d4b6300..3bee9ab 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 ba9770d..20e1d76 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 9952ed3..8b75bbb 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)) diff --git a/source4/librpc/rpc/pyrpc_util.h b/source4/librpc/rpc/pyrpc_util.h index 1efe112..f102014 100644 --- a/source4/librpc/rpc/pyrpc_util.h +++ b/source4/librpc/rpc/pyrpc_util.h @@ -25,11 +25,6 @@ #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) \ diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index b1e0d7d..cb7169e 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -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) { -- Samba Shared Repository