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
a3eabb6f
Kaydet (Commit)
a3eabb6f
authored
Mar 25, 2012
tarafından
Michael Foord
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge
üst
313f85f0
fe17b2bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
test_decimal.py
Lib/test/test_decimal.py
+1
-1
_decimal.c
Modules/_decimal/_decimal.c
+8
-1
No files found.
Lib/test/test_decimal.py
Dosyayı görüntüle @
a3eabb6f
...
@@ -3837,7 +3837,7 @@ class CheckAttributes(unittest.TestCase):
...
@@ -3837,7 +3837,7 @@ class CheckAttributes(unittest.TestCase):
x
=
dir
(
C
)
x
=
dir
(
C
)
y
=
[
s
for
s
in
dir
(
P
)
if
'__'
in
s
or
not
s
.
startswith
(
'_'
)]
y
=
[
s
for
s
in
dir
(
P
)
if
'__'
in
s
or
not
s
.
startswith
(
'_'
)]
self
.
assertEqual
(
set
(
x
)
-
set
(
y
),
{
'MallocError'
}
)
self
.
assertEqual
(
set
(
x
)
-
set
(
y
),
set
()
)
def
test_context_attributes
(
self
):
def
test_context_attributes
(
self
):
...
...
Modules/_decimal/_decimal.c
Dosyayı görüntüle @
a3eabb6f
...
@@ -168,7 +168,9 @@ static DecCondMap cond_map[] = {
...
@@ -168,7 +168,9 @@ static DecCondMap cond_map[] = {
{
"DivisionImpossible"
,
"decimal.DivisionImpossible"
,
MPD_Division_impossible
,
NULL
},
{
"DivisionImpossible"
,
"decimal.DivisionImpossible"
,
MPD_Division_impossible
,
NULL
},
{
"DivisionUndefined"
,
"decimal.DivisionUndefined"
,
MPD_Division_undefined
,
NULL
},
{
"DivisionUndefined"
,
"decimal.DivisionUndefined"
,
MPD_Division_undefined
,
NULL
},
{
"InvalidContext"
,
"decimal.InvalidContext"
,
MPD_Invalid_context
,
NULL
},
{
"InvalidContext"
,
"decimal.InvalidContext"
,
MPD_Invalid_context
,
NULL
},
#ifdef EXTRA_FUNCTIONALITY
{
"MallocError"
,
"decimal.MallocError"
,
MPD_Malloc_error
,
NULL
},
{
"MallocError"
,
"decimal.MallocError"
,
MPD_Malloc_error
,
NULL
},
#endif
{
NULL
}
{
NULL
}
};
};
...
@@ -466,9 +468,14 @@ dec_addstatus(PyObject *context, uint32_t status)
...
@@ -466,9 +468,14 @@ dec_addstatus(PyObject *context, uint32_t status)
mpd_context_t
*
ctx
=
CTX
(
context
);
mpd_context_t
*
ctx
=
CTX
(
context
);
ctx
->
status
|=
status
;
ctx
->
status
|=
status
;
if
(
ctx
->
traps
&
status
)
{
if
(
status
&
(
ctx
->
traps
|
MPD_Malloc_error
)
)
{
PyObject
*
ex
,
*
siglist
;
PyObject
*
ex
,
*
siglist
;
if
(
status
&
MPD_Malloc_error
)
{
PyErr_NoMemory
();
return
1
;
}
ex
=
flags_as_exception
(
ctx
->
traps
&
status
);
ex
=
flags_as_exception
(
ctx
->
traps
&
status
);
if
(
ex
==
NULL
)
{
if
(
ex
==
NULL
)
{
return
1
;
/* GCOV_NOT_REACHED */
return
1
;
/* GCOV_NOT_REACHED */
...
...
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