diff options
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | psycopg/adapter_mxdatetime.c | 2 | ||||
| -rw-r--r-- | psycopg/psycopgmodule.c | 6 |
3 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2006-09-01 Federico Di Gregorio <fog@initd.org> + * psycopg/adapter_mxdatetime.c, psycopg/psycopgmodule.c: fixed last + problem with non-constant initializers (merge from 2.0). + * psycopg/connection_type.c: merged in double mutex destroy patch from Joerg Sonnenberger. diff --git a/psycopg/adapter_mxdatetime.c b/psycopg/adapter_mxdatetime.c index 3b23148..3fcd238 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 6ea4607..b4ea5cb 100644 --- a/psycopg/psycopgmodule.c +++ b/psycopg/psycopgmodule.c @@ -680,6 +680,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"); } |
