| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
| |
|
|
|
|
| |
Added checks for integer overflows, contributed by Google. Some are
only available if asserts are left in the code, in cases where they
can't be triggered from Python code.
|
| |
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
|
| | |
|
| |
|
|
| |
Py_REFCNT. Macros for b/w compatibility are available.
|
| |
|
|
|
| |
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
longobject.c: also fix an ssize_t problem
<a> could have been NULL, so hoist the size calc to not use <a>.
_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.
|
| |
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
available.
|
| |
|
|
| |
tp_clear methods.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 *.
|
| |
|
|
|
| |
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).
|
| |
|
|
| |
validate. Closes 1220242.
|
| |
|
|
|
| |
this allows for better handling of newline characters in quoted fields (and
hopefully resolves Bug 967934).
|
| | |
|
| |
|
|
|
| |
user error messages (otherwise difficult to do without instrumenting
the source).
|
| |
|
|
| |
to floats.
|
| | |
|
| |
|
|
|
|
|
|
| |
PyNumber_Check, rather than trying to convert to a float. Reimplemented
writer - now raises exceptions when it sees a quotechar but neither
doublequote or escapechar are set. Doublequote results are now more
consistent (eg, single quote should generate """", rather than "",
which is ambiguous).
|
| |
|
|
| |
gets).
|
| | |
|
| |
|
|
|
|
|
| |
when this limit is reached. Limit defaults to 128k, and is changed
by module set_field_limit() method. Previously, an unmatched quote
character could result in the entire file being read into the field
buffer, potentially exhausting virtual memory.
|
| |
|
|
|
|
|
| |
only contains instances of the dialect type, we can refer directly to the
dialect instances rather than creating new ones. In other words, if the
dialect comes from the registry, and we apply no further modifications,
the reader/writer can use the dialect object directly.
|
| |
|
|
|
|
| |
was done because we were previously performing validation of the dialect
from python, but this is now down within the C module. Also, the method
we were using to detect classes did not work with new-style classes.
|
| |
|
|
|
| |
record objects of internal dialect type, rather than instances of
python objects.
|
| | |
|
| |
|
|
| |
it for all failures, potentially masking other exceptions).
|
| |
|
|
| |
same as None.
|
| |
|
|
| |
rather than using PyString_Check/PyUnicode_Check.
|
| |
|
|
| |
writer objects (other GC infrastructure already in place).
|
| |
|
|
| |
left in stream).
|
| | |
|
| |
|
|
|
| |
implementation features better error reporting, and better compliance
with the PEP.
|
| | |
|
| |
|
|
| |
Cherniavsky Beni!
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fix memory leak in dialect_init().
|
| | |
|
| |
|
|
| |
(thanks to Neal Norwitz for the code review, BTW)
|
| |
|
|
| |
make csv_{get,unregister}_dialect METH_O functions to avoid PyArg_ParseTuple
|
| |
|
|
| |
conditionally exclude Unicode functions
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
dump empty TODO comment
|