4
/* To handle length as ssize_t in stead of int, otherwise we'd either have to
5
* use the internal _PyArg_ParseTuple_SizeT function to avoid screwups
7
#define PY_SSIZE_T_CLEAN 1
11
#if defined (__APPLE__) || defined(__FreeBSD__) || \
12
defined(__OpenBSD__) || defined(__NetBSD__) || \
13
defined (__sun) || defined (__svr4__)
20
#if !defined(linux) && !defined(__sun) && !defined(__svr4__)
21
typedef unsigned long ulong;
23
#include <sys/types.h>
28
#define ACQUIRE_LOCK(obj) do { \
29
if (!PyThread_acquire_lock(obj->lock, 0)) { \
30
Py_BEGIN_ALLOW_THREADS \
31
PyThread_acquire_lock(obj->lock, 1); \
32
Py_END_ALLOW_THREADS \
34
#define RELEASE_LOCK(obj) PyThread_release_lock(obj->lock)
36
#define ACQUIRE_LOCK(obj)
37
#define RELEASE_LOCK(obj)
40
#ifdef __STDC_VERSION__
41
#if __STDC_VERSION__ >= 199901L
44
#elif defined(__C99FEATURES__)
51
#define inline __inline__
55
#define INITCHECK if (!self->is_initialised) { PyErr_Format(PyExc_RuntimeError, "%s object not initialised!", self->ob_type->tp_name); return NULL; }
57
#endif /* LIBLZMA_H */