Skip to content

Commit 49e6180

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 e459750 commit 49e6180

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ What's New in Python 3.3.3 release candidate 1?
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
16+
Python executable and not removed by the linker's optimizer.
17+
1518
- Issue #19279: UTF-7 decoder no more produces illegal strings.
1619

1720
- Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at

Python/pythonrun.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
9696

9797
PyThreadState *_Py_Finalizing = NULL;
9898

99+
/* Hack to force loading of object files */
100+
int (*_PyOS_mystrnicmp_hack)(const char *, const char *, Py_ssize_t) = \
101+
PyOS_mystrnicmp; /* Python/pystrcmp.o */
102+
99103
/* PyModule_GetWarningsModule is no longer necessary as of 2.6
100104
since _warnings is builtin. This API should not be used. */
101105
PyObject *

0 commit comments

Comments
 (0)