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
00bc08ec
Unverified
Kaydet (Commit)
00bc08ec
authored
Eyl 14, 2018
tarafından
Raymond Hettinger
Kaydeden (comit)
GitHub
Eyl 14, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix-up parenthesis, organization, and NULL check (GH-9297)
üst
902bcd9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
longobject.c
Objects/longobject.c
+11
-6
No files found.
Objects/longobject.c
Dosyayı görüntüle @
00bc08ec
...
@@ -5280,14 +5280,19 @@ static PyObject *
...
@@ -5280,14 +5280,19 @@ static PyObject *
int_as_integer_ratio_impl
(
PyObject
*
self
)
int_as_integer_ratio_impl
(
PyObject
*
self
)
/*[clinic end generated code: output=e60803ae1cc8621a input=55ce3058e15de393]*/
/*[clinic end generated code: output=e60803ae1cc8621a input=55ce3058e15de393]*/
{
{
if
PyLong_CheckExact
(
self
)
{
PyObject
*
numerator
;
PyObject
*
ratio_tuple
;
if
(
PyLong_CheckExact
(
self
))
{
return
PyTuple_Pack
(
2
,
self
,
_PyLong_One
);
return
PyTuple_Pack
(
2
,
self
,
_PyLong_One
);
}
else
{
PyObject
*
numerator
=
_PyLong_Copy
(
self
);
PyObject
*
ratio_tuple
=
PyTuple_Pack
(
2
,
numerator
,
_PyLong_One
);
Py_DECREF
(
numerator
);
return
ratio_tuple
;
}
}
numerator
=
_PyLong_Copy
(
self
);
if
(
numerator
==
NULL
)
{
return
NULL
;
}
ratio_tuple
=
PyTuple_Pack
(
2
,
numerator
,
_PyLong_One
);
Py_DECREF
(
numerator
);
return
ratio_tuple
;
}
}
/*[clinic input]
/*[clinic input]
...
...
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