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
6d802a0c
Kaydet (Commit)
6d802a0c
authored
Ara 13, 2002
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Tweaks to make this module OS9-compatible.
üst
b2ef47b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
+31
-13
_Filemodule.c
Mac/Modules/file/_Filemodule.c
+22
-4
filescan.py
Mac/Modules/file/filescan.py
+8
-4
filesupport.py
Mac/Modules/file/filesupport.py
+1
-5
No files found.
Mac/Modules/file/_Filemodule.c
Dosyayı görüntüle @
6d802a0c
...
@@ -1199,7 +1199,7 @@ static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args)
...
@@ -1199,7 +1199,7 @@ static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args)
{
{
PyObject
*
_res
=
NULL
;
PyObject
*
_res
=
NULL
;
OSStatus
_err
;
OSStatus
_err
;
char
*
path
;
UInt8
*
path
;
FSRef
ref
;
FSRef
ref
;
Boolean
isDirectory
;
Boolean
isDirectory
;
if
(
!
PyArg_ParseTuple
(
_args
,
"s"
,
if
(
!
PyArg_ParseTuple
(
_args
,
"s"
,
...
@@ -1215,6 +1215,8 @@ static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args)
...
@@ -1215,6 +1215,8 @@ static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args)
return
_res
;
return
_res
;
}
}
#if TARGET_API_MAC_OSX
static
PyObject
*
File_FNNotify
(
PyObject
*
_self
,
PyObject
*
_args
)
static
PyObject
*
File_FNNotify
(
PyObject
*
_self
,
PyObject
*
_args
)
{
{
PyObject
*
_res
=
NULL
;
PyObject
*
_res
=
NULL
;
...
@@ -1235,12 +1237,15 @@ static PyObject *File_FNNotify(PyObject *_self, PyObject *_args)
...
@@ -1235,12 +1237,15 @@ static PyObject *File_FNNotify(PyObject *_self, PyObject *_args)
_res
=
Py_None
;
_res
=
Py_None
;
return
_res
;
return
_res
;
}
}
#endif
#if TARGET_API_MAC_OSX
static
PyObject
*
File_FNNotifyByPath
(
PyObject
*
_self
,
PyObject
*
_args
)
static
PyObject
*
File_FNNotifyByPath
(
PyObject
*
_self
,
PyObject
*
_args
)
{
{
PyObject
*
_res
=
NULL
;
PyObject
*
_res
=
NULL
;
OSStatus
_err
;
OSStatus
_err
;
char
*
path
;
UInt8
*
path
;
FNMessage
message
;
FNMessage
message
;
OptionBits
flags
;
OptionBits
flags
;
if
(
!
PyArg_ParseTuple
(
_args
,
"sll"
,
if
(
!
PyArg_ParseTuple
(
_args
,
"sll"
,
...
@@ -1256,6 +1261,9 @@ static PyObject *File_FNNotifyByPath(PyObject *_self, PyObject *_args)
...
@@ -1256,6 +1261,9 @@ static PyObject *File_FNNotifyByPath(PyObject *_self, PyObject *_args)
_res
=
Py_None
;
_res
=
Py_None
;
return
_res
;
return
_res
;
}
}
#endif
#if TARGET_API_MAC_OSX
static
PyObject
*
File_FNNotifyAll
(
PyObject
*
_self
,
PyObject
*
_args
)
static
PyObject
*
File_FNNotifyAll
(
PyObject
*
_self
,
PyObject
*
_args
)
{
{
...
@@ -1274,6 +1282,7 @@ static PyObject *File_FNNotifyAll(PyObject *_self, PyObject *_args)
...
@@ -1274,6 +1282,7 @@ static PyObject *File_FNNotifyAll(PyObject *_self, PyObject *_args)
_res
=
Py_None
;
_res
=
Py_None
;
return
_res
;
return
_res
;
}
}
#endif
static
PyObject
*
File_FSRefMakePath
(
PyObject
*
_self
,
PyObject
*
_args
)
static
PyObject
*
File_FSRefMakePath
(
PyObject
*
_self
,
PyObject
*
_args
)
{
{
...
@@ -1411,13 +1420,22 @@ static PyMethodDef File_methods[] = {
...
@@ -1411,13 +1420,22 @@ static PyMethodDef File_methods[] = {
{
"FSGetResourceForkName"
,
(
PyCFunction
)
File_FSGetResourceForkName
,
1
,
{
"FSGetResourceForkName"
,
(
PyCFunction
)
File_FSGetResourceForkName
,
1
,
PyDoc_STR
(
"() -> (HFSUniStr255 resourceForkName)"
)},
PyDoc_STR
(
"() -> (HFSUniStr255 resourceForkName)"
)},
{
"FSPathMakeRef"
,
(
PyCFunction
)
File_FSPathMakeRef
,
1
,
{
"FSPathMakeRef"
,
(
PyCFunction
)
File_FSPathMakeRef
,
1
,
PyDoc_STR
(
"(char* path) -> (FSRef ref, Boolean isDirectory)"
)},
PyDoc_STR
(
"(UInt8 * path) -> (FSRef ref, Boolean isDirectory)"
)},
#if TARGET_API_MAC_OSX
{
"FNNotify"
,
(
PyCFunction
)
File_FNNotify
,
1
,
{
"FNNotify"
,
(
PyCFunction
)
File_FNNotify
,
1
,
PyDoc_STR
(
"(FSRef ref, FNMessage message, OptionBits flags) -> None"
)},
PyDoc_STR
(
"(FSRef ref, FNMessage message, OptionBits flags) -> None"
)},
#endif
#if TARGET_API_MAC_OSX
{
"FNNotifyByPath"
,
(
PyCFunction
)
File_FNNotifyByPath
,
1
,
{
"FNNotifyByPath"
,
(
PyCFunction
)
File_FNNotifyByPath
,
1
,
PyDoc_STR
(
"(char* path, FNMessage message, OptionBits flags) -> None"
)},
PyDoc_STR
(
"(UInt8 * path, FNMessage message, OptionBits flags) -> None"
)},
#endif
#if TARGET_API_MAC_OSX
{
"FNNotifyAll"
,
(
PyCFunction
)
File_FNNotifyAll
,
1
,
{
"FNNotifyAll"
,
(
PyCFunction
)
File_FNNotifyAll
,
1
,
PyDoc_STR
(
"(FNMessage message, OptionBits flags) -> None"
)},
PyDoc_STR
(
"(FNMessage message, OptionBits flags) -> None"
)},
#endif
{
"FSRefMakePath"
,
(
PyCFunction
)
File_FSRefMakePath
,
1
,
{
"FSRefMakePath"
,
(
PyCFunction
)
File_FSRefMakePath
,
1
,
PyDoc_STR
(
"(FSRef) -> string"
)},
PyDoc_STR
(
"(FSRef) -> string"
)},
{
NULL
,
NULL
,
0
}
{
NULL
,
NULL
,
0
}
...
...
Mac/Modules/file/filescan.py
Dosyayı görüntüle @
6d802a0c
...
@@ -89,6 +89,14 @@ class MyScanner(Scanner_OSX):
...
@@ -89,6 +89,14 @@ class MyScanner(Scanner_OSX):
]
]
def
makegreylist
(
self
):
return
[
(
'#if TARGET_API_MAC_OSX'
,
[
'FNNotifyAll'
,
'FNNotifyByPath'
,
'FNNotify'
,
])]
def
makeblacklisttypes
(
self
):
def
makeblacklisttypes
(
self
):
return
[
return
[
"CInfoPBPtr"
,
# Old stuff
"CInfoPBPtr"
,
# Old stuff
...
@@ -127,10 +135,6 @@ class MyScanner(Scanner_OSX):
...
@@ -127,10 +135,6 @@ class MyScanner(Scanner_OSX):
def
makerepairinstructions
(
self
):
def
makerepairinstructions
(
self
):
return
[
return
[
# Various ways to give pathnames
# Various ways to give pathnames
([(
'UInt8_ptr'
,
'path'
,
'InMode'
)],
[(
'stringptr'
,
'path'
,
'InMode'
)]
),
([(
'char_ptr'
,
'*'
,
'InMode'
)],
([(
'char_ptr'
,
'*'
,
'InMode'
)],
[(
'stringptr'
,
'*'
,
'InMode'
)]
[(
'stringptr'
,
'*'
,
'InMode'
)]
),
),
...
...
Mac/Modules/file/filesupport.py
Dosyayı görüntüle @
6d802a0c
...
@@ -46,11 +46,7 @@ FSVolumeRefNum = Type("FSVolumeRefNum", "h")
...
@@ -46,11 +46,7 @@ FSVolumeRefNum = Type("FSVolumeRefNum", "h")
HFSUniStr255
=
OpaqueType
(
"HFSUniStr255"
,
"PyMac_BuildHFSUniStr255"
,
"PyMac_GetHFSUniStr255"
)
HFSUniStr255
=
OpaqueType
(
"HFSUniStr255"
,
"PyMac_BuildHFSUniStr255"
,
"PyMac_GetHFSUniStr255"
)
SInt64
=
Type
(
"SInt64"
,
"L"
)
SInt64
=
Type
(
"SInt64"
,
"L"
)
UInt64
=
Type
(
"UInt64"
,
"L"
)
UInt64
=
Type
(
"UInt64"
,
"L"
)
#UInt8_ptr
UInt8_ptr
=
InputOnlyType
(
"UInt8 *"
,
"s"
)
#UniCharCount
#char_ptr
#void_ptr
includestuff
=
includestuff
+
"""
includestuff
=
includestuff
+
"""
#ifdef WITHOUT_FRAMEWORKS
#ifdef WITHOUT_FRAMEWORKS
...
...
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