A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-April/014400.html below:

[Python-Dev] Modifying the PyUnicode_FromUnicode result

[Python-Dev] Modifying the PyUnicode_FromUnicode result [Python-Dev] Modifying the PyUnicode_FromUnicode resultMartin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat, 21 Apr 2001 11:51:56 +0200
Currently, a number of routines assume that the result of
PyUnicode_FromUnicode can be modified, i.e. they mutate the resulting
unicode object. Look at unicodeobject.c:fixup for an example, and
assume that fixfct is fixtitle (*).

This is different from PyString_FromStringAndSize, whose result can be
only modified if the str argument is NULL.

These routines broke after I applied my caching patch, since now
PyUnicode_FromUnicode may return an existing string.

Is that difference intentional? My feeling is that it is an error to
modify a unicode object, unless it is known not to be initialized.

Regards,
Martin

P.S. This was actually the first failure case when running
test_unicodedata under my patch.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4