summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* compile.h and eval.h weren't being included which kept a fair bit of theSkip Montanaro2004-03-131-0/+3
| | | | public API from being exposed by simply including Python.h (as recommended).
* SF patch #906501: Fix typos in pystate.h commentsRaymond Hettinger2004-03-131-2/+2
| | | | (Contributed by Greg Chapman.)
* Make PySequence_Fast_ITEMS public. (Thanks Skip.)Raymond Hettinger2004-03-121-1/+1
|
* Use a new macro, PySequence_Fast_ITEMS to factor out code common toRaymond Hettinger2004-03-121-0/+6
| | | | | three recent optimizations. Aside from reducing code volume, it increases readability.
* Eliminate a big block of duplicate code in PySequence_List() byRaymond Hettinger2004-03-111-0/+1
| | | | exposing _PyList_Extend().
* SF patch #910929: Optimize list comprehensionsRaymond Hettinger2004-03-071-0/+1
| | | | | Add a new opcode, LIST_APPEND, and apply it to the code generation for list comprehensions. Reduces the per-loop overhead by about a third.
* * Optimized list appends and pops by making fewer calls the underlying systemRaymond Hettinger2004-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc(). This is achieved by tracking the overallocation size in a new field and using that information to skip calls to realloc() whenever possible. * Simplified and tightened the amount of overallocation. For larger lists, this overallocates by 1/8th (compared to the previous scheme which ranged between 1/4th to 1/32nd over-allocation). For smaller lists (n<6), the maximum overallocation is one byte (formerly it could be upto eight bytes). This saves memory in applications with large numbers of small lists. * Eliminated the NRESIZE macro in favor of a new, static list_resize function that encapsulates the resizing logic. Coverting this back to macro would give a small (under 1%) speed-up. This was too small to warrant the loss of readability, maintainability, and de-coupling. * Some functions using NRESIZE had grown unnecessarily complex in their efforts to bend to the macro's calling pattern. With the new list_resize function in place, those other functions could be simplified. That is being saved for a separate patch. * The ob_item==NULL check could be eliminated from the new list_resize function. This would entail finding each piece of code that sets ob_item to NULL and adding a new line to invalidate the overallocation tracking field. Rather than impose a new requirement on other pieces of list code, it was preferred to leave the NULL check in place and retain the benefits of decoupling, maintainability and information hiding (only PyList_New() and list_sort() need to know about the new field). This approach also reduces the odds of breaking an extension module. (Collaborative effort by Raymond Hettinger, Hye-Shik Chang, Tim Peters, and Armin Rigo.)
* This is my patch #876198 plus a NEWS entry and a header frob.Michael W. Hudson2004-02-121-5/+0
| | | | | Remove the ability to use (from C) arbitrary objects supporting the read buffer interface as the co_code member of code objects.
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-103-10/+0
|
* Revert improvement to list.append() checked in before it was ready.Raymond Hettinger2004-02-081-1/+0
|
* Let reversed() work with itself.Raymond Hettinger2004-02-081-0/+1
|
* Remove support for --without-universal-newlines (see PEP 11).Skip Montanaro2004-02-071-9/+1
|
* Remove support for SunOS 4.Skip Montanaro2004-01-171-7/+0
| | | | Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition).
* Fix name problem in previous checkin: Dict not ListJeremy Hylton2003-12-261-1/+1
|
* At 2.2, the Py<type>_Check() family of API functions (macros) changedAndrew MacIntyre2003-12-261-0/+1
| | | | | | | | | | | | semantics to include subtypes. Most concrete object APIs then had a Py<type>_CheckExact() macro added to test for an object's type not including subtypes. The PyDict_CheckExact() macro wasn't created at that time, so I've added it for API completeness/symmetry - even though nobody has complained about its absence in the time since 2.2 was released. Not a backport candidate.
* reverting 2.29: the patch was Ok, but the commit msg wrongAndrew MacIntyre2003-12-261-1/+0
|
* The semantics of PyList_Check() and PyDict_Check() changed at 2.2, alongAndrew MacIntyre2003-12-261-0/+1
| | | | | | | | | with most other concrete object checks, but the docs weren't brought into line. PyList_CheckExact() was added at 2.2 but never documented. backport candidate.
* Changed the UCHAR_MAX error msg a bit: we don't really assume anythingTim Peters2003-12-221-1/+1
| | | | | about "characters", we assume something about C's char type (which is an integral type).
* There are places in Python which assume bytes have 8-bits. Formalize that aSkip Montanaro2003-12-221-0/+8
| | | | | | bit by checking the value of UCHAR_MAX in Include/Python.h. There was a check in Objects/stringobject.c. Remove that. (Note that we don't define UCHAR_MAX if it's not defined as the old test did.)
* Add rsplit method for str and unicode builtin types.Hye-Shik Chang2003-12-151-0/+20
| | | | | SF feature request #801847. Original patch is written by Sean Reifschneider.
* * Added a new method flag, METH_COEXIST.Raymond Hettinger2003-12-131-0/+7
| | | | | * Used the flag to optimize set.__contains__(), dict.__contains__(), dict.__getitem__(), and list.__getitem__().
* Expose dict_contains() and PyDict_Contains() with is about 10% fasterRaymond Hettinger2003-11-251-0/+1
| | | | | | | than PySequence_Contains() and more clearly applicable to dicts. Apply the new function in setobject.c where __contains__ checking is ubiquitous.
* * Checkin remaining documentationRaymond Hettinger2003-11-241-1/+1
| | | | | | | * Add more tests * Refactor and neaten the code a bit. * Rename union_update() to update(). * Improve the algorithms (making them a closer to sets.py).
* SF bug 839548: Bug in type's GC handling causes segfaults.Tim Peters2003-11-201-0/+2
| | | | | | | | Also SF patch 843455. This is a critical bugfix. I'll backport to 2.3 maint, but not beyond that. The bugs this fixes have been there since weakrefs were introduced.
* Got rid of macglue.h, moved the little bit that remains relevantJack Jansen2003-11-201-0/+2
| | | | to pymactoolbox.h (where it should have been in the first place).
* Getting rid of all the code inside #ifdef macintosh too.Jack Jansen2003-11-202-11/+0
|
* WITHOUT_FRAMEWORKS conditional code bites the dust: this was forJack Jansen2003-11-191-17/+0
| | | | pre-carbon MacOS9 support.
* Various fixups (most suggested by Armin Rigo).Raymond Hettinger2003-11-171-0/+6
|
* * Migrate set() and frozenset() from the sandbox.Raymond Hettinger2003-11-162-0/+27
| | | | | | | | * Install the unittests, docs, newsitem, include file, and makefile update. * Exercise the new functions whereever sets.py was being used. Includes the docs for libfuncs.tex. Separate docs for the types are forthcoming.
* fixed buggy comment as per SF bug #827856Alex Martelli2003-11-091-7/+7
| | | | (same as commit of Sun Nov 2 to the release23-maint branch)
* Implement and apply PEP 322, reverse iterationRaymond Hettinger2003-11-061-0/+1
|
* Deleting cyclic object comparison.Armin Rigo2003-10-281-0/+14
| | | | | SF patch 825639 http://mail.python.org/pipermail/python-dev/2003-October/039445.html
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* Modify the Py_RETURN_* macros to be of the form ``do {...} while (0)`` in orderBrett Cannon2003-10-192-3/+3
| | | | to handle situations like ``if (foo) Py_RETURN_NONE else ...``.
* Modified the Py_RETURN_* macros by having the statements surrounded by {} inBrett Cannon2003-10-192-3/+3
| | | | | order to prevent any unexpected surprises from someone using them in a conditional without using curly braces (e.g., ``if (foo) Py_RETURN_TRUE``.
* Defined macros Py_RETURN_(TRUE|FALSE|NONE) as helper functions for returningBrett Cannon2003-10-192-0/+7
| | | | the specified value. All three Py_INCREF the singleton and then return it.
* Make CObjects mutable. Fixes #477441.Martin v. Löwis2003-10-191-0/+3
|
* Extended tuple's C API to include a new function, PyTuple_Pack() that isRaymond Hettinger2003-10-121-0/+1
| | | | | useful for rapidly building argument tuples without having to invoke the more sophisticated machinery of Py_BuildValue().
* workaround for OpenBSD compiler bug w.r.t. handling of overflows.Anthony Baxter2003-09-301-1/+10
|
* Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize().Martin v. Löwis2003-09-041-0/+1
| | | | Fixes #603724. Will backport to 2.3.
* Bug #794140: cygwin builds do not embedJason Tishler2003-09-041-1/+6
| | | | | | The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim).
* This patch enables the building of Cygwin Python with a static coreJason Tishler2003-09-041-1/+2
| | | | | | | | | | | | | | | which still supports shared extensions. It takes advantage the latest Cygwin binutils (i.e., 20030901-1) which can export symbols from executables: http://cygwin.com/ml/cygwin-announce/2003-09/msg00002.html Additionally, it finally lays to rest the following mailing list subthread: http://mail.python.org/pipermail/python-list/2002-May/102500.html I tested the patch under Red Hat Linux 8.0 too
* Bump the trunk to 2.4a0Barry Warsaw2003-07-301-3/+3
|
* Repair botched release serial number.Tim Peters2003-07-291-1/+1
|
* Bump release level to 2.3 (we won't have time for this tomorrow).Tim Peters2003-07-291-2/+2
|
* Bump the version numberBarry Warsaw2003-07-251-1/+1
|
* Update version numbers and dates for 2.3c2 -- we won't be able to do thisTim Peters2003-07-241-2/+2
| | | | during the day tomorrow, so doing it earlier than I'd like.
* Bump the release number to 2.3c1.Tim Peters2003-07-171-3/+3
|
* Use appropriate macros not the deprecated DL_IMPORT/DL_EXPORT macrosNeal Norwitz2003-07-012-2/+2
|
* Bump version string to "2.3b2+".Tim Peters2003-06-301-1/+1
|