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
fa9dfd4f
Kaydet (Commit)
fa9dfd4f
authored
Eyl 03, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.5 (odict)
üst
5786aef3
ca30b02a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
16 deletions
+23
-16
NEWS
Misc/NEWS
+3
-0
odictobject.c
Objects/odictobject.c
+20
-16
No files found.
Misc/NEWS
Dosyayı görüntüle @
fa9dfd4f
...
...
@@ -92,6 +92,9 @@ Core and Builtins
Library
-------
- Issue #24992: Fix error handling and a race condition (related to garbage
collection) in collections.OrderedDict constructor.
- Issue #24881: Fixed setting binary mode in Python implementation of FileIO
on Windows and Cygwin. Patch from Akira Li.
...
...
Objects/odictobject.c
Dosyayı görüntüle @
fa9dfd4f
...
...
@@ -98,7 +98,6 @@ For removing nodes:
Others:
* _odict_initialize(od)
* _odict_find_node(od, key)
* _odict_keys_equal(od1, od2)
...
...
@@ -602,15 +601,6 @@ _odict_get_index(PyODictObject *od, PyObject *key)
return
_odict_get_index_hash
(
od
,
key
,
hash
);
}
static
int
_odict_initialize
(
PyODictObject
*
od
)
{
od
->
od_state
=
0
;
_odict_FIRST
(
od
)
=
NULL
;
_odict_LAST
(
od
)
=
NULL
;
return
_odict_resize
((
PyODictObject
*
)
od
);
}
/* Returns NULL if there was some error or the key was not found. */
static
_ODictNode
*
_odict_find_node
(
PyODictObject
*
od
,
PyObject
*
key
)
...
...
@@ -1739,14 +1729,28 @@ odict_init(PyObject *self, PyObject *args, PyObject *kwds)
static
PyObject
*
odict_new
(
PyTypeObject
*
type
,
PyObject
*
args
,
PyObject
*
kwds
)
{
PyObject
*
od
=
PyDict_Type
.
tp_new
(
type
,
args
,
kwds
);
if
(
od
!=
NULL
)
{
if
(
_odict_initialize
((
PyODictObject
*
)
od
)
<
0
)
PyObject
*
dict
;
PyODictObject
*
od
;
dict
=
PyDict_New
();
if
(
dict
==
NULL
)
return
NULL
;
od
=
(
PyODictObject
*
)
PyDict_Type
.
tp_new
(
type
,
args
,
kwds
);
if
(
od
==
NULL
)
{
Py_DECREF
(
dict
);
return
NULL
;
}
od
->
od_inst_dict
=
dict
;
/* type constructor fills the memory with zeros (see
PyType_GenericAlloc()), there is no need to set them to zero again */
if
(
_odict_resize
(
od
)
<
0
)
{
Py_DECREF
(
od
);
return
NULL
;
((
PyODictObject
*
)
od
)
->
od_inst_dict
=
PyDict_New
();
((
PyODictObject
*
)
od
)
->
od_weakreflist
=
NULL
;
}
return
od
;
return
(
PyObject
*
)
od
;
}
/* PyODict_Type */
...
...
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