Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r57574:f62e922e0c5f
Date: 2012-09-25 15:50 +0200
http://bitbucket.org/pypy/pypy/changeset/f62e922e0c5f/

Log:    Report at least a little bit more clearly than "Fatal RPython error:
        OSError".

diff --git a/pypy/module/_ffi/interp_funcptr.py 
b/pypy/module/_ffi/interp_funcptr.py
--- a/pypy/module/_ffi/interp_funcptr.py
+++ b/pypy/module/_ffi/interp_funcptr.py
@@ -287,7 +287,11 @@
                                                                w_restype)
     addr = rffi.cast(rffi.VOIDP, addr)
     func = libffi.Func(name, argtypes, restype, addr, flags)
-    return W_FuncPtr(func, argtypes_w, w_restype)
+    try:
+        return W_FuncPtr(func, argtypes_w, w_restype)
+    except OSError:
+        raise OperationError(space.w_SystemError,
+                         space.wrap("internal error building the Func object"))
 
 
 W_FuncPtr.typedef = TypeDef(
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to