[python] python-utils.c (python_string_to_unicode): Always return a new reference.
Phil Muldoon
pmuldoon@redhat.com
Thu Feb 26 18:01:00 GMT 2009
Hi,
The python_string_to_unicode function previously returned either a
borrowed or new reference. This depended on some internal unicode
versus encoded string checks. Because of the new versus borrowed
reference question, and the inability to determine which was
subsequently returned, this brought ambiguity to the clean-up decisions
around this function. This patch removes the ambiguity by altering
python_string_to_unicode to always return a new reference, and alters
the consumers of this function to deal with this new behaviour
appropriately.
This patch does not increase or decrease the number of regressions with
make check. Tested and built on Fedora 10 x86_64.
2009-02-26 Phil Muldoon <pmuldoon@redhat.com>
* python/python-utils.c (python_string_to_unicode): Always
return
a new reference.
(python_string_to_target_string): Decrement transient python
instance.
(python_string_to_host_string): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unicode_decref_cvs.patch
Type: text/x-patch
Size: 1507 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090226/4c7be4fc/attachment.bin>
More information about the Gdb-patches
mailing list