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
a5bca579
Kaydet (Commit)
a5bca579
authored
Agu 03, 2001
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
PyMac_GetFSSpec must be called via the dylib glue code on OSX.
üst
3988358b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
pymactoolbox.h
Mac/Include/pymactoolbox.h
+3
-0
macfsmodule.c
Mac/Modules/macfsmodule.c
+16
-1
macglue.c
Mac/Python/macglue.c
+1
-0
No files found.
Mac/Include/pymactoolbox.h
Dosyayı görüntüle @
a5bca579
...
...
@@ -42,6 +42,9 @@
#define PyMac_INIT_TOOLBOX_OBJECT_CONVERT(object, rtn)
#endif
/* USE_TOOLBOX_OBJECT_GLUE */
/* macfs exports */
extern
int
PyMac_GetFSSpec
(
PyObject
*
,
FSSpec
*
);
/* AE exports */
extern
PyObject
*
AEDesc_New
(
AppleEvent
*
);
/* XXXX Why passed by address?? */
extern
int
AEDesc_Convert
(
PyObject
*
,
AppleEvent
*
);
...
...
Mac/Modules/macfsmodule.c
Dosyayı görüntüle @
a5bca579
...
...
@@ -24,6 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
#include "macglue.h"
#include "pymactoolbox.h"
#ifdef WITHOUT_FRAMEWORKS
#include <Memory.h>
...
...
@@ -38,7 +39,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "getapplbycreator.h"
#ifdef USE_TOOLBOX_OBJECT_GLUE
extern
int
_PyMac_GetFSSpec
(
PyObject
*
,
FSSpec
*
);
#define PyMac_GetFSSpec _PyMac_GetFSSpec
#endif
static
PyObject
*
ErrorObject
;
/* ----------------------------------------------------- */
...
...
@@ -1201,8 +1205,17 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr)
if
(
_mfs_GetFSRefFromFSSpec
(
v
,
fsr
)
)
return
1
;
if
(
PyString_Check
(
v
)
)
{
#if TARGET_API_MAC_OSX
OSStatus
err
;
if
(
(
err
=
FSPathMakeRef
(
PyString_AsString
(
v
),
fsr
,
NULL
))
)
{
PyErr_Mac
(
ErrorObject
,
err
);
return
0
;
}
return
1
;
#else
PyErr_SetString
(
PyExc_NotImplementedError
,
"Cannot create an FSRef from a pathname on this platform"
);
return
0
;
#endif
}
PyErr_SetString
(
PyExc_TypeError
,
"FSRef argument should be existing FSRef, FSSpec or (OSX only) pathname"
);
return
0
;
...
...
@@ -1270,6 +1283,8 @@ initmacfs()
{
PyObject
*
m
,
*
d
;
PyMac_INIT_TOOLBOX_OBJECT_CONVERT
(
Handle
,
PyMac_GetFSSpec
);
/* Create the module and add the functions */
m
=
Py_InitModule
(
"macfs"
,
mfs_methods
);
...
...
Mac/Python/macglue.c
Dosyayı görüntüle @
a5bca579
...
...
@@ -1194,6 +1194,7 @@ int routinename(PyObject *pyobj, object *cobj) { \
} \
return (*PyMacGluePtr_##routinename)(pyobj, cobj); \
}
GLUE_CONVERT
(
FSSpec
,
PyMac_GetFSSpec
,
"macfs"
)
GLUE_NEW
(
AppleEvent
*
,
AEDesc_New
,
"AE"
)
/* XXXX Why by address? */
GLUE_CONVERT
(
AppleEvent
,
AEDesc_Convert
,
"AE"
)
...
...
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