/external/python/cpython2/Objects/ |
D | capsule.c | 17 _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/ |
D | capsule.c | 17 _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/ |
D | capsulethunk.h | 8 #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/ |
D | capsulethunk.h | 8 #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/ |
D | capsule.rst | 27 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 …]
|
D | concrete.rst | 103 capsule.rst
|
/external/python/cpython3/Doc/c-api/ |
D | capsule.rst | 27 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 …]
|
D | concrete.rst | 113 capsule.rst
|
/external/python/cpython2/Include/ |
D | pycapsule.h | 33 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/ |
D | pycapsule.h | 33 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/ |
D | ctypes.h | 468 #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/ |
D | local_computation_builder.cc | 48 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/ |
D | compile.c | 622 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/ |
D | compile.c | 518 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/ |
D | cporting.rst | 224 :c:type:`CObject` provides no place to store the capsule's "name". As a
|
/external/python/cpython2/Doc/howto/ |
D | cporting.rst | 224 :c:type:`CObject` provides no place to store the capsule's "name". As a
|
/external/python/cpython2/PC/os2emx/ |
D | python27.def | 213 ; From python27_s.lib(capsule)
|
/external/python/cpython2/ |
D | Android.bp | 119 "Objects/capsule.c",
|
D | Makefile.pre.in | 353 Objects/capsule.o \
|
/external/python/cpython2/PC/VC6/ |
D | pythoncore.dsp | 260 SOURCE=..\..\Objects\capsule.c
|
/external/python/cpython3/Doc/whatsnew/ |
D | 2.7.rst | 2280 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
|
D | 3.0.rst | 555 reference for the major changes to the library. Here's a capsule
|
/external/python/cpython2/Doc/whatsnew/ |
D | 2.7.rst | 2256 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/ |
D | refcounts.dat | 177 PyCapsule_IsValid:PyObject*:capsule:0:
|
/external/python/cpython3/ |
D | Makefile.pre.in | 423 Objects/capsule.o \
|