diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-01-14 12:54:35 +0100 |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-01-14 12:54:35 +0100 |
commit | 76f2d103d60e9d4e843b0bbeccd4560737839e1c (patch) | |
tree | 677d768f7345a01b4f1bc3cae8f16e2a8b9cfdfc /lib_pypy | |
parent | Add some checks about bitfields in ctypes.Structure (diff) | |
download | pypy-76f2d103d60e9d4e843b0bbeccd4560737839e1c.tar.gz pypy-76f2d103d60e9d4e843b0bbeccd4560737839e1c.tar.bz2 pypy-76f2d103d60e9d4e843b0bbeccd4560737839e1c.zip |
ctypes: Add support for Structure._pack_
Diffstat (limited to 'lib_pypy')
-rw-r--r-- | lib_pypy/_ctypes/structure.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib_pypy/_ctypes/structure.py b/lib_pypy/_ctypes/structure.py index f309e1ae4d..ac89e0a0c8 100644 --- a/lib_pypy/_ctypes/structure.py +++ b/lib_pypy/_ctypes/structure.py @@ -71,7 +71,8 @@ class Field(object): # ________________________________________________________________ def _set_shape(tp, rawfields, is_union=False): - tp._ffistruct = _rawffi.Structure(rawfields, is_union) + tp._ffistruct = _rawffi.Structure(rawfields, is_union, + getattr(self, '_pack_', 0)) tp._ffiargshape = tp._ffishape = (tp._ffistruct, 1) tp._fficompositesize = tp._ffistruct.size |