Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
fee1c7f4
Kaydet (Commit)
fee1c7f4
authored
Şub 02, 2009
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows.
üst
e1e0a026
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
NEWS
Misc/NEWS
+2
-0
getpathp.c
PC/getpathp.c
+12
-0
No files found.
Misc/NEWS
Dosyayı görüntüle @
fee1c7f4
...
...
@@ -397,6 +397,8 @@ Tools/Demos
Build
-----
- Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows.
- Issue #4895: Use _strdup on Windows CE.
- Issue #4472: "configure --enable-shared" now works on OSX
...
...
PC/getpathp.c
Dosyayı görüntüle @
fee1c7f4
...
...
@@ -201,6 +201,7 @@ search_for_prefix(char *argv0_path, char *landmark)
}
#ifdef MS_WINDOWS
#ifdef Py_ENABLE_SHARED
/* a string loaded from the DLL at startup.*/
extern
const
char
*
PyWin_DLLVersionString
;
...
...
@@ -363,6 +364,7 @@ done:
free
(
keyBuf
);
return
retval
;
}
#endif
/* Py_ENABLE_SHARED */
#endif
/* MS_WINDOWS */
static
void
...
...
@@ -380,6 +382,7 @@ get_progpath(void)
but makes no mention of the null terminator. Play it safe.
PLUS Windows itself defines MAX_PATH as the same, but anyway...
*/
#ifdef Py_ENABLE_SHARED
wprogpath
[
MAXPATHLEN
]
=
_T
(
'\0'
);
if
(
PyWin_DLLhModule
&&
GetModuleFileName
(
PyWin_DLLhModule
,
wprogpath
,
MAXPATHLEN
))
{
...
...
@@ -388,6 +391,9 @@ get_progpath(void)
dllpath
,
MAXPATHLEN
+
1
,
NULL
,
NULL
);
}
#else
dllpath
[
0
]
=
0
;
#endif
wprogpath
[
MAXPATHLEN
]
=
_T
(
'\0'
);
if
(
GetModuleFileName
(
NULL
,
wprogpath
,
MAXPATHLEN
))
{
WideCharToMultiByte
(
CP_ACP
,
0
,
...
...
@@ -398,9 +404,13 @@ get_progpath(void)
}
#else
/* static init of progpath ensures final char remains \0 */
#ifdef Py_ENABLE_SHARED
if
(
PyWin_DLLhModule
)
if
(
!
GetModuleFileName
(
PyWin_DLLhModule
,
dllpath
,
MAXPATHLEN
))
dllpath
[
0
]
=
0
;
#else
dllpath
[
0
]
=
0
;
#endif
if
(
GetModuleFileName
(
NULL
,
progpath
,
MAXPATHLEN
))
return
;
#endif
...
...
@@ -501,8 +511,10 @@ calculate_path(void)
}
skiphome
=
pythonhome
==
NULL
?
0
:
1
;
#ifdef Py_ENABLE_SHARED
machinepath
=
getpythonregpath
(
HKEY_LOCAL_MACHINE
,
skiphome
);
userpath
=
getpythonregpath
(
HKEY_CURRENT_USER
,
skiphome
);
#endif
/* We only use the default relative PYTHONPATH if we havent
anything better to use! */
skipdefault
=
envpath
!=
NULL
||
pythonhome
!=
NULL
||
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment