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-May/014664.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Modules stropmodule.c,2.76,2.77

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Modules stropmodule.c,2.76,2.77Fredrik Lundh fredrik@effbot.org
Thu, 10 May 2001 01:19:40 +0200
tim wrote:

> Modified Files:
> stropmodule.c 
> Log Message:
> SF bug #422088: [OSF1 alpha] string.replace().
> Platform blew up on "123".replace("123", "").  Michael Hudson pinned the
> blame on platform malloc(0) returning NULL.

any reason why the

#ifdef MALLOC_ZERO_RETURNS_NULL

macro (in pyport.h) isn't set / doesn't take care of this?

(and is it just me, or does the strop.replace function allocate
a buffer, copy the result to that buffer, only to copy it into a
string and throw the buffer away?  no wonder u"".replace() is
30% faster than "".replace() ;-)

Cheers /F




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