Skip to content

Commit 3658f4c

Browse files
arhadthedevjcfr
authored andcommitted
Rename PY_NO_LINK_LIB to Py_NO_LINK_LIB
1 parent 29268cc commit 3658f4c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Doc/extending/windows.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ gives you access to spam's names, but does not create a separate copy. On Unix,
9696
linking with a library is more like ``from spam import *``; it does create a
9797
separate copy.
9898

99-
.. c:macro:: PY_NO_LINK_LIB
99+
.. c:macro:: Py_NO_LINK_LIB
100100
101101
Turn off the implicit, ``#pragma``-based linkage with the Python
102102
library, performed inside CPython header files.
@@ -138,14 +138,14 @@ When creating DLLs in Windows, you can use the CPython library in two ways::
138138
:file:`.lib`), which knows how to find the necessary functions from spam,
139139
and also from the Python executable.
140140

141-
2. Manually by defining :c:macro:`PY_NO_LINK_LIB` macro before including
141+
2. Manually by defining :c:macro:`Py_NO_LINK_LIB` macro before including
142142
:file:`Python.h`. You must pass :file:`pythonXY.lib` to the linker.
143143

144144
To build two DLLs, spam and ni (which uses C functions found in spam), you
145145
could use these commands::
146146

147-
cl /LD /DPY_NO_LINK_LIB /I/python/include spam.c ../libs/pythonXY.lib
148-
cl /LD /DPY_NO_LINK_LIB /I/python/include ni.c spam.lib ../libs/pythonXY.lib
147+
cl /LD /DPy_NO_LINK_LIB /I/python/include spam.c ../libs/pythonXY.lib
148+
cl /LD /DPy_NO_LINK_LIB /I/python/include ni.c spam.lib ../libs/pythonXY.lib
149149

150150
The first command created three files: :file:`spam.obj`, :file:`spam.dll`
151151
and :file:`spam.lib`. :file:`Spam.dll` does not contain any Python
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
``#pragma``-based linking with ``python3*.lib`` can now be switched off with
2-
:c:expr:`PY_NO_LINK_LIB`. Patch by Jean-Christophe Fillion-Robin.
2+
:c:expr:`Py_NO_LINK_LIB`. Patch by Jean-Christophe Fillion-Robin.

PC/pyconfig.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
311311
#ifdef MS_COREDLL
312312
# if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
313313
/* not building the core - must be an ext */
314-
# if defined(_MSC_VER) && !defined(PY_NO_LINK_LIB)
314+
# if defined(_MSC_VER) && !defined(Py_NO_LINK_LIB)
315315
/* So MSVC users need not specify the .lib
316316
file in their Makefile */
317-
/* Define PY_NO_LINK_LIB to build extension disabling pragma
317+
/* Define Py_NO_LINK_LIB to build extension disabling pragma
318318
based auto-linking.
319319
This is relevant when using build-system generator (e.g CMake) where
320320
the linking is explicitly handled */
@@ -335,7 +335,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
335335
# pragma comment(lib,"python314.lib")
336336
# endif /* _DEBUG */
337337
# endif /* Py_GIL_DISABLED */
338-
# endif /* _MSC_VER && !PY_NO_LINK_LIB */
338+
# endif /* _MSC_VER && !Py_NO_LINK_LIB */
339339
# endif /* Py_BUILD_CORE */
340340
#endif /* MS_COREDLL */
341341

0 commit comments

Comments
 (0)