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
43af5b58
Commit
43af5b58
authored
Aug 06, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some fine points: METH_KEYWORDS implies METH_VARARGS, and ob_size
is no longer unused in type objects.
parent
8ee52434
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
Doc/api/newtypes.tex
Doc/api/newtypes.tex
+10
-6
No files found.
Doc/api/newtypes.tex
View file @
43af5b58
...
...
@@ -221,7 +221,9 @@ The \member{ml_flags} field is a bitfield which can include the
following flags. The individual flags indicate either a calling
convention or a binding convention. Of the calling convention flags,
only
\constant
{
METH
_
VARARGS
}
and
\constant
{
METH
_
KEYWORDS
}
can be
combined. Any of the calling convention flags can be combined with a
combined (but note that
\constant
{
METH
_
KEYWORDS
}
alone is equivalent
to
\code
{
\constant
{
METH
_
VARARGS
}
|
\constant
{
METH
_
KEYWORDS
}}
).
Any of the calling convention flags can be combined with a
binding flag.
\begin{datadesc}
{
METH
_
VARARGS
}
...
...
@@ -335,11 +337,12 @@ the definition found there:
\verbatiminput
{
typestruct.h
}
The type object structure extends the
\ctype
{
PyVarObject
}
structure,
though it does not actually need the the
\member
{
ob
_
size
}
field. The
inclusion of this field is a historical accident that must be
maintained to ensure binary compatibility between new versions of
Python and older compiled extensions.
The type object structure extends the
\ctype
{
PyVarObject
}
structure.
The
\member
{
ob
_
size
}
field is used for dynamic types (created
by
\function
{
type
_
new()
}
, usually called from a class statement).
Note that
\cdata
{
PyType
_
Type
}
(the metatype) initializes
\member
{
tp
_
itemsize
}
, which means that its instances (i.e. type
objects)
\emph
{
must
}
have the
\member
{
ob
_
size
}
field.
\begin{cmemberdesc}
{
PyObject
}{
PyObject*
}{_
ob
_
next
}
\cmemberline
{
PyObject
}{
PyObject*
}{_
ob
_
prev
}
...
...
@@ -1488,6 +1491,7 @@ to be able to test for its presence before using it.}
\begin{ctypedesc}
[getcharbufferproc]
{
int (*getcharbufferproc)
(PyObject *self, int segment, const char **ptrptr)
}
[Guido: the description is missing!]
\end{ctypedesc}
...
...
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