Pelokalan
Python ID
id en
Masuk
Proyek
c-api__capsule.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
Refer to :ref:`using-capsules` for more information on using these objects.
This subtype of :c:type:`PyObject` represents an opaque value, useful for C extension modules which need to pass an opaque value (as a :c:expr:`void*` pointer) through Python code to other C code. It is often used to make a C function pointer defined in one module available to other modules, so the regular import mechanism can be used to access C APIs defined in dynamically loaded modules.
The type object corresponding to capsule objects. This is the same object as :class:`types.CapsuleType` in the Python layer.
typedef void (*PyCapsule_Destructor)(PyObject *);
typedef void (*PyCapsule_Destructor)(PyObject *);
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.
Return a nonzero value if the object is valid and matches the name passed in. Return ``0`` otherwise. This function will not fail.
object
objek