diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-06-23 19:27:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 19:27:30 (GMT) |
commit | cebd43fbfd25a80404728f73edc301f9558d9410 (patch) | |
tree | de4b8d7f977bfcd30ef97682d7a60c0f1c204ffc /PC/dl_nt.c | |
parent | 92f8b480bab408be09bc1631cf2e0e5a4641b731 (diff) | |
download | cpython-cebd43fbfd25a80404728f73edc301f9558d9410.zip cpython-cebd43fbfd25a80404728f73edc301f9558d9410.tar.gz cpython-cebd43fbfd25a80404728f73edc301f9558d9410.tar.bz2 |
bpo-41054: Simplify resource compilation on Windows (GH-21004)
Remove auto-generated resource header. Pass definitions required
by resource files (ORIGINAL_FILENAME and FIELD3) directly to resource
compiler.
Remove unused MS_DLL_ID resource string and related dead code.
(cherry picked from commit 4efc3360c9a83d5891f27ed67b4f0ab7275d2ab4)
Co-authored-by: Nikita Nemkin <nikita@nemkin.ru>
Diffstat (limited to 'PC/dl_nt.c')
-rw-r--r-- | PC/dl_nt.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -12,16 +12,10 @@ forgotten) from the programmer. #include "windows.h" #ifdef Py_ENABLE_SHARED -#ifdef MS_DLL_ID -// The string is available at build, so fill the buffer immediately -char dllVersionBuffer[16] = MS_DLL_ID; -#else -char dllVersionBuffer[16] = ""; // a private buffer -#endif // Python Globals HMODULE PyWin_DLLhModule = NULL; -const char *PyWin_DLLVersionString = dllVersionBuffer; +const char *PyWin_DLLVersionString = MS_DLL_ID; BOOL WINAPI DllMain (HANDLE hInst, ULONG ul_reason_for_call, @@ -31,11 +25,6 @@ BOOL WINAPI DllMain (HANDLE hInst, { case DLL_PROCESS_ATTACH: PyWin_DLLhModule = hInst; -#ifndef MS_DLL_ID - // If we have MS_DLL_ID, we don't need to load the string. - // 1000 is a magic number I picked out of the air. Could do with a #define, I spose... - LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer)); -#endif break; case DLL_PROCESS_DETACH: |