diff options
author | Thomas Heller <theller@ctypes.org> | 2007-07-13 11:53:39 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2007-07-13 11:53:39 (GMT) |
commit | ace05054d3e146a6fa4435275b83bd8e99327fb1 (patch) | |
tree | deecb40e79806d3c91c2184fc98e353f848b415d | |
parent | 84d66a084364ad85383a6d5d10e80f8324421d7e (diff) | |
download | cpython-ace05054d3e146a6fa4435275b83bd8e99327fb1.zip cpython-ace05054d3e146a6fa4435275b83bd8e99327fb1.tar.gz cpython-ace05054d3e146a6fa4435275b83bd8e99327fb1.tar.bz2 |
Remove all the Python 2.3 compatibility markers (the Python 3 ctypes
version is not compatible with Python 2.x anymore).
Remove backwards compatibility code.
-rw-r--r-- | Modules/_ctypes/ctypes.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h index 1791089..5df9943 100644 --- a/Modules/_ctypes/ctypes.h +++ b/Modules/_ctypes/ctypes.h @@ -1,12 +1,3 @@ -/***************************************************************** - This file should be kept compatible with Python 2.3, see PEP 291. - *****************************************************************/ - -#if (PY_VERSION_HEX < 0x02050000) -typedef int Py_ssize_t; -#define PyInt_FromSsize_t PyInt_FromLong -#endif - #ifndef MS_WIN32 #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -16,14 +7,6 @@ typedef int Py_ssize_t; #define PARAMFLAG_FLCID 0x4 #endif -/* - Backwards compatibility: - Python2.2 used LONG_LONG instead of PY_LONG_LONG -*/ -#if defined(HAVE_LONG_LONG) && !defined(PY_LONG_LONG) -#define PY_LONG_LONG LONG_LONG -#endif - typedef struct tagPyCArgObject PyCArgObject; typedef struct tagCDataObject CDataObject; typedef PyObject *(* GETFUNC)(void *, Py_ssize_t size); @@ -339,35 +322,6 @@ extern PyObject *PyExc_ArgError; extern char *conversion_mode_encoding; extern char *conversion_mode_errors; -/* Python 2.4 macros, which are not available in Python 2.3 */ - -#ifndef Py_CLEAR -#define Py_CLEAR(op) \ - do { \ - if (op) { \ - PyObject *tmp = (PyObject *)(op); \ - (op) = NULL; \ - Py_DECREF(tmp); \ - } \ - } while (0) -#endif - -#ifndef Py_VISIT -/* Utility macro to help write tp_traverse functions. - * To use this macro, the tp_traverse function must name its arguments - * "visit" and "arg". This is intended to keep tp_traverse functions - * looking as much alike as possible. - */ -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - #if defined(HAVE_WCHAR_H) # define CTYPES_UNICODE #endif |