[pypy-commit] pypy py3.5: adapt is_interned_string() for py3
rlamy
pypy.commits at gmail.com
Sun Aug 6 19:24:25 EDT 2017
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r92104:e622a373b04c
Date: 2017-08-07 00:23 +0100
http://bitbucket.org/pypy/pypy/changeset/e622a373b04c/
Log: adapt is_interned_string() for py3
diff --git a/pypy/module/cpyext/test/test_cpyext.py b/pypy/module/cpyext/test/test_cpyext.py
--- a/pypy/module/cpyext/test/test_cpyext.py
+++ b/pypy/module/cpyext/test/test_cpyext.py
@@ -97,10 +97,10 @@
def is_interned_string(space, w_obj):
try:
- s = space.str_w(w_obj)
+ u = space.unicode_w(w_obj)
except OperationError:
return False
- return space.is_interned_str(s)
+ return space.interned_strings.get(u) is not None
def is_allowed_to_leak(space, obj):
from pypy.module.cpyext.methodobject import W_PyCFunctionObject
More information about the pypy-commit
mailing list