Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge in release25-maint r60793: | Gregory P. Smith | 2008-06-11 | 1 | -0/+10 |
| | | | | | | 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. | ||||
* | This reverts r63675 based on the discussion in this thread: | Gregory P. Smith | 2008-06-09 | 1 | -14/+14 |
| | | | | | | | 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. | ||||
* | Renamed PyString to PyBytes | Christian Heimes | 2008-05-26 | 1 | -14/+14 |
| | |||||
* | #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵ | Christian Heimes | 2007-12-19 | 1 | -2/+2 |
| | | | | Py_REFCNT. Macros for b/w compatibility are available. | ||||
* | PEP 3123: Provide forward compatibility with Python 3.0, while keeping | Martin v. Löwis | 2007-07-21 | 1 | -8/+5 |
| | | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT. | ||||
* | Fix problems found by Coverity. | Neal Norwitz | 2006-05-10 | 1 | -0/+2 |
| | | | | | | | | | | | | | 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. | ||||
* | Use Py_VISIT in all tp_traverse methods, instead of traversing manually or | Thomas Wouters | 2006-04-15 | 1 | -20/+15 |
| | | | | | | | | 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 | ||||
* | Remove partial change (don't edit, commit and think at the same time :P) | Thomas Wouters | 2006-04-15 | 1 | -1/+0 |
| | |||||
* | Re-instate backward compatibility by defining Py_CLEAR if it isn't | Thomas Wouters | 2006-04-15 | 1 | -0/+14 |
| | | | | available. | ||||
* | Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for | Thomas Wouters | 2006-04-15 | 1 | -10/+5 |
| | | | | tp_clear methods. | ||||
* | docstring tweak | Fredrik Lundh | 2006-04-04 | 1 | -1/+1 |
| | |||||
* | More unconsting. | Martin v. Löwis | 2006-02-27 | 1 | -1/+1 |
| | |||||
* | Add const to several API functions that take char *. | Jeremy Hylton | 2005-12-10 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | 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 *. | ||||
* | Michael Hudson pointed out that the Dialect_Type object isn't INCREF'd. Why | Skip Montanaro | 2005-06-15 | 1 | -0/+1 |
| | | | | | 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). | ||||
* | Leak fix from Michael Hudson. Fix memory leak when dialect doesn't | Skip Montanaro | 2005-06-15 | 1 | -0/+2 |
| | | | | validate. Closes 1220242. | ||||
* | Moved reader \r and \n processing from the iterator to the state machine - | Andrew McNamara | 2005-01-13 | 1 | -97/+75 |
| | | | | | this allows for better handling of newline characters in quoted fields (and hopefully resolves Bug 967934). | ||||
* | Improve wording of parser error message. | Andrew McNamara | 2005-01-12 | 1 | -2/+2 |
| | |||||
* | Add counting of source iterator lines to the reader object - handy for | Andrew McNamara | 2005-01-12 | 1 | -0/+4 |
| | | | | | user error messages (otherwise difficult to do without instrumenting the source). | ||||
* | When quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields | Andrew McNamara | 2005-01-12 | 1 | -30/+59 |
| | | | | to floats. | ||||
* | Fix logic problem in quoting=csv.QUOTE_ALL, quotechar=None check, add test. | Andrew McNamara | 2005-01-12 | 1 | -1/+1 |
| | |||||
* | When using QUOTE_NONNUMERIC, we now test for "numericness" with | Andrew McNamara | 2005-01-12 | 1 | -82/+58 |
| | | | | | | | | 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). | ||||
* | Rename csv.set_field_limit to csv.field_size_limit (since it both sets and | Andrew McNamara | 2005-01-12 | 1 | -6/+6 |
| | | | | gets). | ||||
* | Add belt and braces check of PyString_AsString return. | Andrew McNamara | 2005-01-12 | 1 | -4/+5 |
| | |||||
* | Set an upper limit on the size of the field buffer, raise an exception | Andrew McNamara | 2005-01-11 | 1 | -30/+77 |
| | | | | | | | 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. | ||||
* | Now that internal dialect type is immutable, and the dialect registry | Andrew McNamara | 2005-01-11 | 1 | -29/+40 |
| | | | | | | | 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. | ||||
* | No longer attempt to instantiate python classes describing dialects. This | Andrew McNamara | 2005-01-11 | 1 | -37/+6 |
| | | | | | | 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. | ||||
* | Allow dialect-describing keywords to be supplied to register_dialect, | Andrew McNamara | 2005-01-11 | 1 | -27/+11 |
| | | | | | record objects of internal dialect type, rather than instances of python objects. | ||||
* | Factor out the code for making a dialect instance. | Andrew McNamara | 2005-01-11 | 1 | -18/+22 |
| | |||||
* | Only set error string when dict lookup found no matching key (was setting | Andrew McNamara | 2005-01-10 | 1 | -3/+6 |
| | | | | it for all failures, potentially masking other exceptions). | ||||
* | When parsing args that return a single character, treat null string the | Andrew McNamara | 2005-01-10 | 1 | -1/+1 |
| | | | | same as None. | ||||
* | Where a string is desired, test for PyBaseString_Type derived type, | Andrew McNamara | 2005-01-10 | 1 | -15/+6 |
| | | | | rather than using PyString_Check/PyUnicode_Check. | ||||
* | Add missing PyObject_GC_Track and PyObject_GC_UnTrack calls to csv reader and | Andrew McNamara | 2005-01-10 | 1 | -0/+4 |
| | | | | writer objects (other GC infrastructure already in place). | ||||
* | Fix parsing of csv files with escapes (escape character previously would be | Andrew McNamara | 2005-01-10 | 1 | -8/+0 |
| | | | | left in stream). | ||||
* | Fix to use PEP7 brace style. | Andrew McNamara | 2005-01-07 | 1 | -2/+4 |
| | |||||
* | Improved the implementation of the internal "dialect" type. The new | Andrew McNamara | 2005-01-07 | 1 | -187/+239 |
| | | | | | implementation features better error reporting, and better compliance with the PEP. | ||||
* | Delete Reader_getiter and replace with PyObject_SelfIter. | Andrew McNamara | 2005-01-06 | 1 | -8/+1 |
| | |||||
* | Quote \r\n correctly, remove random indentation (patch #1009384). Thanks | Johannes Gijsbers | 2004-08-15 | 1 | -2/+2 |
| | | | | Cherniavsky Beni! | ||||
* | Use PyArg_UnpackTuple() where possible. | Raymond Hettinger | 2004-06-20 | 1 | -4/+4 |
| | |||||
* | doc nit | Skip Montanaro | 2003-12-02 | 1 | -1/+2 |
| | |||||
* | Fix potential leaks identified by Neal Norwitz. | Andrew McNamara | 2003-06-09 | 1 | -0/+8 |
| | |||||
* | Make readers and writers participate in garbage collection. | Jeremy Hylton | 2003-04-14 | 1 | -14/+71 |
| | | | | Fix memory leak in dialect_init(). | ||||
* | Must declare vrbls at the tops of blocks in C89 (wouldn't compile). | Tim Peters | 2003-04-13 | 1 | -1/+2 |
| | |||||
* | use PyModule_Add{Int,String}Constant() where appropriate | Skip Montanaro | 2003-04-12 | 1 | -12/+6 |
| | | | | (thanks to Neal Norwitz for the code review, BTW) | ||||
* | tighten up string checks | Skip Montanaro | 2003-04-12 | 1 | -17/+18 |
| | | | | make csv_{get,unregister}_dialect METH_O functions to avoid PyArg_ParseTuple | ||||
* | add writerows docstring | Skip Montanaro | 2003-04-12 | 1 | -6/+24 |
| | | | | conditionally exclude Unicode functions | ||||
* | typo | Skip Montanaro | 2003-04-11 | 1 | -1/+1 |
| | |||||
* | typo | Skip Montanaro | 2003-04-11 | 1 | -1/+1 |
| | |||||
* | zap commented out bit of code | Skip Montanaro | 2003-04-11 | 1 | -2/+1 |
| | |||||
* | add comment about 2.2 compatibility | Skip Montanaro | 2003-03-23 | 1 | -1/+13 |
| | | | | dump empty TODO comment | ||||
* | Squash compiler wng about signed-vs-unsigned mismatch. | Tim Peters | 2003-03-21 | 1 | -1/+1 |
| |