[pypy-svn] r34492 - pypy/dist/pypy/rlib

arigo at codespeak.net arigo at codespeak.net
Sat Nov 11 17:49:33 CET 2006


Author: arigo
Date: Sat Nov 11 17:49:32 2006
New Revision: 34492

Modified:
   pypy/dist/pypy/rlib/rctypesobject.py
Log:
Add '_' in front of the internal method names.


Modified: pypy/dist/pypy/rlib/rctypesobject.py
==============================================================================
--- pypy/dist/pypy/rlib/rctypesobject.py	(original)
+++ pypy/dist/pypy/rlib/rctypesobject.py	Sat Nov 11 17:49:32 2006
@@ -69,21 +69,21 @@
             def copyfrom1(self, srcbox):
                 assert isinstance(srcbox, cls)
                 llmemory.raw_memcopy(srcbox.addr, self.addr, cls.rawsize)
-                self.copykeepalives(0, srcbox)
+                self._copykeepalives(0, srcbox)
             cls.copyfrom = copyfrom1
 
     def sameaddr(self, otherbox):
         return self.addr == otherbox.addr
 
-    def keepalivememblock(self, index, memblock):
+    def _keepalivememblock(self, index, memblock):
         self.memblock.setkeepalive(index, memblock)
 
-    def copykeepalives(self, startindex, srcbox):
+    def _copykeepalives(self, startindex, srcbox):
         for i in range(self.num_keepalives):
             memblock = srcbox.memblock.getkeepalive(startindex + i)
             self.memblock.setkeepalive(i, memblock)
 
-    def getmemblock(self, index, target_num_keepalives):
+    def _getmemblock(self, index, target_num_keepalives):
         targetmemblock = self.memblock.getkeepalive(index)
         if targetmemblock is None:
             targetmemblock = RawMemBlock(target_num_keepalives)
@@ -142,7 +142,7 @@
                 ptr = self.ll_ref(RCTypesPtr.CDATATYPE)
                 targetaddr = llmemory.cast_ptr_to_adr(ptr[0])
                 targetkeepalives = contentscls.num_keepalives
-                targetmemblock = self.getmemblock(0, targetkeepalives)
+                targetmemblock = self._getmemblock(0, targetkeepalives)
                 return contentscls(targetaddr, targetmemblock)
 
             def set_contents(self, newcontentsbox):
@@ -151,7 +151,7 @@
                 ptr = self.ll_ref(RCTypesPtr.CDATATYPE)
                 ptr[0] = llmemory.cast_adr_to_ptr(targetaddr,
                                                   RCTypesPtr.LLTYPE)
-                self.keepalivememblock(0, targetmemblock)
+                self._keepalivememblock(0, targetmemblock)
 
         contentscls._ptrcls = RCTypesPtr
         return RCTypesPtr



More information about the Pypy-commit mailing list