mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +00:00
Py_InitModule() and friends now accept NULL for the 'methods'
argument. This makes sense now that extension types can support __init__ directly rather than requiring function constructors.
This commit is contained in:
parent
233cc5987b
commit
794643c314
1 changed files with 9 additions and 0 deletions
|
|
@ -83,6 +83,9 @@ defining new object types.
|
||||||
PyMethodDef *methods}
|
PyMethodDef *methods}
|
||||||
Create a new module object based on a name and table of functions,
|
Create a new module object based on a name and table of functions,
|
||||||
returning the new module object.
|
returning the new module object.
|
||||||
|
|
||||||
|
\versionchanged[Older versions of Python did not support \NULL{} as
|
||||||
|
the value for the \var{methods} argument]{2.3}
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
\begin{cfuncdesc}{PyObject*}{Py_InitModule3}{char *name,
|
\begin{cfuncdesc}{PyObject*}{Py_InitModule3}{char *name,
|
||||||
|
|
@ -91,6 +94,9 @@ defining new object types.
|
||||||
Create a new module object based on a name and table of functions,
|
Create a new module object based on a name and table of functions,
|
||||||
returning the new module object. If \var{doc} is non-\NULL, it will
|
returning the new module object. If \var{doc} is non-\NULL, it will
|
||||||
be used to define the docstring for the module.
|
be used to define the docstring for the module.
|
||||||
|
|
||||||
|
\versionchanged[Older versions of Python did not support \NULL{} as
|
||||||
|
the value for the \var{methods} argument]{2.3}
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
\begin{cfuncdesc}{PyObject*}{Py_InitModule4}{char *name,
|
\begin{cfuncdesc}{PyObject*}{Py_InitModule4}{char *name,
|
||||||
|
|
@ -109,6 +115,9 @@ defining new object types.
|
||||||
\note{Most uses of this function should probably be using
|
\note{Most uses of this function should probably be using
|
||||||
the \cfunction{Py_InitModule3()} instead; only use this if you are
|
the \cfunction{Py_InitModule3()} instead; only use this if you are
|
||||||
sure you need it.}
|
sure you need it.}
|
||||||
|
|
||||||
|
\versionchanged[Older versions of Python did not support \NULL{} as
|
||||||
|
the value for the \var{methods} argument]{2.3}
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
DL_IMPORT
|
DL_IMPORT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue