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

    r2 r391  
    1010:ref:`extending-index`.
    1111
    12 The first three of these functions described, :cfunc:`PyArg_ParseTuple`,
    13 :cfunc:`PyArg_ParseTupleAndKeywords`, and :cfunc:`PyArg_Parse`, all use
     12The first three of these functions described, :c:func:`PyArg_ParseTuple`,
     13:c:func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use
    1414*format strings* which are used to tell the function about the expected
    1515arguments.  The format strings use the same syntax for each of these
     
    2525of the C variable(s) whose address should be passed.
    2626
    27 ``s`` (string or Unicode object) [const char \*]
     27These formats allow to access an object as a contiguous chunk of memory.
     28You don't have to provide raw storage for the returned unicode or bytes
     29area.  Also, you won't have to release any memory yourself, except with the
     30``es``, ``es#``, ``et`` and ``et#`` formats.
     31
     32``s`` (string or Unicode) [const char \*]
    2833   Convert a Python string or Unicode object to a C pointer to a character
    2934   string.  You must not provide storage for the string itself; a pointer to
     
    3439   encoding.  If this conversion fails, a :exc:`UnicodeError` is raised.
    3540
    36 ``s#`` (string, Unicode or any read buffer compatible object) [const char \*, int (or :ctype:`Py_ssize_t`, see below)]
     41``s#`` (string, Unicode or any read buffer compatible object) [const char \*, int (or :c:type:`Py_ssize_t`, see below)]
    3742   This variant on ``s`` stores into two C variables, the first one a pointer
    3843   to a character string, the second one its length.  In this case the Python
     
    4348
    4449   Starting with Python 2.5 the type of the length argument can be controlled
    45    by defining the macro :cmacro:`PY_SSIZE_T_CLEAN` before including
    46    :file:`Python.h`.  If the macro is defined, length is a :ctype:`Py_ssize_t`
     50   by defining the macro :c:macro:`PY_SSIZE_T_CLEAN` before including
     51   :file:`Python.h`.  If the macro is defined, length is a :c:type:`Py_ssize_t`
    4752   rather than an int.
    4853
     
    5661   .. versionadded:: 2.6
    5762
    58 ``z`` (string or ``None``) [const char \*]
     63``z`` (string, Unicode or ``None``) [const char \*]
    5964   Like ``s``, but the Python object may also be ``None``, in which case the C
    6065   pointer is set to *NULL*.
    6166
    62 ``z#`` (string or ``None`` or any read buffer compatible object) [const char \*, int]
     67``z#`` (string, Unicode, ``None`` or any read buffer compatible object) [const char \*, int]
    6368   This is to ``s#`` as ``z`` is to ``s``.
    6469
    65 ``z*`` (string or ``None`` or any buffer compatible object) [Py_buffer]
     70``z*`` (string, Unicode, ``None`` or any buffer compatible object) [Py_buffer]
    6671   This is to ``s*`` as ``z`` is to ``s``.
    6772
    6873   .. versionadded:: 2.6
    6974
    70 ``u`` (Unicode object) [Py_UNICODE \*]
     75``u`` (Unicode) [Py_UNICODE \*]
    7176   Convert a Python Unicode object to a C pointer to a NUL-terminated buffer
    7277   of 16-bit Unicode (UTF-16) data.  As with ``s``, there is no need to
    7378   provide storage for the Unicode data buffer; a pointer to the existing
    74    Unicode data is stored into the :ctype:`Py_UNICODE` pointer variable whose
     79   Unicode data is stored into the :c:type:`Py_UNICODE` pointer variable whose
    7580   address you pass.
    7681
    77 ``u#`` (Unicode object) [Py_UNICODE \*, int]
     82``u#`` (Unicode) [Py_UNICODE \*, int]
    7883   This variant on ``u`` stores into two C variables, the first one a pointer
    7984   to a Unicode data buffer, the second one its length. Non-Unicode objects
    8085   are handled by interpreting their read-buffer pointer as pointer to a
    81    :ctype:`Py_UNICODE` array.
    82 
    83 ``es`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer]
     86   :c:type:`Py_UNICODE` array.
     87
     88``es`` (string, Unicode or character buffer compatible object) [const char \*encoding, char \*\*buffer]
    8489   This variant on ``s`` is used for encoding Unicode and objects convertible
    8590   to Unicode into a character buffer. It only works for encoded data without
     
    8792
    8893   This format requires two arguments.  The first is only used as input, and
    89    must be a :ctype:`const char\*` which points to the name of an encoding as
     94   must be a :c:type:`const char\*` which points to the name of an encoding as
    9095   a NUL-terminated string, or *NULL*, in which case the default encoding is
    9196   used.  An exception is raised if the named encoding is not known to Python.
    92    The second argument must be a :ctype:`char\*\*`; the value of the pointer
     97   The second argument must be a :c:type:`char\*\*`; the value of the pointer
    9398   it references will be set to a buffer with the contents of the argument
    9499   text.  The text will be encoded in the encoding specified by the first
    95100   argument.
    96101
    97    :cfunc:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy
     102   :c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy
    98103   the encoded data into this buffer and adjust *\*buffer* to reference the
    99104   newly allocated storage.  The caller is responsible for calling
    100    :cfunc:`PyMem_Free` to free the allocated buffer after use.
    101 
    102 ``et`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer]
     105   :c:func:`PyMem_Free` to free the allocated buffer after use.
     106
     107``et`` (string, Unicode or character buffer compatible object) [const char \*encoding, char \*\*buffer]
    103108   Same as ``es`` except that 8-bit string objects are passed through without
    104109   recoding them.  Instead, the implementation assumes that the string object
    105110   uses the encoding passed in as parameter.
    106111
    107 ``es#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length]
     112``es#`` (string, Unicode or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length]
    108113   This variant on ``s#`` is used for encoding Unicode and objects convertible
    109114   to Unicode into a character buffer.  Unlike the ``es`` format, this variant
     
    111116
    112117   It requires three arguments.  The first is only used as input, and must be
    113    a :ctype:`const char\*` which points to the name of an encoding as a
     118   a :c:type:`const char\*` which points to the name of an encoding as a
    114119   NUL-terminated string, or *NULL*, in which case the default encoding is
    115120   used.  An exception is raised if the named encoding is not known to Python.
    116    The second argument must be a :ctype:`char\*\*`; the value of the pointer
     121   The second argument must be a :c:type:`char\*\*`; the value of the pointer
    117122   it references will be set to a buffer with the contents of the argument
    118123   text.  The text will be encoded in the encoding specified by the first
     
    125130   of the needed size, copy the encoded data into this buffer and set
    126131   *\*buffer* to reference the newly allocated storage.  The caller is
    127    responsible for calling :cfunc:`PyMem_Free` to free the allocated buffer
     132   responsible for calling :c:func:`PyMem_Free` to free the allocated buffer
    128133   after usage.
    129134
    130135   If *\*buffer* points to a non-*NULL* pointer (an already allocated buffer),
    131    :cfunc:`PyArg_ParseTuple` will use this location as the buffer and
     136   :c:func:`PyArg_ParseTuple` will use this location as the buffer and
    132137   interpret the initial value of *\*buffer_length* as the buffer size.  It
    133138   will then copy the encoded data into the buffer and NUL-terminate it.  If
     
    137142   without the trailing NUL byte.
    138143
    139 ``et#`` (string, Unicode object or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length]
     144``et#`` (string, Unicode or character buffer compatible object) [const char \*encoding, char \*\*buffer, int \*buffer_length]
    140145   Same as ``es#`` except that string objects are passed through without
    141146   recoding them. Instead, the implementation assumes that the string object
     
    144149``b`` (integer) [unsigned char]
    145150   Convert a nonnegative Python integer to an unsigned tiny int, stored in a C
    146    :ctype:`unsigned char`.
     151   :c:type:`unsigned char`.
    147152
    148153``B`` (integer) [unsigned char]
    149154   Convert a Python integer to a tiny int without overflow checking, stored in
    150    a C :ctype:`unsigned char`.
     155   a C :c:type:`unsigned char`.
    151156
    152157   .. versionadded:: 2.3
    153158
    154159``h`` (integer) [short int]
    155    Convert a Python integer to a C :ctype:`short int`.
     160   Convert a Python integer to a C :c:type:`short int`.
    156161
    157162``H`` (integer) [unsigned short int]
    158    Convert a Python integer to a C :ctype:`unsigned short int`, without
     163   Convert a Python integer to a C :c:type:`unsigned short int`, without
    159164   overflow checking.
    160165
     
    162167
    163168``i`` (integer) [int]
    164    Convert a Python integer to a plain C :ctype:`int`.
     169   Convert a Python integer to a plain C :c:type:`int`.
    165170
    166171``I`` (integer) [unsigned int]
    167    Convert a Python integer to a C :ctype:`unsigned int`, without overflow
     172   Convert a Python integer to a C :c:type:`unsigned int`, without overflow
    168173   checking.
    169174
     
    171176
    172177``l`` (integer) [long int]
    173    Convert a Python integer to a C :ctype:`long int`.
     178   Convert a Python integer to a C :c:type:`long int`.
    174179
    175180``k`` (integer) [unsigned long]
    176    Convert a Python integer or long integer to a C :ctype:`unsigned long`
     181   Convert a Python integer or long integer to a C :c:type:`unsigned long`
    177182   without overflow checking.
    178183
     
    180185
    181186``L`` (integer) [PY_LONG_LONG]
    182    Convert a Python integer to a C :ctype:`long long`.  This format is only
    183    available on platforms that support :ctype:`long long` (or :ctype:`_int64`
     187   Convert a Python integer to a C :c:type:`long long`.  This format is only
     188   available on platforms that support :c:type:`long long` (or :c:type:`_int64`
    184189   on Windows).
    185190
    186191``K`` (integer) [unsigned PY_LONG_LONG]
    187    Convert a Python integer or long integer to a C :ctype:`unsigned long long`
     192   Convert a Python integer or long integer to a C :c:type:`unsigned long long`
    188193   without overflow checking.  This format is only available on platforms that
    189    support :ctype:`unsigned long long` (or :ctype:`unsigned _int64` on
     194   support :c:type:`unsigned long long` (or :c:type:`unsigned _int64` on
    190195   Windows).
    191196
     
    193198
    194199``n`` (integer) [Py_ssize_t]
    195    Convert a Python integer or long integer to a C :ctype:`Py_ssize_t`.
     200   Convert a Python integer or long integer to a C :c:type:`Py_ssize_t`.
    196201
    197202   .. versionadded:: 2.5
     
    199204``c`` (string of length 1) [char]
    200205   Convert a Python character, represented as a string of length 1, to a C
    201    :ctype:`char`.
     206   :c:type:`char`.
    202207
    203208``f`` (float) [float]
    204    Convert a Python floating point number to a C :ctype:`float`.
     209   Convert a Python floating point number to a C :c:type:`float`.
    205210
    206211``d`` (float) [double]
    207    Convert a Python floating point number to a C :ctype:`double`.
     212   Convert a Python floating point number to a C :c:type:`double`.
    208213
    209214``D`` (complex) [Py_complex]
    210    Convert a Python complex number to a C :ctype:`Py_complex` structure.
     215   Convert a Python complex number to a C :c:type:`Py_complex` structure.
    211216
    212217``O`` (object) [PyObject \*]
     
    218223   Store a Python object in a C object pointer.  This is similar to ``O``, but
    219224   takes two C arguments: the first is the address of a Python type object,
    220    the second is the address of the C variable (of type :ctype:`PyObject\*`)
     225   the second is the address of the C variable (of type :c:type:`PyObject\*`)
    221226   into which the object pointer is stored.  If the Python object does not
    222227   have the required type, :exc:`TypeError` is raised.
     
    225230   Convert a Python object to a C variable through a *converter* function.
    226231   This takes two arguments: the first is a function, the second is the
    227    address of a C variable (of arbitrary type), converted to :ctype:`void \*`.
     232   address of a C variable (of arbitrary type), converted to :c:type:`void \*`.
    228233   The *converter* function in turn is called as follows::
    229234
     
    231236
    232237   where *object* is the Python object to be converted and *address* is the
    233    :ctype:`void\*` argument that was passed to the :cfunc:`PyArg_Parse\*`
     238   :c:type:`void\*` argument that was passed to the :c:func:`PyArg_Parse\*`
    234239   function.  The returned *status* should be ``1`` for a successful
    235240   conversion and ``0`` if the conversion has failed.  When the conversion
     
    240245   Like ``O`` but requires that the Python object is a string object.  Raises
    241246   :exc:`TypeError` if the object is not a string object.  The C variable may
    242    also be declared as :ctype:`PyObject\*`.
     247   also be declared as :c:type:`PyObject\*`.
    243248
    244249``U`` (Unicode string) [PyUnicodeObject \*]
    245250   Like ``O`` but requires that the Python object is a Unicode object.  Raises
    246251   :exc:`TypeError` if the object is not a Unicode object.  The C variable may
    247    also be declared as :ctype:`PyObject\*`.
     252   also be declared as :c:type:`PyObject\*`.
    248253
    249254``t#`` (read-only character buffer) [char \*, int]
    250255   Like ``s#``, but accepts any object which implements the read-only buffer
    251    interface.  The :ctype:`char\*` variable is set to point to the first byte
    252    of the buffer, and the :ctype:`int` is set to the length of the buffer.
     256   interface.  The :c:type:`char\*` variable is set to point to the first byte
     257   of the buffer, and the :c:type:`int` is set to the length of the buffer.
    253258   Only single-segment buffer objects are accepted; :exc:`TypeError` is raised
    254259   for all others.
     
    262267``w#`` (read-write character buffer) [char \*, Py_ssize_t]
    263268   Like ``s#``, but accepts any object which implements the read-write buffer
    264    interface.  The :ctype:`char \*` variable is set to point to the first byte
    265    of the buffer, and the :ctype:`Py_ssize_t` is set to the length of the
     269   interface.  The :c:type:`char \*` variable is set to point to the first byte
     270   of the buffer, and the :c:type:`Py_ssize_t` is set to the length of the
    266271   buffer.  Only single-segment buffer objects are accepted; :exc:`TypeError`
    267272   is raised for all others.
     
    298303   optional.  The C variables corresponding to optional arguments should be
    299304   initialized to their default value --- when an optional argument is not
    300    specified, :cfunc:`PyArg_ParseTuple` does not touch the contents of the
     305   specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the
    301306   corresponding C variable(s).
    302307
     
    304309   The list of format units ends here; the string after the colon is used as
    305310   the function name in error messages (the "associated value" of the
    306    exception that :cfunc:`PyArg_ParseTuple` raises).
     311   exception that :c:func:`PyArg_ParseTuple` raises).
    307312
    308313``;``
     
    321326
    322327For the conversion to succeed, the *arg* object must match the format and the
    323 format must be exhausted.  On success, the :cfunc:`PyArg_Parse\*` functions
     328format must be exhausted.  On success, the :c:func:`PyArg_Parse\*` functions
    324329return true, otherwise they return false and raise an appropriate exception.
    325 When the :cfunc:`PyArg_Parse\*` functions fail due to conversion failure in
     330When the :c:func:`PyArg_Parse\*` functions fail due to conversion failure in
    326331one of the format units, the variables at the addresses corresponding to that
    327332and the following format units are left untouched.
    328333
    329334
    330 .. cfunction:: int PyArg_ParseTuple(PyObject *args, const char *format, ...)
     335.. c:function:: int PyArg_ParseTuple(PyObject *args, const char *format, ...)
    331336
    332337   Parse the parameters of a function that takes only positional parameters
     
    335340
    336341
    337 .. cfunction:: int PyArg_VaParse(PyObject *args, const char *format, va_list vargs)
    338 
    339    Identical to :cfunc:`PyArg_ParseTuple`, except that it accepts a va_list
     342.. c:function:: int PyArg_VaParse(PyObject *args, const char *format, va_list vargs)
     343
     344   Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list
    340345   rather than a variable number of arguments.
    341346
    342347
    343 .. cfunction:: int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...)
     348.. c:function:: int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...)
    344349
    345350   Parse the parameters of a function that takes both positional and keyword
     
    348353
    349354
    350 .. cfunction:: int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], va_list vargs)
    351 
    352    Identical to :cfunc:`PyArg_ParseTupleAndKeywords`, except that it accepts a
     355.. c:function:: int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], va_list vargs)
     356
     357   Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a
    353358   va_list rather than a variable number of arguments.
    354359
    355360
    356 .. cfunction:: int PyArg_Parse(PyObject *args, const char *format, ...)
     361.. c:function:: int PyArg_Parse(PyObject *args, const char *format, ...)
    357362
    358363   Function used to deconstruct the argument lists of "old-style" functions
     
    365370
    366371
    367 .. cfunction:: int PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, ...)
     372.. c:function:: int PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, ...)
    368373
    369374   A simpler form of parameter retrieval which does not use a format string to
     
    374379   tuple must be at least *min* and no more than *max*; *min* and *max* may be
    375380   equal.  Additional arguments must be passed to the function, each of which
    376    should be a pointer to a :ctype:`PyObject\*` variable; these will be filled
     381   should be a pointer to a :c:type:`PyObject\*` variable; these will be filled
    377382   in with the values from *args*; they will contain borrowed references.  The
    378383   variables which correspond to optional parameters not given by *args* will
     
    397402      }
    398403
    399    The call to :cfunc:`PyArg_UnpackTuple` in this example is entirely
    400    equivalent to this call to :cfunc:`PyArg_ParseTuple`::
     404   The call to :c:func:`PyArg_UnpackTuple` in this example is entirely
     405   equivalent to this call to :c:func:`PyArg_ParseTuple`::
    401406
    402407      PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
     
    405410
    406411   .. versionchanged:: 2.5
    407       This function used an :ctype:`int` type for *min* and *max*. This might
     412      This function used an :c:type:`int` type for *min* and *max*. This might
    408413      require changes in your code for properly supporting 64-bit systems.
    409414
    410415
    411 .. cfunction:: PyObject* Py_BuildValue(const char *format, ...)
     416.. c:function:: PyObject* Py_BuildValue(const char *format, ...)
    412417
    413418   Create a new value based on a format string similar to those accepted by
    414    the :cfunc:`PyArg_Parse\*` family of functions and a sequence of values.
     419   the :c:func:`PyArg_Parse\*` family of functions and a sequence of values.
    415420   Returns the value or *NULL* in the case of an error; an exception will be
    416421   raised if *NULL* is returned.
    417422
    418    :cfunc:`Py_BuildValue` does not always build a tuple.  It builds a tuple
     423   :c:func:`Py_BuildValue` does not always build a tuple.  It builds a tuple
    419424   only if its format string contains two or more format units.  If the format
    420425   string is empty, it returns ``None``; if it contains exactly one format
     
    426431   objects, as for the ``s`` and ``s#`` formats, the required data is copied.
    427432   Buffers provided by the caller are never referenced by the objects created
    428    by :cfunc:`Py_BuildValue`.  In other words, if your code invokes
    429    :cfunc:`malloc` and passes the allocated memory to :cfunc:`Py_BuildValue`,
    430    your code is responsible for calling :cfunc:`free` for that memory once
    431    :cfunc:`Py_BuildValue` returns.
     433   by :c:func:`Py_BuildValue`.  In other words, if your code invokes
     434   :c:func:`malloc` and passes the allocated memory to :c:func:`Py_BuildValue`,
     435   your code is responsible for calling :c:func:`free` for that memory once
     436   :c:func:`Py_BuildValue` returns.
    432437
    433438   In the following description, the quoted form is the format unit; the entry
     
    465470
    466471   ``i`` (integer) [int]
    467       Convert a plain C :ctype:`int` to a Python integer object.
     472      Convert a plain C :c:type:`int` to a Python integer object.
    468473
    469474   ``b`` (integer) [char]
    470       Convert a plain C :ctype:`char` to a Python integer object.
     475      Convert a plain C :c:type:`char` to a Python integer object.
    471476
    472477   ``h`` (integer) [short int]
    473       Convert a plain C :ctype:`short int` to a Python integer object.
     478      Convert a plain C :c:type:`short int` to a Python integer object.
    474479
    475480   ``l`` (integer) [long int]
    476       Convert a C :ctype:`long int` to a Python integer object.
     481      Convert a C :c:type:`long int` to a Python integer object.
    477482
    478483   ``B`` (integer) [unsigned char]
    479       Convert a C :ctype:`unsigned char` to a Python integer object.
     484      Convert a C :c:type:`unsigned char` to a Python integer object.
    480485
    481486   ``H`` (integer) [unsigned short int]
    482       Convert a C :ctype:`unsigned short int` to a Python integer object.
     487      Convert a C :c:type:`unsigned short int` to a Python integer object.
    483488
    484489   ``I`` (integer/long) [unsigned int]
    485       Convert a C :ctype:`unsigned int` to a Python integer object or a Python
     490      Convert a C :c:type:`unsigned int` to a Python integer object or a Python
    486491      long integer object, if it is larger than ``sys.maxint``.
    487492
    488493   ``k`` (integer/long) [unsigned long]
    489       Convert a C :ctype:`unsigned long` to a Python integer object or a
     494      Convert a C :c:type:`unsigned long` to a Python integer object or a
    490495      Python long integer object, if it is larger than ``sys.maxint``.
    491496
    492497   ``L`` (long) [PY_LONG_LONG]
    493       Convert a C :ctype:`long long` to a Python long integer object. Only
    494       available on platforms that support :ctype:`long long`.
     498      Convert a C :c:type:`long long` to a Python long integer object. Only
     499      available on platforms that support :c:type:`long long`.
    495500
    496501   ``K`` (long) [unsigned PY_LONG_LONG]
    497       Convert a C :ctype:`unsigned long long` to a Python long integer object.
    498       Only available on platforms that support :ctype:`unsigned long long`.
     502      Convert a C :c:type:`unsigned long long` to a Python long integer object.
     503      Only available on platforms that support :c:type:`unsigned long long`.
    499504
    500505   ``n`` (int) [Py_ssize_t]
    501       Convert a C :ctype:`Py_ssize_t` to a Python integer or long integer.
     506      Convert a C :c:type:`Py_ssize_t` to a Python integer or long integer.
    502507
    503508      .. versionadded:: 2.5
    504509
    505510   ``c`` (string of length 1) [char]
    506       Convert a C :ctype:`int` representing a character to a Python string of
     511      Convert a C :c:type:`int` representing a character to a Python string of
    507512      length 1.
    508513
    509514   ``d`` (float) [double]
    510       Convert a C :ctype:`double` to a Python floating point number.
     515      Convert a C :c:type:`double` to a Python floating point number.
    511516
    512517   ``f`` (float) [float]
     
    514519
    515520   ``D`` (complex) [Py_complex \*]
    516       Convert a C :ctype:`Py_complex` structure to a Python complex number.
     521      Convert a C :c:type:`Py_complex` structure to a Python complex number.
    517522
    518523   ``O`` (object) [PyObject \*]
     
    520525      incremented by one).  If the object passed in is a *NULL* pointer, it is
    521526      assumed that this was caused because the call producing the argument
    522       found an error and set an exception. Therefore, :cfunc:`Py_BuildValue`
     527      found an error and set an exception. Therefore, :c:func:`Py_BuildValue`
    523528      will return *NULL* but won't raise an exception.  If no exception has
    524529      been raised yet, :exc:`SystemError` is set.
     
    535540      Convert *anything* to a Python object through a *converter* function.
    536541      The function is called with *anything* (which should be compatible with
    537       :ctype:`void \*`) as its argument and should return a "new" Python
     542      :c:type:`void \*`) as its argument and should return a "new" Python
    538543      object, or *NULL* if an error occurred.
    539544
     
    554559   is set and *NULL* returned.
    555560
    556 .. cfunction:: PyObject* Py_VaBuildValue(const char *format, va_list vargs)
    557 
    558    Identical to :cfunc:`Py_BuildValue`, except that it accepts a va_list
     561.. c:function:: PyObject* Py_VaBuildValue(const char *format, va_list vargs)
     562
     563   Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list
    559564   rather than a variable number of arguments.
Note: See TracChangeset for help on using the changeset viewer.