<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/bltinmodule.c, branch 2.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/bltinmodule.c?h=2.1</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/bltinmodule.c?h=2.1'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2002-04-30T04:01:21Z</updated>
<entry>
<title>backport tim_one's patch:</title>
<updated>2002-04-30T04:01:21Z</updated>
<author>
<name>Anthony Baxter</name>
<email>anthonybaxter@gmail.com</email>
</author>
<published>2002-04-30T04:01:21Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=34d316c21ceacefe460a55878dea690d5ec16caf'/>
<id>urn:sha1:34d316c21ceacefe460a55878dea690d5ec16caf</id>
<content type='text'>
Repair widespread misuse of _PyString_Resize.  Since it's clear people
don't understand how this function works, also beefed up the docs.  The
most common usage error is of this form (often spread out across gotos):

	if (_PyString_Resize(&amp;s, n) &lt; 0) {
		Py_DECREF(s);
		s = NULL;
		goto outtahere;
	}

The error is that if _PyString_Resize runs out of memory, it automatically
decrefs the input string object s (which also deallocates it, since its
refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
branch ever triggers, it's an error to call Py_DECREF(s):  s is already
NULL!  A correct way to write the above is the simpler (and intended)

	if (_PyString_Resize(&amp;s, n) &lt; 0)
		goto outtahere;

Bugfix candidate.

Original patch(es):
python/dist/src/Python/bltinmodule.c:2.253
</content>
</entry>
<entry>
<title>Backport fixes for two nested scopes bugs.</title>
<updated>2002-04-20T18:21:29Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2002-04-20T18:21:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f599b7424db923cde691f733b79dd24ebe814419'/>
<id>urn:sha1:f599b7424db923cde691f733b79dd24ebe814419</id>
<content type='text'>
frameobject.c: make sure free and cell vars make it into locals, which
    makes eval work.

bltinmodule.c &amp; ceval.c: make sure a code object with free variables
    that is passed to exec or eval raises an exception.

Also duplicate the current trunk test suite in the 2.1 branch, except
for certain necessary changes: different warnings raised by 2.1, need
for __future__.
</content>
</entry>
<entry>
<title>Backport Tim's checkin 2.199:</title>
<updated>2001-05-23T12:46:45Z</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2001-05-23T12:46:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=db9486f0b36066234cf87b5fb758a40ce9fa8871'/>
<id>urn:sha1:db9486f0b36066234cf87b5fb758a40ce9fa8871</id>
<content type='text'>
Fix buglet reported on c.l.py:  map(fnc, file.xreadlines()) blows up.
Took away map()'s insistence that sequences support __len__, and cleaned
up the convoluted code that made it *look* like it really cared about
__len__ (in fact the old -&gt;len field was only *used* as a flag bit, as
the main loop only looked at its sign bit, setting the field to -1 when
IndexError got raised; renamed the field to -&gt;saw_IndexError instead).
</content>
</entry>
<entry>
<title>SF patch #413552 - Premature decref on object</title>
<updated>2001-04-07T20:34:48Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-04-07T20:34:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=388ed08cbf89ec362541bb165045739866fe9c98'/>
<id>urn:sha1:388ed08cbf89ec362541bb165045739866fe9c98</id>
<content type='text'>
Jeffery Collins pointed out that filterstring decrefs a character object
before it's done using it.  This works by accident today because another
module always happens to have an active reference too at the time.  The
accident doesn't work after his Pippy modifications, and since it *is*
an accident even in the mainline Python, it should work by design there too.
The patch accomplishes that.
</content>
</entry>
<entry>
<title>Extend support for from __future__ import nested_scopes</title>
<updated>2001-03-22T02:47:58Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-03-22T02:47:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=bc32024769eecd3c2251e00850e6a5c003aa9253'/>
<id>urn:sha1:bc32024769eecd3c2251e00850e6a5c003aa9253</id>
<content type='text'>
If a module has a future statement enabling nested scopes, they are
also enable for the exec statement and the functions compile() and
execfile() if they occur in the module.

If Python is run with the -i option, which enters interactive mode
after executing a script, and the script it runs enables nested
scopes, they are also enabled in interactive mode.

XXX The use of -i with -c "from __future__ import nested_scopes" is
not supported.  What's the point?

To support these changes, many function variants have been added to
pythonrun.c.  All the variants names end with Flags and they take an
extra PyCompilerFlags * argument.  It is possible that this complexity
will be eliminated in a future version of the interpreter in which
nested scopes are not optional.
</content>
</entry>
<entry>
<title>Move the code implementing isinstance() and issubclass() to new C</title>
<updated>2001-03-21T18:40:58Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-03-21T18:40:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=823649d544eec66a61176dbb76b51a9408c7f4ed'/>
<id>urn:sha1:823649d544eec66a61176dbb76b51a9408c7f4ed</id>
<content type='text'>
APIs, PyObject_IsInstance() and PyObject_IsSubclass() -- both
returning an int, or -1 for errors.
</content>
</entry>
<entry>
<title>Backed out the unistr() builtin.</title>
<updated>2001-01-19T21:36:19Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-01-19T21:36:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6f77667a64e258c324013e35eb4f0e5e99469f7b'/>
<id>urn:sha1:6f77667a64e258c324013e35eb4f0e5e99469f7b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>clearer error messages for apply() and "no locals"</title>
<updated>2001-01-19T03:25:05Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-01-19T03:25:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c862cf400f90e7ef63fa333d1af141934eb92c59'/>
<id>urn:sha1:c862cf400f90e7ef63fa333d1af141934eb92c59</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix for the bug in complex() just reported by Ping.</title>
<updated>2001-01-19T02:11:59Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-01-19T02:11:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8dabbf149e351c801a7d3b65891c49949be8251c'/>
<id>urn:sha1:8dabbf149e351c801a7d3b65891c49949be8251c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>This patch adds a new builtin unistr() which behaves like str()</title>
<updated>2001-01-17T17:09:53Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-01-17T17:09:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ad7c98e264bbc9c84e911417c8770f6e95ffb794'/>
<id>urn:sha1:ad7c98e264bbc9c84e911417c8770f6e95ffb794</id>
<content type='text'>
except that it always returns Unicode objects.

A new C API PyObject_Unicode() is also provided.

This closes patch #101664.

Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
</content>
</entry>
</feed>
