[pypy-svn] r47838 - pypy/dist/pypy/rpython/lltypesystem
arigo at codespeak.net
arigo at codespeak.net
Wed Oct 24 17:41:52 CEST 2007
Author: arigo
Date: Wed Oct 24 17:41:51 2007
New Revision: 47838
Modified:
pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py
Log:
A more explicit error message than "NameError: standard_c_lib".
Modified: pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py (original)
+++ pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py Wed Oct 24 17:41:51 2007
@@ -513,6 +513,9 @@
# ____________________________________________
def get_ctypes_callable(funcptr, calling_conv):
+ if not ctypes:
+ raise ImportError("ctypes is needed to use ll2ctypes")
+
def get_on_lib(lib, elem):
""" Wrapper to always use lib[func] instead of lib.func
"""
More information about the Pypy-commit
mailing list