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
5fd2e5ae
Kaydet (Commit)
5fd2e5ae
authored
Kas 06, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19512: Add a new _PyDict_DelItemId() function, similar to
PyDict_DelItemString() but using an identifier for the key
üst
7a07e451
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
dictobject.h
Include/dictobject.h
+1
-0
dictobject.c
Objects/dictobject.c
+9
-0
No files found.
Include/dictobject.h
Dosyayı görüntüle @
5fd2e5ae
...
...
@@ -109,6 +109,7 @@ PyAPI_FUNC(PyObject *) _PyDict_GetItemId(PyObject *dp, struct _Py_Identifier *ke
PyAPI_FUNC
(
int
)
PyDict_SetItemString
(
PyObject
*
dp
,
const
char
*
key
,
PyObject
*
item
);
PyAPI_FUNC
(
int
)
_PyDict_SetItemId
(
PyObject
*
dp
,
struct
_Py_Identifier
*
key
,
PyObject
*
item
);
PyAPI_FUNC
(
int
)
PyDict_DelItemString
(
PyObject
*
dp
,
const
char
*
key
);
PyAPI_FUNC
(
int
)
_PyDict_DelItemId
(
PyObject
*
mp
,
struct
_Py_Identifier
*
key
);
#ifndef Py_LIMITED_API
int
_PyObjectDict_SetItem
(
PyTypeObject
*
tp
,
PyObject
**
dictptr
,
PyObject
*
name
,
PyObject
*
value
);
...
...
Objects/dictobject.c
Dosyayı görüntüle @
5fd2e5ae
...
...
@@ -2735,6 +2735,15 @@ PyDict_SetItemString(PyObject *v, const char *key, PyObject *item)
return
err
;
}
int
_PyDict_DelItemId
(
PyObject
*
v
,
_Py_Identifier
*
key
)
{
PyObject
*
kv
=
_PyUnicode_FromId
(
key
);
/* borrowed */
if
(
kv
==
NULL
)
return
-
1
;
return
PyDict_DelItem
(
v
,
kv
);
}
int
PyDict_DelItemString
(
PyObject
*
v
,
const
char
*
key
)
{
...
...
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