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
3ad323ec
Kaydet (Commit)
3ad323ec
authored
Agu 06, 2010
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
üst
5e684339
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
NEWS
Misc/NEWS
+2
-0
setobject.c
Objects/setobject.c
+3
-9
No files found.
Misc/NEWS
Dosyayı görüntüle @
3ad323ec
...
@@ -12,6 +12,8 @@ What's New in Python 2.7.1?
...
@@ -12,6 +12,8 @@ What's New in Python 2.7.1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #83755: Implicit set-to-frozenset conversion was not thread-safe.
- Issue #9416: Fix some issues with complex formatting where the
- Issue #9416: Fix some issues with complex formatting where the
output with no type specifier failed to match the str output:
output with no type specifier failed to match the str output:
...
...
Objects/setobject.c
Dosyayı görüntüle @
3ad323ec
...
@@ -1855,12 +1855,10 @@ set_contains(PySetObject *so, PyObject *key)
...
@@ -1855,12 +1855,10 @@ set_contains(PySetObject *so, PyObject *key)
if
(
!
PySet_Check
(
key
)
||
!
PyErr_ExceptionMatches
(
PyExc_TypeError
))
if
(
!
PySet_Check
(
key
)
||
!
PyErr_ExceptionMatches
(
PyExc_TypeError
))
return
-
1
;
return
-
1
;
PyErr_Clear
();
PyErr_Clear
();
tmpkey
=
make_new_set
(
&
PyFrozenSet_Type
,
NULL
);
tmpkey
=
make_new_set
(
&
PyFrozenSet_Type
,
key
);
if
(
tmpkey
==
NULL
)
if
(
tmpkey
==
NULL
)
return
-
1
;
return
-
1
;
set_swap_bodies
((
PySetObject
*
)
tmpkey
,
(
PySetObject
*
)
key
);
rv
=
set_contains
(
so
,
tmpkey
);
rv
=
set_contains
(
so
,
tmpkey
);
set_swap_bodies
((
PySetObject
*
)
tmpkey
,
(
PySetObject
*
)
key
);
Py_DECREF
(
tmpkey
);
Py_DECREF
(
tmpkey
);
}
}
return
rv
;
return
rv
;
...
@@ -1890,12 +1888,10 @@ set_remove(PySetObject *so, PyObject *key)
...
@@ -1890,12 +1888,10 @@ set_remove(PySetObject *so, PyObject *key)
if
(
!
PySet_Check
(
key
)
||
!
PyErr_ExceptionMatches
(
PyExc_TypeError
))
if
(
!
PySet_Check
(
key
)
||
!
PyErr_ExceptionMatches
(
PyExc_TypeError
))
return
NULL
;
return
NULL
;
PyErr_Clear
();
PyErr_Clear
();
tmpkey
=
make_new_set
(
&
PyFrozenSet_Type
,
NULL
);
tmpkey
=
make_new_set
(
&
PyFrozenSet_Type
,
key
);
if
(
tmpkey
==
NULL
)
if
(
tmpkey
==
NULL
)
return
NULL
;
return
NULL
;
set_swap_bodies
((
PySetObject
*
)
tmpkey
,
(
PySetObject
*
)
key
);
rv
=
set_discard_key
(
so
,
tmpkey
);
rv
=
set_discard_key
(
so
,
tmpkey
);
set_swap_bodies
((
PySetObject
*
)
tmpkey
,
(
PySetObject
*
)
key
);
Py_DECREF
(
tmpkey
);
Py_DECREF
(
tmpkey
);
if
(
rv
==
-
1
)
if
(
rv
==
-
1
)
return
NULL
;
return
NULL
;
...
@@ -1924,12 +1920,10 @@ set_discard(PySetObject *so, PyObject *key)
...
@@ -1924,12 +1920,10 @@ set_discard(PySetObject *so, PyObject *key)
if
(
!
PySet_Check
(
key
)
||
!
PyErr_ExceptionMatches
(
PyExc_TypeError
))
if
(
!
PySet_Check
(
key
)
||
!
PyErr_ExceptionMatches
(
PyExc_TypeError
))
return
NULL
;
return
NULL
;
PyErr_Clear
();
PyErr_Clear
();
tmpkey
=
make_new_set
(
&
PyFrozenSet_Type
,
NULL
);
tmpkey
=
make_new_set
(
&
PyFrozenSet_Type
,
key
);
if
(
tmpkey
==
NULL
)
if
(
tmpkey
==
NULL
)
return
NULL
;
return
NULL
;
set_swap_bodies
((
PySetObject
*
)
tmpkey
,
(
PySetObject
*
)
key
);
result
=
set_discard
(
so
,
tmpkey
);
result
=
set_discard
(
so
,
tmpkey
);
set_swap_bodies
((
PySetObject
*
)
tmpkey
,
(
PySetObject
*
)
key
);
Py_DECREF
(
tmpkey
);
Py_DECREF
(
tmpkey
);
return
result
;
return
result
;
}
}
...
...
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