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

    r2 r391  
    88.. index:: object: CObject
    99
    10 Refer to :ref:`using-cobjects` for more information on using these objects.
    1110
     11.. warning::
    1212
    13 .. ctype:: PyCObject
     13   The CObject API is deprecated as of Python 2.7.  Please switch to the new
     14   :ref:`capsules` API.
    1415
    15    This subtype of :ctype:`PyObject` represents an opaque value, useful for C
    16    extension modules who need to pass an opaque value (as a :ctype:`void\*`
     16.. c:type:: PyCObject
     17
     18   This subtype of :c:type:`PyObject` represents an opaque value, useful for C
     19   extension modules who need to pass an opaque value (as a :c:type:`void\*`
    1720   pointer) through Python code to other C code.  It is often used to make a C
    1821   function pointer defined in one module available to other modules, so the
     
    2124
    2225
    23 .. cfunction:: int PyCObject_Check(PyObject *p)
     26.. c:function:: int PyCObject_Check(PyObject *p)
    2427
    25    Return true if its argument is a :ctype:`PyCObject`.
     28   Return true if its argument is a :c:type:`PyCObject`.
    2629
    2730
    28 .. cfunction:: PyObject* PyCObject_FromVoidPtr(void* cobj, void (*destr)(void *))
     31.. c:function:: PyObject* PyCObject_FromVoidPtr(void* cobj, void (*destr)(void *))
    2932
    30    Create a :ctype:`PyCObject` from the ``void *`` *cobj*.  The *destr* function
     33   Create a :c:type:`PyCObject` from the ``void *`` *cobj*.  The *destr* function
    3134   will be called when the object is reclaimed, unless it is *NULL*.
    3235
    3336
    34 .. cfunction:: PyObject* PyCObject_FromVoidPtrAndDesc(void* cobj, void* desc, void (*destr)(void *, void *))
     37.. c:function:: PyObject* PyCObject_FromVoidPtrAndDesc(void* cobj, void* desc, void (*destr)(void *, void *))
    3538
    36    Create a :ctype:`PyCObject` from the :ctype:`void \*` *cobj*.  The *destr*
     39   Create a :c:type:`PyCObject` from the :c:type:`void \*` *cobj*.  The *destr*
    3740   function will be called when the object is reclaimed. The *desc* argument can
    3841   be used to pass extra callback data for the destructor function.
    3942
    4043
    41 .. cfunction:: void* PyCObject_AsVoidPtr(PyObject* self)
     44.. c:function:: void* PyCObject_AsVoidPtr(PyObject* self)
    4245
    43    Return the object :ctype:`void \*` that the :ctype:`PyCObject` *self* was
     46   Return the object :c:type:`void \*` that the :c:type:`PyCObject` *self* was
    4447   created with.
    4548
    4649
    47 .. cfunction:: void* PyCObject_GetDesc(PyObject* self)
     50.. c:function:: void* PyCObject_GetDesc(PyObject* self)
    4851
    49    Return the description :ctype:`void \*` that the :ctype:`PyCObject` *self* was
     52   Return the description :c:type:`void \*` that the :c:type:`PyCObject` *self* was
    5053   created with.
    5154
    5255
    53 .. cfunction:: int PyCObject_SetVoidPtr(PyObject* self, void* cobj)
     56.. c:function:: int PyCObject_SetVoidPtr(PyObject* self, void* cobj)
    5457
    55    Set the void pointer inside *self* to *cobj*. The :ctype:`PyCObject` must not
     58   Set the void pointer inside *self* to *cobj*. The :c:type:`PyCObject` must not
    5659   have an associated destructor. Return true on success, false on failure.
Note: See TracChangeset for help on using the changeset viewer.