Package: python-pysqlite2 Version: 2.3.2-1 Severity: normal Tags: patch Hello, When trying to run my mod_python-powered site together with mod_cache, it crashes(segfault). The site uses the dbapi2 module of pysqlite2 for its database-connectivity.
Googling, I found this site: http://www.initd.org/tracker/pysqlite/ticket/174, and since the symptoms and version matched, I tried the patch[1]. Used apt-get source, patch -u -p1 < patch-file and debuild I made myself a debianpackage with the patch applied, and it worked when I installed the patched package, without problems. The patch is not mine, but I attached it below for your convenience. Thanks for all your efforts to produce a universal OS! -- Bjarte Aarmo Lund <[EMAIL PROTECTED]>
--- pysqlite-2.3.2/src/cache.c.orig 2006-09-07 17:43:29.000000000 +0200 +++ pysqlite-2.3.2/src/cache.c 2006-09-07 17:45:42.000000000 +0200 @@ -25,7 +25,7 @@ #include <limits.h> /* only used internally */ -Node* new_node(PyObject* key, PyObject* data) +static Node* new_node(PyObject* key, PyObject* data) { Node* node; @@ -46,7 +46,7 @@ return node; } -void node_dealloc(Node* self) +static void node_dealloc(Node* self) { Py_DECREF(self->key); Py_DECREF(self->data); @@ -54,7 +54,7 @@ self->ob_type->tp_free((PyObject*)self); } -int cache_init(Cache* self, PyObject* args, PyObject* kwargs) +static int cache_init(Cache* self, PyObject* args, PyObject* kwargs) { PyObject* factory; int size = 10; @@ -86,7 +86,7 @@ return 0; } -void cache_dealloc(Cache* self) +static void cache_dealloc(Cache* self) { Node* node; Node* delete_node; @@ -358,7 +358,7 @@ 0 /* tp_free */ }; -extern int cache_setup_types(void) +int cache_setup_types(void) { int rc; --- pysqlite-2.3.2/src/cache.h.orig 2006-09-07 17:48:54.000000000 +0200 +++ pysqlite-2.3.2/src/cache.h 2006-09-07 17:49:02.000000000 +0200 @@ -61,11 +61,6 @@ extern PyTypeObject NodeType; extern PyTypeObject CacheType; -int node_init(Node* self, PyObject* args, PyObject* kwargs); -void node_dealloc(Node* self); - -int cache_init(Cache* self, PyObject* args, PyObject* kwargs); -void cache_dealloc(Cache* self); PyObject* cache_get(Cache* self, PyObject* args); int cache_setup_types(void);