[pypy-svn] pypy fast-forward: Don't import modules that are not enabled.

amauryfa commits-noreply at bitbucket.org
Mon Jan 3 20:26:40 CET 2011

Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: fast-forward
Changeset: r40352:50f843f75ed0
Date: 2011-01-03 20:10 +0100

Log:	Don't import modules that are not enabled.

diff --git a/pypy/module/sys/vm.py b/pypy/module/sys/vm.py
--- a/pypy/module/sys/vm.py
+++ b/pypy/module/sys/vm.py
@@ -143,6 +143,9 @@
     if not space.config.objspace.usemodules._rawffi:
         return space.wrap(0)
+    return _get_dllhandle(space)
+def _get_dllhandle(space):
     # Retrieve cpyext api handle
     from pypy.module.cpyext.api import State
     handle = space.fromcache(State).get_pythonapi_handle()

More information about the Pypy-commit mailing list