~pythonregexp2.7/python/issue2636-11

« back to all changes in this revision

Viewing changes to Modules/_ctypes/ctypes.h

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-21 13:47:31 UTC
  • mfrom: (39021.1.404 Regexp-2.7)
  • mto: This revision was merged to the branch mainline in revision 39030.
  • Revision ID: darklord@timehorse.com-20080921134731-rudomuzeh1b2tz1y
Merged in changes from the latest python source snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#   include <alloca.h>
7
7
#endif
8
8
 
 
9
#if (PY_VERSION_HEX < 0x02040000)
 
10
#define PyDict_CheckExact(ob) (Py_TYPE(ob) == &PyDict_Type)
 
11
#endif
 
12
 
9
13
#if (PY_VERSION_HEX < 0x02050000)
10
14
typedef int Py_ssize_t;
11
15
#define PyInt_FromSsize_t PyInt_FromLong
12
16
#define PyNumber_AsSsize_t(ob, exc) PyInt_AsLong(ob)
13
17
#define PyIndex_Check(ob) PyInt_Check(ob)
 
18
typedef Py_ssize_t (*readbufferproc)(PyObject *, Py_ssize_t, void **);
 
19
typedef Py_ssize_t (*writebufferproc)(PyObject *, Py_ssize_t, void **);
 
20
typedef Py_ssize_t (*segcountproc)(PyObject *, Py_ssize_t *);
 
21
typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, char **);
14
22
#endif
15
23
 
16
24
#if (PY_VERSION_HEX < 0x02060000)
18
26
#define PyVarObject_HEAD_INIT(type, size) \
19
27
        PyObject_HEAD_INIT(type) size,
20
28
#define PyImport_ImportModuleNoBlock PyImport_ImportModule
 
29
#define PyLong_FromSsize_t PyInt_FromLong
 
30
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
21
31
#endif
22
32
 
23
33