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
a12c7a76
Kaydet (Commit)
a12c7a76
authored
Mar 30, 2000
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add PyDict_Copy() function to C API for dicts. It returns a new
dictionary that contains the same key/value pairs as p.
üst
c06653f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
api.tex
Doc/api/api.tex
+4
-0
refcounts.dat
Doc/api/refcounts.dat
+4
-1
dictobject.h
Include/dictobject.h
+2
-0
dictobject.c
Objects/dictobject.c
+15
-1
No files found.
Doc/api/api.tex
Dosyayı görüntüle @
a12c7a76
...
...
@@ -2081,6 +2081,10 @@ Returns true if its argument is a \ctype{PyDictObject}.
Returns a new empty dictionary.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyDict
_
Copy
}{
PyObject *p
}
Returns a new dictionary that contains the same key/value pairs as p.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyDict
_
Clear
}{
PyDictObject *p
}
Empties an existing dictionary of all key/value pairs.
\end{cfuncdesc}
...
...
Doc/api/refcounts.dat
Dosyayı görüntüle @
a12c7a76
# Created by kip Montanaro <skip@mojam.com>.
# Created by
S
kip Montanaro <skip@mojam.com>.
# Format:
# function ':' type ':' [param name] ':' [refcount effect] ':' [comment]
...
...
@@ -88,6 +88,9 @@ PyDict_Keys:PyDictObject*:p:0:
PyDict_New:PyObject*::+1:
PyDict_Copy:PyObject*::+1:
PyDict_Copy:PyObject*:p:0:
PyDict_Next:int:::
PyDict_Next:PyDictObject*:p:0:
PyDict_Next:int:ppos::
...
...
Include/dictobject.h
Dosyayı görüntüle @
a12c7a76
...
...
@@ -52,6 +52,8 @@ extern DL_IMPORT(PyObject *) PyDict_Keys Py_PROTO((PyObject *mp));
extern
DL_IMPORT
(
PyObject
*
)
PyDict_Values
Py_PROTO
((
PyObject
*
mp
));
extern
DL_IMPORT
(
PyObject
*
)
PyDict_Items
Py_PROTO
((
PyObject
*
mp
));
extern
DL_IMPORT
(
int
)
PyDict_Size
Py_PROTO
((
PyObject
*
mp
));
extern
DL_IMPORT
(
PyObject
*
)
PyDict_Copy
Py_PROTO
((
PyObject
*
mp
));
extern
DL_IMPORT
(
PyObject
*
)
PyDict_GetItemString
Py_PROTO
((
PyObject
*
dp
,
char
*
key
));
extern
DL_IMPORT
(
int
)
PyDict_SetItemString
Py_PROTO
((
PyObject
*
dp
,
char
*
key
,
PyObject
*
item
));
...
...
Objects/dictobject.c
Dosyayı görüntüle @
a12c7a76
...
...
@@ -738,11 +738,25 @@ dict_copy(mp, args)
register
dictobject
*
mp
;
PyObject
*
args
;
{
if
(
!
PyArg_Parse
(
args
,
""
))
return
NULL
;
return
PyDict_Copy
((
PyObject
*
)
mp
);
}
PyObject
*
PyDict_Copy
(
o
)
PyObject
*
o
;
{
register
dictobject
*
mp
;
register
int
i
;
dictobject
*
copy
;
dictentry
*
entry
;
if
(
!
PyArg_Parse
(
args
,
""
))
if
(
o
==
NULL
||
!
PyDict_Check
(
o
))
{
PyErr_BadInternalCall
();
return
NULL
;
}
mp
=
(
dictobject
*
)
o
;
copy
=
(
dictobject
*
)
PyDict_New
();
if
(
copy
==
NULL
)
return
NULL
;
...
...
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