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
037b2205
Kaydet (Commit)
037b2205
authored
May 20, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved PyObject_{Get,Set}Attr to object.c.
Fixed two 'return NULL' that should be 'return -1'.
üst
98ff96ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
33 deletions
+2
-33
dictobject.c
Objects/dictobject.c
+2
-33
No files found.
Objects/dictobject.c
Dosyayı görüntüle @
037b2205
...
...
@@ -926,37 +926,6 @@ PyTypeObject PyDict_Type = {
&
dict_as_mapping
,
/*tp_as_mapping*/
};
/* These belong in object.c now */
PyObject
*
PyObject_GetAttr
(
v
,
name
)
PyObject
*
v
;
PyObject
*
name
;
{
if
(
v
->
ob_type
->
tp_getattro
!=
NULL
)
return
(
*
v
->
ob_type
->
tp_getattro
)(
v
,
name
);
else
return
PyObject_GetAttrString
(
v
,
PyString_AsString
(
name
));
}
int
PyObject_SetAttr
(
v
,
name
,
value
)
PyObject
*
v
;
PyObject
*
name
;
PyObject
*
value
;
{
int
err
;
Py_INCREF
(
name
);
PyString_InternInPlace
(
&
name
);
if
(
v
->
ob_type
->
tp_setattro
!=
NULL
)
err
=
(
*
v
->
ob_type
->
tp_setattro
)(
v
,
name
,
value
);
else
err
=
PyObject_SetAttrString
(
v
,
PyString_AsString
(
name
),
value
);
Py_DECREF
(
name
);
return
err
;
}
/* For backward compatibility with old dictionary interface */
PyObject
*
...
...
@@ -984,7 +953,7 @@ PyDict_SetItemString(v, key, item)
int
err
;
kv
=
PyString_FromString
(
key
);
if
(
kv
==
NULL
)
return
NULL
;
return
-
1
;
PyString_InternInPlace
(
&
kv
);
err
=
PyDict_SetItem
(
v
,
kv
,
item
);
Py_DECREF
(
kv
);
...
...
@@ -1000,7 +969,7 @@ PyDict_DelItemString(v, key)
int
err
;
kv
=
PyString_FromString
(
key
);
if
(
kv
==
NULL
)
return
NULL
;
return
-
1
;
PyString_InternInPlace
(
&
kv
);
err
=
PyDict_DelItem
(
v
,
kv
);
Py_DECREF
(
kv
);
...
...
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