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
3cef721b
Kaydet (Commit)
3cef721b
authored
Mar 29, 2002
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Allow .pyc files as applets as well as .py files. .py files have
priority, for safety reasons.
üst
5053b70d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
macmain.c
Mac/Python/macmain.c
+9
-4
No files found.
Mac/Python/macmain.c
Dosyayı görüntüle @
3cef721b
...
@@ -476,7 +476,8 @@ PyMac_Initialize(void)
...
@@ -476,7 +476,8 @@ PyMac_Initialize(void)
#if TARGET_API_MAC_OSX
/* Really: TARGET_API_MAC_CARBON */
#if TARGET_API_MAC_OSX
/* Really: TARGET_API_MAC_CARBON */
static
int
static
int
locateResourcePy
(
char
*
resourceName
,
char
*
resourceURLCStr
,
int
length
)
{
locateResourcePy
(
CFStringRef
resourceType
,
char
*
resourceName
,
char
*
resourceURLCStr
,
int
length
)
{
CFBundleRef
mainBundle
=
NULL
;
CFBundleRef
mainBundle
=
NULL
;
CFURLRef
URL
,
absoluteURL
;
CFURLRef
URL
,
absoluteURL
;
CFStringRef
filenameString
,
filepathString
,
rsrcString
;
CFStringRef
filenameString
,
filepathString
,
rsrcString
;
...
@@ -500,7 +501,7 @@ locateResourcePy(char * resourceName, char * resourceURLCStr, int length) {
...
@@ -500,7 +501,7 @@ locateResourcePy(char * resourceName, char * resourceURLCStr, int length) {
/* Look for py files in the main bundle by type */
/* Look for py files in the main bundle by type */
arrayRef
=
CFBundleCopyResourceURLsOfType
(
mainBundle
,
arrayRef
=
CFBundleCopyResourceURLsOfType
(
mainBundle
,
CFSTR
(
"py"
)
,
resourceType
,
NULL
);
NULL
);
/* See if there are any filename matches */
/* See if there are any filename matches */
...
@@ -541,18 +542,22 @@ main(int argc, char **argv)
...
@@ -541,18 +542,22 @@ main(int argc, char **argv)
/* First we see whether we have __rawmain__.py and run that if it
/* First we see whether we have __rawmain__.py and run that if it
** is there
** is there
*/
*/
if
(
locateResourcePy
(
"__rawmain__.py"
,
scriptpath
,
1024
))
{
if
(
locateResourcePy
(
CFSTR
(
"py"
),
"__rawmain__.py"
,
scriptpath
,
1024
))
{
/* If we have a raw main we don't do AppleEvent processing.
/* If we have a raw main we don't do AppleEvent processing.
** Notice that this also means we keep the -psn.... argv[1]
** Notice that this also means we keep the -psn.... argv[1]
** value intact. Not sure whether that is important to someone,
** value intact. Not sure whether that is important to someone,
** but you never know...
** but you never know...
*/
*/
script
=
scriptpath
;
script
=
scriptpath
;
}
else
if
(
locateResourcePy
(
CFSTR
(
"pyc"
),
"__rawmain__.pyc"
,
scriptpath
,
1024
))
{
script
=
scriptpath
;
}
else
{
}
else
{
/* Otherwise we look for __main__.py. Whether that is
/* Otherwise we look for __main__.py. Whether that is
** found or not we also process AppleEvent arguments.
** found or not we also process AppleEvent arguments.
*/
*/
if
(
locateResourcePy
(
"__main__.py"
,
scriptpath
,
1024
))
if
(
locateResourcePy
(
CFSTR
(
"py"
),
"__main__.py"
,
scriptpath
,
1024
))
script
=
scriptpath
;
else
if
(
locateResourcePy
(
CFSTR
(
"pyc"
),
"__main__.pyc"
,
scriptpath
,
1024
))
script
=
scriptpath
;
script
=
scriptpath
;
init_common
(
&
argc
,
&
argv
,
0
);
init_common
(
&
argc
,
&
argv
,
0
);
...
...
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