__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.217.134: ~ $
/* -*- 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;
    }
    if (greenlet::IsShuttingDown()) {
        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:

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
platform Folder 0755
tests Folder 0755
CObjects.cpp File 3.57 KB 0644
PyGreenlet.cpp File 27.52 KB 0644
PyGreenlet.hpp File 1.43 KB 0644
PyGreenletUnswitchable.cpp File 4.06 KB 0644
PyModule.cpp File 8.59 KB 0644
TBrokenGreenlet.cpp File 1021 B 0644
TExceptionState.cpp File 1.33 KB 0644
TGreenlet.cpp File 25.62 KB 0644
TGreenlet.hpp File 28.58 KB 0644
TGreenletGlobals.cpp File 3.84 KB 0644
TMainGreenlet.cpp File 3.51 KB 0644
TPythonState.cpp File 19.15 KB 0644
TStackState.cpp File 7.21 KB 0644
TThreadState.hpp File 23.34 KB 0644
TThreadStateCreator.hpp File 2.7 KB 0644
TThreadStateDestroy.cpp File 7.99 KB 0644
TUserGreenlet.cpp File 23.76 KB 0644
__init__.py File 1.41 KB 0644
_greenlet.cpython-312-x86_64-linux-gnu.so File 1.32 MB 0755
greenlet.cpp File 10.83 KB 0644
greenlet.h File 4.64 KB 0644
greenlet_allocator.hpp File 1.79 KB 0644
greenlet_compiler_compat.hpp File 4.24 KB 0644
greenlet_cpython_compat.hpp File 3.25 KB 0644
greenlet_exceptions.hpp File 4.4 KB 0644
greenlet_internal.hpp File 2.7 KB 0644
greenlet_msvc_compat.hpp File 3.12 KB 0644
greenlet_refs.hpp File 37.17 KB 0644
greenlet_slp_switch.hpp File 3.22 KB 0644
greenlet_thread_support.hpp File 867 B 0644
slp_platformselect.h File 3.87 KB 0644