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
7d45d34e
Kaydet (Commit)
7d45d34e
authored
Agu 11, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ANY becomes void, to reflect the requirement for ANSI C.
üst
091ec2cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
api.tex
Doc/api/api.tex
+11
-18
No files found.
Doc/api/api.tex
Dosyayı görüntüle @
7d45d34e
...
...
@@ -3037,10 +3037,8 @@ Returns the number of items in the dictionary. This is equivalent to
\samp
{
len(
\var
{
p
}
)
}
on a dictionary.
\bifuncindex
{
len
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyDict
_
Next
}{
PyDictObject *p,
int ppos,
PyObject **pkey,
PyObject **pvalue
}
\begin{cfuncdesc}
{
int
}{
PyDict
_
Next
}{
PyDictObject *p, int *ppos,
PyObject **pkey, PyObject **pvalue
}
\end{cfuncdesc}
...
...
@@ -4216,18 +4214,13 @@ The following function sets, modeled after the ANSI C standard, are
available for allocating and releasing memory from the Python heap:
\begin{ctypedesc}
{
ANY*
}
The type used to represent arbitrary blocks of memory. Values of this
type should be cast to the specific type that is needed.
\end{ctypedesc}
\begin{cfuncdesc}
{
ANY*
}{
PyMem
_
Malloc
}{
size
_
t n
}
Allocates
\var
{
n
}
bytes and returns a pointer of type
\ctype
{
ANY*
}
to
\begin{cfuncdesc}
{
void*
}{
PyMem
_
Malloc
}{
size
_
t n
}
Allocates
\var
{
n
}
bytes and returns a pointer of type
\ctype
{
void*
}
to
the allocated memory, or
\NULL
{}
if the request fails. Requesting zero
bytes returns a non-
\NULL
{}
pointer.
\end{cfuncdesc}
\begin{cfuncdesc}
{
ANY*
}{
PyMem
_
Realloc
}{
ANY
*p, size
_
t n
}
\begin{cfuncdesc}
{
void*
}{
PyMem
_
Realloc
}{
void
*p, size
_
t n
}
Resizes the memory block pointed to by
\var
{
p
}
to
\var
{
n
}
bytes. The
contents will be unchanged to the minimum of the old and the new
sizes. If
\var
{
p
}
is
\NULL
{}
, the call is equivalent to
...
...
@@ -4237,7 +4230,7 @@ Unless \var{p} is \NULL{}, it must have been returned by a previous
call to
\cfunction
{
PyMem
_
Malloc()
}
or
\cfunction
{
PyMem
_
Realloc()
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyMem
_
Free
}{
ANY
*p
}
\begin{cfuncdesc}
{
void
}{
PyMem
_
Free
}{
void
*p
}
Frees the memory block pointed to by
\var
{
p
}
, which must have been
returned by a previous call to
\cfunction
{
PyMem
_
Malloc()
}
or
\cfunction
{
PyMem
_
Realloc()
}
. Otherwise, or if
...
...
@@ -4245,17 +4238,17 @@ returned by a previous call to \cfunction{PyMem_Malloc()} or
occurs. If
\var
{
p
}
is
\NULL
{}
, no operation is performed.
\end{cfuncdesc}
\begin{cfuncdesc}
{
ANY
*
}{
Py
_
Malloc
}{
size
_
t n
}
\begin{cfuncdesc}
{
void
*
}{
Py
_
Malloc
}{
size
_
t n
}
Same as
\cfunction
{
PyMem
_
Malloc()
}
, but calls
\cfunction
{
PyErr
_
NoMemory()
}
on failure.
\end{cfuncdesc}
\begin{cfuncdesc}
{
ANY*
}{
Py
_
Realloc
}{
ANY
*p, size
_
t n
}
\begin{cfuncdesc}
{
void*
}{
Py
_
Realloc
}{
void
*p, size
_
t n
}
Same as
\cfunction
{
PyMem
_
Realloc()
}
, but calls
\cfunction
{
PyErr
_
NoMemory()
}
on failure.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
Py
_
Free
}{
ANY
*p
}
\begin{cfuncdesc}
{
void
}{
Py
_
Free
}{
void
*p
}
Same as
\cfunction
{
PyMem
_
Free()
}
.
\end{cfuncdesc}
...
...
@@ -4268,13 +4261,13 @@ sizeof(\var{TYPE}))} bytes of memory. Returns a pointer cast to
\ctype
{
\var
{
TYPE
}
*
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
\var
{
TYPE
}
*
}{
PyMem
_
RESIZE
}{
ANY
*p, TYPE, size
_
t n
}
\begin{cfuncdesc}
{
\var
{
TYPE
}
*
}{
PyMem
_
RESIZE
}{
void
*p, TYPE, size
_
t n
}
Same as
\cfunction
{
PyMem
_
Realloc()
}
, but the memory block is resized
to
\code
{
(
\var
{
n
}
* sizeof(
\var
{
TYPE
}
))
}
bytes. Returns a pointer
cast to
\ctype
{
\var
{
TYPE
}
*
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyMem
_
DEL
}{
ANY
*p
}
\begin{cfuncdesc}
{
void
}{
PyMem
_
DEL
}{
void
*p
}
Same as
\cfunction
{
PyMem
_
Free()
}
.
\end{cfuncdesc}
...
...
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