<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules/_csv.c, branch v2.5.4</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>Added checks for integer overflows, contributed by Google. Some are</title>
<updated>2008-02-14T11:26:18+00:00</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2008-02-14T11:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=73c01d410117a573731e6c2afc9694005f8d11aa'/>
<id>73c01d410117a573731e6c2afc9694005f8d11aa</id>
<content type='text'>
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix problems found by Coverity.</title>
<updated>2006-05-10T06:57:58+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2006-05-10T06:57:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c6a989ac3a2ce1f52f48acfb73d04b604ba173b1'/>
<id>c6a989ac3a2ce1f52f48acfb73d04b604ba173b1</id>
<content type='text'>
longobject.c: also fix an ssize_t problem
  &lt;a&gt; could have been NULL, so hoist the size calc to not use &lt;a&gt;.

_ssl.c: under fail: self is DECREF'd, but it would have been NULL.

_elementtree.c: delete self if there was an error.

_csv.c: I'm not sure if lineterminator could have been anything other than
a string.  However, other string method calls are checked, so check this
one too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
longobject.c: also fix an ssize_t problem
  &lt;a&gt; could have been NULL, so hoist the size calc to not use &lt;a&gt;.

_ssl.c: under fail: self is DECREF'd, but it would have been NULL.

_elementtree.c: delete self if there was an error.

_csv.c: I'm not sure if lineterminator could have been anything other than
a string.  However, other string method calls are checked, so check this
one too.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Py_VISIT in all tp_traverse methods, instead of traversing manually or</title>
<updated>2006-04-15T21:47:09+00:00</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2006-04-15T21:47:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c6e55068cad6f2178981eec4f0a0a583b8bba21a'/>
<id>c6e55068cad6f2178981eec4f0a0a583b8bba21a</id>
<content type='text'>
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove partial change (don't edit, commit and think at the same time :P)</title>
<updated>2006-04-15T17:36:42+00:00</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2006-04-15T17:36:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=73536e039bef3aeb432c3d472a37d7bbb235d7db'/>
<id>73536e039bef3aeb432c3d472a37d7bbb235d7db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Re-instate backward compatibility by defining Py_CLEAR if it isn't</title>
<updated>2006-04-15T17:33:14+00:00</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2006-04-15T17:33:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2742c5ed633776acb0cef21801acad9214b87094'/>
<id>2742c5ed633776acb0cef21801acad9214b87094</id>
<content type='text'>
available.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
available.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for</title>
<updated>2006-04-15T17:28:34+00:00</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2006-04-15T17:28:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=edf17d8798e65c10c970ef86f7374f6c1b51027a'/>
<id>edf17d8798e65c10c970ef86f7374f6c1b51027a</id>
<content type='text'>
tp_clear methods.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tp_clear methods.
</pre>
</div>
</content>
</entry>
<entry>
<title>docstring tweak</title>
<updated>2006-04-04T16:51:13+00:00</updated>
<author>
<name>Fredrik Lundh</name>
<email>fredrik@pythonware.com</email>
</author>
<published>2006-04-04T16:51:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4aaaa49bacc59e4910fb929b7e6b641a1e66ca66'/>
<id>4aaaa49bacc59e4910fb929b7e6b641a1e66ca66</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>More unconsting.</title>
<updated>2006-02-27T17:20:04+00:00</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2006-02-27T17:20:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=02cbf4ae4baff0dbe373351ebf182cbcfc05d6bd'/>
<id>02cbf4ae4baff0dbe373351ebf182cbcfc05d6bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add const to several API functions that take char *.</title>
<updated>2005-12-10T18:50:16+00:00</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2005-12-10T18:50:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=af68c874a6803b4e90b616077a602c0593719a1d'/>
<id>af68c874a6803b4e90b616077a602c0593719a1d</id>
<content type='text'>
In C++, it's an error to pass a string literal to a char* function
without a const_cast().  Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.

I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc.  Predictably, there were a large set of functions that
needed to be fixed as a result of these changes.  The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].

One cast was required as a result of the changes:  A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In C++, it's an error to pass a string literal to a char* function
without a const_cast().  Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.

I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc.  Predictably, there were a large set of functions that
needed to be fixed as a result of these changes.  The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].

One cast was required as a result of the changes:  A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
</pre>
</div>
</content>
</entry>
<entry>
<title>Michael Hudson pointed out that the Dialect_Type object isn't INCREF'd.  Why</title>
<updated>2005-06-15T13:35:08+00:00</updated>
<author>
<name>Skip Montanaro</name>
<email>skip@pobox.com</email>
</author>
<published>2005-06-15T13:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=32c5d424fd31a283651fddbb1be10d33184bbf5d'/>
<id>32c5d424fd31a283651fddbb1be10d33184bbf5d</id>
<content type='text'>
this worked is a bit mystical.  Perhaps it never gets freed because the
object just happens never to be DECREF'd (but that seems unlikely).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this worked is a bit mystical.  Perhaps it never gets freed because the
object just happens never to be DECREF'd (but that seems unlikely).
</pre>
</div>
</content>
</entry>
</feed>
