[pypy-commit] pypy ClassRepr: kill unused flag

rlamy noreply at buildbot.pypy.org
Mon Oct 13 16:04:48 CEST 2014


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: ClassRepr
Changeset: r73915:426445030e02
Date: 2014-10-13 04:33 +0100
http://bitbucket.org/pypy/pypy/changeset/426445030e02/

Log:	kill unused flag

diff --git a/rpython/rtyper/rclass.py b/rpython/rtyper/rclass.py
--- a/rpython/rtyper/rclass.py
+++ b/rpython/rtyper/rclass.py
@@ -288,16 +288,12 @@
         self.allmethods = allmethods
         self.vtable = None
 
-    def getvtable(self, cast_to_typeptr=True):
+    def getvtable(self):
         """Return a ptr to the vtable of this type."""
         if self.vtable is None:
             self.vtable = malloc(self.vtable_type, immortal=True)
             self.setup_vtable(self.vtable, self)
-        #
-        vtable = self.vtable
-        if cast_to_typeptr:
-            vtable = cast_vtable_to_typeptr(vtable)
-        return vtable
+        return cast_vtable_to_typeptr(self.vtable)
 
     def getruntime(self, expected_type):
         assert expected_type == CLASSTYPE


More information about the pypy-commit mailing list