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
8ffe7bbb
Kaydet (Commit)
8ffe7bbb
authored
May 03, 2010
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove unused variables and a variable initialization.
Found using Clang's static analyzer.
üst
5d947cb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
_sre.c
Modules/_sre.c
+6
-6
No files found.
Modules/_sre.c
Dosyayı görüntüle @
8ffe7bbb
...
@@ -1686,7 +1686,7 @@ getstring(PyObject* string, Py_ssize_t* p_length, int* p_charsize)
...
@@ -1686,7 +1686,7 @@ getstring(PyObject* string, Py_ssize_t* p_length, int* p_charsize)
if
(
PyUnicode_Check
(
string
))
{
if
(
PyUnicode_Check
(
string
))
{
/* unicode strings doesn't always support the buffer interface */
/* unicode strings doesn't always support the buffer interface */
ptr
=
(
void
*
)
PyUnicode_AS_DATA
(
string
);
ptr
=
(
void
*
)
PyUnicode_AS_DATA
(
string
);
bytes
=
PyUnicode_GET_DATA_SIZE
(
string
);
/* bytes = PyUnicode_GET_DATA_SIZE(string); */
size
=
PyUnicode_GET_SIZE
(
string
);
size
=
PyUnicode_GET_SIZE
(
string
);
charsize
=
sizeof
(
Py_UNICODE
);
charsize
=
sizeof
(
Py_UNICODE
);
...
@@ -2967,13 +2967,13 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
...
@@ -2967,13 +2967,13 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
<INFO> <1=skip> <2=flags> <3=min> <4=max>;
<INFO> <1=skip> <2=flags> <3=min> <4=max>;
If SRE_INFO_PREFIX or SRE_INFO_CHARSET is in the flags,
If SRE_INFO_PREFIX or SRE_INFO_CHARSET is in the flags,
more follows. */
more follows. */
SRE_CODE
flags
,
min
,
max
,
i
;
SRE_CODE
flags
,
i
;
SRE_CODE
*
newcode
;
SRE_CODE
*
newcode
;
GET_SKIP
;
GET_SKIP
;
newcode
=
code
+
skip
-
1
;
newcode
=
code
+
skip
-
1
;
GET_ARG
;
flags
=
arg
;
GET_ARG
;
flags
=
arg
;
GET_ARG
;
min
=
arg
;
GET_ARG
;
/* min */
GET_ARG
;
max
=
arg
;
GET_ARG
;
/* max */
/* Check that only valid flags are present */
/* Check that only valid flags are present */
if
((
flags
&
~
(
SRE_INFO_PREFIX
|
if
((
flags
&
~
(
SRE_INFO_PREFIX
|
SRE_INFO_LITERAL
|
SRE_INFO_LITERAL
|
...
@@ -2989,9 +2989,9 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
...
@@ -2989,9 +2989,9 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
FAIL
;
FAIL
;
/* Validate the prefix */
/* Validate the prefix */
if
(
flags
&
SRE_INFO_PREFIX
)
{
if
(
flags
&
SRE_INFO_PREFIX
)
{
SRE_CODE
prefix_len
,
prefix_skip
;
SRE_CODE
prefix_len
;
GET_ARG
;
prefix_len
=
arg
;
GET_ARG
;
prefix_len
=
arg
;
GET_ARG
;
prefix_skip
=
arg
;
GET_ARG
;
/* prefix skip */
/* Here comes the prefix string */
/* Here comes the prefix string */
if
(
code
+
prefix_len
<
code
||
code
+
prefix_len
>
newcode
)
if
(
code
+
prefix_len
<
code
||
code
+
prefix_len
>
newcode
)
FAIL
;
FAIL
;
...
...
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