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
c13516b0
Kaydet (Commit)
c13516b0
authored
Eki 01, 2013
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge
üst
65870835
2ff2190b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
5 deletions
+20
-5
object.h
Include/object.h
+1
-0
NEWS
Misc/NEWS
+3
-0
_collectionsmodule.c
Modules/_collectionsmodule.c
+15
-1
typeobject.c
Objects/typeobject.c
+1
-4
No files found.
Include/object.h
Dosyayı görüntüle @
c13516b0
...
@@ -484,6 +484,7 @@ PyAPI_FUNC(PyObject *) PyType_GenericNew(PyTypeObject *,
...
@@ -484,6 +484,7 @@ PyAPI_FUNC(PyObject *) PyType_GenericNew(PyTypeObject *,
PyObject
*
,
PyObject
*
);
PyObject
*
,
PyObject
*
);
#ifndef Py_LIMITED_API
#ifndef Py_LIMITED_API
PyAPI_FUNC
(
PyObject
*
)
_PyType_Lookup
(
PyTypeObject
*
,
PyObject
*
);
PyAPI_FUNC
(
PyObject
*
)
_PyType_Lookup
(
PyTypeObject
*
,
PyObject
*
);
PyAPI_FUNC
(
PyObject
*
)
_PyType_LookupId
(
PyTypeObject
*
,
_Py_Identifier
*
);
PyAPI_FUNC
(
PyObject
*
)
_PyObject_LookupSpecial
(
PyObject
*
,
_Py_Identifier
*
);
PyAPI_FUNC
(
PyObject
*
)
_PyObject_LookupSpecial
(
PyObject
*
,
_Py_Identifier
*
);
PyAPI_FUNC
(
PyTypeObject
*
)
_PyType_CalculateMetaclass
(
PyTypeObject
*
,
PyObject
*
);
PyAPI_FUNC
(
PyTypeObject
*
)
_PyType_CalculateMetaclass
(
PyTypeObject
*
,
PyObject
*
);
#endif
#endif
...
...
Misc/NEWS
Dosyayı görüntüle @
c13516b0
...
@@ -58,6 +58,9 @@ Library
...
@@ -58,6 +58,9 @@ Library
integer (as in Python 2). Au_read and Au_write now correctly works with file
integer (as in Python 2). Au_read and Au_write now correctly works with file
object if start file position is not a zero.
object if start file position is not a zero.
- Issue #18594: The fast path for collections.Counter() was never taken
due to an over-restrictive type check.
- Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty
- Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty
bytes until end of data.
bytes until end of data.
...
...
Modules/_collectionsmodule.c
Dosyayı görüntüle @
c13516b0
...
@@ -1763,10 +1763,16 @@ Count elements in the iterable, updating the mappping");
...
@@ -1763,10 +1763,16 @@ Count elements in the iterable, updating the mappping");
static
PyObject
*
static
PyObject
*
_count_elements
(
PyObject
*
self
,
PyObject
*
args
)
_count_elements
(
PyObject
*
self
,
PyObject
*
args
)
{
{
_Py_IDENTIFIER
(
__getitem__
);
_Py_IDENTIFIER
(
__setitem__
);
PyObject
*
it
,
*
iterable
,
*
mapping
,
*
oldval
;
PyObject
*
it
,
*
iterable
,
*
mapping
,
*
oldval
;
PyObject
*
newval
=
NULL
;
PyObject
*
newval
=
NULL
;
PyObject
*
key
=
NULL
;
PyObject
*
key
=
NULL
;
PyObject
*
one
=
NULL
;
PyObject
*
one
=
NULL
;
PyObject
*
mapping_getitem
;
PyObject
*
mapping_setitem
;
PyObject
*
dict_getitem
;
PyObject
*
dict_setitem
;
if
(
!
PyArg_UnpackTuple
(
args
,
"_count_elements"
,
2
,
2
,
&
mapping
,
&
iterable
))
if
(
!
PyArg_UnpackTuple
(
args
,
"_count_elements"
,
2
,
2
,
&
mapping
,
&
iterable
))
return
NULL
;
return
NULL
;
...
@@ -1781,7 +1787,15 @@ _count_elements(PyObject *self, PyObject *args)
...
@@ -1781,7 +1787,15 @@ _count_elements(PyObject *self, PyObject *args)
return
NULL
;
return
NULL
;
}
}
if
(
PyDict_CheckExact
(
mapping
))
{
mapping_getitem
=
_PyType_LookupId
(
Py_TYPE
(
mapping
),
&
PyId___getitem__
);
dict_getitem
=
_PyType_LookupId
(
&
PyDict_Type
,
&
PyId___getitem__
);
mapping_setitem
=
_PyType_LookupId
(
Py_TYPE
(
mapping
),
&
PyId___setitem__
);
dict_setitem
=
_PyType_LookupId
(
&
PyDict_Type
,
&
PyId___setitem__
);
if
(
mapping_getitem
!=
NULL
&&
mapping_getitem
==
dict_getitem
&&
mapping_setitem
!=
NULL
&&
mapping_setitem
==
dict_setitem
)
{
while
(
1
)
{
while
(
1
)
{
key
=
PyIter_Next
(
it
);
key
=
PyIter_Next
(
it
);
if
(
key
==
NULL
)
if
(
key
==
NULL
)
...
...
Objects/typeobject.c
Dosyayı görüntüle @
c13516b0
...
@@ -49,9 +49,6 @@ _Py_IDENTIFIER(__module__);
...
@@ -49,9 +49,6 @@ _Py_IDENTIFIER(__module__);
_Py_IDENTIFIER
(
__name__
);
_Py_IDENTIFIER
(
__name__
);
_Py_IDENTIFIER
(
__new__
);
_Py_IDENTIFIER
(
__new__
);
static
PyObject
*
_PyType_LookupId
(
PyTypeObject
*
type
,
struct
_Py_Identifier
*
name
);
static
PyObject
*
static
PyObject
*
slot_tp_new
(
PyTypeObject
*
type
,
PyObject
*
args
,
PyObject
*
kwds
);
slot_tp_new
(
PyTypeObject
*
type
,
PyObject
*
args
,
PyObject
*
kwds
);
...
@@ -2620,7 +2617,7 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
...
@@ -2620,7 +2617,7 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
return
res
;
return
res
;
}
}
static
PyObject
*
PyObject
*
_PyType_LookupId
(
PyTypeObject
*
type
,
struct
_Py_Identifier
*
name
)
_PyType_LookupId
(
PyTypeObject
*
type
,
struct
_Py_Identifier
*
name
)
{
{
PyObject
*
oname
;
PyObject
*
oname
;
...
...
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