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
1c44e287
Kaydet (Commit)
1c44e287
authored
Haz 28, 2000
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Trent Mick: familiar simple Win64 patches
üst
ab43fcad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
getpathp.c
PC/getpathp.c
+6
-7
import_nt.c
PC/import_nt.c
+2
-2
No files found.
PC/getpathp.c
Dosyayı görüntüle @
1c44e287
...
@@ -134,7 +134,7 @@ static void
...
@@ -134,7 +134,7 @@ static void
reduce
(
dir
)
reduce
(
dir
)
char
*
dir
;
char
*
dir
;
{
{
in
t
i
=
strlen
(
dir
);
size_
t
i
=
strlen
(
dir
);
while
(
i
>
0
&&
!
is_sep
(
dir
[
i
]))
while
(
i
>
0
&&
!
is_sep
(
dir
[
i
]))
--
i
;
--
i
;
dir
[
i
]
=
'\0'
;
dir
[
i
]
=
'\0'
;
...
@@ -172,7 +172,7 @@ join(buffer, stuff)
...
@@ -172,7 +172,7 @@ join(buffer, stuff)
char
*
buffer
;
char
*
buffer
;
char
*
stuff
;
char
*
stuff
;
{
{
in
t
n
,
k
;
size_
t
n
,
k
;
if
(
is_sep
(
stuff
[
0
]))
if
(
is_sep
(
stuff
[
0
]))
n
=
0
;
n
=
0
;
else
{
else
{
...
@@ -207,7 +207,6 @@ search_for_prefix(argv0_path, landmark)
...
@@ -207,7 +207,6 @@ search_for_prefix(argv0_path, landmark)
char
*
argv0_path
;
char
*
argv0_path
;
char
*
landmark
;
char
*
landmark
;
{
{
/* Search from argv0_path, until landmark is found */
/* Search from argv0_path, until landmark is found */
strcpy
(
prefix
,
argv0_path
);
strcpy
(
prefix
,
argv0_path
);
do
{
do
{
...
@@ -244,7 +243,7 @@ getpythonregpath(HKEY keyBase, int skipcore)
...
@@ -244,7 +243,7 @@ getpythonregpath(HKEY keyBase, int skipcore)
TCHAR
*
dataBuf
=
NULL
;
TCHAR
*
dataBuf
=
NULL
;
static
const
TCHAR
keyPrefix
[]
=
_T
(
"Software
\\
Python
\\
PythonCore
\\
"
);
static
const
TCHAR
keyPrefix
[]
=
_T
(
"Software
\\
Python
\\
PythonCore
\\
"
);
static
const
TCHAR
keySuffix
[]
=
_T
(
"
\\
PythonPath"
);
static
const
TCHAR
keySuffix
[]
=
_T
(
"
\\
PythonPath"
);
in
t
versionLen
;
size_
t
versionLen
;
DWORD
index
;
DWORD
index
;
TCHAR
*
keyBuf
=
NULL
;
TCHAR
*
keyBuf
=
NULL
;
TCHAR
*
keyBufPtr
;
TCHAR
*
keyBufPtr
;
...
@@ -402,7 +401,7 @@ get_progpath()
...
@@ -402,7 +401,7 @@ get_progpath()
char
*
delim
=
strchr
(
path
,
DELIM
);
char
*
delim
=
strchr
(
path
,
DELIM
);
if
(
delim
)
{
if
(
delim
)
{
in
t
len
=
delim
-
path
;
size_
t
len
=
delim
-
path
;
strncpy
(
progpath
,
path
,
len
);
strncpy
(
progpath
,
path
,
len
);
*
(
progpath
+
len
)
=
'\0'
;
*
(
progpath
+
len
)
=
'\0'
;
}
}
...
@@ -429,7 +428,7 @@ calculate_path()
...
@@ -429,7 +428,7 @@ calculate_path()
{
{
char
argv0_path
[
MAXPATHLEN
+
1
];
char
argv0_path
[
MAXPATHLEN
+
1
];
char
*
buf
;
char
*
buf
;
in
t
bufsz
;
size_
t
bufsz
;
char
*
pythonhome
=
Py_GetPythonHome
();
char
*
pythonhome
=
Py_GetPythonHome
();
char
*
envpath
=
getenv
(
"PYTHONPATH"
);
char
*
envpath
=
getenv
(
"PYTHONPATH"
);
...
@@ -554,7 +553,7 @@ calculate_path()
...
@@ -554,7 +553,7 @@ calculate_path()
else
{
else
{
char
*
p
=
PYTHONPATH
;
char
*
p
=
PYTHONPATH
;
char
*
q
;
char
*
q
;
in
t
n
;
size_
t
n
;
for
(;;)
{
for
(;;)
{
q
=
strchr
(
p
,
DELIM
);
q
=
strchr
(
p
,
DELIM
);
if
(
q
==
NULL
)
if
(
q
==
NULL
)
...
...
PC/import_nt.c
Dosyayı görüntüle @
1c44e287
...
@@ -33,7 +33,7 @@ FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppF
...
@@ -33,7 +33,7 @@ FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppF
// Calculate the size for the sprintf buffer.
// Calculate the size for the sprintf buffer.
// Get the size of the chars only, plus 1 NULL.
// Get the size of the chars only, plus 1 NULL.
in
t
bufSize
=
sizeof
(
keyPrefix
)
-
1
+
strlen
(
PyWin_DLLVersionString
)
+
sizeof
(
keySuffix
)
+
strlen
(
moduleName
)
+
sizeof
(
debugString
)
-
1
;
size_
t
bufSize
=
sizeof
(
keyPrefix
)
-
1
+
strlen
(
PyWin_DLLVersionString
)
+
sizeof
(
keySuffix
)
+
strlen
(
moduleName
)
+
sizeof
(
debugString
)
-
1
;
// alloca == no free required, but memory only local to fn, also no heap fragmentation!
// alloca == no free required, but memory only local to fn, also no heap fragmentation!
moduleKey
=
alloca
(
bufSize
);
moduleKey
=
alloca
(
bufSize
);
sprintf
(
moduleKey
,
"Software
\\
Python
\\
PythonCore
\\
%s
\\
Modules
\\
%s%s"
,
PyWin_DLLVersionString
,
moduleName
,
debugString
);
sprintf
(
moduleKey
,
"Software
\\
Python
\\
PythonCore
\\
%s
\\
Modules
\\
%s%s"
,
PyWin_DLLVersionString
,
moduleName
,
debugString
);
...
@@ -44,7 +44,7 @@ FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppF
...
@@ -44,7 +44,7 @@ FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppF
return
NULL
;
return
NULL
;
// use the file extension to locate the type entry.
// use the file extension to locate the type entry.
for
(
fdp
=
_PyImport_Filetab
;
fdp
->
suffix
!=
NULL
;
fdp
++
)
{
for
(
fdp
=
_PyImport_Filetab
;
fdp
->
suffix
!=
NULL
;
fdp
++
)
{
int
extLen
=
strlen
(
fdp
->
suffix
);
size_t
extLen
=
strlen
(
fdp
->
suffix
);
if
(
modNameSize
>
extLen
&&
strnicmp
(
pathBuf
+
(
modNameSize
-
extLen
-
1
),
fdp
->
suffix
,
extLen
)
==
0
)
if
(
modNameSize
>
extLen
&&
strnicmp
(
pathBuf
+
(
modNameSize
-
extLen
-
1
),
fdp
->
suffix
,
extLen
)
==
0
)
break
;
break
;
}
}
...
...
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