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
63ab875c
Kaydet (Commit)
63ab875c
authored
Kas 22, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide
üst
0d3721d9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
25 deletions
+8
-25
_sre.c
Modules/_sre.c
+4
-8
bltinmodule.c
Python/bltinmodule.c
+2
-9
traceback.c
Python/traceback.c
+2
-8
No files found.
Modules/_sre.c
Dosyayı görüntüle @
63ab875c
...
@@ -500,7 +500,7 @@ SRE_COUNT(SRE_STATE* state, SRE_CODE* pattern, Py_ssize_t maxcount)
...
@@ -500,7 +500,7 @@ SRE_COUNT(SRE_STATE* state, SRE_CODE* pattern, Py_ssize_t maxcount)
case
SRE_OP_IN
:
case
SRE_OP_IN
:
/* repeated set */
/* repeated set */
TRACE
((
"|%p|%p|COUNT IN
\n
"
,
pattern
,
ptr
));
TRACE
((
"|%p|%p|COUNT IN
\n
"
,
pattern
,
ptr
));
while
(
ptr
<
end
&&
while
(
ptr
<
end
&&
SRE_CHARSET
(
pattern
+
2
,
SRE_CHARGET
(
state
,
ptr
,
0
)))
SRE_CHARSET
(
pattern
+
2
,
SRE_CHARGET
(
state
,
ptr
,
0
)))
ptr
+=
state
->
charsize
;
ptr
+=
state
->
charsize
;
break
;
break
;
...
@@ -1030,7 +1030,7 @@ entrance:
...
@@ -1030,7 +1030,7 @@ entrance:
ctx
->
u
.
chr
=
ctx
->
pattern
[
ctx
->
pattern
[
0
]
+
1
];
ctx
->
u
.
chr
=
ctx
->
pattern
[
ctx
->
pattern
[
0
]
+
1
];
for
(;;)
{
for
(;;)
{
while
(
ctx
->
count
>=
(
Py_ssize_t
)
ctx
->
pattern
[
1
]
&&
while
(
ctx
->
count
>=
(
Py_ssize_t
)
ctx
->
pattern
[
1
]
&&
(
ctx
->
ptr
>=
end
||
(
ctx
->
ptr
>=
end
||
SRE_CHARGET
(
state
,
ctx
->
ptr
,
0
)
!=
ctx
->
u
.
chr
))
{
SRE_CHARGET
(
state
,
ctx
->
ptr
,
0
)
!=
ctx
->
u
.
chr
))
{
ctx
->
ptr
-=
state
->
charsize
;
ctx
->
ptr
-=
state
->
charsize
;
ctx
->
count
--
;
ctx
->
count
--
;
...
@@ -1302,7 +1302,7 @@ entrance:
...
@@ -1302,7 +1302,7 @@ entrance:
if
(
!
p
||
!
e
||
e
<
p
)
if
(
!
p
||
!
e
||
e
<
p
)
RETURN_FAILURE
;
RETURN_FAILURE
;
while
(
p
<
e
)
{
while
(
p
<
e
)
{
if
(
ctx
->
ptr
>=
end
||
if
(
ctx
->
ptr
>=
end
||
SRE_CHARGET
(
state
,
ctx
->
ptr
,
0
)
!=
SRE_CHARGET
(
state
,
p
,
0
))
SRE_CHARGET
(
state
,
ctx
->
ptr
,
0
)
!=
SRE_CHARGET
(
state
,
p
,
0
))
RETURN_FAILURE
;
RETURN_FAILURE
;
p
+=
state
->
charsize
;
p
+=
state
->
charsize
;
...
@@ -2664,7 +2664,7 @@ _compile(PyObject* self_, PyObject* args)
...
@@ -2664,7 +2664,7 @@ _compile(PyObject* self_, PyObject* args)
if
(
pattern
==
Py_None
)
{
if
(
pattern
==
Py_None
)
{
self
->
logical_charsize
=
-
1
;
self
->
logical_charsize
=
-
1
;
self
->
charsize
=
-
1
;
self
->
charsize
=
-
1
;
}
}
else
{
else
{
Py_ssize_t
p_length
;
Py_ssize_t
p_length
;
if
(
!
getstring
(
pattern
,
&
p_length
,
&
self
->
logical_charsize
,
if
(
!
getstring
(
pattern
,
&
p_length
,
&
self
->
logical_charsize
,
...
@@ -3021,10 +3021,8 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
...
@@ -3021,10 +3021,8 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
GET_ARG
;
max
=
arg
;
GET_ARG
;
max
=
arg
;
if
(
min
>
max
)
if
(
min
>
max
)
FAIL
;
FAIL
;
#ifdef Py_UNICODE_WIDE
if
(
max
>
65535
)
if
(
max
>
65535
)
FAIL
;
FAIL
;
#endif
if
(
!
_validate_inner
(
code
,
code
+
skip
-
4
,
groups
))
if
(
!
_validate_inner
(
code
,
code
+
skip
-
4
,
groups
))
FAIL
;
FAIL
;
code
+=
skip
-
4
;
code
+=
skip
-
4
;
...
@@ -3042,10 +3040,8 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
...
@@ -3042,10 +3040,8 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
GET_ARG
;
max
=
arg
;
GET_ARG
;
max
=
arg
;
if
(
min
>
max
)
if
(
min
>
max
)
FAIL
;
FAIL
;
#ifdef Py_UNICODE_WIDE
if
(
max
>
65535
)
if
(
max
>
65535
)
FAIL
;
FAIL
;
#endif
if
(
!
_validate_inner
(
code
,
code
+
skip
-
3
,
groups
))
if
(
!
_validate_inner
(
code
,
code
+
skip
-
3
,
groups
))
FAIL
;
FAIL
;
code
+=
skip
-
3
;
code
+=
skip
-
3
;
...
...
Python/bltinmodule.c
Dosyayı görüntüle @
63ab875c
...
@@ -518,17 +518,10 @@ builtin_chr(PyObject *self, PyObject *args)
...
@@ -518,17 +518,10 @@ builtin_chr(PyObject *self, PyObject *args)
return
PyUnicode_FromOrdinal
(
x
);
return
PyUnicode_FromOrdinal
(
x
);
}
}
PyDoc_
VAR
(
chr_doc
)
=
PyDoc_STR
(
PyDoc_
STRVAR
(
chr_doc
,
"chr(i) -> Unicode character
\n
\
"chr(i) -> Unicode character
\n
\
\n
\
\n
\
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."
);
)
#ifndef Py_UNICODE_WIDE
PyDoc_STR
(
"
\n
If 0x10000 <= i, a surrogate pair is returned."
)
#endif
;
static
char
*
static
char
*
...
...
Python/traceback.c
Dosyayı görüntüle @
63ab875c
...
@@ -526,23 +526,17 @@ dump_ascii(int fd, PyObject *text)
...
@@ -526,23 +526,17 @@ dump_ascii(int fd, PyObject *text)
char
c
=
(
char
)
ch
;
char
c
=
(
char
)
ch
;
write
(
fd
,
&
c
,
1
);
write
(
fd
,
&
c
,
1
);
}
}
else
if
(
ch
<
256
)
{
else
if
(
ch
<
0xff
)
{
PUTS
(
fd
,
"
\\
x"
);
PUTS
(
fd
,
"
\\
x"
);
dump_hexadecimal
(
2
,
ch
,
fd
);
dump_hexadecimal
(
2
,
ch
,
fd
);
}
}
else
else
if
(
ch
<
0xffff
)
{
#ifdef Py_UNICODE_WIDE
if
(
ch
<
65536
)
#endif
{
PUTS
(
fd
,
"
\\
u"
);
PUTS
(
fd
,
"
\\
u"
);
dump_hexadecimal
(
4
,
ch
,
fd
);
dump_hexadecimal
(
4
,
ch
,
fd
);
#ifdef Py_UNICODE_WIDE
}
}
else
{
else
{
PUTS
(
fd
,
"
\\
U"
);
PUTS
(
fd
,
"
\\
U"
);
dump_hexadecimal
(
8
,
ch
,
fd
);
dump_hexadecimal
(
8
,
ch
,
fd
);
#endif
}
}
}
}
if
(
truncated
)
if
(
truncated
)
...
...
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