8000 Move path definition to inside HAVE_DLADDR · python/cpython@5230b61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5230b61

Browse files
committed
Move path definition to inside HAVE_DLADDR
Signed-off-by: Filipe Laíns <lains@riseup.net
1 parent 08821ee commit 5230b61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/getpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,6 @@ static int
807807
library_to_dict(PyObject *dict, const char *key)
808808
{
809809
#ifdef Py_ENABLE_SHARED
810-
char path[MAXPATHLEN + 1];
811810

812811
#ifdef MS_WINDOWS
813812
extern HMODULE PyWin_DLLhModule;
@@ -817,6 +816,7 @@ library_to_dict(PyObject *dict, const char *key)
817816
#endif
818817

819818
#if HAVE_DLADDR
819+
char path[MAXPATHLEN + 1];
820820
Dl_info libpython_info;
821821
if (dladdr(&Py_Initialize, &libpython_info) && libpython_info.dli_fname) {
822822
strncpy(path, libpython_info.dli_fname, MAXPATHLEN);

0 commit comments

Comments
 (0)
0