Server IP : 85.214.239.14 / Your IP : 3.137.210.16 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /srv/modoboa/env/lib64/python3.5/site-packages/gevent/ |
Upload File : |
<!DOCTYPE html> <!-- Generated by Cython 0.29.2 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Cython: _greenlet_primitives.py</title> <style type="text/css"> body.cython { font-family: courier; font-size: 12; } .cython.tag { } .cython.line { margin: 0em } .cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; } .cython.line .run { background-color: #B0FFB0; } .cython.line .mis { background-color: #FFB0B0; } .cython.code.run { border-left: 8px solid #B0FFB0; } .cython.code.mis { border-left: 8px solid #FFB0B0; } .cython.code .py_c_api { color: red; } .cython.code .py_macro_api { color: #FF7000; } .cython.code .pyx_c_api { color: #FF3000; } .cython.code .pyx_macro_api { color: #FF7000; } .cython.code .refnanny { color: #FFA000; } .cython.code .trace { color: #FFA000; } .cython.code .error_goto { color: #FFA000; } .cython.code .coerce { color: #008000; border: 1px dotted #008000 } .cython.code .py_attr { color: #FF0000; font-weight: bold; } .cython.code .c_attr { color: #0000FF; } .cython.code .py_call { color: #FF0000; font-weight: bold; } .cython.code .c_call { color: #0000FF; } .cython.score-0 {background-color: #FFFFff;} .cython.score-1 {background-color: #FFFFe7;} .cython.score-2 {background-color: #FFFFd4;} .cython.score-3 {background-color: #FFFFc4;} .cython.score-4 {background-color: #FFFFb6;} .cython.score-5 {background-color: #FFFFaa;} .cython.score-6 {background-color: #FFFF9f;} .cython.score-7 {background-color: #FFFF96;} .cython.score-8 {background-color: #FFFF8d;} .cython.score-9 {background-color: #FFFF86;} .cython.score-10 {background-color: #FFFF7f;} .cython.score-11 {background-color: #FFFF79;} .cython.score-12 {background-color: #FFFF73;} .cython.score-13 {background-color: #FFFF6e;} .cython.score-14 {background-color: #FFFF6a;} .cython.score-15 {background-color: #FFFF66;} .cython.score-16 {background-color: #FFFF62;} .cython.score-17 {background-color: #FFFF5e;} .cython.score-18 {background-color: #FFFF5b;} .cython.score-19 {background-color: #FFFF57;} .cython.score-20 {background-color: #FFFF55;} .cython.score-21 {background-color: #FFFF52;} .cython.score-22 {background-color: #FFFF4f;} .cython.score-23 {background-color: #FFFF4d;} .cython.score-24 {background-color: #FFFF4b;} .cython.score-25 {background-color: #FFFF48;} .cython.score-26 {background-color: #FFFF46;} .cython.score-27 {background-color: #FFFF44;} .cython.score-28 {background-color: #FFFF43;} .cython.score-29 {background-color: #FFFF41;} .cython.score-30 {background-color: #FFFF3f;} .cython.score-31 {background-color: #FFFF3e;} .cython.score-32 {background-color: #FFFF3c;} .cython.score-33 {background-color: #FFFF3b;} .cython.score-34 {background-color: #FFFF39;} .cython.score-35 {background-color: #FFFF38;} .cython.score-36 {background-color: #FFFF37;} .cython.score-37 {background-color: #FFFF36;} .cython.score-38 {background-color: #FFFF35;} .cython.score-39 {background-color: #FFFF34;} .cython.score-40 {background-color: #FFFF33;} .cython.score-41 {background-color: #FFFF32;} .cython.score-42 {background-color: #FFFF31;} .cython.score-43 {background-color: #FFFF30;} .cython.score-44 {background-color: #FFFF2f;} .cython.score-45 {background-color: #FFFF2e;} .cython.score-46 {background-color: #FFFF2d;} .cython.score-47 {background-color: #FFFF2c;} .cython.score-48 {background-color: #FFFF2b;} .cython.score-49 {background-color: #FFFF2b;} .cython.score-50 {background-color: #FFFF2a;} .cython.score-51 {background-color: #FFFF29;} .cython.score-52 {background-color: #FFFF29;} .cython.score-53 {background-color: #FFFF28;} .cython.score-54 {background-color: #FFFF27;} .cython.score-55 {background-color: #FFFF27;} .cython.score-56 {background-color: #FFFF26;} .cython.score-57 {background-color: #FFFF26;} .cython.score-58 {background-color: #FFFF25;} .cython.score-59 {background-color: #FFFF24;} .cython.score-60 {background-color: #FFFF24;} .cython.score-61 {background-color: #FFFF23;} .cython.score-62 {background-color: #FFFF23;} .cython.score-63 {background-color: #FFFF22;} .cython.score-64 {background-color: #FFFF22;} .cython.score-65 {background-color: #FFFF22;} .cython.score-66 {background-color: #FFFF21;} .cython.score-67 {background-color: #FFFF21;} .cython.score-68 {background-color: #FFFF20;} .cython.score-69 {background-color: #FFFF20;} .cython.score-70 {background-color: #FFFF1f;} .cython.score-71 {background-color: #FFFF1f;} .cython.score-72 {background-color: #FFFF1f;} .cython.score-73 {background-color: #FFFF1e;} .cython.score-74 {background-color: #FFFF1e;} .cython.score-75 {background-color: #FFFF1e;} .cython.score-76 {background-color: #FFFF1d;} .cython.score-77 {background-color: #FFFF1d;} .cython.score-78 {background-color: #FFFF1c;} .cython.score-79 {background-color: #FFFF1c;} .cython.score-80 {background-color: #FFFF1c;} .cython.score-81 {background-color: #FFFF1c;} .cython.score-82 {background-color: #FFFF1b;} .cython.score-83 {background-color: #FFFF1b;} .cython.score-84 {background-color: #FFFF1b;} .cython.score-85 {background-color: #FFFF1a;} .cython.score-86 {background-color: #FFFF1a;} .cython.score-87 {background-color: #FFFF1a;} .cython.score-88 {background-color: #FFFF1a;} .cython.score-89 {background-color: #FFFF19;} .cython.score-90 {background-color: #FFFF19;} .cython.score-91 {background-color: #FFFF19;} .cython.score-92 {background-color: #FFFF19;} .cython.score-93 {background-color: #FFFF18;} .cython.score-94 {background-color: #FFFF18;} .cython.score-95 {background-color: #FFFF18;} .cython.score-96 {background-color: #FFFF18;} .cython.score-97 {background-color: #FFFF17;} .cython.score-98 {background-color: #FFFF17;} .cython.score-99 {background-color: #FFFF17;} .cython.score-100 {background-color: #FFFF17;} .cython.score-101 {background-color: #FFFF16;} .cython.score-102 {background-color: #FFFF16;} .cython.score-103 {background-color: #FFFF16;} .cython.score-104 {background-color: #FFFF16;} .cython.score-105 {background-color: #FFFF16;} .cython.score-106 {background-color: #FFFF15;} .cython.score-107 {background-color: #FFFF15;} .cython.score-108 {background-color: #FFFF15;} .cython.score-109 {background-color: #FFFF15;} .cython.score-110 {background-color: #FFFF15;} .cython.score-111 {background-color: #FFFF15;} .cython.score-112 {background-color: #FFFF14;} .cython.score-113 {background-color: #FFFF14;} .cython.score-114 {background-color: #FFFF14;} .cython.score-115 {background-color: #FFFF14;} .cython.score-116 {background-color: #FFFF14;} .cython.score-117 {background-color: #FFFF14;} .cython.score-118 {background-color: #FFFF13;} .cython.score-119 {background-color: #FFFF13;} .cython.score-120 {background-color: #FFFF13;} .cython.score-121 {background-color: #FFFF13;} .cython.score-122 {background-color: #FFFF13;} .cython.score-123 {background-color: #FFFF13;} .cython.score-124 {background-color: #FFFF13;} .cython.score-125 {background-color: #FFFF12;} .cython.score-126 {background-color: #FFFF12;} .cython.score-127 {background-color: #FFFF12;} .cython.score-128 {background-color: #FFFF12;} .cython.score-129 {background-color: #FFFF12;} .cython.score-130 {background-color: #FFFF12;} .cython.score-131 {background-color: #FFFF12;} .cython.score-132 {background-color: #FFFF11;} .cython.score-133 {background-color: #FFFF11;} .cython.score-134 {background-color: #FFFF11;} .cython.score-135 {background-color: #FFFF11;} .cython.score-136 {background-color: #FFFF11;} .cython.score-137 {background-color: #FFFF11;} .cython.score-138 {background-color: #FFFF11;} .cython.score-139 {background-color: #FFFF11;} .cython.score-140 {background-color: #FFFF11;} .cython.score-141 {background-color: #FFFF10;} .cython.score-142 {background-color: #FFFF10;} .cython.score-143 {background-color: #FFFF10;} .cython.score-144 {background-color: #FFFF10;} .cython.score-145 {background-color: #FFFF10;} .cython.score-146 {background-color: #FFFF10;} .cython.score-147 {background-color: #FFFF10;} .cython.score-148 {background-color: #FFFF10;} .cython.score-149 {background-color: #FFFF10;} .cython.score-150 {background-color: #FFFF0f;} .cython.score-151 {background-color: #FFFF0f;} .cython.score-152 {background-color: #FFFF0f;} .cython.score-153 {background-color: #FFFF0f;} .cython.score-154 {background-color: #FFFF0f;} .cython.score-155 {background-color: #FFFF0f;} .cython.score-156 {background-color: #FFFF0f;} .cython.score-157 {background-color: #FFFF0f;} .cython.score-158 {background-color: #FFFF0f;} .cython.score-159 {background-color: #FFFF0f;} .cython.score-160 {background-color: #FFFF0f;} .cython.score-161 {background-color: #FFFF0e;} .cython.score-162 {background-color: #FFFF0e;} .cython.score-163 {background-color: #FFFF0e;} .cython.score-164 {background-color: #FFFF0e;} .cython.score-165 {background-color: #FFFF0e;} .cython.score-166 {background-color: #FFFF0e;} .cython.score-167 {background-color: #FFFF0e;} .cython.score-168 {background-color: #FFFF0e;} .cython.score-169 {background-color: #FFFF0e;} .cython.score-170 {background-color: #FFFF0e;} .cython.score-171 {background-color: #FFFF0e;} .cython.score-172 {background-color: #FFFF0e;} .cython.score-173 {background-color: #FFFF0d;} .cython.score-174 {background-color: #FFFF0d;} .cython.score-175 {background-color: #FFFF0d;} .cython.score-176 {background-color: #FFFF0d;} .cython.score-177 {background-color: #FFFF0d;} .cython.score-178 {background-color: #FFFF0d;} .cython.score-179 {background-color: #FFFF0d;} .cython.score-180 {background-color: #FFFF0d;} .cython.score-181 {background-color: #FFFF0d;} .cython.score-182 {background-color: #FFFF0d;} .cython.score-183 {background-color: #FFFF0d;} .cython.score-184 {background-color: #FFFF0d;} .cython.score-185 {background-color: #FFFF0d;} .cython.score-186 {background-color: #FFFF0d;} .cython.score-187 {background-color: #FFFF0c;} .cython.score-188 {background-color: #FFFF0c;} .cython.score-189 {background-color: #FFFF0c;} .cython.score-190 {background-color: #FFFF0c;} .cython.score-191 {background-color: #FFFF0c;} .cython.score-192 {background-color: #FFFF0c;} .cython.score-193 {background-color: #FFFF0c;} .cython.score-194 {background-color: #FFFF0c;} .cython.score-195 {background-color: #FFFF0c;} .cython.score-196 {background-color: #FFFF0c;} .cython.score-197 {background-color: #FFFF0c;} .cython.score-198 {background-color: #FFFF0c;} .cython.score-199 {background-color: #FFFF0c;} .cython.score-200 {background-color: #FFFF0c;} .cython.score-201 {background-color: #FFFF0c;} .cython.score-202 {background-color: #FFFF0c;} .cython.score-203 {background-color: #FFFF0b;} .cython.score-204 {background-color: #FFFF0b;} .cython.score-205 {background-color: #FFFF0b;} .cython.score-206 {background-color: #FFFF0b;} .cython.score-207 {background-color: #FFFF0b;} .cython.score-208 {background-color: #FFFF0b;} .cython.score-209 {background-color: #FFFF0b;} .cython.score-210 {background-color: #FFFF0b;} .cython.score-211 {background-color: #FFFF0b;} .cython.score-212 {background-color: #FFFF0b;} .cython.score-213 {background-color: #FFFF0b;} .cython.score-214 {background-color: #FFFF0b;} .cython.score-215 {background-color: #FFFF0b;} .cython.score-216 {background-color: #FFFF0b;} .cython.score-217 {background-color: #FFFF0b;} .cython.score-218 {background-color: #FFFF0b;} .cython.score-219 {background-color: #FFFF0b;} .cython.score-220 {background-color: #FFFF0b;} .cython.score-221 {background-color: #FFFF0b;} .cython.score-222 {background-color: #FFFF0a;} .cython.score-223 {background-color: #FFFF0a;} .cython.score-224 {background-color: #FFFF0a;} .cython.score-225 {background-color: #FFFF0a;} .cython.score-226 {background-color: #FFFF0a;} .cython.score-227 {background-color: #FFFF0a;} .cython.score-228 {background-color: #FFFF0a;} .cython.score-229 {background-color: #FFFF0a;} .cython.score-230 {background-color: #FFFF0a;} .cython.score-231 {background-color: #FFFF0a;} .cython.score-232 {background-color: #FFFF0a;} .cython.score-233 {background-color: #FFFF0a;} .cython.score-234 {background-color: #FFFF0a;} .cython.score-235 {background-color: #FFFF0a;} .cython.score-236 {background-color: #FFFF0a;} .cython.score-237 {background-color: #FFFF0a;} .cython.score-238 {background-color: #FFFF0a;} .cython.score-239 {background-color: #FFFF0a;} .cython.score-240 {background-color: #FFFF0a;} .cython.score-241 {background-color: #FFFF0a;} .cython.score-242 {background-color: #FFFF0a;} .cython.score-243 {background-color: #FFFF0a;} .cython.score-244 {background-color: #FFFF0a;} .cython.score-245 {background-color: #FFFF0a;} .cython.score-246 {background-color: #FFFF09;} .cython.score-247 {background-color: #FFFF09;} .cython.score-248 {background-color: #FFFF09;} .cython.score-249 {background-color: #FFFF09;} .cython.score-250 {background-color: #FFFF09;} .cython.score-251 {background-color: #FFFF09;} .cython.score-252 {background-color: #FFFF09;} .cython.score-253 {background-color: #FFFF09;} .cython.score-254 {background-color: #FFFF09;} </style> </head> <body class="cython"> <p><span style="border-bottom: solid 1px grey;">Generated by Cython 0.29.2</span></p> <p> <span style="background-color: #FFFF00">Yellow lines</span> hint at Python interaction.<br /> Click on a line that starts with a "<code>+</code>" to see the C code that Cython generated for it. </p> <p>Raw output: <a href="_greenlet_primitives.c">_greenlet_primitives.c</a></p> <div class="cython"><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">01</span>: # -*- coding: utf-8 -*-</pre> <pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">02</span>: # copyright (c) 2018 gevent. See LICENSE.</pre> <pre class="cython line score-0"> <span class="">03</span>: # cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False</pre> <pre class="cython line score-0"> <span class="">04</span>: """</pre> <pre class="cython line score-0"> <span class="">05</span>: A collection of primitives used by the hub, and suitable for</pre> <pre class="cython line score-0"> <span class="">06</span>: compilation with Cython because of their frequency of use.</pre> <pre class="cython line score-0"> <span class="">07</span>: </pre> <pre class="cython line score-0"> <span class="">08</span>: """</pre> <pre class="cython line score-0"> <span class="">09</span>: from __future__ import absolute_import</pre> <pre class="cython line score-0"> <span class="">10</span>: from __future__ import division</pre> <pre class="cython line score-0"> <span class="">11</span>: from __future__ import print_function</pre> <pre class="cython line score-0"> <span class="">12</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">13</span>: from weakref import ref as wref</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_ref); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_ref); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_ref); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_weakref, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_ref);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_21__greenlet_primitives_wref); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_21__greenlet_primitives_wref, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">14</span>: from gc import get_objects</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_get_objects); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_get_objects); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_get_objects); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gc, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_get_objects);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_21__greenlet_primitives_get_objects); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_21__greenlet_primitives_get_objects, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">15</span>: </pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">16</span>: from greenlet import greenlet</pre> <pre class='cython code score-11 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_greenlet); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_greenlet); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_greenlet); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_greenlet, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">17</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">18</span>: from gevent.exceptions import BlockingSwitchOutError</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_BlockingSwitchOutError); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_BlockingSwitchOutError); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_BlockingSwitchOutError); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent_exceptions, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_BlockingSwitchOutError);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_21__greenlet_primitives_BlockingSwitchOutError); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_21__greenlet_primitives_BlockingSwitchOutError, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">19</span>: </pre> <pre class="cython line score-0"> <span class="">20</span>: </pre> <pre class="cython line score-0"> <span class="">21</span>: # In Cython, we define these as 'cdef inline' functions. The</pre> <pre class="cython line score-0"> <span class="">22</span>: # compilation unit cannot have a direct assignment to them (import</pre> <pre class="cython line score-0"> <span class="">23</span>: # is assignment) without generating a 'lvalue is not valid target'</pre> <pre class="cython line score-0"> <span class="">24</span>: # error.</pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">25</span>: locals()['getcurrent'] = __import__('greenlet').getcurrent</pre> <pre class='cython code score-19 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin___import__, __pyx_tuple_, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_getcurrent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_getcurrent, __pyx_t_2) < 0)) <span class='error_goto'>__PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; /* … */ __pyx_tuple_ = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_greenlet);<span class='error_goto'> if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple_); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple_); </pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">26</span>: locals()['greenlet_init'] = lambda: None</pre> <pre class='cython code score-13 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_4lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6gevent_21__greenlet_primitives_4lambda = {"lambda", (PyCFunction)__pyx_pw_6gevent_21__greenlet_primitives_4lambda, METH_NOARGS, 0}; static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_4lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("lambda (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_6gevent_21__greenlet_primitives_lambda(__pyx_self); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6gevent_21__greenlet_primitives_lambda(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("lambda", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_21__greenlet_primitives_4lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_gevent___greenlet_primitives, __pyx_d, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_greenlet_init, __pyx_t_2) < 0)) <span class='error_goto'>__PYX_ERR(0, 26, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">27</span>: locals()['_greenlet_switch'] = greenlet.switch</pre> <pre class='cython code score-11 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_21__greenlet_primitives_greenlet), __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_greenlet_switch, __pyx_t_2) < 0)) <span class='error_goto'>__PYX_ERR(0, 27, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">28</span>: </pre> <pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">29</span>: __all__ = [</pre> <pre class='cython code score-15 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_TrackedRawGreenlet); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_TrackedRawGreenlet); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_TrackedRawGreenlet); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_SwitchOutGreenletWithLoop); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_SwitchOutGreenletWithLoop); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 1, __pyx_n_s_SwitchOutGreenletWithLoop); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 29, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">30</span>: 'TrackedRawGreenlet',</pre> <pre class="cython line score-0"> <span class="">31</span>: 'SwitchOutGreenletWithLoop',</pre> <pre class="cython line score-0"> <span class="">32</span>: ]</pre> <pre class="cython line score-0"> <span class="">33</span>: </pre> <pre class="cython line score-0"> <span class="">34</span>: class TrackedRawGreenlet(greenlet):</pre> <pre class="cython line score-0"> <span class="">35</span>: </pre> <pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">36</span>: def __init__(self, function, parent):</pre> <pre class='cython code score-31 '>/* Python wrapper */ static int __pyx_pw_6gevent_21__greenlet_primitives_18TrackedRawGreenlet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_21__greenlet_primitives_18TrackedRawGreenlet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_function = 0; PyObject *__pyx_v_parent = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_function,&__pyx_n_s_parent,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_parent)) != 0)) kw_args--; else { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 2, 2, 1); <span class='error_goto'>__PYX_ERR(0, 36, __pyx_L3_error)</span> } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 36, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); } __pyx_v_function = values[0]; __pyx_v_parent = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 2, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 36, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.TrackedRawGreenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_21__greenlet_primitives_18TrackedRawGreenlet___init__(((struct __pyx_obj_6gevent_21__greenlet_primitives_TrackedRawGreenlet *)__pyx_v_self), __pyx_v_function, __pyx_v_parent); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_21__greenlet_primitives_18TrackedRawGreenlet___init__(struct __pyx_obj_6gevent_21__greenlet_primitives_TrackedRawGreenlet *__pyx_v_self, PyObject *__pyx_v_function, PyObject *__pyx_v_parent) { PyGreenlet *__pyx_v_current = NULL; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.TrackedRawGreenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_current); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">37</span>: greenlet.__init__(self, function, parent)</pre> <pre class='cython code score-42 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_21__greenlet_primitives_greenlet), __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_function, __pyx_v_parent}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_function, __pyx_v_parent}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif { __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); if (__pyx_t_3) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0+__pyx_t_4, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_function); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_function); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1+__pyx_t_4, __pyx_v_function); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_parent); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_parent); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 2+__pyx_t_4, __pyx_v_parent); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_5, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">38</span>: # See greenlet.py's Greenlet class. We capture the cheap</pre> <pre class="cython line score-0"> <span class="">39</span>: # parts to maintain the tree structure, but we do not capture</pre> <pre class="cython line score-0"> <span class="">40</span>: # the stack because that's too expensive for 'spawn_raw'.</pre> <pre class="cython line score-0"> <span class="">41</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">42</span>: current = getcurrent() # pylint:disable=undefined-variable</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_21__greenlet_primitives_getcurrent());<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_current = ((PyGreenlet *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">43</span>: self.spawning_greenlet = wref(current)</pre> <pre class='cython code score-18 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_21__greenlet_primitives_wref); __pyx_t_2 = __pyx_v_6gevent_21__greenlet_primitives_wref; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, ((PyObject *)__pyx_v_current)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, ((PyObject *)__pyx_v_current)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 43, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_spawning_greenlet, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 43, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">44</span>: # See Greenlet for how trees are maintained.</pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">45</span>: try:</pre> <pre class='cython code score-11 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L4_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L8_try_end:; } </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">46</span>: self.spawn_tree_locals = current.spawn_tree_locals</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_current), __pyx_n_s_spawn_tree_locals);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_spawn_tree_locals, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L3_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">47</span>: except AttributeError:</pre> <pre class='cython code score-6 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_AttributeError); if (__pyx_t_4) { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.TrackedRawGreenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_1, &__pyx_t_2, &__pyx_t_5) < 0) <span class='error_goto'>__PYX_ERR(0, 47, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">48</span>: self.spawn_tree_locals = {}</pre> <pre class='cython code score-5 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_spawn_tree_locals, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 48, __pyx_L5_except_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">49</span>: if current.parent:</pre> <pre class='cython code score-8 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_current), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L5_except_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">50</span>: current.spawn_tree_locals = self.spawn_tree_locals</pre> <pre class='cython code score-5 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_spawn_tree_locals);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_current), __pyx_n_s_spawn_tree_locals, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 50, __pyx_L5_except_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">51</span>: </pre> <pre class="cython line score-0"> <span class="">52</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">53</span>: class SwitchOutGreenletWithLoop(TrackedRawGreenlet):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop { PyObject *(*__pyx_switch)(struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *, int __pyx_skip_dispatch); PyObject *(*switch_out)(struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_vtabptr_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop; </pre><pre class="cython line score-0"> <span class="">54</span>: # Subclasses must define:</pre> <pre class="cython line score-0"> <span class="">55</span>: # - self.loop</pre> <pre class="cython line score-0"> <span class="">56</span>: </pre> <pre class="cython line score-0"> <span class="">57</span>: # This class defines loop in its .pxd for Cython. This lets us avoid</pre> <pre class="cython line score-0"> <span class="">58</span>: # circular dependencies with the hub.</pre> <pre class="cython line score-0"> <span class="">59</span>: </pre> <pre class="cython line score-63" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">60</span>: def switch(self):</pre> <pre class='cython code score-63 '>static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch(struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_v_switch_out = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("switch", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 60, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_switch_out); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch[] = "SwitchOutGreenletWithLoop.switch(self)"; static PyMethodDef __pyx_mdef_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch = {"switch", (PyCFunction)__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch, METH_NOARGS, __pyx_doc_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch}; static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("switch (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch(((struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch(struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("switch", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__2 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 60, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__2); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SwitchOutGreenletWithLoop_switch, NULL, __pyx_n_s_gevent___greenlet_primitives, __pyx_d, ((PyObject *)__pyx_codeobj__3));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop->tp_dict, __pyx_n_s_switch, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 60, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop); __pyx_codeobj__3 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent__greenlet_primitives, __pyx_n_s_switch, 60, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 60, __pyx_L1_error)</span> </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">61</span>: switch_out = getattr(getcurrent(), 'switch_out', None) # pylint:disable=undefined-variable</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_21__greenlet_primitives_getcurrent());<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_1, __pyx_n_s_switch_out, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_switch_out = __pyx_t_2; __pyx_t_2 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">62</span>: if switch_out is not None:</pre> <pre class='cython code score-0 '> __pyx_t_5 = (__pyx_v_switch_out != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* … */ } </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">63</span>: switch_out()</pre> <pre class='cython code score-18 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_switch_out); __pyx_t_1 = __pyx_v_switch_out; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_1, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 63, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">64</span>: return _greenlet_switch(self) # pylint:disable=undefined-variable</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = __pyx_f_6gevent_21__greenlet_primitives__greenlet_switch(((PyGreenlet *)__pyx_v_self));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">65</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">66</span>: def switch_out(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_3switch_out(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch_out(CYTHON_UNUSED struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("switch_out", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_switch_out);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_3switch_out)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 66, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch_out", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_3switch_out(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_2switch_out[] = "SwitchOutGreenletWithLoop.switch_out(self)"; static PyMethodDef __pyx_mdef_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_3switch_out = {"switch_out", (PyCFunction)__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_3switch_out, METH_NOARGS, __pyx_doc_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_2switch_out}; static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_3switch_out(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("switch_out (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_2switch_out(((struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_2switch_out(struct __pyx_obj_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("switch_out", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch_out(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch_out", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__4 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 66, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__4); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__4); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_3switch_out, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SwitchOutGreenletWithLoop_switch_2, NULL, __pyx_n_s_gevent___greenlet_primitives, __pyx_d, ((PyObject *)__pyx_codeobj__5));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop->tp_dict, __pyx_n_s_switch_out, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 66, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_21__greenlet_primitives_SwitchOutGreenletWithLoop); __pyx_codeobj__5 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent__greenlet_primitives, __pyx_n_s_switch_out, 66, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 66, __pyx_L1_error)</span> </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">67</span>: raise BlockingSwitchOutError('Impossible to call blocking function in the event loop callback')</pre> <pre class='cython code score-18 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_21__greenlet_primitives_BlockingSwitchOutError); __pyx_t_2 = __pyx_v_6gevent_21__greenlet_primitives_BlockingSwitchOutError; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Impossible_to_call_blocking_func) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_kp_s_Impossible_to_call_blocking_func); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 67, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_1, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='error_goto'>__PYX_ERR(0, 67, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">68</span>: </pre> <pre class="cython line score-0"> <span class="">69</span>: </pre> <pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">70</span>: def get_reachable_greenlets():</pre> <pre class='cython code score-21 '>static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_1get_reachable_greenlets(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_21__greenlet_primitives_get_reachable_greenlets(CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_7genexpr__pyx_v_x = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_reachable_greenlets", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.get_reachable_greenlets", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_x); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_1get_reachable_greenlets(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_21__greenlet_primitives_get_reachable_greenlets[] = "get_reachable_greenlets() -> list"; static PyMethodDef __pyx_mdef_6gevent_21__greenlet_primitives_1get_reachable_greenlets = {"get_reachable_greenlets", (PyCFunction)__pyx_pw_6gevent_21__greenlet_primitives_1get_reachable_greenlets, METH_NOARGS, __pyx_doc_6gevent_21__greenlet_primitives_get_reachable_greenlets}; static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_1get_reachable_greenlets(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_reachable_greenlets (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_21__greenlet_primitives_get_reachable_greenlets(__pyx_self); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_21__greenlet_primitives_get_reachable_greenlets(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_reachable_greenlets", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_21__greenlet_primitives_get_reachable_greenlets(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent.__greenlet_primitives.get_reachable_greenlets", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_21__greenlet_primitives_1get_reachable_greenlets, 0, __pyx_n_s_get_reachable_greenlets, NULL, __pyx_n_s_gevent___greenlet_primitives, __pyx_d, ((PyObject *)__pyx_codeobj__6));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_get_reachable_greenlets, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 70, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; /* … */ __pyx_codeobj__6 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent__greenlet_primitives, __pyx_n_s_get_reachable_greenlets, 70, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 70, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">71</span>: # We compile this loop with Cython so that it's faster, and so that</pre> <pre class="cython line score-0"> <span class="">72</span>: # the GIL isn't dropped at unpredictable times during the loop.</pre> <pre class="cython line score-0"> <span class="">73</span>: # Dropping the GIL could lead to accessing partly constructed objects</pre> <pre class="cython line score-0"> <span class="">74</span>: # in undefined states (particularly, tuples). This helps close a hole</pre> <pre class="cython line score-0"> <span class="">75</span>: # where a `SystemError: Objects/tupleobject.c bad argument to internal function`</pre> <pre class="cython line score-0"> <span class="">76</span>: # could get raised. (Note that this probably doesn't completely close the hole,</pre> <pre class="cython line score-0"> <span class="">77</span>: # if other threads have dropped the GIL, but hopefully the speed makes that</pre> <pre class="cython line score-0"> <span class="">78</span>: # more rare.) See https://github.com/gevent/gevent/issues/1302</pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">79</span>: return [</pre> <pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); { /* enter inner scope */ __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L5_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); </pre><pre class="cython line score-65" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">80</span>: x for x in get_objects()</pre> <pre class='cython code score-65 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_21__greenlet_primitives_get_objects); __pyx_t_3 = __pyx_v_6gevent_21__greenlet_primitives_get_objects; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 80, __pyx_L5_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_2)) || <span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_3 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L5_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L5_error)</span> } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_3))) { if (__pyx_t_5 >= <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_3, __pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 80, __pyx_L5_error)</span> #else __pyx_t_2 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_3, __pyx_t_5); __pyx_t_5++;<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L5_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); #endif } else { if (__pyx_t_5 >= <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_t_3, __pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 80, __pyx_L5_error)</span> #else __pyx_t_2 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_3, __pyx_t_5); __pyx_t_5++;<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L5_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = <span class='py_c_api'>PyErr_Occurred</span>(); if (exc_type) { if (likely(<span class='pyx_c_api'>__Pyx_PyErr_GivenExceptionMatches</span>(exc_type, PyExc_StopIteration))) <span class='py_c_api'>PyErr_Clear</span>(); else <span class='error_goto'>__PYX_ERR(0, 80, __pyx_L5_error)</span> } break; } <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); } <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_7genexpr__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; /* … */ if (unlikely(<span class='pyx_c_api'>__Pyx_ListComp_Append</span>(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_x))) <span class='error_goto'>__PYX_ERR(0, 79, __pyx_L5_error)</span> /* … */ } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; goto __pyx_L11_exit_scope; __pyx_L5_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; goto __pyx_L1_error; __pyx_L11_exit_scope:; } /* exit inner scope */ __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">81</span>: if isinstance(x, greenlet) and not getattr(x, 'greenlet_tree_is_ignored', False)</pre> <pre class='cython code score-5 '> __pyx_t_8 = <span class='pyx_c_api'>__Pyx_TypeCheck</span>(__pyx_7genexpr__pyx_v_x, __pyx_ptype_6gevent_21__greenlet_primitives_greenlet); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { } else { __pyx_t_7 = __pyx_t_9; goto __pyx_L9_bool_binop_done; } __pyx_t_2 = __Pyx_GetAttr3(__pyx_7genexpr__pyx_v_x, __pyx_n_s_greenlet_tree_is_ignored, Py_False);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L5_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) <span class='error_goto'>__PYX_ERR(0, 81, __pyx_L5_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); __pyx_t_7 = __pyx_t_8; __pyx_L9_bool_binop_done:; if (__pyx_t_7) { /* … */ } </pre><pre class="cython line score-0"> <span class="">82</span>: ]</pre> <pre class="cython line score-0"> <span class="">83</span>: </pre> <pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">84</span>: def _init():</pre> <pre class='cython code score-9 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_3_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_21__greenlet_primitives_2_init[] = "_init()"; static PyMethodDef __pyx_mdef_6gevent_21__greenlet_primitives_3_init = {"_init", (PyCFunction)__pyx_pw_6gevent_21__greenlet_primitives_3_init, METH_NOARGS, __pyx_doc_6gevent_21__greenlet_primitives_2_init}; static PyObject *__pyx_pw_6gevent_21__greenlet_primitives_3_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_init (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_21__greenlet_primitives_2_init(__pyx_self); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_21__greenlet_primitives_2_init(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_init", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_21__greenlet_primitives_3_init, 0, __pyx_n_s_init_2, NULL, __pyx_n_s_gevent___greenlet_primitives, __pyx_d, ((PyObject *)__pyx_codeobj__7));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_init_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 84, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">85</span>: greenlet_init() # pylint:disable=undefined-variable</pre> <pre class='cython code score-0 '> __pyx_f_6gevent_21__greenlet_primitives_greenlet_init(); </pre><pre class="cython line score-0"> <span class="">86</span>: </pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">87</span>: _init()</pre> <pre class='cython code score-6 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_init_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">88</span>: </pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">89</span>: from gevent._util import import_c_accel</pre> <pre class='cython code score-19 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_import_c_accel); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_import_c_accel); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_import_c_accel); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__util, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_import_c_accel);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_import_c_accel, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 89, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">90</span>: import_c_accel(globals(), 'gevent.__greenlet_primitives')</pre> <pre class='cython code score-17 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_import_c_accel);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_gevent___greenlet_primitives); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_gevent___greenlet_primitives); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 1, __pyx_n_s_gevent___greenlet_primitives); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_3, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre></div></body></html>