Author: Armin Rigo <[email protected]>
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:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit