mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
Avoid the use of PyAPI_DATA, which is for internal Python API's.
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
This commit is contained in:
parent
6534358a1a
commit
2ac5cedb71
@ -41,7 +41,7 @@ typedef struct {
|
||||
bool closed;
|
||||
} PyTdbObject;
|
||||
|
||||
PyAPI_DATA(PyTypeObject) PyTdb;
|
||||
extern PyTypeObject PyTdb;
|
||||
|
||||
static void PyErr_SetTDBError(TDB_CONTEXT *tdb)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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))
|
||||
|
@ -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) \
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user