mirror of
https://github.com/python/cpython.git
synced 2025-12-08 02:08:20 +00:00
Document the PyInstance_*() functions and data.
This commit is contained in:
parent
0149e84af2
commit
5838d0fc84
2 changed files with 39 additions and 2 deletions
|
|
@ -3694,6 +3694,36 @@ set.
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{Instance Objects \label{instanceObjects}}
|
||||||
|
|
||||||
|
\obindex{instance}
|
||||||
|
There are very few functions specific to instance objects.
|
||||||
|
|
||||||
|
\begin{cvardesc}{PyTypeObject}{PyInstance_Type}
|
||||||
|
Type object for class instances.
|
||||||
|
\end{cvardesc}
|
||||||
|
|
||||||
|
\begin{cfuncdesc}{int}{PyInstance_Check}{PyObject *obj}
|
||||||
|
Returns true if \var{obj} is an instance.
|
||||||
|
\end{cfuncdesc}
|
||||||
|
|
||||||
|
\begin{cfuncdesc}{PyObject*}{PyInstance_New}{PyObject *class,
|
||||||
|
PyObject *arg,
|
||||||
|
PyObject *kw}
|
||||||
|
Create a new instance of a specific class. The parameters \var{arg}
|
||||||
|
and \var{kw} are used as the positional and keyword parameters to
|
||||||
|
the object's constructor.
|
||||||
|
\end{cfuncdesc}
|
||||||
|
|
||||||
|
\begin{cfuncdesc}{PyObject*}{PyInstance_NewRaw}{PyObject *class,
|
||||||
|
PyObject *dict}
|
||||||
|
Create a new instance of a specific class without calling it's
|
||||||
|
constructor. \var{class} is the class of new object. The
|
||||||
|
\var{dict} parameter will be used as the object's \member{__dict__};
|
||||||
|
if \NULL, a new dictionary will be created for the instance.
|
||||||
|
\end{cfuncdesc}
|
||||||
|
|
||||||
|
|
||||||
\subsection{Module Objects \label{moduleObjects}}
|
\subsection{Module Objects \label{moduleObjects}}
|
||||||
|
|
||||||
\obindex{module}
|
\obindex{module}
|
||||||
|
|
@ -4737,8 +4767,6 @@ Py_BuildValue
|
||||||
|
|
||||||
DL_IMPORT
|
DL_IMPORT
|
||||||
|
|
||||||
Py*_Check
|
|
||||||
|
|
||||||
_Py_NoneStruct
|
_Py_NoneStruct
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,6 +332,15 @@ PyImport_ImportModuleEx:PyObject*:fromlist:0:???
|
||||||
PyImport_ReloadModule:PyObject*::+1:
|
PyImport_ReloadModule:PyObject*::+1:
|
||||||
PyImport_ReloadModule:PyObject*:m:0:
|
PyImport_ReloadModule:PyObject*:m:0:
|
||||||
|
|
||||||
|
PyInstance_New:PyObject*::+1:
|
||||||
|
PyInstance_New:PyObject*:klass:+1:
|
||||||
|
PyInstance_New:PyObject*:arg:0:
|
||||||
|
PyInstance_New:PyObject*:kw:0:
|
||||||
|
|
||||||
|
PyInstance_NewRaw:PyObject*::+1:
|
||||||
|
PyInstance_NewRaw:PyObject*:klass:+1:
|
||||||
|
PyInstance_NewRaw:PyObject*:dict:+1:
|
||||||
|
|
||||||
PyInt_AS_LONG:long:::
|
PyInt_AS_LONG:long:::
|
||||||
PyInt_AS_LONG:PyIntObject*:io:0:
|
PyInt_AS_LONG:PyIntObject*:io:0:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue