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
8dc797d1
Kaydet (Commit)
8dc797d1
authored
Ock 10, 1997
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Return preferences of unknown type as opaque data
üst
466be801
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
ic.py
Mac/Lib/ic.py
+14
-1
No files found.
Mac/Lib/ic.py
Dosyayı görüntüle @
8dc797d1
...
@@ -28,13 +28,24 @@ icReadOnlyPerm = 1
...
@@ -28,13 +28,24 @@ icReadOnlyPerm = 1
icReadWritePerm
=
2
icReadWritePerm
=
2
# End of ictypes.h
# End of ictypes.h
class
ICOpaqueData
:
"""An unparseable IC entry"""
def
__init__
(
self
,
data
):
self
.
data
=
data
def
__repr__
(
self
):
return
"ICOpaqueData(
%
s)"
%
`self.data`
_ICOpaqueDataType
=
type
(
ICOpaqueData
(
''
))
def
_decode_default
(
data
,
key
):
def
_decode_default
(
data
,
key
):
if
len
(
data
)
==
0
:
if
len
(
data
)
==
0
:
return
data
return
data
if
ord
(
data
[
0
])
==
len
(
data
)
-
1
:
if
ord
(
data
[
0
])
==
len
(
data
)
-
1
:
# Assume Pstring
# Assume Pstring
return
data
[
1
:]
return
data
[
1
:]
raise
error
,
"Unknown data format for key "
+
key
return
ICOpaqueData
(
data
)
def
_decode_multistr
(
data
,
key
):
def
_decode_multistr
(
data
,
key
):
numstr
=
ord
(
data
[
0
])
<<
8
|
ord
(
data
[
1
])
numstr
=
ord
(
data
[
0
])
<<
8
|
ord
(
data
[
1
])
...
@@ -134,6 +145,8 @@ def _decode(data, key):
...
@@ -134,6 +145,8 @@ def _decode(data, key):
return
decoder
(
data
,
key
)
return
decoder
(
data
,
key
)
def
_code
(
data
,
key
):
def
_code
(
data
,
key
):
if
type
(
data
)
==
_ICOpaqueDataType
:
return
data
.
data
if
'
\245
'
in
key
:
if
'
\245
'
in
key
:
key2
=
key
[:
string
.
index
(
key
,
'
\245
'
)
+
1
]
key2
=
key
[:
string
.
index
(
key
,
'
\245
'
)
+
1
]
else
:
else
:
...
...
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