summaryrefslogtreecommitdiff
path: root/Modules/python.c
AgeCommit message (Collapse)AuthorLines
2010-10-20Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead ofVictor Stinner-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.
2010-10-16Add an optional size argument to _Py_char2wchar()Victor Stinner-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.
2010-10-13Revert r85435 (and r85440): decode command line arguments from utf-8Victor Stinner-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.
2010-10-13main(): catch PyUnicode_FromString() failure (exit)Victor Stinner-0/+2
2010-10-13Issue #9992: On Mac OS X, decode command line arguments from utf-8 instead ofVictor Stinner-1/+9
the locale encoding.
2010-05-09Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou-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. ........
2010-04-18Move _Py_char2wchar from python.c to main.c.Ronald Oussoren-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.
2010-04-17Fix the --with-cxx-main build.Collin Winter-1/+1
2010-04-14#7301: decode $PYTHONWARNINGS in the same way as argv, test non-ascii valuesPhilip Jenvey-3/+3
2009-05-29Issue #6097: Escape UTF-8 surrogates resulting from mbstocs conversionMartin v. Löwis-2/+18
of the command line.
2009-05-10Rename utf8b error handler to surrogateescape.Martin v. Löwis-1/+1
2009-05-05Issue #5915: Implement PEP 383, Non-decodable Bytes inMartin v. Löwis-24/+89
System Character Interfaces.
2009-02-27another instance of #804543: use strdup() when saving the result of ↵Georg Brandl-1/+2
setlocale() because it could be overwritten by subsequent setlocale()s.
2008-10-19restore compilation on OpenBSD #4146Benjamin Peterson-3/+3
2008-10-07#4004: Missing newline in some startup error messages.Amaury Forgeot d'Arc-4/+4
Patch by Victor.
2008-09-03Issue #3696: Error parsing arguments on OpenBSD <= 4.4 and Cygwin.Antoine Pitrou-1/+14
Patch by Amaury Forgeot d'Arc, reviewed by me.
2008-04-05Change command line processing API to use wchar_t.Martin v. Löwis-1/+42
Fixes #2128.
2002-12-28Apparently FreeBSD enables some HW floating-point exceptions by default.Tim Peters-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.
2002-08-02Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond-2/+0
for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
2000-07-22Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters-1/+1
possible.
2000-07-09- ANSI-ficationFredrik Lundh-3/+1
(patch #100805 by Peter Schneider-Kamp)
1998-12-07Py_Main() must be DL_EXPORT too.Guido van Rossum-1/+1
1998-08-08Now include Python.hGuido van Rossum-0/+2
1997-08-15Keep gcc -Wall happyGuido van Rossum-0/+1
1997-07-19This is now the "real" main program -- it calls Py_Main(argc, argv)Guido van Rossum-0/+10
which is in the library and does all the work.