From: Petr Viktorin Date: Wed, 3 Dec 2014 12:59:58 +0000 (+0100) Subject: Remove use of the "staticforward" macro X-Git-Tag: samba-4.2.0rc5~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62487b6719d944bdac4690008bce7bb28be42259;p=thirdparty%2Fsamba.git Remove use of the "staticforward" macro This macro was used for compatibility with broken compilers. Since Python 2.3, it is always defined as `static`, and only exists "for source compatibility with old C extensions". Signed-off-by: Petr Viktorin Reviewed-by: Jelmer Vernooij Reviewed-by: Andreas Schneider (cherry picked from commit 02980268e8641a1558c6f475d4669ce4d663504d) --- diff --git a/lib/ldb-samba/pyldb.c b/lib/ldb-samba/pyldb.c index aae25a01e68..6c0d2a76b2e 100644 --- a/lib/ldb-samba/pyldb.c +++ b/lib/ldb-samba/pyldb.c @@ -33,7 +33,7 @@ void init_ldb(void); static PyObject *pyldb_module; static PyObject *py_ldb_error; -staticforward PyTypeObject PySambaLdb; +static PyTypeObject PySambaLdb; static void PyErr_SetLdbError(PyObject *error, int ret, struct ldb_context *ldb_ctx) { diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index ee751b363e0..5bcff72a211 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -36,16 +36,16 @@ void initldb(void); static PyObject *PyLdbMessage_FromMessage(struct ldb_message *msg); static PyObject *PyExc_LdbError; -staticforward PyTypeObject PyLdbControl; -staticforward PyTypeObject PyLdbResult; -staticforward PyTypeObject PyLdbMessage; +static PyTypeObject PyLdbControl; +static PyTypeObject PyLdbResult; +static PyTypeObject PyLdbMessage; #define PyLdbMessage_Check(ob) PyObject_TypeCheck(ob, &PyLdbMessage) -staticforward PyTypeObject PyLdbModule; -staticforward PyTypeObject PyLdbDn; +static PyTypeObject PyLdbModule; +static PyTypeObject PyLdbDn; #define pyldb_Dn_Check(ob) PyObject_TypeCheck(ob, &PyLdbDn) -staticforward PyTypeObject PyLdb; +static PyTypeObject PyLdb; #define PyLdb_Check(ob) PyObject_TypeCheck(ob, &PyLdb) -staticforward PyTypeObject PyLdbMessageElement; +static PyTypeObject PyLdbMessageElement; #define pyldb_MessageElement_Check(ob) PyObject_TypeCheck(ob, &PyLdbMessageElement) staticforward PyTypeObject PyLdbTree; diff --git a/lib/ntdb/pyntdb.c b/lib/ntdb/pyntdb.c index b2a1f0cbc1b..72e626472a2 100644 --- a/lib/ntdb/pyntdb.c +++ b/lib/ntdb/pyntdb.c @@ -38,7 +38,7 @@ typedef struct { bool closed; } PyNtdbObject; -staticforward PyTypeObject PyNtdb; +static PyTypeObject PyNtdb; static void PyErr_SetTDBError(enum NTDB_ERROR e) { diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c index 870f5aad610..af3f9d67df6 100644 --- a/lib/tevent/pytevent.c +++ b/lib/tevent/pytevent.c @@ -57,12 +57,12 @@ typedef struct { struct tevent_fd *fd; } TeventFd_Object; -staticforward PyTypeObject TeventContext_Type; -staticforward PyTypeObject TeventReq_Type; -staticforward PyTypeObject TeventQueue_Type; -staticforward PyTypeObject TeventSignal_Type; -staticforward PyTypeObject TeventTimer_Type; -staticforward PyTypeObject TeventFd_Type; +static PyTypeObject TeventContext_Type; +static PyTypeObject TeventReq_Type; +static PyTypeObject TeventQueue_Type; +static PyTypeObject TeventSignal_Type; +static PyTypeObject TeventTimer_Type; +static PyTypeObject TeventFd_Type; static int py_context_init(struct tevent_context *ev) { diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index d6031763913..69b29148af6 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -349,7 +349,7 @@ sub PythonStruct($$$$$$) $self->pidl(""); } - $self->pidl_hdr("staticforward PyTypeObject $name\_Type;\n"); + $self->pidl_hdr("static PyTypeObject $name\_Type;\n"); $self->pidl(""); my $docstring = $self->DocString($d, $name); my $typeobject = "$name\_Type"; @@ -685,7 +685,7 @@ sub Interface($$$) } if (defined $interface->{PROPERTIES}->{uuid}) { - $self->pidl_hdr("staticforward PyTypeObject $interface->{NAME}_InterfaceType;\n"); + $self->pidl_hdr("static PyTypeObject $interface->{NAME}_InterfaceType;\n"); $self->pidl(""); my @fns = (); diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index 3a1e583f0f6..07540cd2fce 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -51,9 +51,9 @@ static PyTypeObject *dom_sid_Type = NULL; static PyTypeObject *security_Type = NULL; static PyTypeObject *guid_Type = NULL; -staticforward PyTypeObject PySamu; -staticforward PyTypeObject PyGroupmap; -staticforward PyTypeObject PyPDB; +static PyTypeObject PySamu; +static PyTypeObject PyGroupmap; +static PyTypeObject PyPDB; static PyObject *py_pdb_error; diff --git a/source4/libcli/pysmb.c b/source4/libcli/pysmb.c index 456b01d87d2..dde37e0467f 100644 --- a/source4/libcli/pysmb.c +++ b/source4/libcli/pysmb.c @@ -38,7 +38,7 @@ #include "libcli/security/security_descriptor.h" #include "librpc/rpc/pyrpc_util.h" -staticforward PyTypeObject PySMB; +static PyTypeObject PySMB; void initsmb(void); diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index 360fb24224c..09f663213b6 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -30,7 +30,7 @@ void initbase(void); -staticforward PyTypeObject dcerpc_InterfaceType; +static PyTypeObject dcerpc_InterfaceType; static PyTypeObject *ndr_syntax_id_Type;