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
6caea370
Kaydet (Commit)
6caea370
authored
Kas 18, 2003
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #794400: Let PYTHONSTARTUP influence the compiler flags.
üst
b61982ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
NEWS
Misc/NEWS
+2
-0
main.c
Modules/main.c
+14
-9
No files found.
Misc/NEWS
Dosyayı görüntüle @
6caea370
...
@@ -12,6 +12,8 @@ What's New in Python 2.4 alpha 1?
...
@@ -12,6 +12,8 @@ What's New in Python 2.4 alpha 1?
Core and builtins
Core and builtins
-----------------
-----------------
- Compiler flags set in PYTHONSTARTUP are now active in __main__.
- Added two builtin types, set() and frozenset().
- Added two builtin types, set() and frozenset().
- Critical bugfix, for SF bug 840829: if cyclic garbage collection
- Critical bugfix, for SF bug 840829: if cyclic garbage collection
...
...
Modules/main.c
Dosyayı görüntüle @
6caea370
...
@@ -117,6 +117,19 @@ usage(int exitcode, char* program)
...
@@ -117,6 +117,19 @@ usage(int exitcode, char* program)
/*NOTREACHED*/
/*NOTREACHED*/
}
}
static
void
RunStartupFile
(
PyCompilerFlags
*
cf
)
{
char
*
startup
=
Py_GETENV
(
"PYTHONSTARTUP"
);
if
(
startup
!=
NULL
&&
startup
[
0
]
!=
'\0'
)
{
FILE
*
fp
=
fopen
(
startup
,
"r"
);
if
(
fp
!=
NULL
)
{
(
void
)
PyRun_SimpleFileExFlags
(
fp
,
startup
,
0
,
cf
);
PyErr_Clear
();
fclose
(
fp
);
}
}
}
/* Main program */
/* Main program */
...
@@ -401,15 +414,7 @@ Py_Main(int argc, char **argv)
...
@@ -401,15 +414,7 @@ Py_Main(int argc, char **argv)
}
}
else
{
else
{
if
(
filename
==
NULL
&&
stdin_is_interactive
)
{
if
(
filename
==
NULL
&&
stdin_is_interactive
)
{
char
*
startup
=
Py_GETENV
(
"PYTHONSTARTUP"
);
RunStartupFile
(
&
cf
);
if
(
startup
!=
NULL
&&
startup
[
0
]
!=
'\0'
)
{
FILE
*
fp
=
fopen
(
startup
,
"r"
);
if
(
fp
!=
NULL
)
{
(
void
)
PyRun_SimpleFile
(
fp
,
startup
);
PyErr_Clear
();
fclose
(
fp
);
}
}
}
}
/* XXX */
/* XXX */
sts
=
PyRun_AnyFileExFlags
(
sts
=
PyRun_AnyFileExFlags
(
...
...
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