Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/c-api/weakref.rst

    r2 r391  
    1212
    1313
    14 .. cfunction:: int PyWeakref_Check(ob)
     14.. c:function:: int PyWeakref_Check(ob)
    1515
    1616   Return true if *ob* is either a reference or proxy object.
     
    1919
    2020
    21 .. cfunction:: int PyWeakref_CheckRef(ob)
     21.. c:function:: int PyWeakref_CheckRef(ob)
    2222
    2323   Return true if *ob* is a reference object.
     
    2626
    2727
    28 .. cfunction:: int PyWeakref_CheckProxy(ob)
     28.. c:function:: int PyWeakref_CheckProxy(ob)
    2929
    3030   Return true if *ob* is a proxy object.
     
    3333
    3434
    35 .. cfunction:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback)
     35.. c:function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback)
    3636
    3737   Return a weak reference object for the object *ob*.  This will always return
     
    4747
    4848
    49 .. cfunction:: PyObject* PyWeakref_NewProxy(PyObject *ob, PyObject *callback)
     49.. c:function:: PyObject* PyWeakref_NewProxy(PyObject *ob, PyObject *callback)
    5050
    5151   Return a weak reference proxy object for the object *ob*.  This will always
     
    6161
    6262
    63 .. cfunction:: PyObject* PyWeakref_GetObject(PyObject *ref)
     63.. c:function:: PyObject* PyWeakref_GetObject(PyObject *ref)
    6464
    6565   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`.
    6767
    6868   .. versionadded:: 2.2
    6969
     70   .. warning::
    7071
    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.
    7276
    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
    7481   error checking.
    7582
Note: See TracChangeset for help on using the changeset viewer.