Home
last modified time | relevance | path

Searched refs:capsule (Results 1 – 25 of 31) sorted by relevance

12

/external/python/cpython2/Objects/
Dcapsule.c17 _is_legal_capsule(PyCapsule *capsule, const char *invalid_capsule) in _is_legal_capsule() argument
19 if (!capsule || !PyCapsule_CheckExact(capsule) || capsule->pointer == NULL) { in _is_legal_capsule()
26 #define is_legal_capsule(capsule, name) \ argument
27 (_is_legal_capsule(capsule, \
46 PyCapsule *capsule; in PyCapsule_New() local
53 capsule = PyObject_NEW(PyCapsule, &PyCapsule_Type); in PyCapsule_New()
54 if (capsule == NULL) { in PyCapsule_New()
58 capsule->pointer = pointer; in PyCapsule_New()
59 capsule->name = name; in PyCapsule_New()
60 capsule->context = NULL; in PyCapsule_New()
[all …]
/external/python/cpython3/Objects/
Dcapsule.c17 _is_legal_capsule(PyCapsule *capsule, const char *invalid_capsule) in _is_legal_capsule() argument
19 if (!capsule || !PyCapsule_CheckExact(capsule) || capsule->pointer == NULL) { in _is_legal_capsule()
26 #define is_legal_capsule(capsule, name) \ argument
27 (_is_legal_capsule(capsule, \
46 PyCapsule *capsule; in PyCapsule_New() local
53 capsule = PyObject_NEW(PyCapsule, &PyCapsule_Type); in PyCapsule_New()
54 if (capsule == NULL) { in PyCapsule_New()
58 capsule->pointer = pointer; in PyCapsule_New()
59 capsule->name = name; in PyCapsule_New()
60 capsule->context = NULL; in PyCapsule_New()
[all …]
/external/python/cpython3/Doc/includes/
Dcapsulethunk.h8 #define __PyCapsule_GetField(capsule, field, default_value) \ argument
9 ( PyCapsule_CheckExact(capsule) \
10 ? (((PyCObject *)capsule)->field) \
14 #define __PyCapsule_SetField(capsule, field, value) \ argument
15 ( PyCapsule_CheckExact(capsule) \
16 ? (((PyCObject *)capsule)->field = value), 1 \
23 #define PyCapsule_CheckExact(capsule) (PyCObject_Check(capsule)) argument
24 #define PyCapsule_IsValid(capsule, name) (PyCObject_Check(capsule)) argument
31 #define PyCapsule_GetPointer(capsule, name) \ argument
32 (PyCObject_AsVoidPtr(capsule))
[all …]
/external/python/cpython2/Doc/includes/
Dcapsulethunk.h8 #define __PyCapsule_GetField(capsule, field, default_value) \ argument
9 ( PyCapsule_CheckExact(capsule) \
10 ? (((PyCObject *)capsule)->field) \
14 #define __PyCapsule_SetField(capsule, field, value) \ argument
15 ( PyCapsule_CheckExact(capsule) \
16 ? (((PyCObject *)capsule)->field = value), 1 \
23 #define PyCapsule_CheckExact(capsule) (PyCObject_Check(capsule)) argument
24 #define PyCapsule_IsValid(capsule, name) (PyCObject_Check(capsule)) argument
31 #define PyCapsule_GetPointer(capsule, name) \ argument
32 (PyCObject_AsVoidPtr(capsule))
[all …]
/external/python/cpython2/Doc/c-api/
Dcapsule.rst27 The type of a destructor callback for a capsule. Defined as::
48 non-*NULL*, this string must outlive the capsule. (Though it is permitted to
52 capsule as its argument when it is destroyed.
54 If this capsule will be stored as an attribute of a module, the *name* should
56 to import the capsule using :c:func:`PyCapsule_Import`.
59 .. c:function:: void* PyCapsule_GetPointer(PyObject *capsule, const char *name)
61 Retrieve the *pointer* stored in the capsule. On failure, set an exception
64 The *name* parameter must compare exactly to the name stored in the capsule.
65 If the name stored in the capsule is *NULL*, the *name* passed in must also
66 be *NULL*. Python uses the C function :c:func:`strcmp` to compare capsule
[all …]
Dconcrete.rst103 capsule.rst
/external/python/cpython3/Doc/c-api/
Dcapsule.rst27 The type of a destructor callback for a capsule. Defined as::
48 non-*NULL*, this string must outlive the capsule. (Though it is permitted to
52 capsule as its argument when it is destroyed.
54 If this capsule will be stored as an attribute of a module, the *name* should
56 to import the capsule using :c:func:`PyCapsule_Import`.
59 .. c:function:: void* PyCapsule_GetPointer(PyObject *capsule, const char *name)
61 Retrieve the *pointer* stored in the capsule. On failure, set an exception
64 The *name* parameter must compare exactly to the name stored in the capsule.
65 If the name stored in the capsule is *NULL*, the *name* passed in must also
66 be *NULL*. Python uses the C function :c:func:`strcmp` to compare capsule
[all …]
Dconcrete.rst113 capsule.rst
/external/python/cpython2/Include/
Dpycapsule.h33 PyAPI_FUNC(void *) PyCapsule_GetPointer(PyObject *capsule, const char *name);
35 PyAPI_FUNC(PyCapsule_Destructor) PyCapsule_GetDestructor(PyObject *capsule);
37 PyAPI_FUNC(const char *) PyCapsule_GetName(PyObject *capsule);
39 PyAPI_FUNC(void *) PyCapsule_GetContext(PyObject *capsule);
41 PyAPI_FUNC(int) PyCapsule_IsValid(PyObject *capsule, const char *name);
43 PyAPI_FUNC(int) PyCapsule_SetPointer(PyObject *capsule, void *pointer);
45 PyAPI_FUNC(int) PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor);
47 PyAPI_FUNC(int) PyCapsule_SetName(PyObject *capsule, const char *name);
49 PyAPI_FUNC(int) PyCapsule_SetContext(PyObject *capsule, void *context);
/external/python/cpython3/Include/
Dpycapsule.h33 PyAPI_FUNC(void *) PyCapsule_GetPointer(PyObject *capsule, const char *name);
35 PyAPI_FUNC(PyCapsule_Destructor) PyCapsule_GetDestructor(PyObject *capsule);
37 PyAPI_FUNC(const char *) PyCapsule_GetName(PyObject *capsule);
39 PyAPI_FUNC(void *) PyCapsule_GetContext(PyObject *capsule);
41 PyAPI_FUNC(int) PyCapsule_IsValid(PyObject *capsule, const char *name);
43 PyAPI_FUNC(int) PyCapsule_SetPointer(PyObject *capsule, void *pointer);
45 PyAPI_FUNC(int) PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor);
47 PyAPI_FUNC(int) PyCapsule_SetName(PyObject *capsule, const char *name);
49 PyAPI_FUNC(int) PyCapsule_SetContext(PyObject *capsule, void *context);
/external/python/cpython2/Modules/_ctypes/
Dctypes.h468 #define CAPSULE_DEREFERENCE(capsule, name) \ argument
469 (PyCapsule_GetPointer(capsule, name))
479 #define CAPSULE_DEREFERENCE(capsule, name) \ argument
480 (PyCObject_AsVoidPtr(capsule))
/external/tensorflow/tensorflow/compiler/xla/python/
Dlocal_computation_builder.cc48 Status RegisterCpuCustomCallTarget(const string& fn_name, PyObject* capsule) { in RegisterCpuCustomCallTarget() argument
50 if (!PyCapsule_IsValid(capsule, name)) { in RegisterCpuCustomCallTarget()
55 void* fn_ptr = PyCapsule_GetPointer(capsule, name); in RegisterCpuCustomCallTarget()
/external/python/cpython3/Python/
Dcompile.c622 PyObject *capsule = PyCapsule_New(c->u, CAPSULE_NAME, NULL); in compiler_enter_scope() local
623 if (!capsule || PyList_Append(c->c_stack, capsule) < 0) { in compiler_enter_scope()
624 Py_XDECREF(capsule); in compiler_enter_scope()
628 Py_DECREF(capsule); in compiler_enter_scope()
653 PyObject *capsule; in compiler_exit_scope() local
660 capsule = PyList_GET_ITEM(c->c_stack, n); in compiler_exit_scope()
661 c->u = (struct compiler_unit *)PyCapsule_GetPointer(capsule, CAPSULE_NAME); in compiler_exit_scope()
688 PyObject *mangled, *capsule; in compiler_set_qualname() local
690 capsule = PyList_GET_ITEM(c->c_stack, stack_size - 1); in compiler_set_qualname()
691 parent = (struct compiler_unit *)PyCapsule_GetPointer(capsule, CAPSULE_NAME); in compiler_set_qualname()
/external/python/cpython2/Python/
Dcompile.c518 PyObject *capsule = PyCapsule_New(c->u, COMPILER_CAPSULE_NAME_COMPILER_UNIT, NULL); in compiler_enter_scope() local
519 if (!capsule || PyList_Append(c->c_stack, capsule) < 0) { in compiler_enter_scope()
520 Py_XDECREF(capsule); in compiler_enter_scope()
524 Py_DECREF(capsule); in compiler_enter_scope()
541 PyObject *capsule; in compiler_exit_scope() local
548 capsule = PyList_GET_ITEM(c->c_stack, n); in compiler_exit_scope()
549 … c->u = (struct compiler_unit *)PyCapsule_GetPointer(capsule, COMPILER_CAPSULE_NAME_COMPILER_UNIT); in compiler_exit_scope()
/external/python/cpython3/Doc/howto/
Dcporting.rst224 :c:type:`CObject` provides no place to store the capsule's "name". As a
/external/python/cpython2/Doc/howto/
Dcporting.rst224 :c:type:`CObject` provides no place to store the capsule's "name". As a
/external/python/cpython2/PC/os2emx/
Dpython27.def213 ; From python27_s.lib(capsule)
/external/python/cpython2/
DAndroid.bp119 "Objects/capsule.c",
DMakefile.pre.in353 Objects/capsule.o \
/external/python/cpython2/PC/VC6/
Dpythoncore.dsp260 SOURCE=..\..\Objects\capsule.c
/external/python/cpython3/Doc/whatsnew/
D2.7.rst2280 C API to an extension module. A capsule is essentially the holder of
2284 can import the module, access its dictionary to get the capsule
2299 if (!PyCapsule_IsValid(capsule, "mymodule.CAPI") {
2304 vtable = PyCapsule_GetPointer(capsule, "mymodule.CAPI");
2307 If a different capsule was passed in, :c:func:`PyCapsule_IsValid` would
D3.0.rst555 reference for the major changes to the library. Here's a capsule
/external/python/cpython2/Doc/whatsnew/
D2.7.rst2256 C API to an extension module. A capsule is essentially the holder of
2260 can import the module, access its dictionary to get the capsule
2275 if (!PyCapsule_IsValid(capsule, "mymodule.CAPI") {
2280 vtable = PyCapsule_GetPointer(capsule, "mymodule.CAPI");
2283 If a different capsule was passed in, :c:func:`PyCapsule_IsValid` would
/external/python/cpython3/Doc/data/
Drefcounts.dat177 PyCapsule_IsValid:PyObject*:capsule:0:
/external/python/cpython3/
DMakefile.pre.in423 Objects/capsule.o \

12