]> git.ipfire.org Git - thirdparty/Python/cpython.git/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 308b67450d9f6954e900ac6afaea7118e4b73a94..c2cb8504d9eb388b16aea589c152cedd9f160d04 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 3.3.3 release candidate 1?
 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 strings.
 
 - Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at
index ee277b67f2cf31e24a457e9c7b689363abe07fa5..832df535f8694fc9afa86b24278355b65a8b1c05 100644 (file)
@@ -96,6 +96,10 @@ int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
 
 PyThreadState *_Py_Finalizing = NULL;
 
+/* 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 *