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

    r2 r391  
    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   .. versionchanged:: 2.5
    15       This function used an :ctype:`int` type for *size*. This might require
     15      This function used an :c:type:`int` type for *size*. This might require
    1616      changes in your code for properly supporting 64-bit systems.
    1717
    1818
    19 .. cfunction:: void _PyObject_Del(PyObject *op)
     19.. c:function:: void _PyObject_Del(PyObject *op)
    2020
    2121
    22 .. cfunction:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
     22.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
    2323
    2424   Initialize a newly-allocated object *op* with its type and initial
     
    2929
    3030
    31 .. cfunction:: PyVarObject* PyObject_InitVar(PyVarObject *op, PyTypeObject *type, Py_ssize_t size)
     31.. c:function:: PyVarObject* PyObject_InitVar(PyVarObject *op, PyTypeObject *type, Py_ssize_t size)
    3232
    33    This does everything :cfunc:`PyObject_Init` does, and also initializes the
     33   This does everything :c:func:`PyObject_Init` does, and also initializes the
    3434   length information for a variable-size object.
    3535
    3636   .. versionchanged:: 2.5
    37       This function used an :ctype:`int` type for *size*. This might require
     37      This function used an :c:type:`int` type for *size*. This might require
    3838      changes in your code for properly supporting 64-bit systems.
    3939
    4040
    41 .. cfunction:: TYPE* PyObject_New(TYPE, PyTypeObject *type)
     41.. c:function:: TYPE* PyObject_New(TYPE, PyTypeObject *type)
    4242
    4343   Allocate a new Python object using the C structure type *TYPE* and the
    4444   Python type object *type*.  Fields not defined by the Python object header
    4545   are not initialized; the object's reference count will be one.  The size of
    46    the memory allocation is determined from the :attr:`tp_basicsize` field of
     46   the memory allocation is determined from the :c:member:`~PyTypeObject.tp_basicsize` field of
    4747   the type object.
    4848
    4949
    50 .. cfunction:: TYPE* PyObject_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size)
     50.. c:function:: TYPE* PyObject_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size)
    5151
    5252   Allocate a new Python object using the C structure type *TYPE* and the
    5353   Python type object *type*.  Fields not defined by the Python object header
    5454   are not initialized.  The allocated memory allows for the *TYPE* structure
    55    plus *size* fields of the size given by the :attr:`tp_itemsize` field of
     55   plus *size* fields of the size given by the :c:member:`~PyTypeObject.tp_itemsize` field of
    5656   *type*.  This is useful for implementing objects like tuples, which are
    5757   able to determine their size at construction time.  Embedding the array of
     
    6060
    6161   .. versionchanged:: 2.5
    62       This function used an :ctype:`int` type for *size*. This might require
     62      This function used an :c:type:`int` type for *size*. This might require
    6363      changes in your code for properly supporting 64-bit systems.
    6464
    6565
    66 .. cfunction:: void PyObject_Del(PyObject *op)
     66.. c:function:: void PyObject_Del(PyObject *op)
    6767
    68    Releases memory allocated to an object using :cfunc:`PyObject_New` or
    69    :cfunc:`PyObject_NewVar`.  This is normally called from the
    70    :attr:`tp_dealloc` handler specified in the object's type.  The fields of
     68   Releases memory allocated to an object using :c:func:`PyObject_New` or
     69   :c:func:`PyObject_NewVar`.  This is normally called from the
     70   :c:member:`~PyTypeObject.tp_dealloc` handler specified in the object's type.  The fields of
    7171   the object should not be accessed after this call as the memory is no
    7272   longer a valid Python object.
    7373
    7474
    75 .. cfunction:: PyObject* Py_InitModule(char *name, PyMethodDef *methods)
     75.. c:function:: PyObject* Py_InitModule(char *name, PyMethodDef *methods)
    7676
    7777   Create a new module object based on a name and table of functions,
     
    8383
    8484
    85 .. cfunction:: PyObject* Py_InitModule3(char *name, PyMethodDef *methods, char *doc)
     85.. c:function:: PyObject* Py_InitModule3(char *name, PyMethodDef *methods, char *doc)
    8686
    8787   Create a new module object based on a name and table of functions,
     
    9494
    9595
    96 .. cfunction:: PyObject* Py_InitModule4(char *name, PyMethodDef *methods, char *doc, PyObject *self, int apiver)
     96.. c:function:: PyObject* Py_InitModule4(char *name, PyMethodDef *methods, char *doc, PyObject *self, int apiver)
    9797
    9898   Create a new module object based on a name and table of functions,
     
    108108
    109109      Most uses of this function should probably be using the
    110       :cfunc:`Py_InitModule3` instead; only use this if you are sure you need
     110      :c:func:`Py_InitModule3` instead; only use this if you are sure you need
    111111      it.
    112112
     
    116116
    117117
    118 .. cvar:: PyObject _Py_NoneStruct
     118.. c:var:: PyObject _Py_NoneStruct
    119119
    120120   Object which is visible in Python as ``None``.  This should only be
Note: See TracChangeset for help on using the changeset viewer.