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
02697771
Kaydet (Commit)
02697771
authored
Eyl 19, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.5
üst
d644d5ee
5783fd2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
longobject.c
Objects/longobject.c
+6
-4
No files found.
Objects/longobject.c
Dosyayı görüntüle @
02697771
...
...
@@ -4495,11 +4495,13 @@ _PyLong_GCD(PyObject *aarg, PyObject *barg)
simple:
assert
(
Py_REFCNT
(
a
)
>
0
);
assert
(
Py_REFCNT
(
b
)
>
0
);
#if LONG_MAX >> 2*PyLong_SHIFT
/* Issue #24999: use two shifts instead of ">> 2*PyLong_SHIFT" to avoid
undefined behaviour when LONG_MAX type is smaller than 60 bits */
#if LONG_MAX >> PyLong_SHIFT >> PyLong_SHIFT
/* a fits into a long, so b must too */
x
=
PyLong_AsLong
((
PyObject
*
)
a
);
y
=
PyLong_AsLong
((
PyObject
*
)
b
);
#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >>
2*
PyLong_SHIFT
#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >>
PyLong_SHIFT >>
PyLong_SHIFT
x
=
PyLong_AsLongLong
((
PyObject
*
)
a
);
y
=
PyLong_AsLongLong
((
PyObject
*
)
b
);
#else
...
...
@@ -4516,9 +4518,9 @@ simple:
y
=
x
%
y
;
x
=
t
;
}
#if LONG_MAX >>
2*
PyLong_SHIFT
#if LONG_MAX >>
PyLong_SHIFT >>
PyLong_SHIFT
return
PyLong_FromLong
(
x
);
#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >>
2*
PyLong_SHIFT
#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >>
PyLong_SHIFT >>
PyLong_SHIFT
return
PyLong_FromLongLong
(
x
);
#else
# error "_PyLong_GCD"
...
...
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