![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /opt/hc_python/lib64/python3.12/site-packages/greenlet/ |
/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ /** * Implementation of greenlet::UserGreenlet. * * Format with: * clang-format -i --style=file src/greenlet/greenlet.c * * * Fix missing braces with: * clang-tidy src/greenlet/greenlet.c -fix -checks="readability-braces-around-statements" */ #include "TGreenlet.hpp" namespace greenlet { void* BrokenGreenlet::operator new(size_t UNUSED(count)) { return allocator.allocate(1); } void BrokenGreenlet::operator delete(void* ptr) { return allocator.deallocate(static_cast<BrokenGreenlet*>(ptr), 1); } greenlet::PythonAllocator<greenlet::BrokenGreenlet> greenlet::BrokenGreenlet::allocator; bool BrokenGreenlet::force_slp_switch_error() const noexcept { return this->_force_slp_switch_error; } UserGreenlet::switchstack_result_t BrokenGreenlet::g_switchstack(void) { if (this->_force_switch_error) { return switchstack_result_t(-1); } return UserGreenlet::g_switchstack(); } }; //namespace greenlet