/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/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 | 24 The type of a destructor callback for a capsule. Defined as:: 45 non-*NULL*, this string must outlive the capsule. (Though it is permitted to 49 capsule as its argument when it is destroyed. 51 If this capsule will be stored as an attribute of a module, the *name* should 53 to import the capsule using :c:func:`PyCapsule_Import`. 56 .. c:function:: void* PyCapsule_GetPointer(PyObject *capsule, const char *name) 58 Retrieve the *pointer* stored in the capsule. On failure, set an exception 61 The *name* parameter must compare exactly to the name stored in the capsule. 62 If the name stored in the capsule is *NULL*, the *name* passed in must also 63 be *NULL*. Python uses the C function :c:func:`strcmp` to compare capsule [all …]
|
D | concrete.rst | 103 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/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/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/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/PC/VC6/ |
D | pythoncore.dsp | 260 SOURCE=..\..\Objects\capsule.c
|
/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/cpython2/ |
D | Makefile.pre.in | 381 Objects/capsule.o \
|
/external/jline/src/src/test/resources/jline/example/ |
D | english.gz |
|