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
ebedb2f7
Kaydet (Commit)
ebedb2f7
authored
Mar 08, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Factor out code common to PyDict_Copy() and PyDict_Merge().
üst
8172ac3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
20 deletions
+6
-20
dictobject.c
Objects/dictobject.c
+6
-20
No files found.
Objects/dictobject.c
Dosyayı görüntüle @
ebedb2f7
...
...
@@ -1242,33 +1242,19 @@ dict_copy(register dictobject *mp)
PyObject
*
PyDict_Copy
(
PyObject
*
o
)
{
register
dictobject
*
mp
;
register
int
i
;
dictobject
*
copy
;
dictentry
*
entry
;
PyObject
*
copy
;
if
(
o
==
NULL
||
!
PyDict_Check
(
o
))
{
PyErr_BadInternalCall
();
return
NULL
;
}
mp
=
(
dictobject
*
)
o
;
copy
=
(
dictobject
*
)
PyDict_New
();
copy
=
PyDict_New
();
if
(
copy
==
NULL
)
return
NULL
;
if
(
mp
->
ma_used
>
0
)
{
if
(
dictresize
(
copy
,
mp
->
ma_used
*
2
)
!=
0
)
return
NULL
;
for
(
i
=
0
;
i
<=
mp
->
ma_mask
;
i
++
)
{
entry
=
&
mp
->
ma_table
[
i
];
if
(
entry
->
me_value
!=
NULL
)
{
Py_INCREF
(
entry
->
me_key
);
Py_INCREF
(
entry
->
me_value
);
insertdict
(
copy
,
entry
->
me_key
,
entry
->
me_hash
,
entry
->
me_value
);
}
}
}
return
(
PyObject
*
)
copy
;
if
(
PyDict_Merge
(
copy
,
o
,
1
)
==
0
)
return
copy
;
Py_DECREF
(
copy
);
return
copy
;
}
int
...
...
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