[pypy-svn] r47186 - pypy/branch/kill-keepalives-again/pypy/rpython/lltypesystem
arigo at codespeak.net
arigo at codespeak.net
Fri Oct 5 15:11:15 CEST 2007
Author: arigo
Date: Fri Oct 5 15:11:14 2007
New Revision: 47186
Modified:
pypy/branch/kill-keepalives-again/pypy/rpython/lltypesystem/llmemory.py
Log:
Fix for addr + FieldOffset(T, 'name_of_inlined_substruct').
Modified: pypy/branch/kill-keepalives-again/pypy/rpython/lltypesystem/llmemory.py
==============================================================================
--- pypy/branch/kill-keepalives-again/pypy/rpython/lltypesystem/llmemory.py (original)
+++ pypy/branch/kill-keepalives-again/pypy/rpython/lltypesystem/llmemory.py Fri Oct 5 15:11:14 2007
@@ -114,7 +114,8 @@
struct = lltype.cast_pointer(lltype.Ptr(self.TYPE), struct)
FIELD = getattr(self.TYPE, self.fldname)
if isinstance(FIELD, lltype.ContainerType):
- return getattr(struct, self.fldname)
+ substruct = struct._obj._getattr(self.fldname)
+ return substruct._as_ptr()
else:
return lltype.direct_fieldptr(struct, self.fldname)
More information about the pypy-svn
mailing list