samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Wed, 8 Jan 2014 14:42:50 +0000 (15:42 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 9 Jan 2014 15:27:47 +0000 (16:27 +0100)
http://www.python.org/doc//current/c-api/none.html

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date(master): Thu Jan  9 16:27:47 CET 2014 on sn-devel-104

15 files changed:
ctdb/lib/tdb/pytdb.c
lib/ldb/pyldb.c
lib/ldb/pyldb_util.c
lib/ntdb/pyntdb.c
lib/socket_wrapper/py_socket_wrapper.c
lib/tdb/pytdb.c
libcli/nbt/pynbt.c
python/pyglue.c
source3/passdb/py_passdb.c
source4/auth/pyauth.c
source4/libcli/pysmb.c
source4/librpc/ndr/py_auth.c
source4/librpc/ndr/py_misc.c
source4/librpc/ndr/py_security.c
source4/librpc/ndr/py_xattr.c

index ae0e6f808d74da94450f7441ded0d3ef05fafffb..98a624687ebd3535ca977b3c56c574a07cee0a4c 100644 (file)
 #include "replace.h"
 #include "system/filesys.h"
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 /* Include tdb headers */
 #include <tdb.h>
 
index 45831329009e630420993a31f8216c1c6e1fa18a..4360b31776e0424b34676677ea75467bc9b2c814 100644 (file)
@@ -64,10 +64,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 #define SIGN(a) (((a) == 0)?0:((a) < 0?-1:1))
 
 
index e2442e2194bfab43aca8377c501494ec5ce8dd6a..4be9126405d92e2779097674358a1938b903b707 100644 (file)
@@ -36,11 +36,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
-
 /**
  * Find out PyTypeObject in ldb module for a given typename
  */
index cbe7ae81fa0e6effe9636d010de8188765086fd9..b2a1f0cbc1b6844611d3130b0831191a55945618 100644 (file)
 #include "replace.h"
 #include "system/filesys.h"
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 /* Include ntdb headers */
 #include <ntdb.h>
 
index f5742d3dd1011aedc29667f7b40b5b75ad7cbd8f..411be59d5b14840a6c4a1dfbd659ec87b2f83d2f 100644 (file)
@@ -52,10 +52,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 #ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */
 #define Py_TYPE(ob)            (((PyObject*)(ob))->ob_type)
 #endif
index cf77a2527466ae8ad7440c5b216240bf36314143..bf0fed6e7b1964da4d36b47c80da05c42775295f 100644 (file)
 #include "replace.h"
 #include "system/filesys.h"
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 /* Include tdb headers */
 #include <tdb.h>
 
index 8074fb6efdb45e56c209b4d90ef21d8e2dded53b..7162880c32c0a5257988f8a3896761ae19909304 100644 (file)
 
 void initnetbios(void);
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 extern PyTypeObject nbt_node_Type;
 
 typedef struct {
index 02fb005071a01ee0f593b07db6c0cf33cc871823..3fc6e38691f1e8a2df68de5f19a200e3fd52393b 100644 (file)
 
 void init_glue(void);
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 static PyObject *py_generate_random_str(PyObject *self, PyObject *args)
 {
        int len;
index 3fd14cdc41181a6eebf2dbfbf2e734938a59e38f..87dbb5dd43579920a5c20ae7fdc1321983566e40 100644 (file)
@@ -33,10 +33,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 #ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */
 #define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
 #endif
index 437e671bba280e7c0966533361481fb1574a76c7..d79d41782d9528457576b490ec90867b63c68731 100644 (file)
@@ -43,10 +43,6 @@ typedef inquiry lenfunc;
 typedef intargfunc ssizeargfunc;
 #endif
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 static PyObject *PyAuthSession_FromSession(struct auth_session_info *session)
 {
        return py_return_ndr_struct("samba.dcerpc.auth", "session_info", session, session);
index fb981c7f18994544cb12785704fa23b12c2ca3f0..456b01d87d2f592742eca36fa083c1c423067c04 100644 (file)
 #include "libcli/security/security_descriptor.h"
 #include "librpc/rpc/pyrpc_util.h"
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 staticforward PyTypeObject PySMB;
 
 void initsmb(void);
index 8c9c16fa2120f2686a4fe56b50021a9d20639f0b..95c9a30321fa82eb143ffbde6a43323b746765a0 100644 (file)
 #include "auth/credentials/pycredentials.h"
 #include "librpc/rpc/pyrpc_util.h"
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 static void PyType_AddGetSet(PyTypeObject *type, PyGetSetDef *getset)
 {
        PyObject *dict;
index 4e6d62ef4828a8181486dc1790a3d15aef483d62..d8edff899aca0ca376fb5fda346f5fc13833639a 100644 (file)
 #include <Python.h>
 #include "librpc/gen_ndr/misc.h"
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 static int py_GUID_cmp(PyObject *py_self, PyObject *py_other)
 {
        int ret;
index 7f79796ea261a480e474b2dfb6f94634d5bd5747..47d8c9a313306e1eb61a150c504b8979f629b961 100644 (file)
 #include <Python.h>
 #include "libcli/security/security.h"
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 static void PyType_AddMethods(PyTypeObject *type, PyMethodDef *methods)
 {
        PyObject *dict;
index 5a61c734a52f92a12db0e0e2e51bb6bbfb3f912a..fcf2e66977ef217cddcbc574020a6c05ff204d5a 100644 (file)
 
 #include <Python.h>
 
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
 static void PyType_AddMethods(PyTypeObject *type, PyMethodDef *methods)
 {
         PyObject *dict;