[pypy-svn] r51954 - pypy/dist/pypy/translator/llvm
arigo at codespeak.net
arigo at codespeak.net
Fri Feb 29 12:53:53 CET 2008
Author: arigo
Date: Fri Feb 29 12:53:50 2008
New Revision: 51954
Modified:
pypy/dist/pypy/translator/llvm/modwrapper.py
Log:
Must clear the RPython-level exception between two invocations
via ctypes, otherwise Extreme Confusion occurs.
Modified: pypy/dist/pypy/translator/llvm/modwrapper.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/modwrapper.py (original)
+++ pypy/dist/pypy/translator/llvm/modwrapper.py Fri Feb 29 12:53:50 2008
@@ -18,6 +18,10 @@
rpyexc_occured.argtypes = []
rpyexc_occured.restype = ctypes.c_byte
+rpyexc_clear = _c.pypy_rpyexc_clear
+rpyexc_clear.argtypes = []
+rpyexc_clear.restype = None
+
rpyexc_fetch_type = _c.pypy_rpyexc_fetch_type
rpyexc_fetch_type.argtypes = []
rpyexc_fetch_type.restype = ctypes.c_void_p
@@ -39,6 +43,8 @@
if not startup_code():
raise Exception("Failed to startup")
_setup = True
+ else:
+ rpyexc_clear()
args = [f(a) for a, f in zip(args, to_llargs)]
result = __entrypoint__(*args)
if rpyexc_occured():
More information about the Pypy-commit
mailing list