Skip to content

Commit 60203b4

Browse files
committed
Migrate to Sphinx 1.0 C language constructs.
1 parent 64a41ed commit 60203b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2573
-2569
lines changed

Doc/c-api/allocation.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Allocating Objects on the Heap
66
==============================
77

88

9-
.. cfunction:: PyObject* _PyObject_New(PyTypeObject *type)
9+
.. c:function:: PyObject* _PyObject_New(PyTypeObject *type)
1010
1111
12-
.. cfunction:: PyVarObject* _PyObject_NewVar(PyTypeObject *type, Py_ssize_t size)
12+
.. c:function:: PyVarObject* _PyObject_NewVar(PyTypeObject *type, Py_ssize_t size)
1313
1414
15-
.. cfunction:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
15+
.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
1616
1717
Initialize a newly-allocated object *op* with its type and initial
1818
reference. Returns the initialized object. If *type* indicates that the
@@ -21,13 +21,13 @@ Allocating Objects on the Heap
2121
affected.
2222
2323
24-
.. cfunction:: PyVarObject* PyObject_InitVar(PyVarObject *op, PyTypeObject *type, Py_ssize_t size)
24+
.. c:function:: PyVarObject* PyObject_InitVar(PyVarObject *op, PyTypeObject *type, Py_ssize_t size)
2525
26-
This does everything :cfunc:`PyObject_Init` does, and also initializes the
26+
This does everything :c:func:`PyObject_Init` does, and also initializes the
2727
length information for a variable-size object.
2828
2929
30-
.. cfunction:: TYPE* PyObject_New(TYPE, PyTypeObject *type)
30+
.. c:function:: TYPE* PyObject_New(TYPE, PyTypeObject *type)
3131
3232
Allocate a new Python object using the C structure type *TYPE* and the
3333
Python type object *type*. Fields not defined by the Python object header
@@ -36,7 +36,7 @@ Allocating Objects on the Heap
3636
the type object.
3737
3838
39-
.. cfunction:: TYPE* PyObject_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size)
39+
.. c:function:: TYPE* PyObject_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size)
4040
4141
Allocate a new Python object using the C structure type *TYPE* and the
4242
Python type object *type*. Fields not defined by the Python object header
@@ -48,24 +48,24 @@ Allocating Objects on the Heap
4848
improving the memory management efficiency.
4949
5050
51-
.. cfunction:: void PyObject_Del(PyObject *op)
51+
.. c:function:: void PyObject_Del(PyObject *op)
5252
53-
Releases memory allocated to an object using :cfunc:`PyObject_New` or
54-
:cfunc:`PyObject_NewVar`. This is normally called from the
53+
Releases memory allocated to an object using :c:func:`PyObject_New` or
54+
:c:func:`PyObject_NewVar`. This is normally called from the
5555
:attr:`tp_dealloc` handler specified in the object's type. The fields of
5656
the object should not be accessed after this call as the memory is no
5757
longer a valid Python object.
5858
5959
60-
.. cvar:: PyObject _Py_NoneStruct
60+
.. c:var:: PyObject _Py_NoneStruct
6161
6262
Object which is visible in Python as ``None``. This should only be accessed
63-
using the :cmacro:`Py_None` macro, which evaluates to a pointer to this
63+
using the :c:macro:`Py_None` macro, which evaluates to a pointer to this
6464
object.
6565
6666
6767
.. seealso::
6868
69-
:cfunc:`PyModule_Create`
69+
:c:func:`PyModule_Create`
7070
To allocate and create extension modules.
7171

Doc/c-api/arg.rst

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

Doc/c-api/bool.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,36 @@ creation and deletion functions don't apply to booleans. The following macros
1111
are available, however.
1212

1313

14-
.. cfunction:: int PyBool_Check(PyObject *o)
14+
.. c:function:: int PyBool_Check(PyObject *o)
1515
16-
Return true if *o* is of type :cdata:`PyBool_Type`.
16+
Return true if *o* is of type :c:data:`PyBool_Type`.
1717
1818
19-
.. cvar:: PyObject* Py_False
19+
.. c:var:: PyObject* Py_False
2020
2121
The Python ``False`` object. This object has no methods. It needs to be
2222
treated just like any other object with respect to reference counts.
2323
2424
25-
.. cvar:: PyObject* Py_True
25+
.. c:var:: PyObject* Py_True
2626
2727
The Python ``True`` object. This object has no methods. It needs to be treated
2828
just like any other object with respect to reference counts.
2929
3030
31-
.. cmacro:: Py_RETURN_FALSE
31+
.. c:macro:: Py_RETURN_FALSE
3232
3333
Return :const:`Py_False` from a function, properly incrementing its reference
3434
count.
3535
3636
37-
.. cmacro:: Py_RETURN_TRUE
37+
.. c:macro:: Py_RETURN_TRUE
3838
3939
Return :const:`Py_True` from a function, properly incrementing its reference
4040
count.
4141
4242
43-
.. cfunction:: PyObject* PyBool_FromLong(long v)
43+
.. c:function:: PyObject* PyBool_FromLong(long v)
4444
4545
Return a new reference to :const:`Py_True` or :const:`Py_False` depending on the
4646
truth value of *v*.

0 commit comments

Comments
 (0)