[Python-checkins] python/dist/src/Python pythonrun.c, 2.195.6.2,
2.195.6.3
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Thu Nov 13 02:42:15 EST 2003
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv16903/Python
Modified Files:
Tag: release23-maint
pythonrun.c
Log Message:
Patch #804543: strdup saved locales.
Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.195.6.2
retrieving revision 2.195.6.3
diff -C2 -d -r2.195.6.2 -r2.195.6.3
*** pythonrun.c 11 Aug 2003 12:21:40 -0000 2.195.6.2
--- pythonrun.c 13 Nov 2003 07:42:13 -0000 2.195.6.3
***************
*** 236,240 ****
stdin and stdout if these are terminals. */
! saved_locale = setlocale(LC_CTYPE, NULL);
setlocale(LC_CTYPE, "");
codeset = nl_langinfo(CODESET);
--- 236,240 ----
stdin and stdout if these are terminals. */
! saved_locale = strdup(setlocale(LC_CTYPE, NULL));
setlocale(LC_CTYPE, "");
codeset = nl_langinfo(CODESET);
***************
*** 251,254 ****
--- 251,255 ----
codeset = NULL;
setlocale(LC_CTYPE, saved_locale);
+ free(saved_locale);
if (codeset) {
More information about the Python-checkins
mailing list