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
323bf5e1
Kaydet (Commit)
323bf5e1
authored
Haz 24, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ignore Windows case check for ALL CAPS 8.3 files
üst
a93b848e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
import.c
Python/import.c
+39
-1
No files found.
Python/import.c
Dosyayı görüntüle @
323bf5e1
...
...
@@ -984,6 +984,34 @@ find_module(name, path, buf, buflen, p_fp)
#ifdef MS_WIN32
#include <windows.h>
#include <ctype.h>
static
int
allcaps8x3
(
s
)
char
*
s
;
{
/* Return 1 if s is an 8.3 filename in ALLCAPS */
char
c
;
char
*
dot
=
strchr
(
s
,
'.'
);
char
*
end
=
strchr
(
s
,
'\0'
);
if
(
dot
!=
NULL
)
{
if
(
dot
-
s
>
8
)
return
1
;
/* More than 8 before '.' */
if
(
end
-
dot
>
4
)
return
1
;
/* More than 3 after '.' */
end
=
strchr
(
dot
+
1
,
'.'
);
if
(
end
!=
NULL
)
return
1
;
/* More than one dot */
}
else
if
(
end
-
s
>
8
)
return
1
;
/* More than 8 and no dot */
while
((
c
=
*
s
++
))
{
if
(
islower
(
c
))
return
0
;
}
return
1
;
}
static
int
check_case
(
char
*
buf
,
int
len
,
int
namelen
,
char
*
name
)
{
...
...
@@ -999,6 +1027,14 @@ check_case(char *buf, int len, int namelen, char *name)
return
0
;
}
FindClose
(
h
);
if
(
allcaps8x3
(
data
.
cFileName
))
{
/* Skip the test if the filename is ALL.CAPS. This can
happen in certain circumstances beyond our control,
e.g. when software is installed under NT on a FAT
filesystem and then the same FAT filesystem is used
under Windows 95. */
return
1
;
}
if
(
strncmp
(
data
.
cFileName
,
name
,
namelen
)
!=
0
)
{
strcpy
(
buf
+
len
-
namelen
,
data
.
cFileName
);
PyErr_Format
(
PyExc_NameError
,
...
...
@@ -2008,9 +2044,11 @@ imp_is_frozen(self, args)
PyObject
*
args
;
{
char
*
name
;
struct
_frozen
*
p
;
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
name
))
return
NULL
;
return
PyInt_FromLong
(
find_frozen
(
name
)
!=
NULL
);
p
=
find_frozen
(
name
);
return
PyInt_FromLong
((
long
)
(
p
==
NULL
?
0
:
p
->
size
));
}
static
FILE
*
...
...
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