summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
Commit message (Collapse)AuthorAgeFilesLines
* with and as are now keywords. There are some generated files I can't recreate.Neal Norwitz2006-09-061-0/+7
|
* Handle a few more error conditions.Neal Norwitz2006-08-211-0/+5
| | | | Klocwork 301 and 302. Will backport.
* PyModule_GetDict() can fail, produce fatal errors if this happens on startup.Neal Norwitz2006-08-121-0/+4
| | | | Klocwork #298-299.
* Whoops, how did that get in there. :-) Revert all the parts of 51227 that ↵Neal Norwitz2006-08-121-3/+0
| | | | were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed
* Check returned pointer is valid.Neal Norwitz2006-08-121-0/+3
| | | | Klocwork #233
* Fix more memory allocation issues found with failmalloc.Neal Norwitz2006-07-221-6/+17
|
* Handle more memory allocation failures without crashing.Neal Norwitz2006-07-211-4/+13
|
* Reported by Klocwork #151.Neal Norwitz2006-07-171-2/+13
| | | | | | v2 can be NULL if exception2 is NULL. I don't think that condition can happen, but I'm not sure it can't either. Now the code will protect against either being NULL.
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-0/+2
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* PyErr_Display(), PyErr_WriteUnraisable(): Coverity found a cut-and-pasteTim Peters2006-05-281-13/+15
| | | | bug in both: `className` was referenced before being checked for NULL.
* Conversion of exceptions over from faked-up classes to new-style C types.Richard Jones2006-05-271-4/+8
|
* Change those parts of the Python-api that were functions in 2.4, andThomas Heller2006-04-181-4/+96
| | | | | | are now macros to exported functions again. Fixes [ 1465834 ] bdist_wininst preinstall script support is broken in 2.5a1.
* Remove types from type_list if they have no objectsMartin v. Löwis2006-04-181-2/+9
| | | | | and unlist_types_without_objects is set. Give dump_counts a FILE* argument.
* spread the extern "C" { } magic pixie dust around. Python itself builds nowAnthony Baxter2006-04-131-0/+9
| | | | | using a C++ compiler. Still lots and lots of errors in the modules built by setup.py, and a bunch of warnings from g++ in the core.
* Ignore the references to the dummy objects used as deleted keysArmin Rigo2006-04-121-1/+1
| | | | in dicts and sets when computing the total number of references.
* Bug #1421664: Set sys.stderr.encodingMartin v. Löwis2006-04-031-0/+10
|
* In format strings slinging Py_ssize_t, unconditionallyTim Peters2006-03-281-9/+6
| | | | | interpolate PY_FORMAT_SIZE_T instead of #if'ing on MS_WIN64.
* Years in the making.Tim Peters2006-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Address an coverity issue. Coverity was complaining about a line that's fine,Guido van Rossum2006-03-071-1/+2
| | | | but an earlier line checked for v != NULL unnecessarily.
* Fix warnings on x86 (32-bit).Neal Norwitz2006-03-061-1/+2
|
* Use %Id for size_t-ish things on Win64.Martin v. Löwis2006-03-051-1/+1
|
* Use Py_ssize_t for _Py_RefTotal.Neal Norwitz2006-03-041-6/+12
| | | | I tried to handle Win64 properly, but please review.
* TabifyNeal Norwitz2006-03-041-34/+34
|
* Get rid of run_err_mod(). It was only used in two places.Neal Norwitz2006-03-041-14/+4
| | | | | One place it wasn't necessary since mod was already checked. Inline the check that mod != NULL for the other use.
* Fix refleak in PyErr_Display().Brett Cannon2006-03-021-15/+14
|
* Reconst parameters that lost their const in the AST merge.Martin v. Löwis2006-03-011-1/+1
|
* PEP 352 implementation. Creates a new base class, BaseException, which has anBrett Cannon2006-03-011-7/+5
| | | | | | | | | added message attribute compared to the previous version of Exception. It is also a new-style class, making all exceptions now new-style. KeyboardInterrupt and SystemExit inherit from BaseException directly. String exceptions now raise DeprecationWarning. Applies patch 1104669, and closes bugs 1012952 and 518846.
* from __future__ import with_statement addon for 'with', mostly written byThomas Wouters2006-02-281-2/+4
| | | | Neal.
* Check whether there are flags.Martin v. Löwis2006-02-261-1/+1
|
* Generate code to recursively copy an AST intoMartin v. Löwis2006-02-261-0/+5
| | | | a tree of Python objects. Expose this through compile().
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+1
|
* Fix Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.Neal Norwitz2005-12-181-2/+2
| | | | Needs backport.
* Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,Neal Norwitz2005-12-171-51/+58
| | | | simplifies a lot of error handling code, and fixes many memory leaks.
* Patch #1350409: Port signal handling to VS 2005.Martin v. Löwis2005-11-281-0/+17
|
* Merge ast-branch to headJeremy Hylton2005-10-201-152/+124
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* - Fix segfault with invalid coding.Neal Norwitz2005-10-021-1/+1
| | | | | | | - SF Bug #772896, unknown encoding results in MemoryError, which is not helpful I will only backport the segfault fix. I'll let Anthony decide if he wants the other changes backported. I will do the backport if asked.
* Forward UnicodeDecodeError into SyntaxError for source encoding errors.Martin v. Löwis2005-08-241-5/+7
| | | | Will backport to 2.4.
* * Improve code for the empty frozenset singleton:Raymond Hettinger2005-08-011-0/+1
| | | | | | | | | | | - Handle both frozenset() and frozenset([]). - Do not use singleton for frozenset subclasses. - Finalize the singleton. - Add test cases. * Factor-out set_update_internal() from set_update(). Simplifies the code for several internal callers. * Factor constant expressions out of loop in set_merge_internal(). * Minor comment touch-ups.
* This is my patch:Michael W. Hudson2005-05-271-0/+2
| | | | | | | | | | | | | | [ 1181301 ] make float packing copy bytes when they can which hasn't been reviewed, despite numerous threats to check it in anyway if noone reviews it. Please read the diff on the checkin list, at least! The basic idea is to examine the bytes of some 'probe values' to see if the current platform is a IEEE 754-ish platform, and if so _PyFloat_{Pack,Unpack}{4,8} just copy bytes around. The rest is hair for testing, and tests.
* Move exception finalisation later in the shutdown process - thisAnthony Baxter2005-03-291-7/+8
| | | | fixes the crash seen in bug #1165761
* Patch #802188: better parser error message for non-EOL following line cont.Martin v. Löwis2005-03-031-0/+3
|
* Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter2004-10-131-24/+19
| | | | a few remaining calls to signal() were converted to PyOS_setsig().
* SF patch 1044089: New C API function PyEval_ThreadsInitialized(), by NickTim Peters2004-10-111-1/+0
| | | | | Coghlan, for determining whether PyEval_InitThreads() has been called. Also purged the undocumented+unused _PyThread_Started int.
* Finalize the freelist of list objects.Raymond Hettinger2004-10-071-0/+1
|
* Patch #900727: Add Py_InitializeEx to allow embedding without signals.Martin v. Löwis2004-08-191-2/+10
|
* Patch #984714: Properly diagnose E_DECODE errors.Martin v. Löwis2004-07-211-0/+3
| | | | Backported to 2.3.
* This closes patch:Michael W. Hudson2004-07-071-1/+2
| | | | | | | | | | | | | | | | | [ 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.
* Changed random calls to PyThreadState_Get() to use the macroNicholas Bastin2004-03-241-3/+3
|
* Lost reference.Armin Rigo2004-03-221-6/+8
|
* remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro2004-02-101-4/+0
|