[pypy-commit] pypy default: Fix reference count in PyString_InternInPlace()
amauryfa
noreply at buildbot.pypy.org
Wed Feb 15 09:05:38 CET 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r52498:bb2eb64cc7e6
Date: 2012-02-15 09:04 +0100
http://bitbucket.org/pypy/pypy/changeset/bb2eb64cc7e6/
Log: Fix reference count in 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
@@ -267,6 +267,7 @@
alias."""
w_str = from_ref(space, string[0])
w_str = space.new_interned_w_str(w_str)
+ Py_DecRef(space, string[0])
string[0] = make_ref(space, w_str)
@cpython_api([PyObject, rffi.CCHARP, rffi.CCHARP], PyObject)
More information about the pypy-commit
mailing list