X7ROOT File Manager
Current Path:
/opt/hc_python/lib/python3.12/site-packages/greenlet
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
greenlet
/
ðŸ“
..
📄
CObjects.cpp
(3.43 KB)
📄
PyGreenlet.cpp
(22.89 KB)
📄
PyGreenlet.hpp
(1.43 KB)
📄
PyGreenletUnswitchable.cpp
(4.27 KB)
📄
PyModule.cpp
(8.39 KB)
📄
TBrokenGreenlet.cpp
(1021 B)
📄
TExceptionState.cpp
(1.33 KB)
📄
TGreenlet.cpp
(25.13 KB)
📄
TGreenlet.hpp
(27.39 KB)
📄
TGreenletGlobals.cpp
(3.19 KB)
📄
TMainGreenlet.cpp
(3.2 KB)
📄
TPythonState.cpp
(15.41 KB)
📄
TStackState.cpp
(7.21 KB)
📄
TThreadState.hpp
(18.68 KB)
📄
TThreadStateCreator.hpp
(2.55 KB)
📄
TThreadStateDestroy.cpp
(7.98 KB)
📄
TUserGreenlet.cpp
(23 KB)
📄
__init__.py
(1.68 KB)
ðŸ“
__pycache__
📄
_greenlet.cpython-312-x86_64-linux-gnu.so
(1.38 MB)
📄
greenlet.cpp
(10.74 KB)
📄
greenlet.h
(4.64 KB)
📄
greenlet_allocator.hpp
(1.54 KB)
📄
greenlet_compiler_compat.hpp
(4.24 KB)
📄
greenlet_cpython_compat.hpp
(3.97 KB)
📄
greenlet_exceptions.hpp
(4.4 KB)
📄
greenlet_internal.hpp
(2.65 KB)
📄
greenlet_refs.hpp
(33.63 KB)
📄
greenlet_slp_switch.hpp
(3.12 KB)
📄
greenlet_thread_support.hpp
(867 B)
ðŸ“
platform
📄
slp_platformselect.h
(3.75 KB)
ðŸ“
tests
Editing: greenlet_internal.hpp
/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ #ifndef GREENLET_INTERNAL_H #define GREENLET_INTERNAL_H #ifdef __clang__ # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wunused-function" #endif /** * Implementation helpers. * * C++ templates and inline functions should go here. */ #define PY_SSIZE_T_CLEAN #include "greenlet_compiler_compat.hpp" #include "greenlet_cpython_compat.hpp" #include "greenlet_exceptions.hpp" #include "TGreenlet.hpp" #include "greenlet_allocator.hpp" #include <vector> #include <string> #define GREENLET_MODULE struct _greenlet; typedef struct _greenlet PyGreenlet; namespace greenlet { class ThreadState; // We can't use the PythonAllocator for this, because we push to it // from the thread state destructor, which doesn't have the GIL, // and Python's allocators can only be called with the GIL. typedef std::vector<ThreadState*> cleanup_queue_t; }; #define implementation_ptr_t greenlet::Greenlet* #include "greenlet.h" void greenlet::refs::MainGreenletExactChecker(void *p) { if (!p) { return; } // We control the class of the main greenlet exactly. if (Py_TYPE(p) != &PyGreenlet_Type) { std::string err("MainGreenlet: Expected exactly a greenlet, not a "); err += Py_TYPE(p)->tp_name; throw greenlet::TypeError(err); } // Greenlets from dead threads no longer respond to main() with a // true value; so in that case we need to perform an additional // check. Greenlet* g = static_cast<PyGreenlet*>(p)->pimpl; if (g->main()) { return; } if (!dynamic_cast<MainGreenlet*>(g)) { std::string err("MainGreenlet: Expected exactly a main greenlet, not a "); err += Py_TYPE(p)->tp_name; throw greenlet::TypeError(err); } } template <typename T, greenlet::refs::TypeChecker TC> inline greenlet::Greenlet* greenlet::refs::_OwnedGreenlet<T, TC>::operator->() const noexcept { return reinterpret_cast<PyGreenlet*>(this->p)->pimpl; } template <typename T, greenlet::refs::TypeChecker TC> inline greenlet::Greenlet* greenlet::refs::_BorrowedGreenlet<T, TC>::operator->() const noexcept { return reinterpret_cast<PyGreenlet*>(this->p)->pimpl; } #include <memory> #include <stdexcept> extern PyTypeObject PyGreenlet_Type; /** * Forward declarations needed in multiple files. */ static PyObject* green_switch(PyGreenlet* self, PyObject* args, PyObject* kwargs); #ifdef __clang__ # pragma clang diagnostic pop #endif #endif // Local Variables: // flycheck-clang-include-path: ("../../include" "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10") // End:
Upload File
Create Folder