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
93648f03
Kaydet (Commit)
93648f03
authored
Haz 23, 2012
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #12965: Merge from 3.2.
üst
04e2e3f2
f0acfeec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
long.rst
Doc/c-api/long.rst
+23
-18
No files found.
Doc/c-api/long.rst
Dosyayı görüntüle @
93648f03
...
@@ -135,6 +135,7 @@ All integers are implemented as "long" integer objects of arbitrary size.
...
@@ -135,6 +135,7 @@ All integers are implemented as "long" integer objects of arbitrary size.
Raise :exc:`OverflowError` if the value of *obj* is out of range for a
Raise :exc:`OverflowError` if the value of *obj* is out of range for a
:c:type:`long`.
:c:type:`long`.
.. c:function:: long PyLong_AsLongAndOverflow(PyObject *obj, int *overflow)
.. c:function:: long PyLong_AsLongAndOverflow(PyObject *obj, int *overflow)
Return a C :c:type:`long` representation of *obj*. If *obj* is not an
Return a C :c:type:`long` representation of *obj*. If *obj* is not an
...
@@ -147,15 +148,29 @@ All integers are implemented as "long" integer objects of arbitrary size.
...
@@ -147,15 +148,29 @@ All integers are implemented as "long" integer objects of arbitrary size.
occurs set *\*overflow* to ``0`` and return ``-1`` as usual.
occurs set *\*overflow* to ``0`` and return ``-1`` as usual.
.. c:function:: PY_LONG_LONG PyLong_AsLongLongAndOverflow(PyObject *pylong, int *overflow)
.. c:function:: PY_LONG_LONG PyLong_AsLongLong(PyObject *obj)
.. index::
single: OverflowError (built-in exception)
Return a C :c:type:`long long` representation of *obj*. If *obj* is not an
instance of :c:type:`PyLongObject`, first call its :meth:`__int__` method
(if present) to convert it to a :c:type:`PyLongObject`.
Raise :exc:`OverflowError` if the value of *obj* is out of range for a
:c:type:`long`.
Return a C :c:type:`long long` representation of the contents of
.. c:function:: PY_LONG_LONG PyLong_AsLongLongAndOverflow(PyObject *obj, int *overflow)
*pylong*. If *pylong* is greater than :const:`PY_LLONG_MAX` or less
than :const:`PY_LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``,
Return a C :c:type:`long long` representation of *obj*. If *obj* is not an
respectively, and return ``-1``; otherwise, set *\*overflow* to
instance of :c:type:`PyLongObject`, first call its :meth:`__int__` method
``0``. If any other exception occurs (for example a TypeError or
(if present) to convert it to a :c:type:`PyLongObject`.
MemoryError), then ``-1`` will be returned and *\*overflow* will
be ``0``.
If the value of *obj* is greater than :const:`PY_LLONG_MAX` or less than
:const:`PY_LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively,
and return ``-1``; otherwise, set *\*overflow* to ``0``. If any other
exception occurs set *\*overflow* to ``0`` and return ``-1`` as usual.
.. versionadded:: 3.2
.. versionadded:: 3.2
...
@@ -189,16 +204,6 @@ All integers are implemented as "long" integer objects of arbitrary size.
...
@@ -189,16 +204,6 @@ All integers are implemented as "long" integer objects of arbitrary size.
:exc:`OverflowError` is raised.
:exc:`OverflowError` is raised.
.. c:function:: PY_LONG_LONG PyLong_AsLongLong(PyObject *pylong)
.. index::
single: OverflowError (built-in exception)
Return a C :c:type:`long long` from a Python integer. If *pylong*
cannot be represented as a :c:type:`long long`, an
:exc:`OverflowError` is raised and ``-1`` is returned.
.. c:function:: unsigned PY_LONG_LONG PyLong_AsUnsignedLongLong(PyObject *pylong)
.. c:function:: unsigned PY_LONG_LONG PyLong_AsUnsignedLongLong(PyObject *pylong)
.. index::
.. index::
...
...
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