Skip to content

Commit 51c4d72

Browse files
committed
Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
Python executable and not removed by the linker's optimizer.
1 parent c624038 commit 51c4d72

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ What's New in Python 2.7.6?
99
Core and Builtins
1010
-----------------
1111

12+
- Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
13+
Python executable and not removed by the linker's optimizer.
14+
1215
- Issue #19279: UTF-7 decoder no more produces illegal unicode strings.
1316

1417
- Issue #18739: Fix an inconsistency between math.log(n) and math.log(long(n));

Python/pythonrun.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ int _Py_QnewFlag = 0;
9191
int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
9292
int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
9393

94+
95+
/* Hack to force loading of object files */
96+
int (*_PyOS_mystrnicmp_hack)(const char *, const char *, Py_ssize_t) = \
97+
PyOS_mystrnicmp; /* Python/pystrcmp.o */
98+
9499
/* PyModule_GetWarningsModule is no longer necessary as of 2.6
95100
since _warnings is builtin. This API should not be used. */
96101
PyObject *

0 commit comments

Comments
 (0)