summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-02-25 08:14:09 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-02-25 08:14:09 -0800
commitb13facb9306eb539fbc10fd899152d092a96852f (patch)
tree77ef735eb6c0dc50485d03ec01f386bfa38cc1df
parentb11a1720201b1acc82a0e16cf1de6fb4e424dfb0 (diff)
downloadcffi-library-module.tar.gz
explanatory commentlibrary-module
-rw-r--r--cffi/vengine_gen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cffi/vengine_gen.py b/cffi/vengine_gen.py
index a2a6e78..27fe82c 100644
--- a/cffi/vengine_gen.py
+++ b/cffi/vengine_gen.py
@@ -57,7 +57,10 @@ class VGenericEngine(object):
# the C compiler
self._load(module, 'loading')
- # build the FFILibrary class and instance
+ # build the FFILibrary class and instance, this is a module subclass
+ # because modules are expected to have usually-constant-attributes and
+ # in PyPy this means the JIT is able to treat attributes as constant,
+ # which we want.
class FFILibrary(types.ModuleType):
_cffi_generic_module = module
_cffi_ffi = self.ffi