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
c8fe0448
Kaydet (Commit)
c8fe0448
authored
Tem 20, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind()
for single-byte argument on Linux.
üst
fd44384f
d92d4efe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
NEWS
Misc/NEWS
+3
-0
bytearrayobject.c
Objects/bytearrayobject.c
+7
-3
bytesobject.c
Objects/bytesobject.c
+7
-3
No files found.
Misc/NEWS
Dosyayı görüntüle @
c8fe0448
...
@@ -32,6 +32,9 @@ Release date: 2015-07-26
...
@@ -32,6 +32,9 @@ Release date: 2015-07-26
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind()
for single-byte argument on Linux.
- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
- Issue #24583: Fix crash when set is mutated while being updated.
- Issue #24583: Fix crash when set is mutated while being updated.
...
...
Objects/bytearrayobject.c
Dosyayı görüntüle @
c8fe0448
...
@@ -1171,12 +1171,16 @@ bytearray_find_internal(PyByteArrayObject *self, PyObject *args, int dir)
...
@@ -1171,12 +1171,16 @@ bytearray_find_internal(PyByteArrayObject *self, PyObject *args, int dir)
ADJUST_INDICES
(
start
,
end
,
len
);
ADJUST_INDICES
(
start
,
end
,
len
);
if
(
end
-
start
<
sub_len
)
if
(
end
-
start
<
sub_len
)
res
=
-
1
;
res
=
-
1
;
/* Issue #23573: FIXME, windows has no memrchr() */
else
if
(
sub_len
==
1
else
if
(
sub_len
==
1
&&
dir
>
0
)
{
#ifndef HAVE_MEMRCHR
&&
dir
>
0
#endif
)
{
unsigned
char
needle
=
*
sub
;
unsigned
char
needle
=
*
sub
;
int
mode
=
(
dir
>
0
)
?
FAST_SEARCH
:
FAST_RSEARCH
;
res
=
stringlib_fastsearch_memchr_1char
(
res
=
stringlib_fastsearch_memchr_1char
(
PyByteArray_AS_STRING
(
self
)
+
start
,
end
-
start
,
PyByteArray_AS_STRING
(
self
)
+
start
,
end
-
start
,
needle
,
needle
,
FAST_SEARCH
);
needle
,
needle
,
mode
);
if
(
res
>=
0
)
if
(
res
>=
0
)
res
+=
start
;
res
+=
start
;
}
}
...
...
Objects/bytesobject.c
Dosyayı görüntüle @
c8fe0448
...
@@ -1815,12 +1815,16 @@ bytes_find_internal(PyBytesObject *self, PyObject *args, int dir)
...
@@ -1815,12 +1815,16 @@ bytes_find_internal(PyBytesObject *self, PyObject *args, int dir)
ADJUST_INDICES
(
start
,
end
,
len
);
ADJUST_INDICES
(
start
,
end
,
len
);
if
(
end
-
start
<
sub_len
)
if
(
end
-
start
<
sub_len
)
res
=
-
1
;
res
=
-
1
;
/* Issue #23573: FIXME, windows has no memrchr() */
else
if
(
sub_len
==
1
else
if
(
sub_len
==
1
&&
dir
>
0
)
{
#ifndef HAVE_MEMRCHR
&&
dir
>
0
#endif
)
{
unsigned
char
needle
=
*
sub
;
unsigned
char
needle
=
*
sub
;
int
mode
=
(
dir
>
0
)
?
FAST_SEARCH
:
FAST_RSEARCH
;
res
=
stringlib_fastsearch_memchr_1char
(
res
=
stringlib_fastsearch_memchr_1char
(
PyBytes_AS_STRING
(
self
)
+
start
,
end
-
start
,
PyBytes_AS_STRING
(
self
)
+
start
,
end
-
start
,
needle
,
needle
,
FAST_SEARCH
);
needle
,
needle
,
mode
);
if
(
res
>=
0
)
if
(
res
>=
0
)
res
+=
start
;
res
+=
start
;
}
}
...
...
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