[pypy-svn] r51531 - pypy/dist/pypy/lib/_ctypes

fijal at codespeak.net fijal at codespeak.net
Fri Feb 15 14:34:33 CET 2008


Author: fijal
Date: Fri Feb 15 14:34:32 2008
New Revision: 51531

Modified:
   pypy/dist/pypy/lib/_ctypes/structure.py
Log:
use direct access to offset


Modified: pypy/dist/pypy/lib/_ctypes/structure.py
==============================================================================
--- pypy/dist/pypy/lib/_ctypes/structure.py	(original)
+++ pypy/dist/pypy/lib/_ctypes/structure.py	Fri Feb 15 14:34:32 2008
@@ -177,8 +177,9 @@
             fieldtype = self._fieldtypes[name].ctype
         except KeyError:
             return _CData.__getattribute__(self, name)
+        offset = self.__class__._fieldtypes[name].offset
         return fieldtype._CData_output(self._subarray(fieldtype, name), self,
-                                       getattr(self.__class__, name).offset)
+                                       offset)
 
     def _get_buffer_for_param(self):
         return self._buffer.byptr()



More information about the Pypy-commit mailing list