diff --git a/ChangeLog b/ChangeLog index de22612a..f359c027 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-02 Federico Di Gregorio + * psycopg/adapter_mxdatetime.c, psycopg/psycopgmodule.c: fixed last + problem with non-constant initializers. + * psycopg/connection_type.c: applied patch from Joerg Sonnenberger to fix a double mutex destroy. diff --git a/psycopg/adapter_mxdatetime.c b/psycopg/adapter_mxdatetime.c index 3b231489..3fcd238c 100644 --- a/psycopg/adapter_mxdatetime.c +++ b/psycopg/adapter_mxdatetime.c @@ -258,7 +258,7 @@ PyTypeObject mxdatetimeType = { 0, /*tp_dictoffset*/ mxdatetime_init, /*tp_init*/ - PyType_GenericAlloc, /*tp_alloc*/ + 0, /*tp_alloc*/ mxdatetime_new, /*tp_new*/ (freefunc)mxdatetime_del, /*tp_free Low-level free-memory routine */ 0, /*tp_is_gc For PyObject_IS_GC */ diff --git a/psycopg/psycopgmodule.c b/psycopg/psycopgmodule.c index 426fb27a..5f378568 100644 --- a/psycopg/psycopgmodule.c +++ b/psycopg/psycopgmodule.c @@ -667,6 +667,10 @@ init_psycopg(void) #ifdef HAVE_PYDATETIME pydatetimeType.tp_alloc = PyType_GenericAlloc; #endif - + +#ifdef HAVE_MXDATETIME + mxdatetimeType.tp_alloc = PyType_GenericAlloc; +#endif + Dprintf("initpsycopg: module initialization complete"); }