summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/weakref.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/weakref.rst')
-rw-r--r--Doc/c-api/weakref.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/c-api/weakref.rst b/Doc/c-api/weakref.rst
index 8a36110..6b053c8 100644
--- a/Doc/c-api/weakref.rst
+++ b/Doc/c-api/weakref.rst
@@ -11,22 +11,22 @@ simple reference object, and the second acts as a proxy for the original object
as much as it can.
-.. cfunction:: int PyWeakref_Check(ob)
+.. c:function:: int PyWeakref_Check(ob)
Return true if *ob* is either a reference or proxy object.
-.. cfunction:: int PyWeakref_CheckRef(ob)
+.. c:function:: int PyWeakref_CheckRef(ob)
Return true if *ob* is a reference object.
-.. cfunction:: int PyWeakref_CheckProxy(ob)
+.. c:function:: int PyWeakref_CheckProxy(ob)
Return true if *ob* is a proxy object.
-.. cfunction:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback)
+.. c:function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback)
Return a weak reference object for the object *ob*. This will always return
a new reference, but is not guaranteed to create a new object; an existing
@@ -38,7 +38,7 @@ as much as it can.
*NULL*, this will return *NULL* and raise :exc:`TypeError`.
-.. cfunction:: PyObject* PyWeakref_NewProxy(PyObject *ob, PyObject *callback)
+.. c:function:: PyObject* PyWeakref_NewProxy(PyObject *ob, PyObject *callback)
Return a weak reference proxy object for the object *ob*. This will always
return a new reference, but is not guaranteed to create a new object; an
@@ -50,7 +50,7 @@ as much as it can.
``None``, or *NULL*, this will return *NULL* and raise :exc:`TypeError`.
-.. cfunction:: PyObject* PyWeakref_GetObject(PyObject *ref)
+.. c:function:: PyObject* PyWeakref_GetObject(PyObject *ref)
Return the referenced object from a weak reference, *ref*. If the referent is
no longer live, returns :const:`Py_None`.
@@ -58,12 +58,12 @@ as much as it can.
.. warning::
This function returns a **borrowed reference** to the referenced object.
- This means that you should always call :cfunc:`Py_INCREF` on the object
+ This means that you should always call :c:func:`Py_INCREF` on the object
except if you know that it cannot be destroyed while you are still
using it.
-.. cfunction:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref)
+.. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref)
- Similar to :cfunc:`PyWeakref_GetObject`, but implemented as a macro that does no
+ Similar to :c:func:`PyWeakref_GetObject`, but implemented as a macro that does no
error checking.