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
3b197540
Kaydet (Commit)
3b197540
authored
Mar 01, 2006
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Document new Py_ssize_t API.
üst
8b87a0b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
concrete.tex
Doc/api/concrete.tex
+19
-1
utilities.tex
Doc/api/utilities.tex
+8
-0
No files found.
Doc/api/concrete.tex
Dosyayı görüntüle @
3b197540
...
...
@@ -162,9 +162,20 @@ There is no \cfunction{PyNone_Check()} function for the same reason.
suspect the behaviour of Python in this case is undefined. :-)
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyInt
_
FromSsize
_
t
}{
Py
_
ssize
_
t ival
}
Create a new integer object with a value of
\var
{
ival
}
.
If the value exceeds
\code
{
LONG
_
MAX
}
, a long integer object is
returned.
\versionadded
{
2.5
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
long
}{
PyInt
_
AsLong
}{
PyObject *io
}
Will first attempt to cast the object to a
\ctype
{
PyIntObject
}
, if
it is not already one, and then return its value.
it is not already one, and then return its value. If there is an
error,
\code
{
-1
}
is returned, and the caller should check
\code
{
PyErr
_
Occurred()
}
to find out whether there was an error, or
whether the value just happened to be -1.
\end{cfuncdesc}
\begin{cfuncdesc}
{
long
}{
PyInt
_
AS
_
LONG
}{
PyObject *io
}
...
...
@@ -186,6 +197,13 @@ There is no \cfunction{PyNone_Check()} function for the same reason.
\versionadded
{
2.3
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
Py
_
ssize
_
t
}{
PyInt
_
AsSsize
_
t
}{
PyObject *io
}
Will first attempt to cast the object to a
\ctype
{
PyIntObject
}
or
\ctype
{
PyLongObject
}
, if it is not already one, and then return its
value as
\ctype
{
Py
_
ssize
_
t
}
.
\versionadded
{
2.5
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
long
}{
PyInt
_
GetMax
}{}
Return the system's idea of the largest integer it can handle
(
\constant
{
LONG
_
MAX
}
\ttindex
{
LONG
_
MAX
}
, as defined in the system
...
...
Doc/api/utilities.tex
Dosyayı görüntüle @
3b197540
...
...
@@ -553,6 +553,10 @@ whose address should be passed.
platforms that support
\ctype
{
unsigned long long
}
(or
\ctype
{
unsigned
_
int64
}
on Windows).
\versionadded
{
2.3
}
\item
[\samp{n} (integer) {[Py_ssize_t]
}
]
Convert a Python integer or long integer to a C
\ctype
{
Py
_
ssize
_
t
}
.
\versionadded
{
2.5
}
\item
[\samp{c} (string of length 1) {[char]
}
]
Convert a Python character, represented as a string of length 1, to
a C
\ctype
{
char
}
.
...
...
@@ -866,6 +870,10 @@ PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
Convert a C
\ctype
{
unsigned long long
}
to a Python long integer object.
Only available on platforms that support
\ctype
{
unsigned long long
}
.
\item
[\samp{n} (int) {[Py_ssize_t]
}
]
Convert a C
\ctype
{
Py
_
ssize
_
t) to a Python integer or long integer.
\versionadded
{
2.5
}
\item
[\samp{c} (string of length 1) {[char]
}
]
Convert a C
\ctype
{
int
}
representing a character to a Python
string of length 1.
...
...
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