[pypy-svn] r53993 - pypy/branch/io-improvements/pypy/rpython/lltypesystem

arigo at codespeak.net arigo at codespeak.net
Tue Apr 22 11:15:23 CEST 2008


Author: arigo
Date: Tue Apr 22 11:15:23 2008
New Revision: 53993

Modified:
   pypy/branch/io-improvements/pypy/rpython/lltypesystem/rffi.py
Log:
This is not much code, but let's make sure it is inlined to avoid
the allocation of the tuple.


Modified: pypy/branch/io-improvements/pypy/rpython/lltypesystem/rffi.py
==============================================================================
--- pypy/branch/io-improvements/pypy/rpython/lltypesystem/rffi.py	(original)
+++ pypy/branch/io-improvements/pypy/rpython/lltypesystem/rffi.py	Tue Apr 22 11:15:23 2008
@@ -521,6 +521,7 @@
     else:
         raw_buf = lltype.malloc(CCHARP.TO, count, flavor='raw')
         return raw_buf, lltype.nullptr(STR)
+alloc_buffer._always_inline_ = True     # to get rid of the returned tuple obj
 
 # (char*, str, int, int) -> None
 def str_from_buffer(raw_buf, gc_buf, allocated_size, needed_size):



More information about the Pypy-commit mailing list