summaryrefslogtreecommitdiffstats
path: root/Python/frozenmain.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-36444: Rework _Py_InitializeFromConfig() API (GH-12576)Victor Stinner2019-03-271-1/+1
|
* bpo-36444: Add _PyCoreConfig._init_main (GH-12572)Victor Stinner2019-03-271-1/+1
| | | | | | | | * Add _PyCoreConfig._init_main: if equals to zero, _Py_InitializeFromConfig() doesn't call _Py_InitializeMainInterpreter(). * Add interp_p parameter to _Py_InitializeFromConfig(). * pymain_init() now calls _Py_InitializeFromConfig(). * Make _Py_InitializeCore() private.
* bpo-36142: Rework error reporting in pymain_main() (GH-12113)Victor Stinner2019-03-011-1/+1
| | | | | | | | | | | Add a new _Py_INIT_EXIT() macro to be able to exit Python with an exitcode using _PyInitError API. Rewrite function calls by pymain_main() to use _PyInitError. Changes: * Remove _PyMain.err and _PyMain.status field * Add _Py_INIT_EXIT() macro and _PyInitError.exitcode field. * Rename _Py_FatalInitError() to _Py_ExitInitError().
* bpo-35081: Rename internal headers (GH-10275)Victor Stinner2018-11-121-1/+1
| | | | | | | | | | | | | | Rename Include/internal/ headers: * pycore_hash.h -> pycore_pyhash.h * pycore_lifecycle.h -> pycore_pylifecycle.h * pycore_mem.h -> pycore_pymem.h * pycore_state.h -> pycore_pystate.h Add missing headers to Makefile.pre.in and PCbuild: * pycore_condvar.h. * pycore_hamt.h * pycore_pyhash.h
* bpo-35081: Add pycore_ prefix to internal header files (GH-10263)Victor Stinner2018-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | * Rename Include/internal/ header files: * pyatomic.h -> pycore_atomic.h * ceval.h -> pycore_ceval.h * condvar.h -> pycore_condvar.h * context.h -> pycore_context.h * pygetopt.h -> pycore_getopt.h * gil.h -> pycore_gil.h * hamt.h -> pycore_hamt.h * hash.h -> pycore_hash.h * mem.h -> pycore_mem.h * pystate.h -> pycore_state.h * warnings.h -> pycore_warnings.h * PCbuild project, Makefile.pre.in, Modules/Setup: add the Include/internal/ directory to the search paths of header files. * Update includes. For example, replace #include "internal/mem.h" with #include "pycore_mem.h".
* bpo-34170: Add _PyCoreConfig._frozen parameter (GH-8591)Victor Stinner2018-08-011-2/+10
| | | Modify frozenmain.c to use _Py_InitializeFromConfig().
* bpo-32241: Add the const qualifire to declarations of umodifiable strings. ↵Serhiy Storchaka2017-12-121-1/+1
| | | | (#4748)
* bpo-32030: Split Py_Main() into subfunctions (#4399)Victor Stinner2017-11-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't use "Python runtime" anymore to parse command line options or to get environment variables: pymain_init() is now a strict separation. * Use an error message rather than "crashing" directly with Py_FatalError(). Limit the number of calls to Py_FatalError(). It prepares the code to handle errors more nicely later. * Warnings options (-W, PYTHONWARNINGS) and "XOptions" (-X) are now only added to the sys module once Python core is properly initialized. * _PyMain is now the well identified owner of some important strings like: warnings options, XOptions, and the "program name". The program name string is now properly freed at exit. pymain_free() is now responsible to free the "command" string. * Rename most methods in Modules/main.c to use a "pymain_" prefix to avoid conflits and ease debug. * Replace _Py_CommandLineDetails_INIT with memset(0) * Reorder a lot of code to fix the initialization ordering. For example, initializing standard streams now comes before parsing PYTHONWARNINGS. * Py_Main() now handles errors when adding warnings options and XOptions. * Add _PyMem_GetDefaultRawAllocator() private function. * Cleanup _PyMem_Initialize(): remove useless global constants: move them into _PyMem_Initialize(). * Call _PyRuntime_Initialize() as soon as possible: _PyRuntime_Initialize() now returns an error message on failure. * Add _PyInitError structure and following macros: * _Py_INIT_OK() * _Py_INIT_ERR(msg) * _Py_INIT_USER_ERR(msg): "user" error, don't abort() in that case * _Py_INIT_FAILED(err)
* Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failureMartin Panter2015-11-301-1/+3
|
* merge 3.4 (#22633)Benjamin Peterson2015-02-141-6/+9
|\
| * avoid reading unallocated memory when argc == 0 (closes #22633)Benjamin Peterson2015-02-141-6/+9
| |
* | Issue #18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`, renameVictor Stinner2014-08-011-1/+1
|/ | | | | ``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document these functions.
* Issue #15893: Improve error handling in main() and Py_FrozenMain()Victor Stinner2013-07-271-16/+23
| | | | | | * handle _PyMem_RawStrdup() failure * Py_FrozenMain() releases memory on error * Py_FrozenMain() duplicates the old locale, as done in main()
* Py_FrozenMain() now uses _Py_char2wchar() to decode command line arguments, asVictor Stinner2013-07-271-18/+4
| | | | done in main()
* Issue #18203: Replace PyMem_Malloc() with PyMem_RawMalloc() at Python ↵Victor Stinner2013-07-261-6/+6
| | | | initialization
* Issue #15893: frozenmain.c now handles PyMem_Malloc() failureVictor Stinner2013-07-261-2/+9
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-77/+77
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* #4004: Missing newline in some startup error messages.Amaury Forgeot d'Arc2008-10-071-4/+4
| | | | Patch by Victor.
* Issue #3696: Error parsing arguments on OpenBSD <= 4.4 and Cygwin.Antoine Pitrou2008-09-031-1/+10
| | | | Patch by Amaury Forgeot d'Arc, reviewed by me.
* Change command line processing API to use wchar_t.Martin v. Löwis2008-04-051-3/+36
| | | | Fixes #2128.
* Patch #569753: Remove support for WIN16.Martin v. Löwis2002-06-301-5/+5
| | | | Rename all occurrences of MS_WIN32 to MS_WINDOWS.
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-9/+0
|
* Add -E command line switch (ignore environment variables like PYTHONHOMENeil Schemenauer2001-07-231-2/+2
| | | | and PYTHONPATH).
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* ANSIfy as many declarations as possible.Thomas Wouters2000-07-221-3/+3
|
* Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters2000-07-221-3/+1
| | | | declarations yet, those come later.
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Call PyInitFrozenExtensions() as requested by Mark Hammond (his patch).Guido van Rossum1999-01-021-0/+4
|
* Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum1998-08-041-0/+5
|
* Make calls into ../PC/frozen_dllmain.c on MS_WIN32.Guido van Rossum1998-04-031-0/+11
|
* Set Py_FrozenFlag, to suppress error messages from getpath.c.Guido van Rossum1998-02-061-0/+2
|
* Add unistd.h for isatty().Guido van Rossum1998-01-191-0/+4
|
* Make stdin unbuffered too, when PYTHONUNBUFFERED is specified.Guido van Rossum1997-12-021-0/+1
|
* Keep gcc -Wall happyGuido van Rossum1997-08-151-2/+2
|
* frozenmain.c is now also in the library,Guido van Rossum1997-07-191-5/+1
| | | | with entry point Py_FrozenMain().
* Tracking changes to Py_Main():Guido van Rossum1997-07-191-18/+4
| | | | | | | | - Got rid of inspection of some environment variables. - Got rid of Py_GetProgramName() and related logic. - Print the version header *after* successful initialization.
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* getprogramname -> Py_GetProgramName.Guido van Rossum1996-08-191-2/+2
|
* grand renaming; added copyright to some filesGuido van Rossum1996-05-281-7/+3
|
* moved stuff around to resemble main.cGuido van Rossum1995-08-041-5/+8
|
* renaming phase 3Guido van Rossum1995-03-311-15/+15
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | | bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
* Merge back to main trunkGuido van Rossum1994-08-301-5/+28
|
* Must initialize 'inspect' flagGuido van Rossum1993-11-051-1/+2
|
* * Makefile: added all: and default: targets.Guido van Rossum1993-07-051-3/+1
| | | | | | | | | | | | * many files: made some functions static; removed "extern int errno;". * frozenmain.c: fixed bugs introduced on 24 June... * flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a (and some old functions that were omitted). * timemodule.c: added MSDOS floatsleep version . * pgenmain.c: changed exit() to goaway() and added defn of goaway(). * intrcheck.c: add hack (to UNIX only) so interrupting 3 times will exit from a hanging program. The second interrupt prints a message explaining this to the user.
* * pythonmain.c: -k option, usage message, more environment flags.Guido van Rossum1993-06-241-3/+18
| | | | | | | | | | | (the latter also in frozenmain.c) * ceval.c: global 'killprint' flag raises exception when printing an expression statement's value (useful for finding stray output) * timemodule.c: add asctime() and ctime(). Change julian date to 1-based origin (as intended and documented). * Removed unused DO_TIMES stuff from timemodule.c. Added 'epoch' and 'day0' globals (year where time.time() == 0 and day of the week the epoch started).
* Support for frozen scripts; added -i option.Guido van Rossum1993-04-011-0/+57