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
0c66967e
Kaydet (Commit)
0c66967e
authored
Ara 13, 2003
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify previous checkin -- a new function was not needed.
üst
d3ae6729
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
26 deletions
+1
-26
dictobject.c
Objects/dictobject.c
+1
-26
No files found.
Objects/dictobject.c
Dosyayı görüntüle @
0c66967e
...
@@ -498,31 +498,6 @@ PyDict_GetItem(PyObject *op, PyObject *key)
...
@@ -498,31 +498,6 @@ PyDict_GetItem(PyObject *op, PyObject *key)
return
(
mp
->
ma_lookup
)(
mp
,
key
,
hash
)
->
me_value
;
return
(
mp
->
ma_lookup
)(
mp
,
key
,
hash
)
->
me_value
;
}
}
static
PyObject
*
dict_getitem
(
PyObject
*
op
,
PyObject
*
key
)
{
long
hash
;
dictobject
*
mp
=
(
dictobject
*
)
op
;
PyObject
*
v
;
if
(
!
PyDict_Check
(
op
))
{
return
NULL
;
}
if
(
!
PyString_CheckExact
(
key
)
||
(
hash
=
((
PyStringObject
*
)
key
)
->
ob_shash
)
==
-
1
)
{
hash
=
PyObject_Hash
(
key
);
if
(
hash
==
-
1
)
return
NULL
;
}
v
=
(
mp
->
ma_lookup
)(
mp
,
key
,
hash
)
->
me_value
;
if
(
v
==
NULL
)
PyErr_SetObject
(
PyExc_KeyError
,
key
);
else
Py_INCREF
(
v
);
return
v
;
}
/* CAUTION: PyDict_SetItem() must guarantee that it won't resize the
/* CAUTION: PyDict_SetItem() must guarantee that it won't resize the
* dictionary if it is merely replacing the value for an existing key.
* dictionary if it is merely replacing the value for an existing key.
* This is means that it's safe to loop over a dictionary with
* This is means that it's safe to loop over a dictionary with
...
@@ -1813,7 +1788,7 @@ PyDoc_STRVAR(iteritems__doc__,
...
@@ -1813,7 +1788,7 @@ PyDoc_STRVAR(iteritems__doc__,
static
PyMethodDef
mapp_methods
[]
=
{
static
PyMethodDef
mapp_methods
[]
=
{
{
"__contains__"
,(
PyCFunction
)
dict_has_key
,
METH_O
|
METH_COEXIST
,
{
"__contains__"
,(
PyCFunction
)
dict_has_key
,
METH_O
|
METH_COEXIST
,
contains__doc__
},
contains__doc__
},
{
"__getitem__"
,
(
PyCFunction
)
dict_
getitem
,
METH_O
|
METH_COEXIST
,
{
"__getitem__"
,
(
PyCFunction
)
dict_
subscript
,
METH_O
|
METH_COEXIST
,
getitem__doc__
},
getitem__doc__
},
{
"has_key"
,
(
PyCFunction
)
dict_has_key
,
METH_O
,
{
"has_key"
,
(
PyCFunction
)
dict_has_key
,
METH_O
,
has_key__doc__
},
has_key__doc__
},
...
...
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