1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s4:pydsdb.c - introduce Python 2.4 compatibility defines

This commit is contained in:
Matthias Dieter Wallnöfer 2010-11-06 17:54:36 +01:00
parent 4b97e7c8f2
commit 9f2d21561b

View File

@ -28,6 +28,17 @@
#include "auth/kerberos/kerberos.h"
#include "librpc/rpc/pyrpc_util.h"
/* There's no Py_ssize_t in 2.4, apparently */
#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
typedef int Py_ssize_t;
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
#endif
#ifndef Py_RETURN_NONE
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif
/* FIXME: These should be in a header file somewhere, once we finish moving
* away from SWIG .. */
#define PyErr_LDB_OR_RAISE(py_ldb, ldb) \