mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
python: Define Py_ssize_t if the Python library doesn't.
This commit is contained in:
parent
4d02bbbfb4
commit
58cfb1a9e1
@ -28,6 +28,12 @@
|
||||
#include "ldb_includes.h"
|
||||
#include "pyldb.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;
|
||||
#endif
|
||||
|
||||
/* Picked out of thin air. To do this properly, we should probably have some part of the
|
||||
* errors in LDB be allocated to bindings ? */
|
||||
#define LDB_ERR_PYTHON_EXCEPTION 142
|
||||
|
@ -25,6 +25,12 @@
|
||||
#include "param/loadparm.h"
|
||||
#include "pytalloc.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;
|
||||
#endif
|
||||
|
||||
#define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_ptr(obj)
|
||||
|
||||
PyAPI_DATA(PyTypeObject) PyLoadparmContext;
|
||||
|
Loading…
Reference in New Issue
Block a user