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
b1c46984
Kaydet (Commit)
b1c46984
authored
Eki 05, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Introduced the oddly-missing PyList_CheckExact(), and used it to replace
a hard-coded type check.
üst
e138f369
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
listobject.h
Include/listobject.h
+1
-0
ceval.c
Python/ceval.c
+1
-1
No files found.
Include/listobject.h
Dosyayı görüntüle @
b1c46984
...
@@ -27,6 +27,7 @@ typedef struct {
...
@@ -27,6 +27,7 @@ typedef struct {
extern
DL_IMPORT
(
PyTypeObject
)
PyList_Type
;
extern
DL_IMPORT
(
PyTypeObject
)
PyList_Type
;
#define PyList_Check(op) PyObject_TypeCheck(op, &PyList_Type)
#define PyList_Check(op) PyObject_TypeCheck(op, &PyList_Type)
#define PyList_CheckExact(op) ((op)->ob_type == &PyList_Type)
extern
DL_IMPORT
(
PyObject
*
)
PyList_New
(
int
size
);
extern
DL_IMPORT
(
PyObject
*
)
PyList_New
(
int
size
);
extern
DL_IMPORT
(
int
)
PyList_Size
(
PyObject
*
);
extern
DL_IMPORT
(
int
)
PyList_Size
(
PyObject
*
);
...
...
Python/ceval.c
Dosyayı görüntüle @
b1c46984
...
@@ -989,7 +989,7 @@ eval_frame(PyFrameObject *f)
...
@@ -989,7 +989,7 @@ eval_frame(PyFrameObject *f)
case
BINARY_SUBSCR
:
case
BINARY_SUBSCR
:
w
=
POP
();
w
=
POP
();
v
=
POP
();
v
=
POP
();
if
(
v
->
ob_type
==
&
PyList_Type
&&
PyInt_CheckExact
(
w
))
{
if
(
PyList_CheckExact
(
v
)
&&
PyInt_CheckExact
(
w
))
{
/* INLINE: list[int] */
/* INLINE: list[int] */
long
i
=
PyInt_AsLong
(
w
);
long
i
=
PyInt_AsLong
(
w
);
if
(
i
<
0
)
if
(
i
<
0
)
...
...
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