diff Python/pythonrun.c @ 86562:b5cc822d5bf0

Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the Python executable and not removed by the linker's optimizer.
author Christian Heimes <christian@cheimes.de>
date Tue, 22 Oct 2013 10:23:12 +0200
parents 12d7b6171b28 4c4f31a1b706
children 55517661a053
line wrap: on
line diff
--- a/Python/pythonrun.c	Mon Oct 21 21:28:45 2013 -0700
+++ b/Python/pythonrun.c	Tue Oct 22 10:23:12 2013 +0200
@@ -116,6 +116,10 @@
 
 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 *