]> granicus.if.org Git - python/commitdiff
Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
authorChristian Heimes <christian@cheimes.de>
Tue, 22 Oct 2013 08:22:29 +0000 (10:22 +0200)
committerChristian Heimes <christian@cheimes.de>
Tue, 22 Oct 2013 08:22:29 +0000 (10:22 +0200)
Python executable and not removed by the linker's optimizer.

Misc/NEWS
Python/pythonrun.c

index e9d692c9dd4c2d43ae7f597ebe3514fe8890f9ba..80a1a231f36841a7bbb77694c2fdac67153d2774 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -9,6 +9,9 @@ What's New in Python 2.7.6?
 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));
index a2e1e745897b4bfe06eba84da3de35a020e262e5..2a40c0b570153994305704349c203ba30400fa6a 100644 (file)
@@ -91,6 +91,11 @@ int _Py_QnewFlag = 0;
 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 *