[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] Patch to make the C extension compile under Cygwin.
Update of /home/minion/cvsroot/src/minion/src
In directory moria.mit.edu:/tmp/cvs-serv24881/src
Modified Files:
crypt.c main.c tls.c
Log Message:
Patch to make the C extension compile under Cygwin.
Gods, what am I doing?
Index: crypt.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/crypt.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- crypt.c 12 Feb 2003 01:23:24 -0000 1.19
+++ crypt.c 16 Feb 2003 18:46:31 -0000 1.20
@@ -786,7 +786,7 @@
"An RSA key. May be public or private.";
PyTypeObject mm_RSA_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(/*&PyType_Type*/ 0)
0, /*ob_size*/
"mixminion._minionlib.RSA", /*tp_name*/
sizeof(mm_RSA), /*tp_basicsize*/
Index: main.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/main.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- main.c 12 Feb 2003 01:23:24 -0000 1.11
+++ main.c 16 Feb 2003 18:46:31 -0000 1.12
@@ -117,6 +117,11 @@
"TLSClosed", mm_TLSClosed__doc__))
return;
+ /* We set ob_type here so that Cygwin is happy. */
+ mm_RSA_Type.ob_type = mm_TLSContext_Type.ob_type =
+ mm_TLSSock_Type.ob_type = &PyType_Type;
+
+
Py_INCREF(&mm_RSA_Type);
if (PyDict_SetItemString(d, "RSA", (PyObject*)&mm_RSA_Type) < 0)
return;
Index: tls.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/tls.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- tls.c 12 Feb 2003 01:23:25 -0000 1.15
+++ tls.c 16 Feb 2003 18:46:31 -0000 1.16
@@ -278,7 +278,7 @@
"sockets. It has a single method, 'sock()', to create new sockets.\n";
PyTypeObject mm_TLSContext_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(/*&PyType_Type*/ 0)
0, /*ob_size*/
"mixminion._minionlib.TLSContext", /*tp_name*/
sizeof(mm_TLSContext), /*tp_basicsize*/