Nuitka-winsvc 2.1.6__cp311-cp311-win_amd64.whl → 2.2.1__cp311-cp311-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Nuitka-winsvc might be problematic. Click here for more details.

Files changed (232) hide show
  1. {Nuitka_winsvc-2.1.6.dist-info → Nuitka_winsvc-2.2.1.dist-info}/METADATA +1 -1
  2. {Nuitka_winsvc-2.1.6.dist-info → Nuitka_winsvc-2.2.1.dist-info}/RECORD +232 -223
  3. nuitka/Errors.py +4 -0
  4. nuitka/HardImportRegistry.py +18 -1
  5. nuitka/MainControl.py +27 -30
  6. nuitka/OptionParsing.py +32 -30
  7. nuitka/Options.py +26 -13
  8. nuitka/OutputDirectories.py +7 -4
  9. nuitka/PostProcessing.py +9 -7
  10. nuitka/Progress.py +3 -3
  11. nuitka/PythonVersions.py +2 -2
  12. nuitka/TreeXML.py +1 -1
  13. nuitka/Version.py +1 -1
  14. nuitka/build/Backend.scons +2 -1
  15. nuitka/build/DataComposerInterface.py +1 -0
  16. nuitka/build/Onefile.scons +2 -1
  17. nuitka/build/SconsCaching.py +64 -46
  18. nuitka/build/SconsCompilerSettings.py +19 -6
  19. nuitka/build/SconsHacks.py +0 -1
  20. nuitka/build/SconsInterface.py +84 -5
  21. nuitka/build/SconsProgress.py +0 -1
  22. nuitka/build/SconsUtils.py +8 -4
  23. nuitka/build/include/nuitka/allocator.h +8 -3
  24. nuitka/build/include/nuitka/compiled_cell.h +8 -0
  25. nuitka/build/include/nuitka/exceptions.h +554 -179
  26. nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
  27. nuitka/build/include/nuitka/helper/import_hard.h +3 -0
  28. nuitka/build/include/nuitka/helper/ints.h +15 -2
  29. nuitka/build/include/nuitka/helper/lists.h +4 -1
  30. nuitka/build/include/nuitka/helper/raising.h +12 -0
  31. nuitka/build/include/nuitka/helper/tuples.h +5 -1
  32. nuitka/build/include/nuitka/helpers.h +4 -0
  33. nuitka/build/include/nuitka/importing.h +3 -4
  34. nuitka/build/include/nuitka/jit_sources.h +25 -0
  35. nuitka/build/include/nuitka/prelude.h +38 -11
  36. nuitka/build/include/nuitka/printing.h +3 -0
  37. nuitka/build/include/nuitka/threading.h +2 -6
  38. nuitka/build/include/nuitka/type_aliases.h +27 -0
  39. nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +0 -3
  40. nuitka/build/inline_copy/tqdm/tqdm/version.py +1 -4
  41. nuitka/build/static_src/CompiledAsyncgenType.c +99 -114
  42. nuitka/build/static_src/CompiledCodeHelpers.c +24 -14
  43. nuitka/build/static_src/CompiledCoroutineType.c +96 -114
  44. nuitka/build/static_src/CompiledFrameType.c +14 -11
  45. nuitka/build/static_src/CompiledFunctionType.c +34 -7
  46. nuitka/build/static_src/CompiledGeneratorType.c +248 -142
  47. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +60 -70
  48. nuitka/build/static_src/CompiledMethodType.c +8 -7
  49. nuitka/build/static_src/HelpersAttributes.c +2 -19
  50. nuitka/build/static_src/HelpersBuiltin.c +2 -1
  51. nuitka/build/static_src/HelpersComparisonEq.c +32 -18
  52. nuitka/build/static_src/HelpersComparisonGe.c +50 -36
  53. nuitka/build/static_src/HelpersComparisonGt.c +50 -36
  54. nuitka/build/static_src/HelpersComparisonLe.c +50 -36
  55. nuitka/build/static_src/HelpersComparisonLt.c +50 -36
  56. nuitka/build/static_src/HelpersComparisonNe.c +32 -18
  57. nuitka/build/static_src/HelpersDeepcopy.c +6 -8
  58. nuitka/build/static_src/HelpersDictionaries.c +8 -3
  59. nuitka/build/static_src/HelpersExceptions.c +36 -22
  60. nuitka/build/static_src/HelpersFilesystemPaths.c +7 -7
  61. nuitka/build/static_src/HelpersImportHard.c +15 -0
  62. nuitka/build/static_src/HelpersJitSources.c +46 -0
  63. nuitka/build/static_src/HelpersLists.c +40 -0
  64. nuitka/build/static_src/HelpersOperationBinaryAdd.c +66 -66
  65. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +80 -33
  66. nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +16 -13
  67. nuitka/build/static_src/HelpersOperationBinarySub.c +39 -39
  68. nuitka/build/static_src/HelpersOperationInplaceAdd.c +54 -54
  69. nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
  70. nuitka/build/static_src/HelpersOperationInplaceSub.c +50 -50
  71. nuitka/build/static_src/HelpersProfiling.c +3 -4
  72. nuitka/build/static_src/HelpersRaising.c +62 -1
  73. nuitka/build/static_src/HelpersStrings.c +203 -8
  74. nuitka/build/static_src/HelpersTypes.c +42 -0
  75. nuitka/build/static_src/MainProgram.c +1 -1
  76. nuitka/build/static_src/MetaPathBasedLoader.c +2 -1
  77. nuitka/build/static_src/OnefileBootstrap.c +3 -3
  78. nuitka/code_generation/BinaryOperationHelperDefinitions.py +5 -3
  79. nuitka/code_generation/BuiltinCodes.py +1 -0
  80. nuitka/code_generation/CodeGeneration.py +11 -0
  81. nuitka/code_generation/CodeHelpers.py +5 -3
  82. nuitka/code_generation/CodeObjectCodes.py +10 -6
  83. nuitka/code_generation/ComparisonCodes.py +19 -3
  84. nuitka/code_generation/ConstantCodes.py +5 -0
  85. nuitka/code_generation/Contexts.py +22 -6
  86. nuitka/code_generation/Emission.py +1 -0
  87. nuitka/code_generation/ErrorCodes.py +8 -16
  88. nuitka/code_generation/EvalCodes.py +5 -3
  89. nuitka/code_generation/ExceptionCodes.py +8 -1
  90. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -0
  91. nuitka/code_generation/FrameCodes.py +5 -3
  92. nuitka/code_generation/FunctionCodes.py +0 -1
  93. nuitka/code_generation/GeneratorCodes.py +3 -3
  94. nuitka/code_generation/GlobalConstants.py +0 -2
  95. nuitka/code_generation/ImportCodes.py +2 -0
  96. nuitka/code_generation/JitCodes.py +44 -0
  97. nuitka/code_generation/ListCodes.py +11 -17
  98. nuitka/code_generation/MatchCodes.py +0 -1
  99. nuitka/code_generation/ModuleCodes.py +2 -1
  100. nuitka/code_generation/Namify.py +0 -1
  101. nuitka/code_generation/NetworkxCodes.py +51 -0
  102. nuitka/code_generation/OperationCodes.py +8 -6
  103. nuitka/code_generation/PackageResourceCodes.py +7 -5
  104. nuitka/code_generation/TensorflowCodes.py +54 -0
  105. nuitka/code_generation/TypeAliasCodes.py +71 -0
  106. nuitka/code_generation/VariableCodes.py +7 -5
  107. nuitka/code_generation/VariableDeclarations.py +1 -0
  108. nuitka/code_generation/c_types/CTypeCLongs.py +0 -1
  109. nuitka/code_generation/c_types/CTypeNuitkaInts.py +0 -1
  110. nuitka/code_generation/c_types/CTypeVoids.py +1 -0
  111. nuitka/code_generation/templates/CodeTemplatesConstants.py +14 -0
  112. nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
  113. nuitka/code_generation/templates/CodeTemplatesIterators.py +0 -1
  114. nuitka/code_generation/templates/CodeTemplatesLoader.py +0 -1
  115. nuitka/code_generation/templates/CodeTemplatesModules.py +4 -1
  116. nuitka/code_generation/templates/CodeTemplatesVariables.py +8 -8
  117. nuitka/code_generation/templates/TemplateDebugWrapper.py +0 -1
  118. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -0
  119. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +9 -7
  120. nuitka/containers/Namedtuples.py +0 -1
  121. nuitka/finalizations/Finalization.py +1 -0
  122. nuitka/finalizations/FinalizeMarkups.py +0 -1
  123. nuitka/freezer/DllDependenciesMacOS.py +60 -13
  124. nuitka/freezer/DllDependenciesPosix.py +0 -1
  125. nuitka/freezer/IncludedDataFiles.py +46 -15
  126. nuitka/freezer/IncludedEntryPoints.py +5 -3
  127. nuitka/freezer/Standalone.py +6 -1
  128. nuitka/importing/ImportCache.py +2 -2
  129. nuitka/importing/ImportResolving.py +80 -78
  130. nuitka/importing/Importing.py +34 -1
  131. nuitka/nodes/AttributeNodesGenerated.py +21 -6
  132. nuitka/nodes/BuiltinComplexNodes.py +1 -0
  133. nuitka/nodes/BuiltinFormatNodes.py +1 -0
  134. nuitka/nodes/BuiltinIteratorNodes.py +5 -3
  135. nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +21 -6
  136. nuitka/nodes/BuiltinRefNodes.py +8 -1
  137. nuitka/nodes/BuiltinVarsNodes.py +0 -1
  138. nuitka/nodes/ChildrenHavingMixins.py +906 -186
  139. nuitka/nodes/CodeObjectSpecs.py +1 -1
  140. nuitka/nodes/ConstantRefNodes.py +38 -0
  141. nuitka/nodes/CtypesNodes.py +0 -1
  142. nuitka/nodes/DictionaryNodes.py +0 -1
  143. nuitka/nodes/ExceptionNodes.py +10 -0
  144. nuitka/nodes/ExpressionBases.py +15 -9
  145. nuitka/nodes/ExpressionBasesGenerated.py +32 -15
  146. nuitka/nodes/FunctionNodes.py +50 -5
  147. nuitka/nodes/HardImportNodesGenerated.py +245 -60
  148. nuitka/nodes/ImportHardNodes.py +27 -13
  149. nuitka/nodes/ImportNodes.py +90 -70
  150. nuitka/nodes/InjectCNodes.py +0 -1
  151. nuitka/nodes/ModuleNodes.py +10 -5
  152. nuitka/nodes/NetworkxNodes.py +45 -0
  153. nuitka/nodes/OperatorNodesUnary.py +1 -0
  154. nuitka/nodes/OsSysNodes.py +0 -1
  155. nuitka/nodes/PackageMetadataNodes.py +0 -1
  156. nuitka/nodes/PackageResourceNodes.py +10 -6
  157. nuitka/nodes/StatementBasesGenerated.py +107 -60
  158. nuitka/nodes/StringConcatenationNodes.py +1 -0
  159. nuitka/nodes/TensorflowNodes.py +38 -0
  160. nuitka/nodes/TypeNodes.py +21 -0
  161. nuitka/nodes/VariableRefNodes.py +1 -0
  162. nuitka/nodes/shapes/BuiltinTypeShapes.py +25 -15
  163. nuitka/optimizations/Optimization.py +7 -6
  164. nuitka/optimizations/OptimizeBuiltinCalls.py +11 -9
  165. nuitka/optimizations/Tags.py +0 -1
  166. nuitka/optimizations/TraceCollections.py +6 -55
  167. nuitka/optimizations/ValueTraces.py +49 -1
  168. nuitka/plugins/PluginBase.py +26 -4
  169. nuitka/plugins/Plugins.py +49 -12
  170. nuitka/plugins/standard/AntiBloatPlugin.py +12 -2
  171. nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +0 -1
  172. nuitka/plugins/standard/DataFilesPlugin.py +2 -6
  173. nuitka/plugins/standard/DillPlugin.py +3 -3
  174. nuitka/plugins/standard/DllFilesPlugin.py +29 -23
  175. nuitka/plugins/standard/GiPlugin.py +1 -0
  176. nuitka/plugins/standard/ImplicitImports.py +8 -7
  177. nuitka/plugins/standard/MatplotlibPlugin.py +1 -0
  178. nuitka/plugins/standard/OptionsNannyPlugin.py +3 -7
  179. nuitka/plugins/standard/PkgResourcesPlugin.py +0 -1
  180. nuitka/plugins/standard/PmwPlugin.py +10 -9
  181. nuitka/plugins/standard/PySidePyQtPlugin.py +0 -28
  182. nuitka/plugins/standard/TensorflowPlugin.py +1 -0
  183. nuitka/plugins/standard/TorchPlugin.py +1 -0
  184. nuitka/plugins/standard/TrioPlugin.py +1 -0
  185. nuitka/plugins/standard/standard.nuitka-package.config.yml +242 -34
  186. nuitka/reports/CompilationReportReader.py +0 -1
  187. nuitka/reports/Reports.py +49 -5
  188. nuitka/specs/BuiltinParameterSpecs.py +10 -2
  189. nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
  190. nuitka/specs/BuiltinTypeOperationSpecs.py +0 -1
  191. nuitka/specs/HardImportSpecs.py +34 -1
  192. nuitka/specs/ParameterSpecs.py +11 -9
  193. nuitka/tools/environments/Virtualenv.py +0 -1
  194. nuitka/tools/specialize/CTypeDescriptions.py +15 -11
  195. nuitka/tools/specialize/SpecializeC.py +11 -9
  196. nuitka/tools/specialize/SpecializePython.py +57 -30
  197. nuitka/tools/testing/Common.py +24 -7
  198. nuitka/tools/testing/OutputComparison.py +4 -0
  199. nuitka/tools/testing/Pythons.py +0 -1
  200. nuitka/tools/testing/compare_with_cpython/__main__.py +0 -4
  201. nuitka/tools/watch/GitHub.py +4 -1
  202. nuitka/tools/watch/__main__.py +22 -1
  203. nuitka/tree/Building.py +3 -0
  204. nuitka/tree/InternalModule.py +0 -1
  205. nuitka/tree/ReformulationAssertStatements.py +1 -0
  206. nuitka/tree/ReformulationAssignmentStatements.py +26 -3
  207. nuitka/tree/ReformulationClasses3.py +23 -26
  208. nuitka/tree/ReformulationContractionExpressions.py +5 -3
  209. nuitka/tree/ReformulationDictionaryCreation.py +6 -5
  210. nuitka/tree/ReformulationExecStatements.py +8 -6
  211. nuitka/tree/ReformulationFunctionStatements.py +10 -6
  212. nuitka/tree/SourceHandling.py +8 -0
  213. nuitka/tree/TreeHelpers.py +6 -3
  214. nuitka/utils/AppDirs.py +6 -2
  215. nuitka/utils/CStrings.py +1 -1
  216. nuitka/utils/CommandLineOptions.py +0 -1
  217. nuitka/utils/Distributions.py +3 -3
  218. nuitka/utils/Download.py +5 -1
  219. nuitka/utils/Execution.py +6 -3
  220. nuitka/utils/FileOperations.py +61 -34
  221. nuitka/utils/Importing.py +4 -4
  222. nuitka/utils/InstanceCounters.py +1 -0
  223. nuitka/utils/MacOSApp.py +1 -0
  224. nuitka/utils/Shebang.py +1 -0
  225. nuitka/utils/Utils.py +39 -1
  226. nuitka/utils/WindowsFileUsage.py +4 -3
  227. {Nuitka_winsvc-2.1.6.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka-run.bat +0 -0
  228. {Nuitka_winsvc-2.1.6.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka.bat +0 -0
  229. {Nuitka_winsvc-2.1.6.dist-info → Nuitka_winsvc-2.2.1.dist-info}/LICENSE.txt +0 -0
  230. {Nuitka_winsvc-2.1.6.dist-info → Nuitka_winsvc-2.2.1.dist-info}/WHEEL +0 -0
  231. {Nuitka_winsvc-2.1.6.dist-info → Nuitka_winsvc-2.2.1.dist-info}/entry_points.txt +0 -0
  232. {Nuitka_winsvc-2.1.6.dist-info → Nuitka_winsvc-2.2.1.dist-info}/top_level.txt +0 -0
@@ -19,6 +19,11 @@
19
19
  #undef Py_BUILD_CORE
20
20
  #endif
21
21
 
22
+ #if PYTHON_VERSION >= 0x300
23
+ static PyObject *Nuitka_CallGeneratorThrowMethod(PyObject *throw_method,
24
+ struct Nuitka_ExceptionPreservationItem *exception_state);
25
+ #endif
26
+
22
27
  // This function takes no reference to value, and publishes a StopIteration
23
28
  // exception with it.
24
29
  #if PYTHON_VERSION >= 0x300
@@ -32,8 +37,7 @@ static void Nuitka_SetStopIterationValue(PyThreadState *tstate, PyObject *value)
32
37
  return;
33
38
  }
34
39
 
35
- Py_INCREF(PyExc_StopIteration);
36
- RESTORE_ERROR_OCCURRED(tstate, PyExc_StopIteration, stop_value, NULL);
40
+ SET_CURRENT_EXCEPTION_TYPE0_VALUE1(tstate, PyExc_StopIteration, stop_value);
37
41
  #else
38
42
  if (likely(!PyTuple_Check(value) && !PyExceptionInstance_Check(value))) {
39
43
  Py_INCREF(PyExc_StopIteration);
@@ -41,14 +45,13 @@ static void Nuitka_SetStopIterationValue(PyThreadState *tstate, PyObject *value)
41
45
 
42
46
  RESTORE_ERROR_OCCURRED(tstate, PyExc_StopIteration, value, NULL);
43
47
  } else {
44
- PyObject *stop_value = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, PyExc_StopIteration, value);
48
+ PyObject *stop_value = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, (PyObject *)PyExc_StopIteration, value);
45
49
 
46
50
  if (unlikely(stop_value == NULL)) {
47
51
  return;
48
52
  }
49
53
 
50
54
  Py_INCREF(PyExc_StopIteration);
51
-
52
55
  RESTORE_ERROR_OCCURRED(tstate, PyExc_StopIteration, stop_value, NULL);
53
56
  }
54
57
  #endif
@@ -256,10 +259,11 @@ static PyObject *Nuitka_PyGen_Send(PyThreadState *tstate, PyGenObject *gen, PyOb
256
259
  if (result == Py_None) {
257
260
  SET_CURRENT_EXCEPTION_TYPE0(tstate, PyExc_StopIteration);
258
261
  } else {
259
- PyObject *e = PyObject_CallFunctionObjArgs(PyExc_StopIteration, result, NULL);
262
+ PyObject *e = CALL_FUNCTION_WITH_SINGLE_ARG(tstate, (PyObject *)PyExc_StopIteration, result);
260
263
 
261
- if (e != NULL) {
262
- SET_CURRENT_EXCEPTION_TYPE0_VALUE1(tstate, PyExc_StopIteration, e);
264
+ if (likely(e != NULL)) {
265
+ Py_INCREF(PyExc_StopIteration);
266
+ RESTORE_ERROR_OCCURRED(tstate, PyExc_StopIteration, e, NULL);
263
267
  }
264
268
  }
265
269
 
@@ -349,8 +353,8 @@ static PyObject *Nuitka_PyGen_Send(PyThreadState *tstate, PyGenObject *gen, PyOb
349
353
 
350
354
  #if NUITKA_UNCOMPILED_THROW_INTEGRATION
351
355
 
352
- static bool _Nuitka_Generator_check_throw2(PyThreadState *tstate, PyObject **exception_type, PyObject **exception_value,
353
- PyTracebackObject **exception_tb);
356
+ static bool _Nuitka_Generator_check_throw(PyThreadState *tstate,
357
+ struct Nuitka_ExceptionPreservationItem *exception_state);
354
358
 
355
359
  #if PYTHON_VERSION < 0x3b0
356
360
  #include <opcode.h>
@@ -785,17 +789,15 @@ static PyFrameObject *_Nuitka_PyFrame_New_NoTrack(PyCodeObject *code) {
785
789
  static PyFrameObject *_Nuitka_PyFrame_MakeAndSetFrameObject(PyThreadState *tstate, _PyInterpreterFrame *frame) {
786
790
  assert(frame->frame_obj == NULL);
787
791
 
788
- PyObject *error_type, *error_value;
789
- PyTracebackObject *error_traceback;
790
-
791
- FETCH_ERROR_OCCURRED(tstate, &error_type, &error_value, &error_traceback);
792
+ struct Nuitka_ExceptionPreservationItem saved_exception_state;
793
+ FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
792
794
 
793
795
  PyFrameObject *f = _Nuitka_PyFrame_New_NoTrack(frame->f_code);
794
796
 
795
797
  // Out of memory should be rare.
796
798
  assert(f != NULL);
797
799
 
798
- RESTORE_ERROR_OCCURRED(tstate, error_type, error_value, error_traceback);
800
+ RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state);
799
801
 
800
802
  // Apparently there are situations where there is a race with what code creates the
801
803
  // frame, and this time it's not us.
@@ -1037,12 +1039,11 @@ static PyObject *Nuitka_PyGen_gen_send_ex(PyThreadState *tstate, PyGenObject *ge
1037
1039
  // value of exception_type will not be NULL, but the actual exception will not necessarily
1038
1040
  // be normalized.
1039
1041
  static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenObject *gen, int close_on_genexit,
1040
- PyObject *exception_type, PyObject *exception_value,
1041
- PyTracebackObject *exception_tb) {
1042
+ struct Nuitka_ExceptionPreservationItem *exception_state) {
1042
1043
  #if _DEBUG_GENERATOR
1043
1044
  PRINT_STRING("Nuitka_UncompiledGenerator_throw: Enter ");
1044
1045
  PRINT_ITEM((PyObject *)gen);
1045
- PRINT_EXCEPTION(exception_type, exception_value, exception_tb);
1046
+ PRINT_EXCEPTION_STATE(exception_state);
1046
1047
  PRINT_NEW_LINE();
1047
1048
  #endif
1048
1049
 
@@ -1051,7 +1052,8 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1051
1052
  if (yf != NULL) {
1052
1053
  _PyInterpreterFrame *frame = (_PyInterpreterFrame *)gen->gi_iframe;
1053
1054
 
1054
- if (close_on_genexit && EXCEPTION_MATCH_BOOL_SINGLE(tstate, exception_type, PyExc_GeneratorExit)) {
1055
+ if (close_on_genexit &&
1056
+ EXCEPTION_MATCH_BOOL_SINGLE(tstate, exception_state->exception_type, PyExc_GeneratorExit)) {
1055
1057
  PyFrameState state = (PyFrameState)gen->gi_frame_state;
1056
1058
  gen->gi_frame_state = FRAME_EXECUTING;
1057
1059
 
@@ -1064,9 +1066,7 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1064
1066
  if (err < 0) {
1065
1067
  // Releasing exception, we are done with it, raising instead the error just
1066
1068
  // occurred.
1067
- Py_DECREF(exception_type);
1068
- Py_XDECREF(exception_value);
1069
- Py_XDECREF(exception_tb);
1069
+ RELEASE_ERROR_OCCURRED_STATE(exception_state);
1070
1070
 
1071
1071
  return Nuitka_PyGen_gen_send_ex(tstate, gen, Py_None, 1, 0);
1072
1072
  }
@@ -1085,8 +1085,7 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1085
1085
  gen->gi_frame_state = FRAME_EXECUTING;
1086
1086
 
1087
1087
  // Handing exception ownership to "Nuitka_UncompiledGenerator_throw".
1088
- ret = Nuitka_UncompiledGenerator_throw(tstate, (PyGenObject *)yf, close_on_genexit, exception_type,
1089
- exception_value, exception_tb);
1088
+ ret = Nuitka_UncompiledGenerator_throw(tstate, (PyGenObject *)yf, close_on_genexit, exception_state);
1090
1089
  gen->gi_frame_state = state;
1091
1090
  tstate->cframe->current_frame = prev;
1092
1091
  frame->previous = NULL;
@@ -1114,15 +1113,12 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1114
1113
  PyFrameState state = (PyFrameState)gen->gi_frame_state;
1115
1114
  gen->gi_frame_state = FRAME_EXECUTING;
1116
1115
 
1117
- // TODO: Faster call code should be used.
1118
- ret = PyObject_CallFunctionObjArgs(meth, exception_type, exception_value, exception_tb, NULL);
1116
+ ret = Nuitka_CallGeneratorThrowMethod(meth, exception_state);
1119
1117
 
1120
1118
  gen->gi_frame_state = state;
1121
1119
 
1122
1120
  // Releasing exception, we are done with it.
1123
- Py_DECREF(exception_type);
1124
- Py_XDECREF(exception_value);
1125
- Py_XDECREF(exception_tb);
1121
+ RELEASE_ERROR_OCCURRED_STATE(exception_state);
1126
1122
 
1127
1123
  Py_DECREF(meth);
1128
1124
  }
@@ -1150,51 +1146,51 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1150
1146
  }
1151
1147
 
1152
1148
  throw_here:
1153
- if (exception_tb == (PyTracebackObject *)Py_None) {
1154
- exception_tb = NULL;
1155
- Py_DECREF(exception_tb);
1156
- } else if (exception_tb != NULL && !PyTraceBack_Check(exception_tb)) {
1149
+ if (exception_state->exception_tb == (PyTracebackObject *)Py_None) {
1150
+ exception_state->exception_tb = NULL;
1151
+ Py_DECREF(exception_state->exception_tb);
1152
+ } else if (exception_state->exception_tb != NULL && !PyTraceBack_Check(exception_state->exception_tb)) {
1157
1153
  SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_TypeError, "throw() third argument must be a traceback object");
1158
1154
  goto failed_throw;
1159
1155
  }
1160
1156
 
1161
1157
  tstate = _PyThreadState_GET();
1162
1158
 
1163
- if (PyExceptionClass_Check(exception_type)) {
1164
- Nuitka_Err_NormalizeException(tstate, &exception_type, &exception_value, &exception_tb);
1165
- } else if (PyExceptionInstance_Check(exception_type)) {
1166
- if (exception_value && exception_value != Py_None) {
1159
+ if (PyExceptionClass_Check(exception_state->exception_type)) {
1160
+ Nuitka_Err_NormalizeException(tstate, &exception_state->exception_type, &exception_state->exception_value,
1161
+ &exception_state->exception_tb);
1162
+ } else if (PyExceptionInstance_Check(exception_state->exception_type)) {
1163
+ if (exception_state->exception_value && exception_state->exception_value != Py_None) {
1167
1164
  SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_TypeError,
1168
1165
  "instance exception may not have a separate value");
1169
1166
  goto failed_throw;
1170
1167
  } else {
1171
1168
  // Normalize manually here via APIs
1172
- Py_XDECREF(exception_value);
1173
- exception_value = exception_type;
1174
- exception_type = PyExceptionInstance_Class(exception_type);
1175
- Py_INCREF(exception_type);
1169
+ Py_XDECREF(exception_state->exception_value);
1170
+ exception_state->exception_value = exception_state->exception_type;
1171
+ exception_state->exception_type = PyExceptionInstance_Class(exception_state->exception_type);
1172
+ Py_INCREF(exception_state->exception_type);
1176
1173
 
1177
- if (exception_tb == NULL) {
1174
+ if (exception_state->exception_tb == NULL) {
1178
1175
  // Can remain NULL if no traceback is available.
1179
- exception_tb = GET_EXCEPTION_TRACEBACK(exception_value);
1180
- Py_XINCREF(exception_tb);
1176
+ exception_state->exception_tb = GET_EXCEPTION_TRACEBACK(exception_state->exception_value);
1177
+ Py_XINCREF(exception_state->exception_tb);
1181
1178
  }
1182
1179
  }
1183
1180
  } else {
1184
1181
  // Raisable
1185
1182
  SET_CURRENT_EXCEPTION_TYPE_COMPLAINT(
1186
- "exceptions must be classes or instances deriving from BaseException, not %s", exception_type);
1183
+ "exceptions must be classes or instances deriving from BaseException, not %s",
1184
+ exception_state->exception_type);
1187
1185
  goto failed_throw;
1188
1186
  }
1189
1187
 
1190
- RESTORE_ERROR_OCCURRED(tstate, exception_type, exception_value, exception_tb);
1188
+ RESTORE_ERROR_OCCURRED_STATE(tstate, exception_state);
1191
1189
 
1192
1190
  return Nuitka_PyGen_gen_send_ex(tstate, gen, Py_None, 1, 1);
1193
1191
 
1194
1192
  failed_throw:
1195
- Py_DECREF(exception_type);
1196
- Py_XDECREF(exception_value);
1197
- Py_XDECREF(exception_tb);
1193
+ RELEASE_ERROR_OCCURRED_STATE(exception_state);
1198
1194
 
1199
1195
  return NULL;
1200
1196
  }
@@ -1467,19 +1463,19 @@ static PyObject *Nuitka_PyGen_gen_send_ex(PyThreadState *tstate, PyGenObject *ge
1467
1463
  // value of exception_type will not be NULL, but the actual exception will not necessarily
1468
1464
  // be normalized.
1469
1465
  static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenObject *gen, int close_on_genexit,
1470
- PyObject *exception_type, PyObject *exception_value,
1471
- PyTracebackObject *exception_tb) {
1466
+ struct Nuitka_ExceptionPreservationItem *exception_state) {
1472
1467
  #if _DEBUG_GENERATOR
1473
1468
  PRINT_STRING("Nuitka_UncompiledGenerator_throw: Enter ");
1474
1469
  PRINT_ITEM((PyObject *)gen);
1475
- PRINT_EXCEPTION(exception_type, exception_value, exception_tb);
1470
+ PRINT_EXCEPTION_STATE(exception_state);
1476
1471
  PRINT_NEW_LINE();
1477
1472
  #endif
1478
1473
 
1479
1474
  PyObject *yf = Nuitka_PyGen_yf(gen);
1480
1475
 
1481
1476
  if (yf != NULL) {
1482
- if (close_on_genexit && EXCEPTION_MATCH_BOOL_SINGLE(tstate, exception_type, PyExc_GeneratorExit)) {
1477
+ if (close_on_genexit &&
1478
+ EXCEPTION_MATCH_BOOL_SINGLE(tstate, exception_state->exception_type, PyExc_GeneratorExit)) {
1483
1479
  #if PYTHON_VERSION < 0x3a0
1484
1480
  gen->gi_running = 1;
1485
1481
  #else
@@ -1498,9 +1494,7 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1498
1494
  if (err < 0) {
1499
1495
  // Releasing exception, we are done with it, raising instead the error just
1500
1496
  // occurred.
1501
- Py_DECREF(exception_type);
1502
- Py_XDECREF(exception_value);
1503
- Py_XDECREF(exception_tb);
1497
+ RELEASE_ERROR_OCCURRED_STATE(exception_state);
1504
1498
 
1505
1499
  return Nuitka_PyGen_gen_send_ex(tstate, gen, Py_None, 1, 0);
1506
1500
  }
@@ -1524,8 +1518,7 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1524
1518
  #endif
1525
1519
 
1526
1520
  // Handing exception ownership to "Nuitka_UncompiledGenerator_throw".
1527
- ret = Nuitka_UncompiledGenerator_throw(tstate, (PyGenObject *)yf, close_on_genexit, exception_type,
1528
- exception_value, exception_tb);
1521
+ ret = Nuitka_UncompiledGenerator_throw(tstate, (PyGenObject *)yf, close_on_genexit, exception_state);
1529
1522
 
1530
1523
  #if PYTHON_VERSION < 0x3a0
1531
1524
  gen->gi_running = 0;
@@ -1547,9 +1540,7 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1547
1540
  Py_DECREF(yf);
1548
1541
 
1549
1542
  // Releasing exception, we are done with it.
1550
- Py_DECREF(exception_type);
1551
- Py_XDECREF(exception_value);
1552
- Py_XDECREF(exception_tb);
1543
+ RELEASE_ERROR_OCCURRED_STATE(exception_state);
1553
1544
 
1554
1545
  return NULL;
1555
1546
  }
@@ -1568,7 +1559,8 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1568
1559
  gen->gi_frame->f_state = FRAME_EXECUTING;
1569
1560
  #endif
1570
1561
  // TODO: Faster call code should be used.
1571
- ret = PyObject_CallFunctionObjArgs(meth, exception_type, exception_value, exception_tb, NULL);
1562
+ ret = Nuitka_CallGeneratorThrowMethod(meth, exception_state);
1563
+
1572
1564
  #if PYTHON_VERSION < 0x3a0
1573
1565
  gen->gi_running = 0;
1574
1566
  #else
@@ -1576,9 +1568,7 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1576
1568
  #endif
1577
1569
 
1578
1570
  // Releasing exception, we are done with it.
1579
- Py_DECREF(exception_type);
1580
- Py_XDECREF(exception_value);
1581
- Py_XDECREF(exception_tb);
1571
+ RELEASE_ERROR_OCCURRED_STATE(exception_state);
1582
1572
 
1583
1573
  Py_DECREF(meth);
1584
1574
  }
@@ -1601,10 +1591,10 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1601
1591
  gen->gi_frame->f_lasti += 1;
1602
1592
  #endif
1603
1593
 
1604
- if (_PyGen_FetchStopIterationValue(&exception_value) == 0) {
1605
- ret = Nuitka_PyGen_gen_send_ex(tstate, gen, exception_value, 0, 0);
1594
+ if (_PyGen_FetchStopIterationValue(&exception_state->exception_value) == 0) {
1595
+ ret = Nuitka_PyGen_gen_send_ex(tstate, gen, exception_state->exception_value, 0, 0);
1606
1596
 
1607
- Py_DECREF(exception_value);
1597
+ Py_DECREF(exception_state->exception_value);
1608
1598
  } else {
1609
1599
  ret = Nuitka_PyGen_gen_send_ex(tstate, gen, Py_None, 1, 0);
1610
1600
  }
@@ -1614,13 +1604,13 @@ static PyObject *Nuitka_UncompiledGenerator_throw(PyThreadState *tstate, PyGenOb
1614
1604
 
1615
1605
  throw_here:
1616
1606
  // We continue to have exception ownership here.
1617
- if (unlikely(_Nuitka_Generator_check_throw2(tstate, &exception_type, &exception_value, &exception_tb) == false)) {
1618
- // Exception was released by _Nuitka_Generator_check_throw2 already.
1607
+ if (unlikely(_Nuitka_Generator_check_throw(tstate, exception_state) == false)) {
1608
+ // Exception was released by _Nuitka_Generator_check_throw already.
1619
1609
  return NULL;
1620
1610
  }
1621
1611
 
1622
1612
  // Transfer exception ownership to published exception.
1623
- RESTORE_ERROR_OCCURRED(tstate, exception_type, exception_value, (PyTracebackObject *)exception_tb);
1613
+ RESTORE_ERROR_OCCURRED_STATE(tstate, exception_state);
1624
1614
 
1625
1615
  return Nuitka_PyGen_gen_send_ex(tstate, gen, Py_None, 1, 1);
1626
1616
  }
@@ -417,10 +417,9 @@ static void Nuitka_Method_tp_dealloc(struct Nuitka_MethodObject *method) {
417
417
  // Save the current exception, if any, we must to not corrupt it.
418
418
  PyThreadState *tstate = PyThreadState_GET();
419
419
 
420
- PyObject *save_exception_type, *save_exception_value;
421
- PyTracebackObject *save_exception_tb;
422
- FETCH_ERROR_OCCURRED(tstate, &save_exception_type, &save_exception_value, &save_exception_tb);
423
- RESTORE_ERROR_OCCURRED(tstate, save_exception_type, save_exception_value, save_exception_tb);
420
+ struct Nuitka_ExceptionPreservationItem saved_exception_state1;
421
+ FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state1);
422
+ RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state1);
424
423
  #endif
425
424
 
426
425
  Nuitka_GC_UnTrack(method);
@@ -438,9 +437,11 @@ static void Nuitka_Method_tp_dealloc(struct Nuitka_MethodObject *method) {
438
437
  releaseToFreeList(free_list_methods, method, MAX_METHOD_FREE_LIST_COUNT);
439
438
 
440
439
  #ifndef __NUITKA_NO_ASSERT__
441
- assert(tstate->curexc_type == save_exception_type);
442
- assert(tstate->curexc_value == save_exception_value);
443
- assert((PyTracebackObject *)tstate->curexc_traceback == save_exception_tb);
440
+ struct Nuitka_ExceptionPreservationItem saved_exception_state2;
441
+ FETCH_ERROR_OCCURRED_STATE(tstate, &saved_exception_state2);
442
+ RESTORE_ERROR_OCCURRED_STATE(tstate, &saved_exception_state2);
443
+
444
+ ASSERT_SAME_EXCEPTION_STATE(&saved_exception_state1, &saved_exception_state2);
444
445
  #endif
445
446
  }
446
447
 
@@ -1228,19 +1228,7 @@ PyObject *GET_MODULE_VARIABLE_VALUE_FALLBACK(PyThreadState *tstate, PyObject *va
1228
1228
  PyObject *result = GET_STRING_DICT_VALUE(dict_builtin, (Nuitka_StringObject *)variable_name);
1229
1229
 
1230
1230
  if (unlikely(result == NULL)) {
1231
- PyObject *exception_type;
1232
- PyObject *exception_value;
1233
-
1234
- // TODO: Do this in one go, once FORMAT_NAME_ERROR becomes unused in code generation.
1235
- FORMAT_NAME_ERROR(&exception_type, &exception_value, variable_name);
1236
-
1237
- #if PYTHON_VERSION >= 0x300
1238
- // TODO: FORMAT_NAME_ERROR for Python3 should already produce this normalized and chained.
1239
- NORMALIZE_EXCEPTION(tstate, &exception_type, &exception_value, NULL);
1240
- CHAIN_EXCEPTION(tstate, exception_value);
1241
- #endif
1242
-
1243
- RESTORE_ERROR_OCCURRED(tstate, exception_type, exception_value, NULL);
1231
+ SET_CURRENT_EXCEPTION_NAME_ERROR(tstate, variable_name);
1244
1232
  }
1245
1233
 
1246
1234
  return result;
@@ -1251,12 +1239,7 @@ PyObject *GET_MODULE_VARIABLE_VALUE_FALLBACK_IN_FUNCTION(PyThreadState *tstate,
1251
1239
  PyObject *result = GET_STRING_DICT_VALUE(dict_builtin, (Nuitka_StringObject *)variable_name);
1252
1240
 
1253
1241
  if (unlikely(result == NULL)) {
1254
- PyObject *exception_type;
1255
- PyObject *exception_value;
1256
-
1257
- FORMAT_GLOBAL_NAME_ERROR(&exception_type, &exception_value, variable_name);
1258
-
1259
- RESTORE_ERROR_OCCURRED(tstate, exception_type, exception_value, NULL);
1242
+ SET_CURRENT_EXCEPTION_GLOBAL_NAME_ERROR(tstate, variable_name);
1260
1243
  }
1261
1244
 
1262
1245
  return result;
@@ -20,8 +20,9 @@ PyObject *CALL_BUILTIN_KW_ARGS(PyThreadState *tstate, PyObject *callable, PyObje
20
20
  int i = 0;
21
21
 
22
22
  while (i < max_args) {
23
- if (args[i] == NULL)
23
+ if (args[i] == NULL) {
24
24
  break;
25
+ }
25
26
 
26
27
  CHECK_OBJECT(args[i]);
27
28
 
@@ -2135,20 +2135,24 @@ static PyObject *COMPARE_EQ_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
2135
2135
  r = false;
2136
2136
  } else {
2137
2137
  int kind1 = PyUnicode_KIND(a);
2138
+ #if PYTHON_VERSION < 0x3c0
2138
2139
  if (unlikely(kind1 == 0)) {
2139
2140
  NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)a);
2140
2141
  assert(res != -1);
2141
2142
  kind1 = PyUnicode_KIND(a);
2142
2143
  assert(kind1 != 0);
2143
2144
  }
2145
+ #endif
2144
2146
 
2145
2147
  int kind2 = PyUnicode_KIND(b);
2148
+ #if PYTHON_VERSION < 0x3c0
2146
2149
  if (unlikely(kind2 == 0)) {
2147
2150
  NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)b);
2148
2151
  assert(res != -1);
2149
2152
  kind2 = PyUnicode_KIND(b);
2150
2153
  assert(kind2 != 0);
2151
2154
  }
2155
+ #endif
2152
2156
 
2153
2157
  if (kind1 != kind2) {
2154
2158
  r = false;
@@ -2805,20 +2809,24 @@ static bool COMPARE_EQ_CBOOL_UNICODE_UNICODE(PyObject *operand1, PyObject *opera
2805
2809
  r = false;
2806
2810
  } else {
2807
2811
  int kind1 = PyUnicode_KIND(a);
2812
+ #if PYTHON_VERSION < 0x3c0
2808
2813
  if (unlikely(kind1 == 0)) {
2809
2814
  NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)a);
2810
2815
  assert(res != -1);
2811
2816
  kind1 = PyUnicode_KIND(a);
2812
2817
  assert(kind1 != 0);
2813
2818
  }
2819
+ #endif
2814
2820
 
2815
2821
  int kind2 = PyUnicode_KIND(b);
2822
+ #if PYTHON_VERSION < 0x3c0
2816
2823
  if (unlikely(kind2 == 0)) {
2817
2824
  NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)b);
2818
2825
  assert(res != -1);
2819
2826
  kind2 = PyUnicode_KIND(b);
2820
2827
  assert(kind2 != 0);
2821
2828
  }
2829
+ #endif
2822
2830
 
2823
2831
  if (kind1 != kind2) {
2824
2832
  r = false;
@@ -6276,14 +6284,16 @@ static PyObject *COMPARE_EQ_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
6276
6284
 
6277
6285
  if (operand1_long_object == operand2_long_object) {
6278
6286
  r = true;
6279
- } else if (Py_SIZE(operand1_long_object) != Py_SIZE(operand2_long_object)) {
6287
+ } else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
6288
+ Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
6280
6289
  r = false;
6281
6290
  } else {
6282
- Py_ssize_t i = Py_ABS(Py_SIZE(operand1_long_object));
6291
+ Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
6283
6292
  r = true;
6284
6293
 
6285
6294
  while (--i >= 0) {
6286
- if (operand1_long_object->ob_digit[i] != operand2_long_object->ob_digit[i]) {
6295
+ if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
6296
+ Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
6287
6297
  r = false;
6288
6298
  break;
6289
6299
  }
@@ -6903,14 +6913,16 @@ static bool COMPARE_EQ_CBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2) {
6903
6913
 
6904
6914
  if (operand1_long_object == operand2_long_object) {
6905
6915
  r = true;
6906
- } else if (Py_SIZE(operand1_long_object) != Py_SIZE(operand2_long_object)) {
6916
+ } else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
6917
+ Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
6907
6918
  r = false;
6908
6919
  } else {
6909
- Py_ssize_t i = Py_ABS(Py_SIZE(operand1_long_object));
6920
+ Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
6910
6921
  r = true;
6911
6922
 
6912
6923
  while (--i >= 0) {
6913
- if (operand1_long_object->ob_digit[i] != operand2_long_object->ob_digit[i]) {
6924
+ if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
6925
+ Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
6914
6926
  r = false;
6915
6927
  break;
6916
6928
  }
@@ -11784,14 +11796,14 @@ static PyObject *COMPARE_EQ_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
11784
11796
 
11785
11797
  bool r;
11786
11798
 
11787
- if (Py_SIZE(operand1_long_object) != operand2_size) {
11799
+ if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
11788
11800
  r = false;
11789
11801
  } else {
11790
- Py_ssize_t i = Py_ABS(Py_SIZE(operand1_long_object));
11802
+ Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
11791
11803
  r = true;
11792
11804
 
11793
11805
  while (--i >= 0) {
11794
- if (operand1_long_object->ob_digit[i] != operand2_digits[i]) {
11806
+ if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
11795
11807
  r = false;
11796
11808
  break;
11797
11809
  }
@@ -11846,14 +11858,14 @@ static bool COMPARE_EQ_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
11846
11858
 
11847
11859
  bool r;
11848
11860
 
11849
- if (Py_SIZE(operand1_long_object) != operand2_size) {
11861
+ if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
11850
11862
  r = false;
11851
11863
  } else {
11852
- Py_ssize_t i = Py_ABS(Py_SIZE(operand1_long_object));
11864
+ Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
11853
11865
  r = true;
11854
11866
 
11855
11867
  while (--i >= 0) {
11856
- if (operand1_long_object->ob_digit[i] != operand2_digits[i]) {
11868
+ if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
11857
11869
  r = false;
11858
11870
  break;
11859
11871
  }
@@ -11925,14 +11937,15 @@ static PyObject *COMPARE_EQ_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
11925
11937
 
11926
11938
  bool r;
11927
11939
 
11928
- if (Py_SIZE(operand1_long_object) != (Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
11940
+ if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
11941
+ (Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
11929
11942
  r = false;
11930
11943
  } else {
11931
- Py_ssize_t i = Py_ABS(Py_SIZE(operand1_long_object));
11944
+ Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
11932
11945
  r = true;
11933
11946
 
11934
11947
  while (--i >= 0) {
11935
- if (operand1_long_object->ob_digit[i] != (digit)Py_ABS(operand2)) {
11948
+ if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
11936
11949
  r = false;
11937
11950
  break;
11938
11951
  }
@@ -11960,14 +11973,15 @@ static bool COMPARE_EQ_CBOOL_LONG_DIGIT(PyObject *operand1, long operand2) {
11960
11973
 
11961
11974
  bool r;
11962
11975
 
11963
- if (Py_SIZE(operand1_long_object) != (Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
11976
+ if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
11977
+ (Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
11964
11978
  r = false;
11965
11979
  } else {
11966
- Py_ssize_t i = Py_ABS(Py_SIZE(operand1_long_object));
11980
+ Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
11967
11981
  r = true;
11968
11982
 
11969
11983
  while (--i >= 0) {
11970
- if (operand1_long_object->ob_digit[i] != (digit)Py_ABS(operand2)) {
11984
+ if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
11971
11985
  r = false;
11972
11986
  break;
11973
11987
  }