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
fbb215cb
Kaydet (Commit)
fbb215cb
authored
Eyl 03, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.5 (namereplace)
üst
304d5287
38b8ae0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
codecs.c
Python/codecs.c
+5
-7
No files found.
Python/codecs.c
Dosyayı görüntüle @
fbb215cb
...
@@ -966,7 +966,6 @@ PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
...
@@ -966,7 +966,6 @@ PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
}
}
static
_PyUnicode_Name_CAPI
*
ucnhash_CAPI
=
NULL
;
static
_PyUnicode_Name_CAPI
*
ucnhash_CAPI
=
NULL
;
static
int
ucnhash_initialized
=
0
;
PyObject
*
PyCodec_NameReplaceErrors
(
PyObject
*
exc
)
PyObject
*
PyCodec_NameReplaceErrors
(
PyObject
*
exc
)
{
{
...
@@ -988,17 +987,17 @@ PyObject *PyCodec_NameReplaceErrors(PyObject *exc)
...
@@ -988,17 +987,17 @@ PyObject *PyCodec_NameReplaceErrors(PyObject *exc)
return
NULL
;
return
NULL
;
if
(
!
(
object
=
PyUnicodeEncodeError_GetObject
(
exc
)))
if
(
!
(
object
=
PyUnicodeEncodeError_GetObject
(
exc
)))
return
NULL
;
return
NULL
;
if
(
!
ucnhash_
initialized
)
{
if
(
!
ucnhash_
CAPI
)
{
/* load the unicode data module */
/* load the unicode data module */
ucnhash_CAPI
=
(
_PyUnicode_Name_CAPI
*
)
PyCapsule_Import
(
ucnhash_CAPI
=
(
_PyUnicode_Name_CAPI
*
)
PyCapsule_Import
(
PyUnicodeData_CAPSULE_NAME
,
1
);
PyUnicodeData_CAPSULE_NAME
,
1
);
ucnhash_initialized
=
1
;
if
(
!
ucnhash_CAPI
)
return
NULL
;
}
}
for
(
i
=
start
,
ressize
=
0
;
i
<
end
;
++
i
)
{
for
(
i
=
start
,
ressize
=
0
;
i
<
end
;
++
i
)
{
/* object is guaranteed to be "ready" */
/* object is guaranteed to be "ready" */
c
=
PyUnicode_READ_CHAR
(
object
,
i
);
c
=
PyUnicode_READ_CHAR
(
object
,
i
);
if
(
ucnhash_CAPI
&&
if
(
ucnhash_CAPI
->
getname
(
NULL
,
c
,
buffer
,
sizeof
(
buffer
),
1
))
{
ucnhash_CAPI
->
getname
(
NULL
,
c
,
buffer
,
sizeof
(
buffer
),
1
))
{
replsize
=
1
+
1
+
1
+
(
int
)
strlen
(
buffer
)
+
1
;
replsize
=
1
+
1
+
1
+
(
int
)
strlen
(
buffer
)
+
1
;
}
}
else
if
(
c
>=
0x10000
)
{
else
if
(
c
>=
0x10000
)
{
...
@@ -1021,8 +1020,7 @@ PyObject *PyCodec_NameReplaceErrors(PyObject *exc)
...
@@ -1021,8 +1020,7 @@ PyObject *PyCodec_NameReplaceErrors(PyObject *exc)
i
<
end
;
++
i
)
{
i
<
end
;
++
i
)
{
c
=
PyUnicode_READ_CHAR
(
object
,
i
);
c
=
PyUnicode_READ_CHAR
(
object
,
i
);
*
outp
++
=
'\\'
;
*
outp
++
=
'\\'
;
if
(
ucnhash_CAPI
&&
if
(
ucnhash_CAPI
->
getname
(
NULL
,
c
,
buffer
,
sizeof
(
buffer
),
1
))
{
ucnhash_CAPI
->
getname
(
NULL
,
c
,
buffer
,
sizeof
(
buffer
),
1
))
{
*
outp
++
=
'N'
;
*
outp
++
=
'N'
;
*
outp
++
=
'{'
;
*
outp
++
=
'{'
;
strcpy
((
char
*
)
outp
,
buffer
);
strcpy
((
char
*
)
outp
,
buffer
);
...
...
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