summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2006-09-02 09:00:47 +0000
committerFederico Di Gregorio <fog@initd.org>2006-09-02 09:00:47 +0000
commita9d307140e8366bc16a280f6edba12ea41fa0e1c (patch)
tree38d0cabe3c1b72098ceccf8d4b1545d200c20bdd
parentdbd976bc03106a869c2ccad622749161126693d5 (diff)
downloadpsycopg2-a9d307140e8366bc16a280f6edba12ea41fa0e1c.tar.gz
mx fix to build on win32.
-rw-r--r--ChangeLog3
-rw-r--r--psycopg/adapter_mxdatetime.c2
-rw-r--r--psycopg/psycopgmodule.c6
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 670c2fe..8349fb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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");
}