Skip to content

Commit

Permalink
pythonGH-107585: fix the stable API .lib file name in debug builds on…
Browse files Browse the repository at this point in the history
… MSVC

Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed Aug 8, 2023
1 parent 707018c commit dd2b891
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions PC/pyconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,19 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* So MSVC users need not specify the .lib
file in their Makefile (other compilers are
generally taken care of by distutils.) */
# if defined(Py_LIMITED_API)
# define PINNED_VER "3"
# else
# define PINNED_VER "313"
# endif /* Py_LIMITED_API */
# if defined(_DEBUG)
# pragma comment(lib,"python313_d.lib")
# elif defined(Py_LIMITED_API)
# pragma comment(lib,"python3.lib")
# define DEBUG_SUFFIX "_d"
# else
# pragma comment(lib,"python313.lib")
# define DEBUG_SUFFIX ""
# endif /* _DEBUG */
# pragma comment(lib, "python" PINNED_VER DEBUG_SUFFIX ".lib")
# undef PINNED_VER
# undef DEBUG_SUFFIX
# endif /* _MSC_VER */
# endif /* Py_BUILD_CORE */
#endif /* MS_COREDLL */
Expand Down

0 comments on commit dd2b891

Please sign in to comment.