[pypy-commit] pypy no-release-gil: Add an explicit getname() to W_TypeObjects. This should fix some
arigo
noreply at buildbot.pypy.org
Fri Aug 30 11:52:34 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: no-release-gil
Changeset: r66449:703a831151b0
Date: 2013-08-30 09:23 +0100
http://bitbucket.org/pypy/pypy/changeset/703a831151b0/
Log: Add an explicit getname() to W_TypeObjects. This should fix some
get_location_str() that use getname() and that might in theory
previously call arbitrary Python code.
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -494,6 +494,9 @@
else:
return w_self.name
+ def getname(w_self, space, default='?'):
+ return w_self.name
+
def add_subclass(w_self, w_subclass):
space = w_self.space
if not space.config.translation.rweakref:
More information about the pypy-commit
mailing list