Author: Armin Rigo <[email protected]>
Branch: cpyext-gc-support
Changeset: r80401:6d5788d930a9
Date: 2015-10-23 09:00 +0200
http://bitbucket.org/pypy/pypy/changeset/6d5788d930a9/
Log: fix PyString_InternInPlace
diff --git a/pypy/module/cpyext/stringobject.py
b/pypy/module/cpyext/stringobject.py
--- a/pypy/module/cpyext/stringobject.py
+++ b/pypy/module/cpyext/stringobject.py
@@ -250,10 +250,10 @@
This function is not available in 3.x and does not have a PyBytes
alias."""
- w_str = from_ref(space, string[0])
+ w_str = from_pyobj(space, string[0])
w_str = space.new_interned_w_str(w_str)
Py_DecRef(space, string[0])
- string[0] = make_ref(space, w_str)
+ string[0] = get_pyobj_and_incref(space, w_str)
@cpython_api([PyObject, CONST_STRING, CONST_STRING], PyObject)
def PyString_AsEncodedObject(space, w_str, encoding, errors):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit