summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Patch #984714: Properly diagnose E_DECODE errors.Martin v. Löwis2004-07-211-0/+3
| | | | Backported to 2.3.
* Check the type of values returned by __int__, __float__, __long__,Neil Schemenauer2004-07-191-2/+20
| | | | | | __oct__, and __hex__. Raise TypeError if an invalid type is returned. Note that PyNumber_Int and PyNumber_Long can still return ints or longs. Fixes SF bug #966618.
* Upgrade None assignment SyntaxWarning to a SyntaxError.Raymond Hettinger2004-07-171-7/+6
|
* optimize_code(): Repaired gross error in new special-casing for None.Tim Peters2004-07-171-1/+2
| | | | | | The preceding case statement was missing a terminating "break" stmt, so fell into the new code by mistake. This caused uncaught out-of-bounds accesses to the "names" tuple, leading to a variety of insane behaviors.
* Treat None as a constant.Raymond Hettinger2004-07-161-4/+20
|
* Fix for 838140: don't call NSUnlinkModule when we fail to find ourJack Jansen2004-07-151-2/+2
| | | | | | expected entrypoint. The unlinking will crash the application if the module contained ObjC code. The price of this is small: a little wasted memory, and only in a case than isn't expected to occur often.
* Moved PyMac_GetScript() to _localemodule, which is the only place whereJack Jansen2004-07-151-24/+0
| | | | it is used, and made it private. Should fix #978662.
* This is Pete Shinners' patch from his bug reportMichael W. Hudson2004-07-141-10/+30
| | | | | | | | [ 984722 ] Py_BuildValue loses reference counts on error I'm ever-so-slightly uneasy at the amount of work this can do with an exception pending, but I don't think that this can result in anything more serious than a strange error message.
* Add PyArg_VaParseTupleAndKeywords(). Document this function andBrett Cannon2004-07-101-0/+36
| | | | | | PyArg_VaParse(). Closes patch #550732. Thanks Greg Chapman.
* Fix a couple of signed/unsigned comparison warningsNeal Norwitz2004-07-081-1/+1
|
* Remove unused macros in .c filesNeal Norwitz2004-07-082-8/+0
|
* This closes patch:Michael W. Hudson2004-07-074-14/+5
| | | | | | | | | | | | | | | | | [ 960406 ] unblock signals in threads although the changes do not correspond exactly to any patch attached to that report. Non-main threads no longer have all signals masked. A different interface to readline is used. The handling of signals inside calls to PyOS_Readline is now rather different. These changes are all a bit scary! Review and cross-platform testing much appreciated.
* * Fix missing return after error message is set.Raymond Hettinger2004-07-061-1/+2
| | | | * Add a test case that would have caught it.
* When importing an extension on Windows, the code reads the PE 'importThomas Heller2004-07-021-0/+12
| | | | | | | | | | | | | | | | | | table' of the dll, to make sure that the dll really was build for the correct Python version. It does this by looking for an entry 'pythonXY.dll' (X.Y is the Python version number). The code now checks the size of the dll's import table before reading entries from it. Before this patch, the code crashed trying to read the import table when the size was zero (as in Win2k's wmi.dll, for example). Look for imports of 'pythonXY_d.dll' in a debug build instead of 'pythonXY.dll'. Fixes SF 951851: Crash when reading "import table" of certain windows dlls. Already backported to the 2.3 branch.
* SF Bug #215126: Over restricted type checking on eval() functionRaymond Hettinger2004-07-022-10/+29
| | | | | | The builtin eval() function now accepts any mapping for the locals argument. Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing down the normal case. My timings so no measurable impact.
* Patch #923098: Share interned strings in marshal.Martin v. Löwis2004-06-272-24/+83
|
* Patch #966493: Cleanup generator/eval_frame exposure.Martin v. Löwis2004-06-271-14/+6
|
* Get ceval.c to compile again by moving declarations before other statments.Raymond Hettinger2004-06-261-1/+2
|
* Massive performance improvement for C extension and builtin tracing codeNicholas Bastin2004-06-251-51/+27
|
* Move NOP to end of code transformation.Raymond Hettinger2004-06-241-3/+7
|
* Less ugly #ifdefs for C profiling fixNicholas Bastin2004-06-221-12/+5
|
* One forgotten C profiling #ifdefNicholas Bastin2004-06-221-1/+2
|
* Making C profiling a configure option (at least temporarily)Nicholas Bastin2004-06-221-0/+12
|
* Install two code generation optimizations that depend on NOP.Raymond Hettinger2004-06-212-3/+33
| | | | Reduces the cost of "not" to almost zero.
* Performance tweak: allow stack_pointer and oparg to be register variables.Armin Rigo2004-06-171-7/+16
| | | | SF patch #943898
* Remove compiler warningNeal Norwitz2004-06-131-1/+1
|
* Make private function staticNeal Norwitz2004-06-131-1/+1
|
* Patch #774665: Make Python LC_NUMERIC agnostic.Martin v. Löwis2004-06-083-5/+263
|
* Patch #510695: Add TSC profiling for the VM.Martin v. Löwis2004-06-083-2/+183
|
* Fix a refcount bug in an obscure code corner.Thomas Heller2004-06-071-0/+1
| | | | Already backported.
* SF bug #963956: Bad error mesage when subclassing a moduleRaymond Hettinger2004-06-051-0/+9
| | | | | | Add a more informative message for the common user mistake of subclassing from a module name rather than another class (i.e. random instead of random.random).
* Patch #957398: Add public API for Generator Object/Type.Martin v. Löwis2004-06-011-138/+8
|
* starting to add comments to explain what's hereFred Drake2004-05-281-0/+11
|
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-193-308/+680
| | | | | | | | | | | | | | (Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
* forward-port 1.17.12.1Anthony Baxter2004-05-131-1/+1
|
* Some (but not all) of the why code bitfield tests ran faster asRaymond Hettinger2004-04-111-3/+4
| | | | separate equality tests. Now, all are set to their best timing.
* Revert 2.393, elimination of pre-decrementing, whichRaymond Hettinger2004-04-101-17/+13
| | | | did not stand-up to additional timings.
* Use continue instead of break whereever possible.Raymond Hettinger2004-04-071-2/+8
|
* * Improve readability and remove data dependencies by convertingRaymond Hettinger2004-04-071-14/+18
| | | | | | | | pre-increment forms to post-increment forms. Post-incrementing also eliminates the need for negative array indices for oparg fetches. * In exception handling code, check for class based exceptions before the older string based exceptions.
* Small code improvements for readability, code size, and/or speed.Raymond Hettinger2004-04-071-58/+54
| | | | | | | | | | | | | | | | | | | | | | | BINARY_SUBSCR: * invert test for normal case fall through * eliminate err handling code by jumping to slow_case LOAD_LOCALS: * invert test for normal case fall through * continue instead of break for the non-error case STORE_NAME and DELETE_NAME: * invert test for normal case fall through LOAD_NAME: * continue instead of break for the non-error case DELETE_FAST: * invert test for normal case fall through LOAD_DEREF: * invert test for normal case fall through * continue instead of break for the non-error case
* Simplify previous checkin (bitfields for WHY codes).Raymond Hettinger2004-04-061-12/+14
| | | | Restores the self-documenting enum declaration.
* Coded WHY flags as bitfields (taking inspiration from tp_flags).Raymond Hettinger2004-04-061-20/+16
| | | | | This allows multiple flags to be tested in a single compare which eliminates unnecessary compares and saves a few bytes.
* Since the fast_yield branch target was introduced, it appears that mostTim Peters2004-04-051-41/+41
| | | | | | | tests of "why" against WHY_YIELD became useless. This patch removes them, but assert()s that why != WHY_YIELD everywhere such a test was removed. The test suite ran fine under a debug build (i.e., the asserts never triggered).
* Bump the magic number to avoid sharing bytecode between 2.3 and 2.4.Jeremy Hylton2004-04-011-32/+14
| | | | | Revise the long comment that explained details of the magic number in gory detail.
* OS/2 VACPP build updates/fixesAndrew MacIntyre2004-03-291-1/+1
|
* Marshal clean-up (SF patch #873224)Armin Rigo2004-03-262-70/+61
|
* A few more PyThreadState_Get to PyThreadState_GET conversionsNicholas Bastin2004-03-251-1/+1
|
* Changed random calls to PyThreadState_Get() to use the macroNicholas Bastin2004-03-247-25/+25
|
* Enable the profiling of C functions (builtins and extensions)Nicholas Bastin2004-03-242-6/+52
|
* Decref all if ensure_fromlist fails. Fixes #876533.Martin v. Löwis2004-03-231-2/+3
| | | | Backported to 2.3.