diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-14 01:24:44 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-14 01:24:44 (GMT) |
commit | 380532117c2547bb0dedf6f85efa66d18a9abb88 (patch) | |
tree | 33e690cd422859aa0272fbe0a9d1f163e77fbaf2 /Modules | |
parent | 8a78cadf561ea67649a84d9b4055dd4c24e2e0ba (diff) | |
download | cpython-380532117c2547bb0dedf6f85efa66d18a9abb88.zip cpython-380532117c2547bb0dedf6f85efa66d18a9abb88.tar.gz cpython-380532117c2547bb0dedf6f85efa66d18a9abb88.tar.bz2 |
Merged revisions 59465-59487 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r59467 | georg.brandl | 2007-12-11 17:32:49 +0100 (Tue, 11 Dec 2007) | 2 lines
Add another GHOP contributor.
........
r59468 | kurt.kaiser | 2007-12-11 20:35:12 +0100 (Tue, 11 Dec 2007) | 3 lines
IDLE_tabbedpages.071101.patch Tal Einat
Cosmetic changes, one bug. Remove tabpage.py, replaced by tabbedpages.py
........
r59471 | gerhard.haering | 2007-12-11 22:07:40 +0100 (Tue, 11 Dec 2007) | 9 lines
Forward-port of commit 59184.
- Backported a workaround for a bug in SQLite 3.2.x/3.3.x versions where a
statement recompilation with no bound parameters lead to a segfault
- Backported a fix necessary because of an SQLite API change in version
3.5.
This prevents segfaults when executing empty queries, like our test suite
does
........
r59475 | christian.heimes | 2007-12-12 19:09:06 +0100 (Wed, 12 Dec 2007) | 1 line
Fixed a nasty problem in the xxmodule.c
........
r59478 | raymond.hettinger | 2007-12-13 01:08:37 +0100 (Thu, 13 Dec 2007) | 1 line
Fix bug 1604. deque.__init__() did not clear existing contents like list.__init__. Not a backport candidate.
........
r59480 | alexandre.vassalotti | 2007-12-13 18:58:23 +0100 (Thu, 13 Dec 2007) | 2 lines
Fix issue #1313119: urlparse "caches" parses regardless of encoding
........
r59482 | christian.heimes | 2007-12-13 20:23:16 +0100 (Thu, 13 Dec 2007) | 1 line
Fixed bug #1613: Makefile's VPATH feature is broken
........
r59484 | guido.van.rossum | 2007-12-13 21:50:10 +0100 (Thu, 13 Dec 2007) | 3 lines
Patch #1608. Someone with access to autoconf 2.61 or higher needs to
run it and check in the resulting configure file.
........
r59485 | thomas.heller | 2007-12-13 22:20:29 +0100 (Thu, 13 Dec 2007) | 1 line
Ran autoconf.
........
r59486 | raymond.hettinger | 2007-12-13 23:55:52 +0100 (Thu, 13 Dec 2007) | 1 line
Simplify implementation of __replace__()
........
r59487 | raymond.hettinger | 2007-12-14 00:52:59 +0100 (Fri, 14 Dec 2007) | 1 line
Small speedup
........
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_collectionsmodule.c | 1 | ||||
-rw-r--r-- | Modules/_sqlite/statement.c | 6 | ||||
-rw-r--r-- | Modules/_sqlite/util.c | 12 | ||||
-rw-r--r-- | Modules/xxmodule.c | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 20c0774..0d1df5f 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -784,6 +784,7 @@ deque_init(dequeobject *deque, PyObject *args, PyObject *kwdargs) } } deque->maxlen = maxlen; + deque_clear(deque); if (iterable != NULL) { PyObject *rv = deque_extend(deque, iterable); if (rv == NULL) diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index f81e642..126ba6f 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -231,7 +231,11 @@ int pysqlite_statement_recompile(pysqlite_Statement* self, PyObject* params) */ #ifdef SQLITE_VERSION_NUMBER #if SQLITE_VERSION_NUMBER >= 3002002 - (void)sqlite3_transfer_bindings(self->st, new_st); + /* The check for the number of parameters is necessary to not trigger a + * bug in certain SQLite versions (experienced in 3.2.8 and 3.3.4). */ + if (sqlite3_bind_parameter_count(self->st) > 0) { + (void)sqlite3_transfer_bindings(self->st, new_st); + } #endif #else statement_bind_parameters(self, params); diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c index b70297b..5e78d58 100644 --- a/Modules/_sqlite/util.c +++ b/Modules/_sqlite/util.c @@ -28,9 +28,15 @@ int _sqlite_step_with_busyhandler(sqlite3_stmt* statement, pysqlite_Connection* { int rc; - Py_BEGIN_ALLOW_THREADS - rc = sqlite3_step(statement); - Py_END_ALLOW_THREADS + if (statement == NULL) { + /* this is a workaround for SQLite 3.5 and later. it now apparently + * returns NULL for "no-operation" statements */ + rc = SQLITE_OK; + } else { + Py_BEGIN_ALLOW_THREADS + rc = sqlite3_step(statement); + Py_END_ALLOW_THREADS + } return rc; } diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c index 6b998b1..5c371fb 100644 --- a/Modules/xxmodule.c +++ b/Modules/xxmodule.c @@ -349,7 +349,7 @@ initxx(void) Str_Type.tp_base = &PyUnicode_Type; /* Finalize the type object including setting type of the new type - * object; doing it here is required for portability, too. /* + * object; doing it here is required for portability, too. */ if (PyType_Ready(&Xxo_Type) < 0) return; |