Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
bde3e0bf
Unverified
Kaydet (Commit)
bde3e0bf
authored
May 18, 2018
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
May 18, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix C API docs: PyCapsule_Import always set an exception on failure. (GH-6967)
üst
d89ca948
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
capsule.rst
Doc/c-api/capsule.rst
+9
-2
No files found.
Doc/c-api/capsule.rst
Dosyayı görüntüle @
bde3e0bf
...
@@ -9,6 +9,8 @@ Capsules
...
@@ -9,6 +9,8 @@ Capsules
Refer to :ref:`using-capsules` for more information on using these objects.
Refer to :ref:`using-capsules` for more information on using these objects.
.. versionadded:: 3.1
.. c:type:: PyCapsule
.. c:type:: PyCapsule
...
@@ -19,6 +21,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
...
@@ -19,6 +21,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
regular import mechanism can be used to access C APIs defined in dynamically
regular import mechanism can be used to access C APIs defined in dynamically
loaded modules.
loaded modules.
.. c:type:: PyCapsule_Destructor
.. c:type:: PyCapsule_Destructor
The type of a destructor callback for a capsule. Defined as::
The type of a destructor callback for a capsule. Defined as::
...
@@ -104,8 +107,8 @@ Refer to :ref:`using-capsules` for more information on using these objects.
...
@@ -104,8 +107,8 @@ Refer to :ref:`using-capsules` for more information on using these objects.
import the module conventionally (using :c:func:`PyImport_ImportModule`).
import the module conventionally (using :c:func:`PyImport_ImportModule`).
Return the capsule's internal *pointer* on success. On failure, set an
Return the capsule's internal *pointer* on success. On failure, set an
exception and return *NULL*.
However, if :c:func:`PyCapsule_Import` failed to
exception and return *NULL*.
import the module, and *no_block* was true, no exception is set.
.. c:function:: int PyCapsule_IsValid(PyObject *capsule, const char *name)
.. c:function:: int PyCapsule_IsValid(PyObject *capsule, const char *name)
...
@@ -122,18 +125,21 @@ Refer to :ref:`using-capsules` for more information on using these objects.
...
@@ -122,18 +125,21 @@ Refer to :ref:`using-capsules` for more information on using these objects.
Return a nonzero value if the object is valid and matches the name passed in.
Return a nonzero value if the object is valid and matches the name passed in.
Return ``0`` otherwise. This function will not fail.
Return ``0`` otherwise. This function will not fail.
.. c:function:: int PyCapsule_SetContext(PyObject *capsule, void *context)
.. c:function:: int PyCapsule_SetContext(PyObject *capsule, void *context)
Set the context pointer inside *capsule* to *context*.
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.
.. c:function:: int PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor)
.. c:function:: int PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor)
Set the destructor inside *capsule* to *destructor*.
Set the destructor inside *capsule* to *destructor*.
Return ``0`` on success. Return nonzero and set an exception on failure.
Return ``0`` on success. Return nonzero and set an exception on failure.
.. c:function:: int PyCapsule_SetName(PyObject *capsule, const char *name)
.. c:function:: int PyCapsule_SetName(PyObject *capsule, const char *name)
Set the name inside *capsule* to *name*. If non-*NULL*, the name must
Set the name inside *capsule* to *name*. If non-*NULL*, the name must
...
@@ -142,6 +148,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
...
@@ -142,6 +148,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
Return ``0`` on success. Return nonzero and set an exception on failure.
Return ``0`` on success. Return nonzero and set an exception on failure.
.. c:function:: int PyCapsule_SetPointer(PyObject *capsule, void *pointer)
.. c:function:: int PyCapsule_SetPointer(PyObject *capsule, void *pointer)
Set the void pointer inside *capsule* to *pointer*. The pointer may not be
Set the void pointer inside *capsule* to *pointer*. The pointer may not be
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment