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
568867a6
Kaydet (Commit)
568867a6
authored
Eyl 11, 2010
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
check for NULL tp_as_mapping in PySequence_(Get/Set/Del)Slice #9834
üst
e861598d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
NEWS
Misc/NEWS
+7
-0
abstract.c
Objects/abstract.c
+3
-3
No files found.
Misc/NEWS
Dosyayı görüntüle @
568867a6
...
...
@@ -108,6 +108,13 @@ Library
guaranteed to exist in all Python implementations and the names of hash
algorithms available in the current process.
C-API
-----
- Issue #9834: Don't segfault in PySequence_GetSlice, PySequence_SetSlice, or
PySequence_DelSlice when the object doesn't have any mapping operations
defined.
Tools/Demos
-----------
...
...
Objects/abstract.c
Dosyayı görüntüle @
568867a6
...
...
@@ -1612,7 +1612,7 @@ PySequence_GetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2)
if
(
!
s
)
return
null_error
();
mp
=
s
->
ob_type
->
tp_as_mapping
;
if
(
mp
->
mp_subscript
)
{
if
(
mp
&&
mp
->
mp_subscript
)
{
PyObject
*
res
;
PyObject
*
slice
=
_PySlice_FromIndices
(
i1
,
i2
);
if
(
!
slice
)
...
...
@@ -1690,7 +1690,7 @@ PySequence_SetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2, PyObject *o)
}
mp
=
s
->
ob_type
->
tp_as_mapping
;
if
(
mp
->
mp_ass_subscript
)
{
if
(
mp
&&
mp
->
mp_ass_subscript
)
{
int
res
;
PyObject
*
slice
=
_PySlice_FromIndices
(
i1
,
i2
);
if
(
!
slice
)
...
...
@@ -1715,7 +1715,7 @@ PySequence_DelSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2)
}
mp
=
s
->
ob_type
->
tp_as_mapping
;
if
(
mp
->
mp_ass_subscript
)
{
if
(
mp
&&
mp
->
mp_ass_subscript
)
{
int
res
;
PyObject
*
slice
=
_PySlice_FromIndices
(
i1
,
i2
);
if
(
!
slice
)
...
...
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