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
82972e7f
Commit
82972e7f
authored
Apr 14, 2006
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #702933: Undocument PyObject_NEW, PyObject_NEW_VAR,
and PyObject_DEL.
parent
b17f12bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
20 deletions
+1
-20
Doc/api/memory.tex
Doc/api/memory.tex
+1
-3
Doc/api/newtypes.tex
Doc/api/newtypes.tex
+0
-17
No files found.
Doc/api/memory.tex
View file @
82972e7f
...
...
@@ -195,9 +195,7 @@ free(buf1); /* Fatal -- should be PyMem_Del() */
In addition to the functions aimed at handling raw memory blocks from
the Python heap, objects in Python are allocated and released with
\cfunction
{
PyObject
_
New()
}
,
\cfunction
{
PyObject
_
NewVar()
}
and
\cfunction
{
PyObject
_
Del()
}
, or with their corresponding macros
\cfunction
{
PyObject
_
NEW()
}
,
\cfunction
{
PyObject
_
NEW
_
VAR()
}
and
\cfunction
{
PyObject
_
DEL()
}
.
\cfunction
{
PyObject
_
Del()
}
.
These will be explained in the next chapter on defining and
implementing new object types in C.
Doc/api/newtypes.tex
View file @
82972e7f
...
...
@@ -62,23 +62,6 @@ defining new object types.
after this call as the memory is no longer a valid Python object.
\end{cfuncdesc}
\begin{cfuncdesc}
{
\var
{
TYPE
}
*
}{
PyObject
_
NEW
}{
TYPE, PyTypeObject *type
}
Macro version of
\cfunction
{
PyObject
_
New()
}
, to gain performance at
the expense of safety. This does not check
\var
{
type
}
for a
\NULL
{}
value.
\end{cfuncdesc}
\begin{cfuncdesc}
{
\var
{
TYPE
}
*
}{
PyObject
_
NEW
_
VAR
}{
TYPE, PyTypeObject *type,
Py
_
ssize
_
t size
}
Macro version of
\cfunction
{
PyObject
_
NewVar()
}
, to gain performance
at the expense of safety. This does not check
\var
{
type
}
for a
\NULL
{}
value.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyObject
_
DEL
}{
PyObject *op
}
Macro version of
\cfunction
{
PyObject
_
Del()
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
Py
_
InitModule
}{
char *name,
PyMethodDef *methods
}
Create a new module object based on a name and table of functions,
...
...
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