summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
...
* Conversion of exceptions over from faked-up classes to new-style C types.Richard Jones2006-05-271-2/+66
|
* needforspeed: backed out the Py_LOCAL-isation of ceval; the massive in-Fredrik Lundh2006-05-271-8/+15
| | | | | lining killed performance on certain Intel boxes, and the "aggressive" macro itself gives most of the benefits on others.
* Patch 1145039.Tim Peters2006-05-261-0/+9
| | | | | | | | | | | | | | | | | | | set_exc_info(), reset_exc_info(): By exploiting the likely (who knows?) invariant that when an exception's `type` is NULL, its `value` and `traceback` are also NULL, save some cycles in heavily-executed code. This is a "a kronar saved is a kronar earned" patch: the speedup isn't reliably measurable, but it obviously does reduce the operation count in the normal (no exception raised) path through PyEval_EvalFrameEx(). The tim-exc_sanity branch tries to push this harder, but is still blowing up (at least in part due to pre-existing subtle bugs that appear to have no other visible consequences!). Not a bugfix candidate.
* needforspeed: added rpartition implementationFredrik Lundh2006-05-261-1/+12
|
* needforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive"Fredrik Lundh2006-05-261-0/+8
| | | | LOCAL inlining; also added some missing whitespace
* use Py_LOCAL also for string and unicode objectsFredrik Lundh2006-05-261-2/+7
|
* needforspeed: added Py_LOCAL macro, based on the LOCAL macro usedFredrik Lundh2006-05-261-0/+17
| | | | | for SRE and others. applied Py_LOCAL to relevant portion of ceval, which gives a 1-2% speedup on my machine. ymmv.
* needforspeed: partition implementation, part two.Fredrik Lundh2006-05-261-0/+9
| | | | feel free to improve the documentation and the docstrings.
* A new table to help string->integer conversion was added yesterday toTim Peters2006-05-251-0/+1
| | | | | | both mystrtoul.c and longobject.c. Share the table instead. Also cut its size by 64 entries (they had been used for an inscrutable trick originally, but the code no longer tries to use that trick).
* Fix incorrect documentation for the Py_IS_FINITE(X) macro.Kristján Valur Jónsson2006-05-251-3/+3
|
* Fix another typoAndrew M. Kuchling2006-05-251-1/+1
|
* Fix comment typosAndrew M. Kuchling2006-05-251-1/+1
|
* Added a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for ↵Kristján Valur Jónsson2006-05-251-0/+9
| | | | this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X). No change on other platforms
* Applied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects.Richard Jones2006-05-231-4/+0
|
* Merge from rjones-funccall branch.Richard Jones2006-05-231-0/+1
| | | | | | Applied patch zombie-frames-2.diff from sf patch 876206 with updates for Python 2.5 and also modified to retain the free_list to avoid the 67% slow-down in pybench recursion test. 5% speed up in function call pybench.
* needforspeed: check first *and* last character before doing a full memcmpFredrik Lundh2006-05-231-4/+6
|
* needforspeed: use memcpy for "long" strings; use a better algorithmFredrik Lundh2006-05-221-4/+9
| | | | for long repeats.
* needforspeed: speed up unicode repeat, unicode string copyFredrik Lundh2006-05-221-4/+7
|
* Patch #1492356: Port to Windows CE (patch set 1).Martin v. Löwis2006-05-222-0/+14
|
* - Add new Warning class, ImportWarningThomas Wouters2006-04-271-0/+1
| | | | | | | | | | | | | | - Warn-raise ImportWarning when importing would have picked up a directory as package, if only it'd had an __init__.py. This swaps two tests (for case-ness and __init__-ness), but case-test is not really more expensive, and it's not in a speed-critical section. - Test for the new warning by importing a common non-package directory on sys.path: site-packages - In regrtest.py, silence warnings generated by the build-environment because Modules/ (which is added to sys.path for Setup-created modules) has 'zlib' and '_ctypes' directories without __init__.py's.
* 2.5a2Anthony Baxter2006-04-271-2/+2
|
* Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python usesThomas Wouters2006-04-251-0/+4
| | | | | | | | | MAXPATHLEN-sized buffers for various output-buffers (like to realpath()), and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and does not define MAXPATHLEN.) Cursory googling suggests Linux is following a newer standard than BSD, but in cases like this, who knows. Using the greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the most portable solution.
* Refactor: Move code that uses co_lnotab from ceval to codeobjectJeremy Hylton2006-04-181-0/+15
|
* Remove types from type_list if they have no objectsMartin v. Löwis2006-04-181-1/+3
| | | | | and unlist_types_without_objects is set. Give dump_counts a FILE* argument.
* C++ compile cleanup: proper declaration of _Py_BuildValue_SizeTSkip Montanaro2006-04-181-0/+1
|
* C++ compilation cleanup: Migrate declaration ofSkip Montanaro2006-04-181-0/+5
| | | | | _PyObject_Call(Function|Method)_SizeT into Include/abstract.h. This gets them under the umbrella of the extern "C" { ... } block in that file.
* frame_traverse(): Use the standard Py_VISIT macro.Tim Peters2006-04-151-7/+7
| | | | | | | Py_VISIT: cast the `op` argument to PyObject* when calling `visit()`. Else the caller has to pay too much attention to this silly detail (e.g., frame_traverse needs to traverse `struct _frame *` and `PyCodeObject *` pointers too).
* There were no comments explaining what Py_CLEAR() did orTim Peters2006-04-151-0/+34
| | | | | | | why it's important. Now there are ;-) If someone else hasn't already, I'll add a Py_CLEAR cleanup task to the TODO Wiki next.
* Make Py_BuildValue, PyObject_CallFunction andMartin v. Löwis2006-04-142-12/+7
| | | | PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
* Introduce asdl_int_seq, to hold cmpop_ty.Martin v. Löwis2006-04-132-2/+8
|
* revert - breaks build of Python/ast.c w/ gccSkip Montanaro2006-04-131-7/+3
|
* Use union to discriminate pointer types from enum/int types.Skip Montanaro2006-04-131-3/+7
|
* Don't set gi_frame to Py_None, use NULL instead, eliminating some insanePhillip J. Eby2006-04-121-0/+1
| | | | pointer dereferences.
* Ignore the references to the dummy objects used as deleted keysArmin Rigo2006-04-121-0/+3
| | | | in dicts and sets when computing the total number of references.
* Make _kind types global for C++ compilation.Martin v. Löwis2006-04-111-16/+20
| | | | Explicitly cast void* to int to cmpop_ty.
* C++ already defines a perfectly good 'bool'. Use that.Anthony Baxter2006-04-111-0/+2
|
* SF Patch #1463867: Improved generator finalization to allow generatorsPhillip J. Eby2006-04-101-0/+1
| | | | | | | | that are suspended outside of any try/except/finally blocks to be garbage collected even if they are part of a cycle. Generators that suspend inside of an active try/except or try/finally block (including those created by a ``with`` statement) are still not GC-able if they are part of a cycle, however.
* Fixed error in comment for new PY_SSIZE_T_MIN.Tim Peters2006-04-051-1/+1
|
* Add PY_SSIZE_T_MIN, as suggested by Ralf W. Grosse-Kunstleve.Martin v. Löwis2006-04-051-0/+2
|
* aargh. Don't make last minute re-organisations before checkin!Anthony Baxter2006-04-041-1/+1
|
* PyAPI_FUNC() the PyArg_.*SizeT forms. Without this, cygwin has hysterics.Anthony Baxter2006-04-041-0/+12
| | | | (see buildbot)
* Add lineno, col_offset to excephandler to enable future fix forJeremy Hylton2006-04-041-2/+4
| | | | | | | | | | | | | | | tracing/line number table in except blocks. Reflow long lines introduced by col_offset changes. Update test_ast to handle new fields in excepthandler. As note in Python.asdl says, we might want to rethink how attributes are handled. Perhaps they should be the same as other fields, with the primary difference being how they are defined for all types within a sum. Also fix asdl_c so that constructors with int fields don't fail when passed a zero value.
* preparation for 2.5a1Anthony Baxter2006-04-031-2/+2
|
* Don't abbreviate ABS, use long name ABSOLUTE.Neal Norwitz2006-04-033-3/+3
|
* Add a clause to the PY_FORMAT_SIZE_T to stop warnings on 32 bit intelAnthony Baxter2006-04-011-1/+3
| | | | | linux with gcc 4.0.2, after talking to Tim. <ymmit> But it won't break anything anywhere, so don't worry :-)
* SF patch #1458476 with modifications based on discussions in python-dev. ThisBarry Warsaw2006-03-301-0/+3
| | | | | | adds the following API calls: PySet_Clear(), _PySet_Next(), and _PySet_Update(). The latter two are considered non-public. Tests and documentation (for the public API) are included.
* Years in the making.Tim Peters2006-03-262-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | objimpl.h, pymem.h: Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE} to PyObject_{Free, FREE} in a release build. They're aliases for the system free() now. _subprocess.c/sp_handle_dealloc(): Since the memory was originally obtained via PyObject_NEW, it must be released via PyObject_FREE (or _DEL). pythonrun.c, tokenizer.c, parsermodule.c: I lost count of the number of PyObject vs PyMem mismatches in these -- it's like the specific function called at each site was picked at random, sometimes even with memory obtained via PyMem getting released via PyObject. Changed most to use PyObject uniformly, since the blobs allocated are predictably small in most cases, and obmalloc is generally faster than system mallocs then. If extension modules in real life prove as sloppy as Python's front end, we'll have to revert the objimpl.h + pymem.h part of this patch. Note that no problems will show up in a debug build (all calls still go thru obmalloc then). Problems will show up only in a release build, most likely segfaults.
* Stop duplicating code and handle slice indices consistently and correctlyNeal Norwitz2006-03-231-0/+1
| | | | wrt to ssize_t.
* Remove false information from the comment and reformat it like otherHye-Shik Chang2006-03-221-8/+6
| | | | comments in the file. (SF #1455641)
* Get Py_DEPRECATED to work with gcc 4.x tooNeal Norwitz2006-03-201-1/+2
|