Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7d45d34e
Commit
7d45d34e
authored
Aug 11, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ANY becomes void, to reflect the requirement for ANSI C.
parent
091ec2cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
Doc/api/api.tex
Doc/api/api.tex
+11
-18
No files found.
Doc/api/api.tex
View file @
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