| <!DOCTYPE html> |
| <!-- Generated by Cython 3.1.4 --> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <title>Cython: decoder_fast.pyx</title> |
| <style type="text/css"> |
| |
| body.cython { font-family: courier; font-size: 12; } |
| |
| .cython.tag { } |
| .cython.line { color: #000000; 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 3.1.4</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="decoder_fast.c">decoder_fast.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="">001</span>: # Licensed to the Apache Software Foundation (ASF) under one</pre> |
| <pre class='cython code score-8 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| </pre><pre class="cython line score-0"> <span class="">002</span>: # or more contributor license agreements. See the NOTICE file</pre> |
| <pre class="cython line score-0"> <span class="">003</span>: # distributed with this work for additional information</pre> |
| <pre class="cython line score-0"> <span class="">004</span>: # regarding copyright ownership. The ASF licenses this file</pre> |
| <pre class="cython line score-0"> <span class="">005</span>: # to you under the Apache License, Version 2.0 (the</pre> |
| <pre class="cython line score-0"> <span class="">006</span>: # "License"); you may not use this file except in compliance</pre> |
| <pre class="cython line score-0"> <span class="">007</span>: # with the License. You may obtain a copy of the License at</pre> |
| <pre class="cython line score-0"> <span class="">008</span>: #</pre> |
| <pre class="cython line score-0"> <span class="">009</span>: # http://www.apache.org/licenses/LICENSE-2.0</pre> |
| <pre class="cython line score-0"> <span class="">010</span>: #</pre> |
| <pre class="cython line score-0"> <span class="">011</span>: # Unless required by applicable law or agreed to in writing,</pre> |
| <pre class="cython line score-0"> <span class="">012</span>: # software distributed under the License is distributed on an</pre> |
| <pre class="cython line score-0"> <span class="">013</span>: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</pre> |
| <pre class="cython line score-0"> <span class="">014</span>: # KIND, either express or implied. See the License for the</pre> |
| <pre class="cython line score-0"> <span class="">015</span>: # specific language governing permissions and limitations</pre> |
| <pre class="cython line score-0"> <span class="">016</span>: # under the License.</pre> |
| <pre class="cython line score-0"> <span class="">017</span>: import cython</pre> |
| <pre class="cython line score-0"> <span class="">018</span>: from cython.cimports.cpython import array</pre> |
| <pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">019</span>: from pyiceberg.avro import STRUCT_DOUBLE, STRUCT_FLOAT</pre> |
| <pre class='cython code score-22 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyList_Pack</span>(2, __pyx_mstate_global->__pyx_n_u_STRUCT_DOUBLE, __pyx_mstate_global->__pyx_n_u_STRUCT_FLOAT);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_mstate_global->__pyx_n_u_pyiceberg_avro, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| <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_3, __pyx_mstate_global->__pyx_n_u_STRUCT_DOUBLE);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_STRUCT_DOUBLE, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 19, __pyx_L1_error)</span> |
| <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_3, __pyx_mstate_global->__pyx_n_u_STRUCT_FLOAT);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_STRUCT_FLOAT, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 19, __pyx_L1_error)</span> |
| <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; |
| </pre><pre class="cython line score-0"> <span class="">020</span>: from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free</pre> |
| <pre class="cython line score-0"> <span class="">021</span>: from libc.string cimport memcpy</pre> |
| <pre class="cython line score-0"> <span class="">022</span>: from libc.stdint cimport uint64_t, int64_t</pre> |
| <pre class="cython line score-0"> <span class="">023</span>: </pre> |
| <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">024</span>: import array</pre> |
| <pre class='cython code score-8 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportDottedModule</span>(__pyx_mstate_global->__pyx_n_u_array, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_array, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 24, __pyx_L1_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="">025</span>: </pre> |
| <pre class="cython line score-0"> <span class="">026</span>: </pre> |
| <pre class="cython line score-0"> <span class="">027</span>: cdef extern from "decoder_basic.c":</pre> |
| <pre class="cython line score-0"> <span class="">028</span>: void decode_zigzag_ints(const unsigned char **buffer, const uint64_t count, uint64_t *result);</pre> |
| <pre class="cython line score-0"> <span class="">029</span>: void skip_zigzag_int(const unsigned char **buffer);</pre> |
| <pre class="cython line score-0"> <span class="">030</span>: </pre> |
| <pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">031</span>: unsigned_long_long_array_template = cython.declare(array.array, array.array('Q', []))</pre> |
| <pre class='cython code score-12 '> __pyx_t_2 = NULL; |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_5array_array); |
| __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_5array_array); |
| __pyx_t_5 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); |
| __pyx_t_6 = 1; |
| { |
| PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Q, __pyx_t_5}; |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; |
| <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_4); __pyx_t_4 = 0; |
| if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>((PyObject *)__pyx_t_3); |
| } |
| <span class='refnanny'>__Pyx_XGOTREF</span>((PyObject *)__pyx_v_9pyiceberg_4avro_12decoder_fast_unsigned_long_long_array_template); |
| <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_9pyiceberg_4avro_12decoder_fast_unsigned_long_long_array_template, ((arrayobject *)__pyx_t_3)); |
| <span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_t_3); |
| __pyx_t_3 = 0; |
| </pre><pre class="cython line score-0"> <span class="">032</span>: </pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">033</span>: @cython.final</pre> |
| <pre class='cython code score-0 '>struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder { |
| PyObject_HEAD |
| struct __pyx_vtabstruct_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_vtab; |
| unsigned char *_data; |
| unsigned char const *_current; |
| unsigned char const *_end; |
| uint64_t _size; |
| }; |
| |
| |
| |
| struct __pyx_vtabstruct_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder { |
| unsigned int (*tell)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, int __pyx_skip_dispatch); |
| PyObject *(*read)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, PyObject *, int __pyx_skip_dispatch); |
| int64_t (*read_int)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, int __pyx_skip_dispatch); |
| void (*read_int_bytes_dict)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, PyObject *, PyObject *, int __pyx_skip_dispatch); |
| PyObject *(*read_bytes)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, int __pyx_skip_dispatch); |
| float (*read_float)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, int __pyx_skip_dispatch); |
| float (*read_double)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, int __pyx_skip_dispatch); |
| PyObject *(*read_utf8)(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *, int __pyx_skip_dispatch); |
| }; |
| static struct __pyx_vtabstruct_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_vtabptr_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder; |
| </pre><pre class="cython line score-0"> <span class="">034</span>: cdef class CythonBinaryDecoder:</pre> |
| <pre class="cython line score-0"> <span class="">035</span>: """Implement a BinaryDecoder that reads from an in-memory buffer."""</pre> |
| <pre class="cython line score-0"> <span class="">036</span>: </pre> |
| <pre class="cython line score-0"> <span class="">037</span>: # This the data that is duplicated when the decoder is created.</pre> |
| <pre class="cython line score-0"> <span class="">038</span>: cdef unsigned char *_data</pre> |
| <pre class="cython line score-0"> <span class="">039</span>: </pre> |
| <pre class="cython line score-0"> <span class="">040</span>: # This is the current pointer to the buffer.</pre> |
| <pre class="cython line score-0"> <span class="">041</span>: cdef const unsigned char *_current</pre> |
| <pre class="cython line score-0"> <span class="">042</span>: </pre> |
| <pre class="cython line score-0"> <span class="">043</span>: # This is the address after the data buffer</pre> |
| <pre class="cython line score-0"> <span class="">044</span>: cdef const unsigned char *_end</pre> |
| <pre class="cython line score-0"> <span class="">045</span>: </pre> |
| <pre class="cython line score-0"> <span class="">046</span>: # This is the size of the buffer of the data being parsed.</pre> |
| <pre class="cython line score-0"> <span class="">047</span>: cdef uint64_t _size</pre> |
| <pre class="cython line score-0"> <span class="">048</span>: </pre> |
| <pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">049</span>: def __cinit__(self, input_contents: bytes) -> None:</pre> |
| <pre class='cython code score-26 '>/* Python wrapper */ |
| static int __pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ |
| static int __pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { |
| PyObject *__pyx_v_input_contents = 0; |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| int __pyx_r; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__cinit__ (wrapper)", 0); |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs); |
| { |
| PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_input_contents,0}; |
| PyObject* values[1] = {0}; |
| const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_VARARGS</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len) < 0) <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L3_error)</span> |
| if (__pyx_kwds_len > 0) { |
| switch (__pyx_nargs) { |
| case 1: |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_VARARGS</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L3_error)</span> |
| CYTHON_FALLTHROUGH; |
| case 0: break; |
| default: goto __pyx_L5_argtuple_error; |
| } |
| const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| if (<span class='pyx_c_api'>__Pyx_ParseKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < 0) <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L3_error)</span> |
| for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { |
| if (unlikely(!values[i])) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__cinit__", 1, 1, 1, i); <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L3_error)</span> } |
| } |
| } else if (unlikely(__pyx_nargs != 1)) { |
| goto __pyx_L5_argtuple_error; |
| } else { |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_VARARGS</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L3_error)</span> |
| } |
| __pyx_v_input_contents = ((PyObject*)values[0]); |
| } |
| goto __pyx_L6_skip; |
| __pyx_L5_argtuple_error:; |
| <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__cinit__", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L3_error)</span> |
| __pyx_L6_skip:; |
| goto __pyx_L4_argument_unpacking_done; |
| __pyx_L3_error:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return -1; |
| __pyx_L4_argument_unpacking_done:; |
| if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_input_contents), (&PyBytes_Type), 0, "input_contents", 2))) <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L1_error)</span> |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder___cinit__(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self), __pyx_v_input_contents); |
| int __pyx_lineno = 0; |
| const char *__pyx_filename = NULL; |
| int __pyx_clineno = 0; |
| |
| /* function exit code */ |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| __pyx_r = -1; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| goto __pyx_L7_cleaned_up; |
| __pyx_L0:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| __pyx_L7_cleaned_up:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static int __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder___cinit__(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, PyObject *__pyx_v_input_contents) { |
| unsigned char const *__pyx_v_input_as_array; |
| int __pyx_r; |
| /* … */ |
| /* function exit code */ |
| __pyx_r = 0; |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| __pyx_r = -1; |
| __pyx_L0:; |
| return __pyx_r; |
| } |
| </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">050</span>: self._size = len(input_contents)</pre> |
| <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyBytes_GET_SIZE</span>(__pyx_v_input_contents);<span class='error_goto'> if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 50, __pyx_L1_error)</span> |
| __pyx_v_self->_size = __pyx_t_1; |
| </pre><pre class="cython line score-0"> <span class="">051</span>: </pre> |
| <pre class="cython line score-0"> <span class="">052</span>: # Make a copy of the data so the data can be iterated.</pre> |
| <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: self._data = <unsigned char *> PyMem_Malloc(self._size * sizeof(char))</pre> |
| <pre class='cython code score-5 '> __pyx_v_self->_data = ((unsigned char *)<span class='py_c_api'>PyMem_Malloc</span>((__pyx_v_self->_size * (sizeof(char))))); |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">054</span>: if not self._data:</pre> |
| <pre class='cython code score-0 '> __pyx_t_2 = (!(__pyx_v_self->_data != 0)); |
| if (unlikely(__pyx_t_2)) { |
| /* … */ |
| } |
| </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">055</span>: raise MemoryError()</pre> |
| <pre class='cython code score-5 '> <span class='py_c_api'>PyErr_NoMemory</span>(); <span class='error_goto'>__PYX_ERR(0, 55, __pyx_L1_error)</span> |
| </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: cdef const unsigned char *input_as_array = input_contents</pre> |
| <pre class='cython code score-7 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyBytes_AsUString</span>(__pyx_v_input_contents); if (unlikely((!__pyx_t_3) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span> |
| __pyx_v_input_as_array = __pyx_t_3; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">057</span>: memcpy(self._data, input_as_array, self._size)</pre> |
| <pre class='cython code score-0 '> (void)(memcpy(__pyx_v_self->_data, __pyx_v_input_as_array, __pyx_v_self->_size)); |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">058</span>: self._end = self._data + self._size</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_end = (__pyx_v_self->_data + __pyx_v_self->_size); |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">059</span>: self._current = self._data</pre> |
| <pre class='cython code score-0 '> __pyx_t_4 = __pyx_v_self->_data; |
| __pyx_v_self->_current = __pyx_t_4; |
| </pre><pre class="cython line score-0"> <span class="">060</span>: </pre> |
| <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">061</span>: def __dealloc__(self):</pre> |
| <pre class='cython code score-2 '>/* Python wrapper */ |
| static void __pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ |
| static void __pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_3__dealloc__(PyObject *__pyx_v_self) { |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__dealloc__ (wrapper)", 0); |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs); |
| __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_2__dealloc__(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| } |
| |
| static void __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_2__dealloc__(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| /* … */ |
| /* function exit code */ |
| } |
| </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">062</span>: PyMem_Free(self._data)</pre> |
| <pre class='cython code score-5 '> <span class='py_c_api'>PyMem_Free</span>(__pyx_v_self->_data); |
| </pre><pre class="cython line score-0"> <span class="">063</span>: </pre> |
| <pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">064</span>: cpdef unsigned int tell(self):</pre> |
| <pre class='cython code score-26 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_5tell(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static unsigned int __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_tell(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| unsigned int __pyx_r; |
| /* … */ |
| /* function exit code */ |
| __pyx_L0:; |
| return __pyx_r; |
| } |
| |
| /* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_5tell(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_4tell, "Return the current stream position."); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_5tell = {"tell", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_5tell, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_4tell}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_5tell(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("tell (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("tell", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("tell", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_4tell(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_4tell(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_tell(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error)</span> |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyLong_From_unsigned_int</span>(__pyx_t_1);<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; |
| |
| /* function exit code */ |
| __pyx_L1_error:; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.tell", __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_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_5tell, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_tell, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_tell, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 64, __pyx_L1_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="">065</span>: """Return the current stream position."""</pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">066</span>: return self._current - self._data</pre> |
| <pre class='cython code score-0 '> __pyx_r = (__pyx_v_self->_current - __pyx_v_self->_data); |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">067</span>: </pre> |
| <pre class="cython line score-57" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">068</span>: cpdef bytes read(self, n: int):</pre> |
| <pre class='cython code score-57 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_7read(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyObject *__pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, PyObject *__pyx_v_n, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| unsigned char const *__pyx_v_r; |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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_3); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read", __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_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_7read(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_6read, "Read n bytes."); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_7read = {"read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_7read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_6read}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_7read(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| PyObject *__pyx_v_n = 0; |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| { |
| PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0}; |
| PyObject* values[1] = {0}; |
| const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len) < 0) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> |
| if (__pyx_kwds_len > 0) { |
| switch (__pyx_nargs) { |
| case 1: |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> |
| CYTHON_FALLTHROUGH; |
| case 0: break; |
| default: goto __pyx_L5_argtuple_error; |
| } |
| const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| if (<span class='pyx_c_api'>__Pyx_ParseKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read", 0) < 0) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> |
| for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { |
| if (unlikely(!values[i])) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read", 1, 1, 1, i); <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> } |
| } |
| } else if (unlikely(__pyx_nargs != 1)) { |
| goto __pyx_L5_argtuple_error; |
| } else { |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> |
| } |
| __pyx_v_n = ((PyObject*)values[0]); |
| } |
| goto __pyx_L6_skip; |
| __pyx_L5_argtuple_error:; |
| <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> |
| __pyx_L6_skip:; |
| goto __pyx_L4_argument_unpacking_done; |
| __pyx_L3_error:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return NULL; |
| __pyx_L4_argument_unpacking_done:; |
| if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_n), (&PyLong_Type), 0, "n", 2))) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L1_error)</span> |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_6read(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self), __pyx_v_n); |
| int __pyx_lineno = 0; |
| const char *__pyx_filename = NULL; |
| int __pyx_clineno = 0; |
| |
| /* function exit code */ |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| __pyx_r = NULL; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| goto __pyx_L7_cleaned_up; |
| __pyx_L0:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| __pyx_L7_cleaned_up:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_6read(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, PyObject *__pyx_v_n) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| if (unlikely(__pyx_v_n == Py_None)) { |
| <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); |
| <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L1_error)</span> |
| } |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read(__pyx_v_self, __pyx_v_n, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read", __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_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_n, __pyx_mstate_global->__pyx_n_u_int) < 0) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L1_error)</span> |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_7read, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_4, __pyx_t_3); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| </pre><pre class="cython line score-0"> <span class="">069</span>: """Read n bytes."""</pre> |
| <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">070</span>: if n < 0:</pre> |
| <pre class='cython code score-8 '> __pyx_t_1 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_v_n, __pyx_mstate_global->__pyx_int_0, Py_LT); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)</span> |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely((__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_1); __pyx_t_1 = 0; |
| if (unlikely(__pyx_t_2)) { |
| /* … */ |
| } |
| </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">071</span>: raise ValueError(f"Requested {n} bytes to read, expected positive integer.")</pre> |
| <pre class='cython code score-18 '> __pyx_t_3 = NULL; |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_ValueError); |
| __pyx_t_4 = __pyx_builtin_ValueError; |
| __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_v_n, __pyx_mstate_global->__pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); |
| __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Requested; |
| __pyx_t_6[1] = __pyx_t_5; |
| __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_bytes_to_read_expected_positive; |
| __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyUnicode_Join</span>(__pyx_t_6, 3, 10 + <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5) + 42, 127 | <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5)); |
| if (unlikely(!__pyx_t_7)) <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; |
| __pyx_t_8 = 1; |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7}; |
| __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); |
| } |
| <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, 71, __pyx_L1_error)</span> |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">072</span>: cdef const unsigned char *r = self._current</pre> |
| <pre class='cython code score-0 '> __pyx_t_9 = __pyx_v_self->_current; |
| __pyx_v_r = __pyx_t_9; |
| </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">073</span>: self._current += n</pre> |
| <pre class='cython code score-7 '> __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_n); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L1_error)</span> |
| __pyx_v_self->_current = (__pyx_v_self->_current + __pyx_t_10); |
| </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">074</span>: return r[0:n]</pre> |
| <pre class='cython code score-12 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_n); |
| __pyx_t_11 = __pyx_v_n; |
| __pyx_t_2 = (__pyx_t_11 == ((PyObject*)Py_None)); |
| if (__pyx_t_2) { |
| __pyx_t_10 = PY_SSIZE_T_MAX; |
| } else { |
| __pyx_t_12 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_t_11); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 74, __pyx_L1_error)</span> |
| __pyx_t_10 = __pyx_t_12; |
| } |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; |
| __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyBytes_FromStringAndSize</span>(((char const *)__pyx_v_r) + 0, __pyx_t_10 - 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); |
| __pyx_r = ((PyObject*)__pyx_t_1); |
| __pyx_t_1 = 0; |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">075</span>: </pre> |
| <pre class="cython line score-33" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">076</span>: def read_boolean(self) -> bool:</pre> |
| <pre class='cython code score-33 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_9read_boolean(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_8read_boolean, "Reads a value from the stream as a boolean.\n\n A boolean is written as a single byte\n whose value is either 0 (false) or 1 (true).\n "); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_9read_boolean = {"read_boolean", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_9read_boolean, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_8read_boolean}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_9read_boolean(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_boolean (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_boolean", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("read_boolean", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_8read_boolean(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_8read_boolean(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_boolean", __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_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bool) < 0) <span class='error_goto'>__PYX_ERR(0, 76, __pyx_L1_error)</span> |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_9read_boolean, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_boolean, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_3, __pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_boolean, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 76, __pyx_L1_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="">077</span>: """Reads a value from the stream as a boolean.</pre> |
| <pre class="cython line score-0"> <span class="">078</span>: </pre> |
| <pre class="cython line score-0"> <span class="">079</span>: A boolean is written as a single byte</pre> |
| <pre class="cython line score-0"> <span class="">080</span>: whose value is either 0 (false) or 1 (true).</pre> |
| <pre class="cython line score-0"> <span class="">081</span>: """</pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">082</span>: self._current += 1;</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_current = (__pyx_v_self->_current + 1); |
| </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">083</span>: return self._current[-1] != 0</pre> |
| <pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>(((__pyx_v_self->_current[-1L]) != 0));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __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; |
| </pre><pre class="cython line score-0"> <span class="">084</span>: </pre> |
| <pre class="cython line score-29" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">085</span>: cpdef inline int64_t read_int(self):</pre> |
| <pre class='cython code score-29 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_11read_int(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static CYTHON_INLINE int64_t __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_int(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| uint64_t __pyx_v_result; |
| int64_t __pyx_r; |
| /* … */ |
| /* function exit code */ |
| __pyx_L1_error:; |
| <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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_int", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| __pyx_r = 0; |
| __pyx_L0:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| /* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_11read_int(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_10read_int, "Reads a value from the stream as an integer.\n\n int/long values are written using variable-length, zigzag coding.\n "); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_11read_int = {"read_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_11read_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_10read_int}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_11read_int(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_int (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_int", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("read_int", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_10read_int(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_10read_int(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_int(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error)</span> |
| __pyx_t_2 = __Pyx_PyLong_From_int64_t(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __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; |
| |
| /* function exit code */ |
| __pyx_L1_error:; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_int", __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_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_11read_int, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_int, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_int, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 85, __pyx_L1_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="">086</span>: """Reads a value from the stream as an integer.</pre> |
| <pre class="cython line score-0"> <span class="">087</span>: </pre> |
| <pre class="cython line score-0"> <span class="">088</span>: int/long values are written using variable-length, zigzag coding.</pre> |
| <pre class="cython line score-0"> <span class="">089</span>: """</pre> |
| <pre class="cython line score-0"> <span class="">090</span>: cdef uint64_t result;</pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">091</span>: if self._current >= self._end:</pre> |
| <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_current >= __pyx_v_self->_end); |
| if (unlikely(__pyx_t_1)) { |
| /* … */ |
| } |
| </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">092</span>: raise EOFError(f"EOF: read 1 bytes")</pre> |
| <pre class='cython code score-8 '> __pyx_t_3 = NULL; |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_EOFError); |
| __pyx_t_4 = __pyx_builtin_EOFError; |
| __pyx_t_5 = 1; |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_EOF_read_1_bytes}; |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 92, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| } |
| <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; |
| <span class='error_goto'>__PYX_ERR(0, 92, __pyx_L1_error)</span> |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">093</span>: decode_zigzag_ints(&self._current, 1, &result)</pre> |
| <pre class='cython code score-0 '> decode_zigzag_ints((&__pyx_v_self->_current), 1, (&__pyx_v_result)); |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">094</span>: return result</pre> |
| <pre class='cython code score-0 '> __pyx_r = __pyx_v_result; |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">095</span>: </pre> |
| <pre class="cython line score-51" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">096</span>: def read_ints(self, count: int) -> array.array[int]:</pre> |
| <pre class='cython code score-51 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_13read_ints(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_12read_ints, "Reads a list of integers."); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_13read_ints = {"read_ints", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_13read_ints, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_12read_ints}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_13read_ints(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| PyObject *__pyx_v_count = 0; |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_ints (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| { |
| PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_count,0}; |
| PyObject* values[1] = {0}; |
| const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len) < 0) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> |
| if (__pyx_kwds_len > 0) { |
| switch (__pyx_nargs) { |
| case 1: |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> |
| CYTHON_FALLTHROUGH; |
| case 0: break; |
| default: goto __pyx_L5_argtuple_error; |
| } |
| const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| if (<span class='pyx_c_api'>__Pyx_ParseKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_ints", 0) < 0) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> |
| for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { |
| if (unlikely(!values[i])) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_ints", 1, 1, 1, i); <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> } |
| } |
| } else if (unlikely(__pyx_nargs != 1)) { |
| goto __pyx_L5_argtuple_error; |
| } else { |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> |
| } |
| __pyx_v_count = ((PyObject*)values[0]); |
| } |
| goto __pyx_L6_skip; |
| __pyx_L5_argtuple_error:; |
| <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_ints", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> |
| __pyx_L6_skip:; |
| goto __pyx_L4_argument_unpacking_done; |
| __pyx_L3_error:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_ints", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return NULL; |
| __pyx_L4_argument_unpacking_done:; |
| if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_count), (&PyLong_Type), 0, "count", 2))) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L1_error)</span> |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_12read_ints(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self), __pyx_v_count); |
| int __pyx_lineno = 0; |
| const char *__pyx_filename = NULL; |
| int __pyx_clineno = 0; |
| |
| /* function exit code */ |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| __pyx_r = NULL; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| goto __pyx_L7_cleaned_up; |
| __pyx_L0:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| __pyx_L7_cleaned_up:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_12read_ints(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, PyObject *__pyx_v_count) { |
| arrayobject *__pyx_v_newarray = NULL; |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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_3); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_ints", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| __pyx_r = NULL; |
| __pyx_L0:; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_newarray); |
| <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| /* … */ |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_count, __pyx_mstate_global->__pyx_n_u_int) < 0) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L1_error)</span> |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_array_array_int) < 0) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L1_error)</span> |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_13read_ints, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_ints, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_4, __pyx_t_3); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_ints, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| </pre><pre class="cython line score-0"> <span class="">097</span>: """Reads a list of integers."""</pre> |
| <pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">098</span>: newarray = array.clone(unsigned_long_long_array_template, count, zero=False)</pre> |
| <pre class='cython code score-9 '> __pyx_t_1 = ((PyObject *)__pyx_v_9pyiceberg_4avro_12decoder_fast_unsigned_long_long_array_template); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 98, __pyx_L1_error)</span> |
| __pyx_t_3 = ((PyObject *)__pyx_f_7cpython_5array_clone(((arrayobject *)__pyx_t_1), __pyx_t_2, 0));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; |
| __pyx_v_newarray = ((arrayobject *)__pyx_t_3); |
| __pyx_t_3 = 0; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">099</span>: if self._current >= self._end:</pre> |
| <pre class='cython code score-0 '> __pyx_t_4 = (__pyx_v_self->_current >= __pyx_v_self->_end); |
| if (unlikely(__pyx_t_4)) { |
| /* … */ |
| } |
| </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">100</span>: raise EOFError(f"EOF: read 1 bytes")</pre> |
| <pre class='cython code score-8 '> __pyx_t_1 = NULL; |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_EOFError); |
| __pyx_t_5 = __pyx_builtin_EOFError; |
| __pyx_t_6 = 1; |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_EOF_read_1_bytes}; |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; |
| if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 100, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| } |
| <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_3, 0, 0, 0); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| <span class='error_goto'>__PYX_ERR(0, 100, __pyx_L1_error)</span> |
| </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">101</span>: decode_zigzag_ints(&self._current, count, <uint64_t *>newarray.data.as_ulonglongs)</pre> |
| <pre class='cython code score-5 '> __pyx_t_7 = __Pyx_PyLong_As_uint64_t(__pyx_v_count); if (unlikely((__pyx_t_7 == ((uint64_t)-1)) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L1_error)</span> |
| decode_zigzag_ints((&__pyx_v_self->_current), __pyx_t_7, ((uint64_t *)__pyx_v_newarray->data.as_ulonglongs)); |
| </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">102</span>: return newarray</pre> |
| <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_v_newarray); |
| __pyx_r = ((PyObject *)__pyx_v_newarray); |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">103</span>: </pre> |
| <pre class="cython line score-64" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">104</span>: cpdef void read_int_bytes_dict(self, count: int, dest: Dict[int, bytes]):</pre> |
| <pre class='cython code score-64 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_15read_int_bytes_dict(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static void __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_int_bytes_dict(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, PyObject *__pyx_v_count, PyObject *__pyx_v_dest, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| uint64_t __pyx_v_result[2]; |
| CYTHON_UNUSED PyObject *__pyx_v__ = NULL; |
| /* … */ |
| /* function exit code */ |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| <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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_int_bytes_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| __pyx_L0:; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v__); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| } |
| |
| /* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_15read_int_bytes_dict(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_14read_int_bytes_dict, "Reads a dictionary of integers for keys and bytes for values into a destination dict."); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_15read_int_bytes_dict = {"read_int_bytes_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_15read_int_bytes_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_14read_int_bytes_dict}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_15read_int_bytes_dict(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| PyObject *__pyx_v_count = 0; |
| PyObject *__pyx_v_dest = 0; |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_int_bytes_dict (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| { |
| PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_count,&__pyx_mstate_global->__pyx_n_u_dest,0}; |
| PyObject* values[2] = {0,0}; |
| const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len) < 0) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> |
| if (__pyx_kwds_len > 0) { |
| switch (__pyx_nargs) { |
| case 2: |
| values[1] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 1); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> |
| CYTHON_FALLTHROUGH; |
| case 1: |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> |
| CYTHON_FALLTHROUGH; |
| case 0: break; |
| default: goto __pyx_L5_argtuple_error; |
| } |
| const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| if (<span class='pyx_c_api'>__Pyx_ParseKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_int_bytes_dict", 0) < 0) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> |
| for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { |
| if (unlikely(!values[i])) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_int_bytes_dict", 1, 2, 2, i); <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> } |
| } |
| } else if (unlikely(__pyx_nargs != 2)) { |
| goto __pyx_L5_argtuple_error; |
| } else { |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> |
| values[1] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 1); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> |
| } |
| __pyx_v_count = ((PyObject*)values[0]); |
| __pyx_v_dest = values[1]; |
| } |
| goto __pyx_L6_skip; |
| __pyx_L5_argtuple_error:; |
| <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_int_bytes_dict", 1, 2, 2, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span> |
| __pyx_L6_skip:; |
| goto __pyx_L4_argument_unpacking_done; |
| __pyx_L3_error:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_int_bytes_dict", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return NULL; |
| __pyx_L4_argument_unpacking_done:; |
| if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_count), (&PyLong_Type), 0, "count", 2))) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L1_error)</span> |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_14read_int_bytes_dict(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self), __pyx_v_count, __pyx_v_dest); |
| int __pyx_lineno = 0; |
| const char *__pyx_filename = NULL; |
| int __pyx_clineno = 0; |
| |
| /* function exit code */ |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| __pyx_r = NULL; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| goto __pyx_L7_cleaned_up; |
| __pyx_L0:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| __pyx_L7_cleaned_up:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_14read_int_bytes_dict(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, PyObject *__pyx_v_count, PyObject *__pyx_v_dest) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| if (unlikely(__pyx_v_count == Py_None)) { |
| <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); |
| <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L1_error)</span> |
| } |
| __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_int_bytes_dict(__pyx_v_self, __pyx_v_count, __pyx_v_dest, 1);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error)</span> |
| __pyx_t_1 = __Pyx_void_to_None(NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_int_bytes_dict", __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_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_count, __pyx_mstate_global->__pyx_n_u_int) < 0) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L1_error)</span> |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dest, __pyx_mstate_global->__pyx_kp_u_Dict_int_bytes) < 0) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L1_error)</span> |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_15read_int_bytes_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_int_byt, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_3, __pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_int_bytes_dict, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L1_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="">105</span>: """Reads a dictionary of integers for keys and bytes for values into a destination dict."""</pre> |
| <pre class="cython line score-0"> <span class="">106</span>: cdef uint64_t result[2];</pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">107</span>: if self._current >= self._end:</pre> |
| <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_current >= __pyx_v_self->_end); |
| if (unlikely(__pyx_t_1)) { |
| /* … */ |
| } |
| </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">108</span>: raise EOFError(f"EOF: read 1 bytes")</pre> |
| <pre class='cython code score-8 '> __pyx_t_3 = NULL; |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_EOFError); |
| __pyx_t_4 = __pyx_builtin_EOFError; |
| __pyx_t_5 = 1; |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_EOF_read_1_bytes}; |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 108, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| } |
| <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; |
| <span class='error_goto'>__PYX_ERR(0, 108, __pyx_L1_error)</span> |
| </pre><pre class="cython line score-0"> <span class="">109</span>: </pre> |
| <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">110</span>: for _ in range(count):</pre> |
| <pre class='cython code score-61 '> __pyx_t_4 = NULL; |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_range); |
| __pyx_t_3 = __pyx_builtin_range; |
| __pyx_t_5 = 1; |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_count}; |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 110, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| } |
| 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_6 = 0; |
| __pyx_t_7 = NULL; |
| } else { |
| __pyx_t_6 = -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, 110, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : <span class='pyx_c_api'>__Pyx_PyObject_GetIterNextFunc</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error)</span> |
| } |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; |
| for (;;) { |
| if (likely(!__pyx_t_7)) { |
| if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_3))) { |
| { |
| Py_ssize_t __pyx_temp = <span class='pyx_c_api'>__Pyx_PyList_GET_SIZE</span>(__pyx_t_3); |
| #if !CYTHON_ASSUME_SAFE_SIZE |
| if (unlikely((__pyx_temp < 0))) <span class='error_goto'>__PYX_ERR(0, 110, __pyx_L1_error)</span> |
| #endif |
| if (__pyx_t_6 >= __pyx_temp) break; |
| } |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyList_GetItemRef</span>(__pyx_t_3, __pyx_t_6); |
| ++__pyx_t_6; |
| } else { |
| { |
| Py_ssize_t __pyx_temp = <span class='pyx_c_api'>__Pyx_PyTuple_GET_SIZE</span>(__pyx_t_3); |
| #if !CYTHON_ASSUME_SAFE_SIZE |
| if (unlikely((__pyx_temp < 0))) <span class='error_goto'>__PYX_ERR(0, 110, __pyx_L1_error)</span> |
| #endif |
| if (__pyx_t_6 >= __pyx_temp) break; |
| } |
| #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_NewRef</span>(<span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_t_3, __pyx_t_6)); |
| #else |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PySequence_ITEM</span>(__pyx_t_3, __pyx_t_6); |
| #endif |
| ++__pyx_t_6; |
| } |
| if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 110, __pyx_L1_error)</span> |
| } else { |
| __pyx_t_2 = __pyx_t_7(__pyx_t_3); |
| if (unlikely(!__pyx_t_2)) { |
| PyObject* exc_type = <span class='py_c_api'>PyErr_Occurred</span>(); |
| if (exc_type) { |
| if (unlikely(!<span class='pyx_c_api'>__Pyx_PyErr_GivenExceptionMatches</span>(exc_type, PyExc_StopIteration))) <span class='error_goto'>__PYX_ERR(0, 110, __pyx_L1_error)</span> |
| <span class='py_c_api'>PyErr_Clear</span>(); |
| } |
| break; |
| } |
| } |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| if (!(likely(<span class='py_c_api'>PyLong_CheckExact</span>(__pyx_t_2))||((__pyx_t_2) == Py_None) || <span class='pyx_c_api'>__Pyx_RaiseUnexpectedTypeError</span>("int", __pyx_t_2))) <span class='error_goto'>__PYX_ERR(0, 110, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v__, ((PyObject*)__pyx_t_2)); |
| __pyx_t_2 = 0; |
| /* … */ |
| } |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">111</span>: decode_zigzag_ints(&self._current, 2, <uint64_t *>&result)</pre> |
| <pre class='cython code score-0 '> decode_zigzag_ints((&__pyx_v_self->_current), 2, ((uint64_t *)(&__pyx_v_result))); |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">112</span>: if result[1] <= 0:</pre> |
| <pre class='cython code score-0 '> __pyx_t_1 = ((__pyx_v_result[1]) <= 0); |
| if (__pyx_t_1) { |
| /* … */ |
| goto __pyx_L6; |
| } |
| </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">113</span>: dest[result[0]] = b""</pre> |
| <pre class='cython code score-2 '> if (unlikely((<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest, (__pyx_v_result[0]), __pyx_mstate_global->__pyx_kp_b_, uint64_t, 0, __Pyx_PyLong_From_uint64_t, 0, 0, 1, 1) < 0))) <span class='error_goto'>__PYX_ERR(0, 113, __pyx_L1_error)</span> |
| </pre><pre class="cython line score-0"> <span class="">114</span>: else:</pre> |
| <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">115</span>: dest[result[0]] = self._current[0:result[1]]</pre> |
| <pre class='cython code score-5 '> /*else*/ { |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyBytes_FromStringAndSize</span>(((char const *)__pyx_v_self->_current) + 0, (__pyx_v_result[1]) - 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| if (unlikely((<span class='pyx_c_api'>__Pyx_SetItemInt</span>(__pyx_v_dest, (__pyx_v_result[0]), __pyx_t_2, uint64_t, 0, __Pyx_PyLong_From_uint64_t, 0, 0, 1, 1) < 0))) <span class='error_goto'>__PYX_ERR(0, 115, __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="">116</span>: self._current += result[1]</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_current = (__pyx_v_self->_current + (__pyx_v_result[1])); |
| } |
| __pyx_L6:; |
| </pre><pre class="cython line score-0"> <span class="">117</span>: </pre> |
| <pre class="cython line score-29" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">118</span>: cpdef inline bytes read_bytes(self):</pre> |
| <pre class='cython code score-29 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_17read_bytes(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static CYTHON_INLINE PyObject *__pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_bytes(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| uint64_t __pyx_v_length; |
| unsigned char const *__pyx_v_r; |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* function exit code */ |
| __pyx_L1_error:; |
| <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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_bytes", __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_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_17read_bytes(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_16read_bytes, "Bytes are encoded as a long followed by that many bytes of data."); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_17read_bytes = {"read_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_17read_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_16read_bytes}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_17read_bytes(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_bytes (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_bytes", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("read_bytes", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_16read_bytes(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_16read_bytes(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_bytes(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_bytes", __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_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_17read_bytes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_bytes, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_bytes, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 118, __pyx_L1_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="">119</span>: """Bytes are encoded as a long followed by that many bytes of data."""</pre> |
| <pre class="cython line score-0"> <span class="">120</span>: cdef uint64_t length;</pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">121</span>: if self._current >= self._end:</pre> |
| <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_current >= __pyx_v_self->_end); |
| if (unlikely(__pyx_t_1)) { |
| /* … */ |
| } |
| </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">122</span>: raise EOFError(f"EOF: read 1 bytes")</pre> |
| <pre class='cython code score-8 '> __pyx_t_3 = NULL; |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_builtin_EOFError); |
| __pyx_t_4 = __pyx_builtin_EOFError; |
| __pyx_t_5 = 1; |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_EOF_read_1_bytes}; |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 122, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| } |
| <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; |
| <span class='error_goto'>__PYX_ERR(0, 122, __pyx_L1_error)</span> |
| </pre><pre class="cython line score-0"> <span class="">123</span>: </pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">124</span>: decode_zigzag_ints(&self._current, 1, &length)</pre> |
| <pre class='cython code score-0 '> decode_zigzag_ints((&__pyx_v_self->_current), 1, (&__pyx_v_length)); |
| </pre><pre class="cython line score-0"> <span class="">125</span>: </pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">126</span>: if length <= 0:</pre> |
| <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_length <= 0); |
| if (__pyx_t_1) { |
| /* … */ |
| } |
| </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">127</span>: return b""</pre> |
| <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_mstate_global->__pyx_kp_b_); |
| __pyx_r = __pyx_mstate_global->__pyx_kp_b_; |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">128</span>: cdef const unsigned char *r = self._current</pre> |
| <pre class='cython code score-0 '> __pyx_t_6 = __pyx_v_self->_current; |
| __pyx_v_r = __pyx_t_6; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">129</span>: self._current += length</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_current = (__pyx_v_self->_current + __pyx_v_length); |
| </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">130</span>: return r[0:length]</pre> |
| <pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyBytes_FromStringAndSize</span>(((char const *)__pyx_v_r) + 0, __pyx_v_length - 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); |
| __pyx_r = ((PyObject*)__pyx_t_2); |
| __pyx_t_2 = 0; |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">131</span>: </pre> |
| <pre class="cython line score-35" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">132</span>: cpdef float read_float(self):</pre> |
| <pre class='cython code score-35 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_19read_float(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static float __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_float(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| float __pyx_r; |
| /* … */ |
| /* 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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_float", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| __pyx_r = 0; |
| __pyx_L0:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| /* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_19read_float(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_18read_float, "Reads a value from the stream as a float.\n\n A float is written as 4 bytes.\n The float is converted into a 32-bit integer using a method equivalent to\n Java's floatToIntBits and then encoded in little-endian format.\n "); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_19read_float = {"read_float", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_19read_float, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_18read_float}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_19read_float(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_float (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_float", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("read_float", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_18read_float(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_18read_float(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_float(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L1_error)</span> |
| __pyx_t_2 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __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; |
| |
| /* function exit code */ |
| __pyx_L1_error:; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_float", __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_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_19read_float, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_float, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_float, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 132, __pyx_L1_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="">133</span>: """Reads a value from the stream as a float.</pre> |
| <pre class="cython line score-0"> <span class="">134</span>: </pre> |
| <pre class="cython line score-0"> <span class="">135</span>: A float is written as 4 bytes.</pre> |
| <pre class="cython line score-0"> <span class="">136</span>: The float is converted into a 32-bit integer using a method equivalent to</pre> |
| <pre class="cython line score-0"> <span class="">137</span>: Java's floatToIntBits and then encoded in little-endian format.</pre> |
| <pre class="cython line score-0"> <span class="">138</span>: """</pre> |
| <pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">139</span>: return float(STRUCT_FLOAT.unpack(self.read(4))[0])</pre> |
| <pre class='cython code score-31 '> __pyx_t_2 = NULL; |
| <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_STRUCT_FLOAT);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_unpack);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| __pyx_t_3 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read(__pyx_v_self, __pyx_mstate_global->__pyx_int_4, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| __pyx_t_5 = 1; |
| #if CYTHON_UNPACK_METHODS |
| if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { |
| __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); |
| assert(__pyx_t_2); |
| PyObject* __pyx__function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx__function); |
| <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, __pyx__function); |
| __pyx_t_5 = 0; |
| } |
| #endif |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; |
| __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</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_4); __pyx_t_4 = 0; |
| if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 139, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); |
| } |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; |
| __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_AsDouble</span>(__pyx_t_4); if (unlikely(__pyx_t_6 == ((double)((double)-1)) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 139, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| __pyx_r = __pyx_t_6; |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">140</span>: </pre> |
| <pre class="cython line score-35" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">141</span>: cpdef float read_double(self):</pre> |
| <pre class='cython code score-35 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_21read_double(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static float __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_double(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| float __pyx_r; |
| /* … */ |
| /* 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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_double", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| __pyx_r = 0; |
| __pyx_L0:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| /* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_21read_double(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_20read_double, "Reads a value from the stream as a double.\n\n A double is written as 8 bytes.\n The double is converted into a 64-bit integer using a method equivalent to\n Java's doubleToLongBits and then encoded in little-endian format.\n "); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_21read_double = {"read_double", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_21read_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_20read_double}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_21read_double(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_double (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_double", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("read_double", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_20read_double(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_20read_double(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_double(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)</span> |
| __pyx_t_2 = <span class='py_c_api'>PyFloat_FromDouble</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __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; |
| |
| /* function exit code */ |
| __pyx_L1_error:; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_double", __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_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_21read_double, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_double, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_double, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 141, __pyx_L1_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="">142</span>: """Reads a value from the stream as a double.</pre> |
| <pre class="cython line score-0"> <span class="">143</span>: </pre> |
| <pre class="cython line score-0"> <span class="">144</span>: A double is written as 8 bytes.</pre> |
| <pre class="cython line score-0"> <span class="">145</span>: The double is converted into a 64-bit integer using a method equivalent to</pre> |
| <pre class="cython line score-0"> <span class="">146</span>: Java's doubleToLongBits and then encoded in little-endian format.</pre> |
| <pre class="cython line score-0"> <span class="">147</span>: """</pre> |
| <pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">148</span>: return float(STRUCT_DOUBLE.unpack(self.read(8))[0])</pre> |
| <pre class='cython code score-31 '> __pyx_t_2 = NULL; |
| <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_STRUCT_DOUBLE);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_unpack);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| __pyx_t_3 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read(__pyx_v_self, __pyx_mstate_global->__pyx_int_8, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| __pyx_t_5 = 1; |
| #if CYTHON_UNPACK_METHODS |
| if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { |
| __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); |
| assert(__pyx_t_2); |
| PyObject* __pyx__function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx__function); |
| <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, __pyx__function); |
| __pyx_t_5 = 0; |
| } |
| #endif |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; |
| __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</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_4); __pyx_t_4 = 0; |
| if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 148, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); |
| } |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; |
| __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_AsDouble</span>(__pyx_t_4); if (unlikely(__pyx_t_6 == ((double)((double)-1)) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 148, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| __pyx_r = __pyx_t_6; |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">149</span>: </pre> |
| <pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">150</span>: cpdef str read_utf8(self):</pre> |
| <pre class='cython code score-28 '>static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_23read_utf8(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyObject *__pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_utf8(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_utf8", __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_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_23read_utf8(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| <span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_22read_utf8, "Reads a utf-8 encoded string from the stream.\n\n A string is encoded as a long followed by\n that many bytes of UTF-8 encoded character data.\n "); |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_23read_utf8 = {"read_utf8", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_23read_utf8, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_22read_utf8}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_23read_utf8(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("read_utf8 (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("read_utf8", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("read_utf8", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_22read_utf8(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_22read_utf8(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_utf8(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __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>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.read_utf8", __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_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_23read_utf8, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_read_utf8, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_read_utf8, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 150, __pyx_L1_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="">151</span>: """Reads a utf-8 encoded string from the stream.</pre> |
| <pre class="cython line score-0"> <span class="">152</span>: </pre> |
| <pre class="cython line score-0"> <span class="">153</span>: A string is encoded as a long followed by</pre> |
| <pre class="cython line score-0"> <span class="">154</span>: that many bytes of UTF-8 encoded character data.</pre> |
| <pre class="cython line score-0"> <span class="">155</span>: """</pre> |
| <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">156</span>: return self.read_bytes().decode("utf-8")</pre> |
| <pre class='cython code score-7 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); |
| __pyx_t_1 = __pyx_f_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_read_bytes(__pyx_v_self, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); |
| if (unlikely(__pyx_t_1 == Py_None)) { |
| <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); |
| <span class='error_goto'>__PYX_ERR(0, 156, __pyx_L1_error)</span> |
| } |
| __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __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_r = ((PyObject*)__pyx_t_2); |
| __pyx_t_2 = 0; |
| goto __pyx_L0; |
| </pre><pre class="cython line score-0"> <span class="">157</span>: </pre> |
| <pre class="cython line score-29" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">158</span>: def skip_int(self) -> None:</pre> |
| <pre class='cython code score-29 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_25skip_int(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_25skip_int = {"skip_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_25skip_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_25skip_int(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("skip_int (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip_int", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("skip_int", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_24skip_int(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_24skip_int(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* function exit code */ |
| __pyx_L0:; |
| <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| /* … */ |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < 0) <span class='error_goto'>__PYX_ERR(0, 158, __pyx_L1_error)</span> |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_25skip_int, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_skip_int, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10]));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_4, __pyx_t_3); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_skip_int, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 158, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">159</span>: skip_zigzag_int(&self._current)</pre> |
| <pre class='cython code score-0 '> skip_zigzag_int((&__pyx_v_self->_current)); |
| </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">160</span>: return</pre> |
| <pre class='cython code score-2 '> <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; |
| </pre><pre class="cython line score-0"> <span class="">161</span>: </pre> |
| <pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">162</span>: def skip(self, n: int) -> None:</pre> |
| <pre class='cython code score-47 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_27skip(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_27skip = {"skip", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_27skip, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_27skip(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| PyObject *__pyx_v_n = 0; |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("skip (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| { |
| PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_n,0}; |
| PyObject* values[1] = {0}; |
| const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L3_error)</span> |
| if (__pyx_kwds_len > 0) { |
| switch (__pyx_nargs) { |
| case 1: |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L3_error)</span> |
| CYTHON_FALLTHROUGH; |
| case 0: break; |
| default: goto __pyx_L5_argtuple_error; |
| } |
| const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| if (<span class='pyx_c_api'>__Pyx_ParseKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "skip", 0) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L3_error)</span> |
| for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { |
| if (unlikely(!values[i])) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip", 1, 1, 1, i); <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L3_error)</span> } |
| } |
| } else if (unlikely(__pyx_nargs != 1)) { |
| goto __pyx_L5_argtuple_error; |
| } else { |
| values[0] = <span class='pyx_c_api'>__Pyx_ArgRef_FASTCALL</span>(__pyx_args, 0); |
| if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L3_error)</span> |
| } |
| __pyx_v_n = ((PyObject*)values[0]); |
| } |
| goto __pyx_L6_skip; |
| __pyx_L5_argtuple_error:; |
| <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L3_error)</span> |
| __pyx_L6_skip:; |
| goto __pyx_L4_argument_unpacking_done; |
| __pyx_L3_error:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.skip", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return NULL; |
| __pyx_L4_argument_unpacking_done:; |
| if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_n), (&PyLong_Type), 0, "n", 2))) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span> |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_26skip(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self), __pyx_v_n); |
| int __pyx_lineno = 0; |
| const char *__pyx_filename = NULL; |
| int __pyx_clineno = 0; |
| |
| /* function exit code */ |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| __pyx_r = NULL; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| goto __pyx_L7_cleaned_up; |
| __pyx_L0:; |
| for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| Py_XDECREF(values[__pyx_temp]); |
| } |
| __pyx_L7_cleaned_up:; |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_26skip(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self, PyObject *__pyx_v_n) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* function exit code */ |
| __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); |
| goto __pyx_L0; |
| __pyx_L1_error:; |
| <span class='pyx_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.skip", __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_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_n, __pyx_mstate_global->__pyx_n_u_int) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span> |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span> |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_27skip, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_skip, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_3, __pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_skip, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 162, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">163</span>: self._current += n</pre> |
| <pre class='cython code score-7 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_n); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 163, __pyx_L1_error)</span> |
| __pyx_v_self->_current = (__pyx_v_self->_current + __pyx_t_1); |
| </pre><pre class="cython line score-0"> <span class="">164</span>: </pre> |
| <pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">165</span>: def skip_boolean(self) -> None:</pre> |
| <pre class='cython code score-30 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_29skip_boolean(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_29skip_boolean = {"skip_boolean", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_29skip_boolean, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_29skip_boolean(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("skip_boolean (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip_boolean", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("skip_boolean", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_28skip_boolean(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_28skip_boolean(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < 0) <span class='error_goto'>__PYX_ERR(0, 165, __pyx_L1_error)</span> |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_29skip_boolean, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_skip_boolean, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12]));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_4, __pyx_t_3); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_skip_boolean, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 165, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">166</span>: self._current += 1</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_current = (__pyx_v_self->_current + 1); |
| </pre><pre class="cython line score-0"> <span class="">167</span>: </pre> |
| <pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">168</span>: def skip_float(self) -> None:</pre> |
| <pre class='cython code score-30 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_31skip_float(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_31skip_float = {"skip_float", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_31skip_float, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_31skip_float(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("skip_float (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip_float", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("skip_float", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_30skip_float(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_30skip_float(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < 0) <span class='error_goto'>__PYX_ERR(0, 168, __pyx_L1_error)</span> |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_31skip_float, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_skip_float, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_3, __pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_skip_float, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 168, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">169</span>: self._current += 4</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_current = (__pyx_v_self->_current + 4); |
| </pre><pre class="cython line score-0"> <span class="">170</span>: </pre> |
| <pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">171</span>: def skip_double(self) -> None:</pre> |
| <pre class='cython code score-30 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_33skip_double(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_33skip_double = {"skip_double", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_33skip_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_33skip_double(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("skip_double (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip_double", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("skip_double", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_32skip_double(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_32skip_double(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < 0) <span class='error_goto'>__PYX_ERR(0, 171, __pyx_L1_error)</span> |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_33skip_double, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_skip_double, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14]));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_4, __pyx_t_3); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_skip_double, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 171, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">172</span>: self._current += 8</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_current = (__pyx_v_self->_current + 8); |
| </pre><pre class="cython line score-0"> <span class="">173</span>: </pre> |
| <pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">174</span>: def skip_bytes(self) -> None:</pre> |
| <pre class='cython code score-30 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_35skip_bytes(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_35skip_bytes = {"skip_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_35skip_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_35skip_bytes(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("skip_bytes (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip_bytes", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("skip_bytes", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_34skip_bytes(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_34skip_bytes(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| uint64_t __pyx_v_result; |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* 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_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < 0) <span class='error_goto'>__PYX_ERR(0, 174, __pyx_L1_error)</span> |
| __pyx_t_3 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_35skip_bytes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_skip_bytes, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15]));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_3, __pyx_t_4); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_skip_bytes, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 174, __pyx_L1_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="">175</span>: cdef uint64_t result;</pre> |
| <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">176</span>: decode_zigzag_ints(&self._current, 1, &result)</pre> |
| <pre class='cython code score-0 '> decode_zigzag_ints((&__pyx_v_self->_current), 1, (&__pyx_v_result)); |
| </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">177</span>: self._current += result</pre> |
| <pre class='cython code score-0 '> __pyx_v_self->_current = (__pyx_v_self->_current + __pyx_v_result); |
| </pre><pre class="cython line score-0"> <span class="">178</span>: </pre> |
| <pre class="cython line score-34" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">179</span>: def skip_utf8(self) -> None:</pre> |
| <pre class='cython code score-34 '>/* Python wrapper */ |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_37skip_utf8(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ); /*proto*/ |
| static PyMethodDef __pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_37skip_utf8 = {"skip_utf8", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_37skip_utf8, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| static PyObject *__pyx_pw_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_37skip_utf8(PyObject *__pyx_v_self, |
| #if CYTHON_METH_FASTCALL |
| PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| #else |
| PyObject *__pyx_args, PyObject *__pyx_kwds |
| #endif |
| ) { |
| #if !CYTHON_METH_FASTCALL |
| CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| #endif |
| CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| PyObject *__pyx_r = 0; |
| <span class='refnanny'>__Pyx_RefNannyDeclarations</span> |
| <span class='refnanny'>__Pyx_RefNannySetupContext</span>("skip_utf8 (wrapper)", 0); |
| #if !CYTHON_METH_FASTCALL |
| #if CYTHON_ASSUME_SAFE_SIZE |
| __pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); |
| #else |
| __pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| #endif |
| #endif |
| __pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs); |
| if (unlikely(__pyx_nargs > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("skip_utf8", 1, 0, 0, __pyx_nargs); return NULL; } |
| const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) : 0; |
| if (unlikely(__pyx_kwds_len < 0)) return NULL; |
| if (unlikely(__pyx_kwds_len > 0)) {<span class='pyx_c_api'>__Pyx_RejectKeywords</span>("skip_utf8", __pyx_kwds); return NULL;} |
| __pyx_r = __pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_36skip_utf8(((struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *)__pyx_v_self)); |
| |
| /* function exit code */ |
| <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); |
| return __pyx_r; |
| } |
| |
| static PyObject *__pyx_pf_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_36skip_utf8(struct __pyx_obj_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder *__pyx_v_self) { |
| PyObject *__pyx_r = NULL; |
| /* … */ |
| /* function exit code */ |
| __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); |
| 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_c_api'>__Pyx_AddTraceback</span>("pyiceberg.avro.decoder_fast.CythonBinaryDecoder.skip_utf8", __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_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); |
| if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < 0) <span class='error_goto'>__PYX_ERR(0, 179, __pyx_L1_error)</span> |
| __pyx_t_4 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9pyiceberg_4avro_12decoder_fast_19CythonBinaryDecoder_37skip_utf8, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_CythonBinaryDecoder_skip_utf8, NULL, __pyx_mstate_global->__pyx_n_u_pyiceberg_avro_decoder_fast, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16]));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); |
| <span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_4, __pyx_t_3); |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; |
| if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>(__pyx_mstate_global->__pyx_ptype_9pyiceberg_4avro_12decoder_fast_CythonBinaryDecoder, __pyx_mstate_global->__pyx_n_u_skip_utf8, __pyx_t_4) < 0) <span class='error_goto'>__PYX_ERR(0, 179, __pyx_L1_error)</span> |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; |
| </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">180</span>: self.skip_bytes()</pre> |
| <pre class='cython code score-5 '> __pyx_t_2 = ((PyObject *)__pyx_v_self); |
| <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); |
| __pyx_t_3 = 0; |
| { |
| PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; |
| __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_FastCallMethod</span>(__pyx_mstate_global->__pyx_n_u_skip_bytes, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); |
| <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; |
| if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 180, __pyx_L1_error)</span> |
| <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); |
| } |
| <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; |
| </pre></div></body></html> |