Changeset 391 for python/trunk/Doc/c-api/weakref.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/c-api/weakref.rst
r2 r391 12 12 13 13 14 .. c function:: int PyWeakref_Check(ob)14 .. c:function:: int PyWeakref_Check(ob) 15 15 16 16 Return true if *ob* is either a reference or proxy object. … … 19 19 20 20 21 .. c function:: int PyWeakref_CheckRef(ob)21 .. c:function:: int PyWeakref_CheckRef(ob) 22 22 23 23 Return true if *ob* is a reference object. … … 26 26 27 27 28 .. c function:: int PyWeakref_CheckProxy(ob)28 .. c:function:: int PyWeakref_CheckProxy(ob) 29 29 30 30 Return true if *ob* is a proxy object. … … 33 33 34 34 35 .. c function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback)35 .. c:function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback) 36 36 37 37 Return a weak reference object for the object *ob*. This will always return … … 47 47 48 48 49 .. c function:: PyObject* PyWeakref_NewProxy(PyObject *ob, PyObject *callback)49 .. c:function:: PyObject* PyWeakref_NewProxy(PyObject *ob, PyObject *callback) 50 50 51 51 Return a weak reference proxy object for the object *ob*. This will always … … 61 61 62 62 63 .. c function:: PyObject* PyWeakref_GetObject(PyObject *ref)63 .. c:function:: PyObject* PyWeakref_GetObject(PyObject *ref) 64 64 65 65 Return the referenced object from a weak reference, *ref*. If the referent is 66 no longer live, returns ``None``.66 no longer live, returns :const:`Py_None`. 67 67 68 68 .. versionadded:: 2.2 69 69 70 .. warning:: 70 71 71 .. cfunction:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref) 72 This function returns a **borrowed reference** to the referenced object. 73 This means that you should always call :c:func:`Py_INCREF` on the object 74 except if you know that it cannot be destroyed while you are still 75 using it. 72 76 73 Similar to :cfunc:`PyWeakref_GetObject`, but implemented as a macro that does no 77 78 .. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref) 79 80 Similar to :c:func:`PyWeakref_GetObject`, but implemented as a macro that does no 74 81 error checking. 75 82
Note:
See TracChangeset
for help on using the changeset viewer.