diff -r a206f952668e Modules/_ctypes/_ctypes.c --- a/Modules/_ctypes/_ctypes.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_ctypes/_ctypes.c Sat Aug 10 13:19:27 2013 +0300 @@ -428,13 +428,7 @@ StgDictObject *dict = PyType_stgdict(type); assert (dict); - if (!PyArg_ParseTuple(args, -#if (PY_VERSION_HEX < 0x02050000) - "O|i:from_buffer", -#else - "O|n:from_buffer", -#endif - &obj, &offset)) + if (!PyArg_ParseTuple(args, "O|n:from_buffer", &obj, &offset)) return NULL; if (-1 == PyObject_AsWriteBuffer(obj, &buffer, &buffer_len)) @@ -447,11 +441,7 @@ } if (dict->size > buffer_len - offset) { PyErr_Format(PyExc_ValueError, -#if (PY_VERSION_HEX < 0x02050000) - "Buffer size too small (%d instead of at least %d bytes)", -#else "Buffer size too small (%zd instead of at least %zd bytes)", -#endif buffer_len, dict->size + offset); return NULL; } @@ -484,13 +474,7 @@ StgDictObject *dict = PyType_stgdict(type); assert (dict); - if (!PyArg_ParseTuple(args, -#if (PY_VERSION_HEX < 0x02050000) - "O|i:from_buffer", -#else - "O|n:from_buffer", -#endif - &obj, &offset)) + if (!PyArg_ParseTuple(args, "O|n:from_buffer", &obj, &offset)) return NULL; if (-1 == PyObject_AsReadBuffer(obj, (const void**)&buffer, &buffer_len)) @@ -504,11 +488,7 @@ if (dict->size > buffer_len - offset) { PyErr_Format(PyExc_ValueError, -#if (PY_VERSION_HEX < 0x02050000) - "Buffer size too small (%d instead of at least %d bytes)", -#else "Buffer size too small (%zd instead of at least %zd bytes)", -#endif buffer_len, dict->size + offset); return NULL; } diff -r a206f952668e Modules/_sqlite/cache.c --- a/Modules/_sqlite/cache.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_sqlite/cache.c Sat Aug 10 13:19:27 2013 +0300 @@ -21,7 +21,6 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include "sqlitecompat.h" #include "cache.h" #include diff -r a206f952668e Modules/_sqlite/connection.c --- a/Modules/_sqlite/connection.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_sqlite/connection.c Sat Aug 10 13:19:27 2013 +0300 @@ -29,7 +29,6 @@ #include "cursor.h" #include "prepare_protocol.h" #include "util.h" -#include "sqlitecompat.h" #include "pythread.h" diff -r a206f952668e Modules/_sqlite/cursor.c --- a/Modules/_sqlite/cursor.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_sqlite/cursor.c Sat Aug 10 13:19:27 2013 +0300 @@ -24,7 +24,6 @@ #include "cursor.h" #include "module.h" #include "util.h" -#include "sqlitecompat.h" PyObject* pysqlite_cursor_iternext(pysqlite_Cursor* self); diff -r a206f952668e Modules/_sqlite/prepare_protocol.c --- a/Modules/_sqlite/prepare_protocol.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_sqlite/prepare_protocol.c Sat Aug 10 13:19:27 2013 +0300 @@ -21,7 +21,6 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include "sqlitecompat.h" #include "prepare_protocol.h" int pysqlite_prepare_protocol_init(pysqlite_PrepareProtocol* self, PyObject* args, PyObject* kwargs) diff -r a206f952668e Modules/_sqlite/row.c --- a/Modules/_sqlite/row.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_sqlite/row.c Sat Aug 10 13:19:27 2013 +0300 @@ -23,7 +23,6 @@ #include "row.h" #include "cursor.h" -#include "sqlitecompat.h" void pysqlite_row_dealloc(pysqlite_Row* self) { diff -r a206f952668e Modules/_sqlite/sqlitecompat.h --- a/Modules/_sqlite/sqlitecompat.h Thu Aug 08 18:28:53 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* sqlitecompat.h - compatibility macros - * - * Copyright (C) 2006-2010 Gerhard Häring - * - * This file is part of pysqlite. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include "Python.h" - -#ifndef PYSQLITE_COMPAT_H -#define PYSQLITE_COMPAT_H - -/* define Py_ssize_t for pre-2.5 versions of Python */ - -#if PY_VERSION_HEX < 0x02050000 -typedef int Py_ssize_t; -typedef int (*lenfunc)(PyObject*); -#endif - - -/* define PyDict_CheckExact for pre-2.4 versions of Python */ -#ifndef PyDict_CheckExact -#define PyDict_CheckExact(op) ((op)->ob_type == &PyDict_Type) -#endif - -/* define Py_CLEAR for pre-2.4 versions of Python */ -#ifndef Py_CLEAR -#define Py_CLEAR(op) \ - do { \ - if (op) { \ - PyObject *tmp = (PyObject *)(op); \ - (op) = NULL; \ - Py_DECREF(tmp); \ - } \ - } while (0) -#endif - -#ifndef PyVarObject_HEAD_INIT -#define PyVarObject_HEAD_INIT(type, size) \ - PyObject_HEAD_INIT(type) size, -#endif - -#ifndef Py_TYPE -#define Py_TYPE(ob) ((ob)->ob_type) -#endif - -#endif diff -r a206f952668e Modules/_sqlite/statement.c --- a/Modules/_sqlite/statement.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_sqlite/statement.c Sat Aug 10 13:19:27 2013 +0300 @@ -27,7 +27,6 @@ #include "microprotocols.h" #include "prepare_protocol.h" #include "util.h" -#include "sqlitecompat.h" /* prototypes */ static int pysqlite_check_remaining_sql(const char* tail); diff -r a206f952668e Modules/_sre.c --- a/Modules/_sre.c Thu Aug 08 18:28:53 2013 +0100 +++ b/Modules/_sre.c Sat Aug 10 13:19:27 2013 +0300 @@ -70,10 +70,6 @@ /* enables copy/deepcopy handling (work in progress) */ #undef USE_BUILTIN_COPY -#if PY_VERSION_HEX < 0x01060000 -#define PyObject_DEL(op) PyMem_DEL((op)) -#endif - /* -------------------------------------------------------------------- */ #if defined(_MSC_VER) @@ -1993,10 +1989,8 @@ /* join list elements */ PyObject* joiner; -#if PY_VERSION_HEX >= 0x01060000 PyObject* function; PyObject* args; -#endif PyObject* result; joiner = PySequence_GetSlice(string, 0, 0); @@ -2008,7 +2002,6 @@ return joiner; } -#if PY_VERSION_HEX >= 0x01060000 function = PyObject_GetAttrString(joiner, "join"); if (!function) { Py_DECREF(joiner); @@ -2024,12 +2017,6 @@ result = PyObject_CallObject(function, args); Py_DECREF(args); /* also removes list */ Py_DECREF(function); -#else - result = call( - "string", "join", - PyTuple_Pack(2, list, joiner) - ); -#endif Py_DECREF(joiner); return result; @@ -2136,7 +2123,6 @@ } -#if PY_VERSION_HEX >= 0x02020000 static PyObject* pattern_finditer(PatternObject* pattern, PyObject* args, PyObject* kw) { @@ -2158,7 +2144,6 @@ return iterator; } -#endif static PyObject* pattern_split(PatternObject* self, PyObject* args, PyObject* kw) @@ -2581,10 +2566,8 @@ pattern_split_doc}, {"findall", (PyCFunction) pattern_findall, METH_VARARGS|METH_KEYWORDS, pattern_findall_doc}, -#if PY_VERSION_HEX >= 0x02020000 {"finditer", (PyCFunction) pattern_finditer, METH_VARARGS|METH_KEYWORDS, pattern_finditer_doc}, -#endif {"scanner", (PyCFunction) pattern_scanner, METH_VARARGS|METH_KEYWORDS}, {"__copy__", (PyCFunction) pattern_copy, METH_NOARGS}, {"__deepcopy__", (PyCFunction) pattern_deepcopy, METH_O}, diff -r a206f952668e Objects/stringlib/unicodedefs.h --- a/Objects/stringlib/unicodedefs.h Thu Aug 08 18:28:53 2013 +0100 +++ b/Objects/stringlib/unicodedefs.h Sat Aug 10 13:19:27 2013 +0300 @@ -24,13 +24,8 @@ #define STRINGLIB_CHECK PyUnicode_Check #define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact -#if PY_VERSION_HEX < 0x03000000 -#define STRINGLIB_TOSTR PyObject_Unicode -#define STRINGLIB_TOASCII PyObject_Repr -#else #define STRINGLIB_TOSTR PyObject_Str #define STRINGLIB_TOASCII PyObject_ASCII -#endif #define STRINGLIB_WANT_CONTAINS_OBJ 1 diff -r a206f952668e PC/VS9.0/_sqlite3.vcproj --- a/PC/VS9.0/_sqlite3.vcproj Thu Aug 08 18:28:53 2013 +0100 +++ b/PC/VS9.0/_sqlite3.vcproj Sat Aug 10 13:19:27 2013 +0300 @@ -555,10 +555,6 @@ > - - diff -r a206f952668e PCbuild/_sqlite3.vcxproj --- a/PCbuild/_sqlite3.vcxproj Thu Aug 08 18:28:53 2013 +0100 +++ b/PCbuild/_sqlite3.vcxproj Sat Aug 10 13:19:27 2013 +0300 @@ -243,7 +243,6 @@ - diff -r a206f952668e PCbuild/_sqlite3.vcxproj.filters --- a/PCbuild/_sqlite3.vcxproj.filters Thu Aug 08 18:28:53 2013 +0100 +++ b/PCbuild/_sqlite3.vcxproj.filters Sat Aug 10 13:19:27 2013 +0300 @@ -30,9 +30,6 @@ Header Files - - Header Files - Header Files