Small style edits.

This commit is contained in:
Georg Brandl 2009-05-05 22:53:19 +00:00
parent 7847cd6b41
commit f05f820bf9

View File

@ -46,7 +46,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
free it inside the *destructor*.)
If the *destructor* argument is not *NULL*, it will be called with the
capsule when it is destroyed.
capsule as its argument when it is destroyed.
If this capsule will be stored as an attribute of a module, the *name* should
be specified as ``modulename.attributename``. This will enable other modules
@ -96,7 +96,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
.. cfunction:: void* PyCapsule_Import(const char *name, int no_block)
Import a pointer to a C object from a ``capsule`` attribute in a module. The
Import a pointer to a C object from a capsule attribute in a module. The
*name* parameter should specify the full name to the attribute, as in
``module.attribute``. The *name* stored in the capsule must match this
string exactly. If *no_block* is true, import the module without blocking
@ -110,7 +110,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
.. cfunction:: int PyCapsule_IsValid(PyObject *capsule, const char *name)
Determines whether or not *capsule* is a valid capsule. A valid capsule is
non-*NULL*, passes :cfunc:`PyCapsule_CheckExact`, has a non-NULL pointer
non-*NULL*, passes :cfunc:`PyCapsule_CheckExact`, has a non-*NULL* pointer
stored in it, and its internal name matches the *name* parameter. (See
:cfunc:`PyCapsule_GetPointer` for information on how capsule names are
compared.)
@ -126,8 +126,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
Set the context pointer inside *capsule* to *context*.
Return 0 on success.
Return nonzero and set an exception on failure.
Return 0 on success. Return nonzero and set an exception on failure.
.. cfunction:: int PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor)
@ -149,4 +148,3 @@ Refer to :ref:`using-capsules` for more information on using these objects.
*NULL*.
Return 0 on success. Return nonzero and set an exception on failure.