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/refcounting.rst

    r2 r391  
    1212
    1313
    14 .. cfunction:: void Py_INCREF(PyObject *o)
     14.. c:function:: void Py_INCREF(PyObject *o)
    1515
    1616   Increment the reference count for object *o*.  The object must not be *NULL*; if
    17    you aren't sure that it isn't *NULL*, use :cfunc:`Py_XINCREF`.
     17   you aren't sure that it isn't *NULL*, use :c:func:`Py_XINCREF`.
    1818
    1919
    20 .. cfunction:: void Py_XINCREF(PyObject *o)
     20.. c:function:: void Py_XINCREF(PyObject *o)
    2121
    2222   Increment the reference count for object *o*.  The object may be *NULL*, in
     
    2424
    2525
    26 .. cfunction:: void Py_DECREF(PyObject *o)
     26.. c:function:: void Py_DECREF(PyObject *o)
    2727
    2828   Decrement the reference count for object *o*.  The object must not be *NULL*; if
    29    you aren't sure that it isn't *NULL*, use :cfunc:`Py_XDECREF`.  If the reference
     29   you aren't sure that it isn't *NULL*, use :c:func:`Py_XDECREF`.  If the reference
    3030   count reaches zero, the object's type's deallocation function (which must not be
    3131   *NULL*) is invoked.
     
    3737      exceptions in such code are not propagated, the executed code has free access to
    3838      all Python global variables.  This means that any object that is reachable from
    39       a global variable should be in a consistent state before :cfunc:`Py_DECREF` is
     39      a global variable should be in a consistent state before :c:func:`Py_DECREF` is
    4040      invoked.  For example, code to delete an object from a list should copy a
    4141      reference to the deleted object in a temporary variable, update the list data
    42       structure, and then call :cfunc:`Py_DECREF` for the temporary variable.
     42      structure, and then call :c:func:`Py_DECREF` for the temporary variable.
    4343
    4444
    45 .. cfunction:: void Py_XDECREF(PyObject *o)
     45.. c:function:: void Py_XDECREF(PyObject *o)
    4646
    4747   Decrement the reference count for object *o*.  The object may be *NULL*, in
    4848   which case the macro has no effect; otherwise the effect is the same as for
    49    :cfunc:`Py_DECREF`, and the same warning applies.
     49   :c:func:`Py_DECREF`, and the same warning applies.
    5050
    5151
    52 .. cfunction:: void Py_CLEAR(PyObject *o)
     52.. c:function:: void Py_CLEAR(PyObject *o)
    5353
    5454   Decrement the reference count for object *o*.  The object may be *NULL*, in
    5555   which case the macro has no effect; otherwise the effect is the same as for
    56    :cfunc:`Py_DECREF`, except that the argument is also set to *NULL*.  The warning
    57    for :cfunc:`Py_DECREF` does not apply with respect to the object passed because
     56   :c:func:`Py_DECREF`, except that the argument is also set to *NULL*.  The warning
     57   for :c:func:`Py_DECREF` does not apply with respect to the object passed because
    5858   the macro carefully uses a temporary variable and sets the argument to *NULL*
    5959   before decrementing its reference count.
     
    6666The following functions are for runtime dynamic embedding of Python:
    6767``Py_IncRef(PyObject *o)``, ``Py_DecRef(PyObject *o)``. They are
    68 simply exported function versions of :cfunc:`Py_XINCREF` and
    69 :cfunc:`Py_XDECREF`, respectively.
     68simply exported function versions of :c:func:`Py_XINCREF` and
     69:c:func:`Py_XDECREF`, respectively.
    7070
    7171The following functions or macros are only for use within the interpreter core:
    72 :cfunc:`_Py_Dealloc`, :cfunc:`_Py_ForgetReference`, :cfunc:`_Py_NewReference`,
    73 as well as the global variable :cdata:`_Py_RefTotal`.
     72:c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`,
     73as well as the global variable :c:data:`_Py_RefTotal`.
    7474
Note: See TracChangeset for help on using the changeset viewer.