Author: Armin Rigo <[email protected]>
Branch:
Changeset: r2863:bcd1faac093e
Date: 2017-01-20 09:32 +0100
http://bitbucket.org/cffi/cffi/changeset/bcd1faac093e/
Log: Move back "import cparser" to FFI.__init__, because that module only
needs to be imported if we instantiate FFI (admittedly, very often)
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -1,7 +1,7 @@
import sys, types
from .lock import allocate_lock
from .error import CDefError
-from . import cparser, model
+from . import model
try:
callable
@@ -60,6 +60,7 @@
# 'backend=backend_ctypes.CTypesBackend()', but don't
# rely on it! It's probably not going to work well.)
+ from . import cparser
self._backend = backend
self._lock = allocate_lock()
self._parser = cparser.Parser()
diff --git a/cffi/ffiplatform.py b/cffi/ffiplatform.py
--- a/cffi/ffiplatform.py
+++ b/cffi/ffiplatform.py
@@ -1,5 +1,5 @@
import sys, os
-from .error import VerificationError, VerificationMissing
+from .error import VerificationError
LIST_OF_FILE_NAMES = ['sources', 'include_dirs', 'library_dirs',
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit