summaryrefslogtreecommitdiffstats
path: root/Modules/_bisectmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Add const to several API functions that take char *.Jeremy Hylton2005-12-101-5/+4
| | | | | | | | | | | | | | | | | | | 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 *.
* SF #1313496: bisect C replacement doesn't accept named argsRaymond Hettinger2005-10-051-22/+26
|
* Any call to insort_{left,right} with a non-list leaked a reference to NoneMichael W. Hudson2004-08-021-6/+10
| | | | (or to whatever the 'insert' method chose to return).
* SF Patch #864863: Bisect C implementationRaymond Hettinger2004-01-051-0/+228
(Contributed by Dmitry Vasiliev.)