summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/type.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/type.rst')
-rw-r--r--Doc/c-api/type.rst26
1 files changed, 13 insertions, 13 deletions
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst
index 7d1c773..22f7dd0 100644
--- a/Doc/c-api/type.rst
+++ b/Doc/c-api/type.rst
@@ -8,12 +8,12 @@ Type Objects
.. index:: object: type
-.. ctype:: PyTypeObject
+.. c:type:: PyTypeObject
The C structure of the objects used to describe built-in types.
-.. cvar:: PyObject* PyType_Type
+.. c:var:: PyObject* PyType_Type
.. index:: single: TypeType (in module types)
@@ -21,13 +21,13 @@ Type Objects
``types.TypeType`` in the Python layer.
-.. cfunction:: int PyType_Check(PyObject *o)
+.. c:function:: int PyType_Check(PyObject *o)
Return true if the object *o* is a type object, including instances of types
derived from the standard type object. Return false in all other cases.
-.. cfunction:: int PyType_CheckExact(PyObject *o)
+.. c:function:: int PyType_CheckExact(PyObject *o)
Return true if the object *o* is a type object, but not a subtype of the
standard type object. Return false in all other cases.
@@ -35,14 +35,14 @@ Type Objects
.. versionadded:: 2.2
-.. cfunction:: unsigned int PyType_ClearCache()
+.. c:function:: unsigned int PyType_ClearCache()
Clear the internal lookup cache. Return the current version tag.
.. versionadded:: 2.6
-.. cfunction:: void PyType_Modified(PyTypeObject *type)
+.. c:function:: void PyType_Modified(PyTypeObject *type)
Invalidate the internal lookup cache for the type and all of its
subtypes. This function must be called after any manual
@@ -51,13 +51,13 @@ Type Objects
.. versionadded:: 2.6
-.. cfunction:: int PyType_HasFeature(PyObject *o, int feature)
+.. c:function:: int PyType_HasFeature(PyObject *o, int feature)
Return true if the type object *o* sets the feature *feature*. Type features
are denoted by single bit flags.
-.. cfunction:: int PyType_IS_GC(PyObject *o)
+.. c:function:: int PyType_IS_GC(PyObject *o)
Return true if the type object includes support for the cycle detector; this
tests the type flag :const:`Py_TPFLAGS_HAVE_GC`.
@@ -65,28 +65,28 @@ Type Objects
.. versionadded:: 2.0
-.. cfunction:: int PyType_IsSubtype(PyTypeObject *a, PyTypeObject *b)
+.. c:function:: int PyType_IsSubtype(PyTypeObject *a, PyTypeObject *b)
Return true if *a* is a subtype of *b*.
.. versionadded:: 2.2
-.. cfunction:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
+.. c:function:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
.. versionadded:: 2.2
.. versionchanged:: 2.5
- This function used an :ctype:`int` type for *nitems*. This might require
+ This function used an :c:type:`int` type for *nitems*. This might require
changes in your code for properly supporting 64-bit systems.
-.. cfunction:: PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
+.. c:function:: PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
.. versionadded:: 2.2
-.. cfunction:: int PyType_Ready(PyTypeObject *type)
+.. c:function:: int PyType_Ready(PyTypeObject *type)
Finalize a type object. This should be called on all type objects to finish
their initialization. This function is responsible for adding inherited slots