Download python/user_packages/Python313/Include/greenlet/greenlet.h from codekingpro/portable-devtools: direct link, hf CLI and curl.
- Browser
- Download file 4.92 kB
-
https://huggingface.co/datasets/codekingpro/portable-devtools/resolve/df58e70f9edde36aaca2d2aacc2440dd6c2f807d/python/user_packages/Python313/Include/greenlet/greenlet.h
- Command line
-
hf download hf://datasets/codekingpro/portable-devtools@df58e70f9edde36aaca2d2aacc2440dd6c2f807d/python/user_packages/Python313/Include/greenlet/greenlet.h
-
curl -L -o greenlet.h https://huggingface.co/datasets/codekingpro/portable-devtools/resolve/df58e70f9edde36aaca2d2aacc2440dd6c2f807d/python/user_packages/Python313/Include/greenlet/greenlet.h
4.92 kB
| /* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ | |
| /* Greenlet object interface */ | |
| extern "C" { | |
| /* This is deprecated and undocumented. It does not change. */ | |
| typedef struct _greenlet { | |
| PyObject_HEAD | |
| PyObject* weakreflist; | |
| PyObject* dict; | |
| implementation_ptr_t pimpl; | |
| } PyGreenlet; | |
| /* C API functions */ | |
| /* Total number of symbols that are exported */ | |
| /* This section is used by modules that uses the greenlet C API */ | |
| static void** _PyGreenlet_API = NULL; | |
| (*(PyTypeObject*)_PyGreenlet_API[PyGreenlet_Type_NUM]) | |
| ((PyObject*)_PyGreenlet_API[PyExc_GreenletError_NUM]) | |
| ((PyObject*)_PyGreenlet_API[PyExc_GreenletExit_NUM]) | |
| /* | |
| * PyGreenlet_New(PyObject *args) | |
| * | |
| * greenlet.greenlet(run, parent=None) | |
| */ | |
| (*(PyGreenlet * (*)(PyObject * run, PyGreenlet * parent)) \ | |
| _PyGreenlet_API[PyGreenlet_New_NUM]) | |
| /* | |
| * PyGreenlet_GetCurrent(void) | |
| * | |
| * greenlet.getcurrent() | |
| */ | |
| (*(PyGreenlet * (*)(void)) _PyGreenlet_API[PyGreenlet_GetCurrent_NUM]) | |
| /* | |
| * PyGreenlet_Throw( | |
| * PyGreenlet *greenlet, | |
| * PyObject *typ, | |
| * PyObject *val, | |
| * PyObject *tb) | |
| * | |
| * g.throw(...) | |
| */ | |
| (*(PyObject * (*)(PyGreenlet * self, \ | |
| PyObject * typ, \ | |
| PyObject * val, \ | |
| PyObject * tb)) \ | |
| _PyGreenlet_API[PyGreenlet_Throw_NUM]) | |
| /* | |
| * PyGreenlet_Switch(PyGreenlet *greenlet, PyObject *args) | |
| * | |
| * g.switch(*args, **kwargs) | |
| */ | |
| (*(PyObject * \ | |
| (*)(PyGreenlet * greenlet, PyObject * args, PyObject * kwargs)) \ | |
| _PyGreenlet_API[PyGreenlet_Switch_NUM]) | |
| /* | |
| * PyGreenlet_SetParent(PyObject *greenlet, PyObject *new_parent) | |
| * | |
| * g.parent = new_parent | |
| */ | |
| (*(int (*)(PyGreenlet * greenlet, PyGreenlet * nparent)) \ | |
| _PyGreenlet_API[PyGreenlet_SetParent_NUM]) | |
| /* | |
| * PyGreenlet_GetParent(PyObject* greenlet) | |
| * | |
| * return greenlet.parent; | |
| * | |
| * This could return NULL even if there is no exception active. | |
| * If it does not return NULL, you are responsible for decrementing the | |
| * reference count. | |
| */ | |
| (*(PyGreenlet* (*)(PyGreenlet*)) \ | |
| _PyGreenlet_API[PyGreenlet_GET_PARENT_NUM]) | |
| /* | |
| * deprecated, undocumented alias. | |
| */ | |
| (*(int (*)(PyGreenlet*)) \ | |
| _PyGreenlet_API[PyGreenlet_MAIN_NUM]) | |
| (*(int (*)(PyGreenlet*)) \ | |
| _PyGreenlet_API[PyGreenlet_STARTED_NUM]) | |
| (*(int (*)(PyGreenlet*)) \ | |
| _PyGreenlet_API[PyGreenlet_ACTIVE_NUM]) | |
| /* Macro that imports greenlet and initializes C API */ | |
| /* NOTE: This has actually moved to ``greenlet._greenlet._C_API``, but we | |
| keep the older definition to be sure older code that might have a copy of | |
| the header still works. */ | |
| { \ | |
| _PyGreenlet_API = (void**)PyCapsule_Import("greenlet._C_API", 0); \ | |
| } | |
| } | |