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
ab57c7dc
Kaydet (Commit)
ab57c7dc
authored
Eki 31, 2001
tarafından
Just van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved macfsn hackery from macmain.c to macfsmodule.c so it loads
on demand instead of at startup.
üst
e2ec3ebc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
30 deletions
+32
-30
macfsmodule.c
Mac/Modules/macfsmodule.c
+32
-1
macmain.c
Mac/Python/macmain.c
+0
-29
No files found.
Mac/Modules/macfsmodule.c
Dosyayı görüntüle @
ab57c7dc
...
@@ -39,6 +39,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -39,6 +39,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "getapplbycreator.h"
#include "getapplbycreator.h"
#include "pythonresources.h"
extern
PyMac_PrefRecord
PyMac_options
;
#ifdef USE_TOOLBOX_OBJECT_GLUE
#ifdef USE_TOOLBOX_OBJECT_GLUE
extern
int
_PyMac_GetFSSpec
(
PyObject
*
,
FSSpec
*
);
extern
int
_PyMac_GetFSSpec
(
PyObject
*
,
FSSpec
*
);
extern
PyObject
*
_PyMac_BuildFSSpec
(
FSSpec
*
);
extern
PyObject
*
_PyMac_BuildFSSpec
(
FSSpec
*
);
...
@@ -1206,6 +1209,33 @@ PyObject *PyMac_BuildFSSpec(FSSpec *v)
...
@@ -1206,6 +1209,33 @@ PyObject *PyMac_BuildFSSpec(FSSpec *v)
return
(
PyObject
*
)
newmfssobject
(
v
);
return
(
PyObject
*
)
newmfssobject
(
v
);
}
}
/*
** Import the macfsn module, which will override the Standard File
** calls in the macfs builtin module by Navigation Services versions,
** if available on this machine.
*/
static
void
PyMac_InstallNavServicesForSF
(
void
)
{
if
(
!
PyMac_options
.
nonavservice
)
{
PyObject
*
m
=
PyImport_ImportModule
(
"macfsn"
);
if
(
m
==
NULL
)
{
PySys_WriteStderr
(
"'import macfsn' failed; "
);
if
(
Py_VerboseFlag
)
{
PySys_WriteStderr
(
"traceback:
\n
"
);
PyErr_Print
();
}
else
{
PySys_WriteStderr
(
"use -v for traceback
\n
"
);
}
PyErr_Clear
();
}
}
}
/* Initialization function for the module (*must* be called initmacfs) */
/* Initialization function for the module (*must* be called initmacfs) */
void
void
...
@@ -1235,5 +1265,6 @@ initmacfs(void)
...
@@ -1235,5 +1265,6 @@ initmacfs(void)
Mfsitype
.
ob_type
=
&
PyType_Type
;
Mfsitype
.
ob_type
=
&
PyType_Type
;
Py_INCREF
(
&
Mfsitype
);
Py_INCREF
(
&
Mfsitype
);
PyDict_SetItemString
(
d
,
"FInfoType"
,
(
PyObject
*
)
&
Mfsitype
);
PyDict_SetItemString
(
d
,
"FInfoType"
,
(
PyObject
*
)
&
Mfsitype
);
/* XXXX Add constants here */
PyMac_InstallNavServicesForSF
();
}
}
Mac/Python/macmain.c
Dosyayı görüntüle @
ab57c7dc
...
@@ -392,31 +392,6 @@ run_inspect(void)
...
@@ -392,31 +392,6 @@ run_inspect(void)
return
sts
;
return
sts
;
}
}
/*
** Import the macfsn module, which will override the Standard File
** calls in the macfs builtin module by Navigation Services versions,
** if available on this machine.
*/
static
void
PyMac_InstallNavServicesForSF
(
void
)
{
if
(
!
PyMac_options
.
nonavservice
)
{
PyObject
*
m
=
PyImport_ImportModule
(
"macfsn"
);
if
(
m
==
NULL
)
{
PySys_WriteStderr
(
"'import macfsn' failed; "
);
if
(
Py_VerboseFlag
)
{
PySys_WriteStderr
(
"traceback:
\n
"
);
PyErr_Print
();
}
else
{
PySys_WriteStderr
(
"use -v for traceback
\n
"
);
}
PyErr_Clear
();
}
}
}
#ifdef USE_MAC_APPLET_SUPPORT
#ifdef USE_MAC_APPLET_SUPPORT
/* Applet support */
/* Applet support */
...
@@ -464,7 +439,6 @@ PyMac_InitApplet(void)
...
@@ -464,7 +439,6 @@ PyMac_InitApplet(void)
init_common
(
&
argc
,
&
argv
,
0
);
init_common
(
&
argc
,
&
argv
,
0
);
Py_Initialize
();
Py_Initialize
();
PyMac_InstallNavServicesForSF
();
PySys_SetArgv
(
argc
,
argv
);
PySys_SetArgv
(
argc
,
argv
);
err
=
run_main_resource
();
err
=
run_main_resource
();
...
@@ -488,7 +462,6 @@ PyMac_Initialize(void)
...
@@ -488,7 +462,6 @@ PyMac_Initialize(void)
init_common
(
&
argc
,
&
argv
,
1
);
init_common
(
&
argc
,
&
argv
,
1
);
Py_Initialize
();
Py_Initialize
();
PyMac_InstallNavServicesForSF
();
PySys_SetArgv
(
argc
,
argv
);
PySys_SetArgv
(
argc
,
argv
);
}
}
...
@@ -675,8 +648,6 @@ Py_Main(int argc, char **argv, char *filename)
...
@@ -675,8 +648,6 @@ Py_Main(int argc, char **argv, char *filename)
PyUnicode_SetDefaultEncoding
(
PyMac_getscript
());
PyUnicode_SetDefaultEncoding
(
PyMac_getscript
());
PyMac_InstallNavServicesForSF
();
PySys_SetArgv
(
argc
,
argv
);
PySys_SetArgv
(
argc
,
argv
);
if
(
filename
==
NULL
&&
isatty
((
int
)
fileno
(
fp
)))
{
if
(
filename
==
NULL
&&
isatty
((
int
)
fileno
(
fp
)))
{
...
...
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