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
d505cab5
Kaydet (Commit)
d505cab5
authored
Mar 03, 2003
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Accept only the system default encoding when converting Python
strings to CF strings. Fixes 682215.
üst
f0089986
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
_CFmodule.c
Mac/Modules/cf/_CFmodule.c
+4
-4
cfsupport.py
Mac/Modules/cf/cfsupport.py
+4
-2
pycfbridge.c
Mac/Modules/cf/pycfbridge.c
+3
-2
No files found.
Mac/Modules/cf/_CFmodule.c
Dosyayı görüntüle @
d505cab5
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
PyErr_SetString(PyExc_NotImplementedError, \
PyErr_SetString(PyExc_NotImplementedError, \
"Not available in this shared library/OS version"); \
"Not available in this shared library/OS version"); \
return NULL; \
return NULL; \
}} while(0)
}} while(0)
...
@@ -1458,7 +1458,7 @@ int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself)
...
@@ -1458,7 +1458,7 @@ int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself)
if
(
v
==
Py_None
)
{
*
p_itself
=
NULL
;
return
1
;
}
if
(
v
==
Py_None
)
{
*
p_itself
=
NULL
;
return
1
;
}
if
(
PyString_Check
(
v
))
{
if
(
PyString_Check
(
v
))
{
char
*
cStr
=
PyString_AsString
(
v
);
char
*
cStr
=
PyString_AsString
(
v
);
*
p_itself
=
CFStringCreateWithCString
((
CFAllocatorRef
)
NULL
,
cStr
,
0
);
*
p_itself
=
CFStringCreateWithCString
((
CFAllocatorRef
)
NULL
,
cStr
,
kCFStringEncodingASCII
);
return
1
;
return
1
;
}
}
if
(
PyUnicode_Check
(
v
))
{
if
(
PyUnicode_Check
(
v
))
{
...
...
Mac/Modules/cf/cfsupport.py
Dosyayı görüntüle @
d505cab5
...
@@ -359,8 +359,10 @@ class CFStringRefObjectDefinition(MyGlobalObjectDefinition):
...
@@ -359,8 +359,10 @@ class CFStringRefObjectDefinition(MyGlobalObjectDefinition):
Out
(
"""
Out
(
"""
if (v == Py_None) { *p_itself = NULL; return 1; }
if (v == Py_None) { *p_itself = NULL; return 1; }
if (PyString_Check(v)) {
if (PyString_Check(v)) {
char *cStr = PyString_AsString(v);
char *cStr;
*p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, 0);
if (!PyArg_Parse(v, "et", "ascii", &cStr))
return NULL;
*p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
return 1;
return 1;
}
}
if (PyUnicode_Check(v)) {
if (PyUnicode_Check(v)) {
...
...
Mac/Modules/cf/pycfbridge.c
Dosyayı görüntüle @
d505cab5
...
@@ -292,8 +292,9 @@ PyCF_Python2CF_string(PyObject *src, CFStringRef *dst) {
...
@@ -292,8 +292,9 @@ PyCF_Python2CF_string(PyObject *src, CFStringRef *dst) {
UniChar
*
unichars
;
UniChar
*
unichars
;
if
(
PyString_Check
(
src
))
{
if
(
PyString_Check
(
src
))
{
if
((
chars
=
PyString_AsString
(
src
))
==
NULL
)
goto
err
;
if
(
!
PyArg_Parse
(
src
,
"es"
,
NULL
,
&
chars
))
*
dst
=
CFStringCreateWithCString
((
CFAllocatorRef
)
NULL
,
chars
,
0
);
return
NULL
;
/* This error is more descriptive than the general one below */
*
dst
=
CFStringCreateWithCString
((
CFAllocatorRef
)
NULL
,
chars
,
kCFStringEncodingASCII
);
return
1
;
return
1
;
}
}
if
(
PyUnicode_Check
(
src
))
{
if
(
PyUnicode_Check
(
src
))
{
...
...
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