summaryrefslogtreecommitdiffstats
path: root/Modules/python.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #15893: frozenmain.c now handles PyMem_Malloc() failureVictor Stinner2013-07-261-6/+10
|
* #18399: fix comment typo.R David Murray2013-07-101-1/+1
| | | | Patch by Andrew Rowe.
* (Merge 3.2) Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner2012-12-031-8/+0
|\ | | | | | | | | | | | | encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no locale environment variable is set), to avoid inconsistencies with os.fsencode() and os.fsdecode() functions which are already using UTF-8/surrogateescape.
| * Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner2012-12-031-8/+0
| | | | | | | | | | | | | | encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no locale environment variable is set), to avoid inconsistencies with os.fsencode() and os.fsdecode() functions which are already using UTF-8/surrogateescape.
* | If main() is called and an argument cannot be decoded, make sure toBrett Cannon2012-06-251-0/+1
|/ | | | | | free the copy of the command-line. Found using Clang's static analyzer.
* Issue #3367: NULL-terminate argv[] copies to prevent an invalid accessStefan Krah2012-03-261-2/+4
| | | | in sys_update_path().
* main() now displays an error message before exiting if a command line argumentVictor Stinner2011-12-161-1/+5
| | | | cannot be decoded
* Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead ofVictor Stinner2010-10-201-0/+8
| | | | | | | the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment variable is not set, the locale encoding is ISO-8859-1, whereas most programs (including Python) expect UTF-8. Python already uses UTF-8 for the filesystem encoding and to encode command line arguments on this OS.
* Add an optional size argument to _Py_char2wchar()Victor Stinner2010-10-161-1/+1
| | | | | | _Py_char2wchar() callers usually need the result size in characters. Since it's trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add an option to get it.
* Revert r85435 (and r85440): decode command line arguments from utf-8Victor Stinner2010-10-131-10/+1
| | | | | | | Python exits with a fatal error if the command line contains an undecodable argument. PyUnicode_FromString() fails at the first undecodable byte because it calls the error handler, but error handlers are not ready before Python initialization.
* main(): catch PyUnicode_FromString() failure (exit)Victor Stinner2010-10-131-0/+2
|
* Issue #9992: On Mac OS X, decode command line arguments from utf-8 instead ofVictor Stinner2010-10-131-1/+9
| | | | the locale encoding.
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-34/+34
| | | | | | | | | | 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. ........
* Move _Py_char2wchar from python.c to main.c.Ronald Oussoren2010-04-181-102/+0
| | | | | | | This fixes issue #8441: python.c is not included in the framework while main.c is and without this patch you get a link error when building Python.framework on OSX.
* Fix the --with-cxx-main build.Collin Winter2010-04-171-1/+1
|
* #7301: decode $PYTHONWARNINGS in the same way as argv, test non-ascii valuesPhilip Jenvey2010-04-141-3/+3
|
* Issue #6097: Escape UTF-8 surrogates resulting from mbstocs conversionMartin v. Löwis2009-05-291-2/+18
| | | | of the command line.
* Rename utf8b error handler to surrogateescape.Martin v. Löwis2009-05-101-1/+1
|
* Issue #5915: Implement PEP 383, Non-decodable Bytes inMartin v. Löwis2009-05-051-24/+89
| | | | System Character Interfaces.
* another instance of #804543: use strdup() when saving the result of ↵Georg Brandl2009-02-271-1/+2
| | | | setlocale() because it could be overwritten by subsequent setlocale()s.
* restore compilation on OpenBSD #4146Benjamin Peterson2008-10-191-3/+3
|
* #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/+14
| | | | Patch by Amaury Forgeot d'Arc, reviewed by me.
* Change command line processing API to use wchar_t.Martin v. Löwis2008-04-051-1/+42
| | | | Fixes #2128.
* Apparently FreeBSD enables some HW floating-point exceptions by default.Tim Peters2002-12-281-0/+15
| | | | | | | This can cause core dumps when Python runs. Python relies on the 754- (and C99-) mandated default "non-stop" mode for FP exceptions. This patch from Ben Laurie disables at least one FP exception on FreeBSD at Python startup time.
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-2/+0
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters2000-07-221-1/+1
| | | | possible.
* - ANSI-ficationFredrik Lundh2000-07-091-3/+1
| | | | (patch #100805 by Peter Schneider-Kamp)
* Py_Main() must be DL_EXPORT too.Guido van Rossum1998-12-071-1/+1
|
* Now include Python.hGuido van Rossum1998-08-081-0/+2
|
* Keep gcc -Wall happyGuido van Rossum1997-08-151-0/+1
|
* This is now the "real" main program -- it calls Py_Main(argc, argv)Guido van Rossum1997-07-191-0/+10
which is in the library and does all the work.