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
d3da7d39
Kaydet (Commit)
d3da7d39
authored
Eyl 05, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix SF bug #1546288, crash in dict_equal
üst
85687522
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
test_mutants.py
Lib/test/test_mutants.py
+9
-1
NEWS
Misc/NEWS
+10
-1
dictobject.c
Objects/dictobject.c
+3
-0
No files found.
Lib/test/test_mutants.py
Dosyayı görüntüle @
d3da7d39
...
@@ -91,12 +91,17 @@ class Horrid:
...
@@ -91,12 +91,17 @@ class Horrid:
self
.
hashcode
=
random
.
randrange
(
1000000000
)
self
.
hashcode
=
random
.
randrange
(
1000000000
)
def
__hash__
(
self
):
def
__hash__
(
self
):
return
42
return
self
.
hashcode
return
self
.
hashcode
def
__cmp__
(
self
,
other
):
def
__cmp__
(
self
,
other
):
maybe_mutate
()
# The point of the test.
maybe_mutate
()
# The point of the test.
return
cmp
(
self
.
i
,
other
.
i
)
return
cmp
(
self
.
i
,
other
.
i
)
def
__eq__
(
self
,
other
):
maybe_mutate
()
# The point of the test.
return
self
.
i
==
other
.
i
def
__repr__
(
self
):
def
__repr__
(
self
):
return
"Horrid(
%
d)"
%
self
.
i
return
"Horrid(
%
d)"
%
self
.
i
...
@@ -132,7 +137,10 @@ def test_one(n):
...
@@ -132,7 +137,10 @@ def test_one(n):
while
dict1
and
len
(
dict1
)
==
len
(
dict2
):
while
dict1
and
len
(
dict1
)
==
len
(
dict2
):
if
verbose
:
if
verbose
:
print
"."
,
print
"."
,
c
=
cmp
(
dict1
,
dict2
)
if
random
.
random
()
<
0.5
:
c
=
cmp
(
dict1
,
dict2
)
else
:
c
=
dict1
==
dict2
if
verbose
:
if
verbose
:
print
print
...
...
Misc/NEWS
Dosyayı görüntüle @
d3da7d39
...
@@ -9,6 +9,13 @@ What's New in Python 2.5?
...
@@ -9,6 +9,13 @@ What's New in Python 2.5?
*Release date: XX-SEP-2006*
*Release date: XX-SEP-2006*
(Hopefully nothing.)
What'
s
New
in
Python
2.5
release
candidate
2
?
=============================================
*
Release
date
:
XX
-
SEP
-
2006
*
Core
and
builtins
Core
and
builtins
-----------------
-----------------
...
@@ -18,12 +25,14 @@ Core and builtins
...
@@ -18,12 +25,14 @@ Core and builtins
-
Patch
#
1541585
:
fix
buffer
overrun
when
performing
repr
()
on
-
Patch
#
1541585
:
fix
buffer
overrun
when
performing
repr
()
on
a
unicode
string
in
a
build
with
wide
unicode
(
UCS
-
4
)
support
.
a
unicode
string
in
a
build
with
wide
unicode
(
UCS
-
4
)
support
.
-
Patch
#
1546288
:
fix
seg
fault
in
dict_equal
due
to
ref
counting
bug
.
Library
Library
-------
-------
-
Patch
#
1550886
:
Fix
decimal
module
context
management
implementation
-
Patch
#
1550886
:
Fix
decimal
module
context
management
implementation
to match the localcontext() example from PEP 343
to
match
the
localcontext
()
example
from
PEP
343
.
-
Bug
#
1541863
:
uuid
.
uuid1
failed
to
generate
unique
identifiers
-
Bug
#
1541863
:
uuid
.
uuid1
failed
to
generate
unique
identifiers
on
systems
with
low
clock
resolution
.
on
systems
with
low
clock
resolution
.
...
...
Objects/dictobject.c
Dosyayı görüntüle @
d3da7d39
...
@@ -1585,7 +1585,10 @@ dict_equal(dictobject *a, dictobject *b)
...
@@ -1585,7 +1585,10 @@ dict_equal(dictobject *a, dictobject *b)
/* temporarily bump aval's refcount to ensure it stays
/* temporarily bump aval's refcount to ensure it stays
alive until we're done with it */
alive until we're done with it */
Py_INCREF
(
aval
);
Py_INCREF
(
aval
);
/* ditto for key */
Py_INCREF
(
key
);
bval
=
PyDict_GetItem
((
PyObject
*
)
b
,
key
);
bval
=
PyDict_GetItem
((
PyObject
*
)
b
,
key
);
Py_DECREF
(
key
);
if
(
bval
==
NULL
)
{
if
(
bval
==
NULL
)
{
Py_DECREF
(
aval
);
Py_DECREF
(
aval
);
return
0
;
return
0
;
...
...
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