[pypy-svn] r14753 - in pypy/dist/pypy/translator/c: . src

tismer at codespeak.net tismer at codespeak.net
Tue Jul 19 01:22:27 CEST 2005


Author: tismer
Date: Tue Jul 19 01:22:26 2005
New Revision: 14753

Modified:
   pypy/dist/pypy/translator/c/funcgen.py
   pypy/dist/pypy/translator/c/src/exception.h
   pypy/dist/pypy/translator/c/src/ll_time.h
Log:
windows support:

- added missing include <windows.h> for ll_time.h
- renamed macro RaiseException, because windows uses it.

Modified: pypy/dist/pypy/translator/c/funcgen.py
==============================================================================
--- pypy/dist/pypy/translator/c/funcgen.py	(original)
+++ pypy/dist/pypy/translator/c/funcgen.py	Tue Jul 19 01:22:26 2005
@@ -210,7 +210,7 @@
                     # exceptional return block
                     exc_cls   = self.expr(block.inputargs[0])
                     exc_value = self.expr(block.inputargs[1])
-                    yield 'RaiseException(%s, %s);' % (exc_cls, exc_value)
+                    yield 'RPyRaiseException(%s, %s);' % (exc_cls, exc_value)
                     for line in self.return_with_error():
                         yield line 
                 else:

Modified: pypy/dist/pypy/translator/c/src/exception.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/exception.h	(original)
+++ pypy/dist/pypy/translator/c/src/exception.h	Tue Jul 19 01:22:26 2005
@@ -14,7 +14,7 @@
 
 #define ExceptionOccurred()	(rpython_exc_type != NULL)
 
-#define RaiseException(etype, evalue)		\
+#define RPyRaiseException(etype, evalue)		\
 		assert(!ExceptionOccurred());	\
 		rpython_exc_type = etype;	\
 		rpython_exc_value = evalue
@@ -78,7 +78,7 @@
 /******************************************************************/
 
 #define ExceptionOccurred()           PyErr_Occurred()
-#define RaiseException(etype, evalue) PyErr_Restore(etype, evalue, NULL)
+#define RPyRaiseException(etype, evalue) PyErr_Restore(etype, evalue, NULL)
 #define FetchException(etypevar, evaluevar, ignored)   {	\
 		PyObject *__tb;					\
 		PyErr_Fetch(&etypevar, &evaluevar, &__tb);	\

Modified: pypy/dist/pypy/translator/c/src/ll_time.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/ll_time.h	(original)
+++ pypy/dist/pypy/translator/c/src/ll_time.h	Tue Jul 19 01:22:26 2005
@@ -9,6 +9,7 @@
 #if defined(MS_WINDOWS) && !defined(MS_WIN64) && !defined(__BORLANDC__)
 /* Win32 has better clock replacement
    XXX Win64 does not yet, but might when the platform matures. */
+#include <windows.h>
 
 double LL_time_clock(void)
 {



More information about the Pypy-commit mailing list