[Zope3-checkins] CVS: Zope3/src/pythonlib/compat22 - _csv.c:1.2

Godefroid Chapelle gotcha@swing.be
Wed, 11 Jun 2003 05:13:15 -0400


Update of /cvs-repository/Zope3/src/pythonlib/compat22
In directory cvs.zope.org:/tmp/cvs-serv17531

Modified Files:
	_csv.c 
Log Message:

changes to allow this to compile under cygwin.

cygwin gcc was giving error such as
initializer element is not constant

where PyType_GenericAlloc was used in the type-definition
struct-initialiser. (Or whatever it is properly called...)



=== Zope3/src/pythonlib/compat22/_csv.c 1.1 => 1.2 ===
--- Zope3/src/pythonlib/compat22/_csv.c:1.1	Mon Jun  9 13:39:21 2003
+++ Zope3/src/pythonlib/compat22/_csv.c	Wed Jun 11 05:13:14 2003
@@ -442,7 +442,7 @@
 	0,					/* tp_descr_set */
 	0,					/* tp_dictoffset */
 	(initproc)dialect_init,			/* tp_init */
-	PyType_GenericAlloc,	                /* tp_alloc */
+	0, /*PyType_GenericAlloc,*/	                /* tp_alloc */
 	dialect_new,			        /* tp_new */
 	0,                           		/* tp_free */
 };
@@ -1504,6 +1504,9 @@
 
 	if (PyType_Ready(&Dialect_Type) < 0)
 		return;
+
+
+    Dialect_Type.tp_alloc = PyType_GenericAlloc;
 
 	if (PyType_Ready(&Reader_Type) < 0)
 		return;