[Python-checkins] cpython (2.7): Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the

christian.heimes python-checkins at python.org
Tue Oct 22 10:26:59 CEST 2013


http://hg.python.org/cpython/rev/dc9f17f10899
changeset:   86563:dc9f17f10899
branch:      2.7
parent:      86533:737b79e524aa
user:        Christian Heimes <christian at cheimes.de>
date:        Tue Oct 22 10:22:29 2013 +0200
summary:
  Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
Python executable and not removed by the linker's optimizer.

files:
  Misc/NEWS          |  3 +++
  Python/pythonrun.c |  5 +++++
  2 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -9,6 +9,9 @@
 Core and Builtins
 -----------------
 
+- Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
+  Python executable and not removed by the linker's optimizer.
+
 - Issue #19279: UTF-7 decoder no more produces illegal unicode strings.
 
 - Issue #18739: Fix an inconsistency between math.log(n) and math.log(long(n));
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -91,6 +91,11 @@
 int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
 int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
 
+
+/* Hack to force loading of object files */
+int (*_PyOS_mystrnicmp_hack)(const char *, const char *, Py_ssize_t) = \
+    PyOS_mystrnicmp; /* Python/pystrcmp.o */
+
 /* PyModule_GetWarningsModule is no longer necessary as of 2.6
 since _warnings is builtin.  This API should not be used. */
 PyObject *

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list