[Zodb-checkins] SVN: ZODB/branches/jim-zeo-blob/s Only compile winlock on windows.

Jim Fulton jim at zope.com
Wed May 16 13:36:41 EDT 2007


Log message for revision 75809:
  Only compile winlock on windows.
  

Changed:
  U   ZODB/branches/jim-zeo-blob/setup.py
  U   ZODB/branches/jim-zeo-blob/src/ZODB/winlock.c

-=-
Modified: ZODB/branches/jim-zeo-blob/setup.py
===================================================================
--- ZODB/branches/jim-zeo-blob/setup.py	2007-05-16 17:30:48 UTC (rev 75808)
+++ ZODB/branches/jim-zeo-blob/setup.py	2007-05-16 17:36:41 UTC (rev 75809)
@@ -162,17 +162,19 @@
                       sources= ['src/persistent/TimeStamp.c']
                       )
 
-winlock = Extension(name = 'ZODB.winlock',
-                    include_dirs = include,
-                    sources = ['src/ZODB/winlock.c']
-                    )
 
 exts += [cPersistence,
          cPickleCache,
          TimeStamp,
-         winlock,
         ]
 
+if sys.platform == 'win32':
+    exts.append(Extension(name = 'ZODB.winlock',
+                          include_dirs = include,
+                          sources = ['src/ZODB/winlock.c']
+                          )
+                )
+
 # The ZODB.zodb4 code is not being packaged, because it is only
 # need to convert early versions of Zope3 databases to ZODB3.
 

Modified: ZODB/branches/jim-zeo-blob/src/ZODB/winlock.c
===================================================================
--- ZODB/branches/jim-zeo-blob/src/ZODB/winlock.c	2007-05-16 17:30:48 UTC (rev 75808)
+++ ZODB/branches/jim-zeo-blob/src/ZODB/winlock.c	2007-05-16 17:36:41 UTC (rev 75809)
@@ -20,8 +20,6 @@
 
 static PyObject *Error, *LockError;
 
-#ifdef MS_WIN32
-
 #include <windows.h>
 #include <io.h>
 
@@ -75,14 +73,7 @@
   
   {NULL,		NULL}		/* sentinel */
 };
-#else
 
-static struct PyMethodDef methods[] = {
-  {NULL,		NULL}		/* sentinel */
-};
-
-#endif
-
 /* Initialization function for the module (*must* be called initwinlock) */
 
 #ifndef DL_EXPORT	/* declarations for DLL import/export */



More information about the Zodb-checkins mailing list