Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r85574:11d652c7d64e
Date: 2016-07-06 11:51 +0200
http://bitbucket.org/pypy/pypy/changeset/11d652c7d64e/

Log:    This should constant-fold ffi.offsetof("structname", "fieldname")

diff --git a/pypy/module/_cffi_backend/ctypestruct.py 
b/pypy/module/_cffi_backend/ctypestruct.py
--- a/pypy/module/_cffi_backend/ctypestruct.py
+++ b/pypy/module/_cffi_backend/ctypestruct.py
@@ -90,7 +90,7 @@
         self.force_lazy_struct()
         space = self.space
         try:
-            cfield = self._fields_dict[fieldname]
+            cfield = self._getcfield_const(fieldname)
         except KeyError:
             raise OperationError(space.w_KeyError, space.wrap(fieldname))
         if cfield.bitshift >= 0:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to