[pypy-svn] r23485 - pypy/dist/pypy/translator/c/src
ericvrp at codespeak.net
ericvrp at codespeak.net
Sun Feb 19 18:03:39 CET 2006
Author: ericvrp
Date: Sun Feb 19 18:03:39 2006
New Revision: 23485
Modified:
pypy/dist/pypy/translator/c/src/exception.h
Log:
Thought this would fix test_kill_raise_del_coro,
but now there is a CoroutineExit exception instead of a ValueError.
Checking this in anyway because I might just overlook the real issue.
Will continue tonight. If anyone needs it NOW, please revert r23449
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 Sun Feb 19 18:03:39 2006
@@ -20,9 +20,15 @@
#define RPyExceptionOccurred() (rpython_exc_type != NULL)
-#define RPyRaisePseudoException() rpython_exc_type = (RPYTHON_EXCEPTION_VTABLE)&rpython_exc_type
-
-#define RPyExceptionClear() rpython_exc_type = NULL
+#define RPyRaisePseudoException() do { \
+ if (rpython_exc_type == NULL) \
+ rpython_exc_type = (RPYTHON_EXCEPTION_VTABLE)&rpython_exc_type; \
+ } while (0)
+
+#define RPyExceptionClear() do { \
+ if (rpython_exc_type == (RPYTHON_EXCEPTION_VTABLE)&rpython_exc_type) \
+ rpython_exc_type = NULL; \
+ } while (0)
#define RPyRaiseException(etype, evalue) do { \
assert(!RPyExceptionOccurred()); \
More information about the Pypy-commit
mailing list