Nuitka-winsvc 2.1.5__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 (234) hide show
  1. {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/METADATA +1 -1
  2. {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/RECORD +234 -225
  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 +9 -5
  23. nuitka/build/include/nuitka/allocator.h +8 -3
  24. nuitka/build/include/nuitka/compiled_cell.h +8 -0
  25. nuitka/build/include/nuitka/constants.h +2 -0
  26. nuitka/build/include/nuitka/exceptions.h +554 -179
  27. nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
  28. nuitka/build/include/nuitka/helper/import_hard.h +3 -0
  29. nuitka/build/include/nuitka/helper/ints.h +15 -2
  30. nuitka/build/include/nuitka/helper/lists.h +4 -1
  31. nuitka/build/include/nuitka/helper/raising.h +12 -0
  32. nuitka/build/include/nuitka/helper/tuples.h +5 -1
  33. nuitka/build/include/nuitka/helpers.h +5 -0
  34. nuitka/build/include/nuitka/importing.h +3 -4
  35. nuitka/build/include/nuitka/jit_sources.h +25 -0
  36. nuitka/build/include/nuitka/prelude.h +38 -11
  37. nuitka/build/include/nuitka/printing.h +3 -0
  38. nuitka/build/include/nuitka/threading.h +2 -6
  39. nuitka/build/include/nuitka/type_aliases.h +27 -0
  40. nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +0 -3
  41. nuitka/build/inline_copy/tqdm/tqdm/version.py +1 -4
  42. nuitka/build/static_src/CompiledAsyncgenType.c +99 -114
  43. nuitka/build/static_src/CompiledCodeHelpers.c +24 -14
  44. nuitka/build/static_src/CompiledCoroutineType.c +96 -114
  45. nuitka/build/static_src/CompiledFrameType.c +14 -11
  46. nuitka/build/static_src/CompiledFunctionType.c +34 -7
  47. nuitka/build/static_src/CompiledGeneratorType.c +248 -142
  48. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +60 -70
  49. nuitka/build/static_src/CompiledMethodType.c +8 -7
  50. nuitka/build/static_src/HelpersAttributes.c +2 -19
  51. nuitka/build/static_src/HelpersBuiltin.c +2 -1
  52. nuitka/build/static_src/HelpersComparisonEq.c +32 -18
  53. nuitka/build/static_src/HelpersComparisonGe.c +50 -36
  54. nuitka/build/static_src/HelpersComparisonGt.c +50 -36
  55. nuitka/build/static_src/HelpersComparisonLe.c +50 -36
  56. nuitka/build/static_src/HelpersComparisonLt.c +50 -36
  57. nuitka/build/static_src/HelpersComparisonNe.c +32 -18
  58. nuitka/build/static_src/HelpersDeepcopy.c +6 -8
  59. nuitka/build/static_src/HelpersDictionaries.c +8 -3
  60. nuitka/build/static_src/HelpersExceptions.c +36 -22
  61. nuitka/build/static_src/HelpersFiles.c +9 -0
  62. nuitka/build/static_src/HelpersFilesystemPaths.c +7 -7
  63. nuitka/build/static_src/HelpersImportHard.c +15 -0
  64. nuitka/build/static_src/HelpersJitSources.c +46 -0
  65. nuitka/build/static_src/HelpersLists.c +40 -0
  66. nuitka/build/static_src/HelpersOperationBinaryAdd.c +66 -66
  67. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +80 -33
  68. nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +16 -13
  69. nuitka/build/static_src/HelpersOperationBinarySub.c +39 -39
  70. nuitka/build/static_src/HelpersOperationInplaceAdd.c +54 -54
  71. nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
  72. nuitka/build/static_src/HelpersOperationInplaceSub.c +50 -50
  73. nuitka/build/static_src/HelpersProfiling.c +3 -4
  74. nuitka/build/static_src/HelpersRaising.c +62 -1
  75. nuitka/build/static_src/HelpersStrings.c +203 -8
  76. nuitka/build/static_src/HelpersTypes.c +42 -0
  77. nuitka/build/static_src/MainProgram.c +1 -1
  78. nuitka/build/static_src/MetaPathBasedLoader.c +2 -1
  79. nuitka/build/static_src/OnefileBootstrap.c +3 -3
  80. nuitka/code_generation/BinaryOperationHelperDefinitions.py +5 -3
  81. nuitka/code_generation/BuiltinCodes.py +1 -0
  82. nuitka/code_generation/CodeGeneration.py +11 -0
  83. nuitka/code_generation/CodeHelpers.py +5 -3
  84. nuitka/code_generation/CodeObjectCodes.py +10 -6
  85. nuitka/code_generation/ComparisonCodes.py +19 -3
  86. nuitka/code_generation/ConstantCodes.py +5 -0
  87. nuitka/code_generation/Contexts.py +22 -6
  88. nuitka/code_generation/Emission.py +1 -0
  89. nuitka/code_generation/ErrorCodes.py +8 -16
  90. nuitka/code_generation/EvalCodes.py +5 -3
  91. nuitka/code_generation/ExceptionCodes.py +8 -1
  92. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -0
  93. nuitka/code_generation/FrameCodes.py +5 -3
  94. nuitka/code_generation/FunctionCodes.py +0 -1
  95. nuitka/code_generation/GeneratorCodes.py +3 -3
  96. nuitka/code_generation/GlobalConstants.py +1 -2
  97. nuitka/code_generation/ImportCodes.py +2 -0
  98. nuitka/code_generation/JitCodes.py +44 -0
  99. nuitka/code_generation/ListCodes.py +11 -17
  100. nuitka/code_generation/MatchCodes.py +0 -1
  101. nuitka/code_generation/ModuleCodes.py +2 -1
  102. nuitka/code_generation/Namify.py +0 -1
  103. nuitka/code_generation/NetworkxCodes.py +51 -0
  104. nuitka/code_generation/OperationCodes.py +8 -6
  105. nuitka/code_generation/PackageResourceCodes.py +7 -5
  106. nuitka/code_generation/TensorflowCodes.py +54 -0
  107. nuitka/code_generation/TypeAliasCodes.py +71 -0
  108. nuitka/code_generation/VariableCodes.py +7 -5
  109. nuitka/code_generation/VariableDeclarations.py +1 -0
  110. nuitka/code_generation/c_types/CTypeCLongs.py +0 -1
  111. nuitka/code_generation/c_types/CTypeNuitkaInts.py +0 -1
  112. nuitka/code_generation/c_types/CTypeVoids.py +1 -0
  113. nuitka/code_generation/templates/CodeTemplatesConstants.py +15 -0
  114. nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
  115. nuitka/code_generation/templates/CodeTemplatesIterators.py +0 -1
  116. nuitka/code_generation/templates/CodeTemplatesLoader.py +0 -1
  117. nuitka/code_generation/templates/CodeTemplatesModules.py +4 -1
  118. nuitka/code_generation/templates/CodeTemplatesVariables.py +8 -8
  119. nuitka/code_generation/templates/TemplateDebugWrapper.py +0 -1
  120. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -0
  121. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +9 -7
  122. nuitka/containers/Namedtuples.py +0 -1
  123. nuitka/finalizations/Finalization.py +1 -0
  124. nuitka/finalizations/FinalizeMarkups.py +0 -1
  125. nuitka/freezer/DllDependenciesMacOS.py +60 -13
  126. nuitka/freezer/DllDependenciesPosix.py +0 -1
  127. nuitka/freezer/IncludedDataFiles.py +46 -15
  128. nuitka/freezer/IncludedEntryPoints.py +5 -3
  129. nuitka/freezer/Standalone.py +6 -1
  130. nuitka/importing/ImportCache.py +2 -2
  131. nuitka/importing/ImportResolving.py +80 -78
  132. nuitka/importing/Importing.py +34 -1
  133. nuitka/nodes/AttributeNodesGenerated.py +21 -6
  134. nuitka/nodes/BuiltinComplexNodes.py +1 -0
  135. nuitka/nodes/BuiltinFormatNodes.py +1 -0
  136. nuitka/nodes/BuiltinIteratorNodes.py +5 -3
  137. nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +21 -6
  138. nuitka/nodes/BuiltinRefNodes.py +8 -1
  139. nuitka/nodes/BuiltinVarsNodes.py +0 -1
  140. nuitka/nodes/ChildrenHavingMixins.py +906 -186
  141. nuitka/nodes/CodeObjectSpecs.py +1 -1
  142. nuitka/nodes/ConstantRefNodes.py +38 -0
  143. nuitka/nodes/CtypesNodes.py +0 -1
  144. nuitka/nodes/DictionaryNodes.py +0 -1
  145. nuitka/nodes/ExceptionNodes.py +10 -0
  146. nuitka/nodes/ExpressionBases.py +15 -9
  147. nuitka/nodes/ExpressionBasesGenerated.py +32 -15
  148. nuitka/nodes/FunctionNodes.py +50 -5
  149. nuitka/nodes/HardImportNodesGenerated.py +245 -60
  150. nuitka/nodes/ImportHardNodes.py +27 -13
  151. nuitka/nodes/ImportNodes.py +90 -70
  152. nuitka/nodes/InjectCNodes.py +0 -1
  153. nuitka/nodes/ModuleNodes.py +10 -5
  154. nuitka/nodes/NetworkxNodes.py +45 -0
  155. nuitka/nodes/OperatorNodesUnary.py +1 -0
  156. nuitka/nodes/OsSysNodes.py +0 -1
  157. nuitka/nodes/PackageMetadataNodes.py +0 -1
  158. nuitka/nodes/PackageResourceNodes.py +10 -6
  159. nuitka/nodes/StatementBasesGenerated.py +107 -60
  160. nuitka/nodes/StringConcatenationNodes.py +1 -0
  161. nuitka/nodes/TensorflowNodes.py +38 -0
  162. nuitka/nodes/TypeNodes.py +21 -0
  163. nuitka/nodes/VariableRefNodes.py +1 -0
  164. nuitka/nodes/shapes/BuiltinTypeShapes.py +25 -15
  165. nuitka/optimizations/Optimization.py +7 -6
  166. nuitka/optimizations/OptimizeBuiltinCalls.py +11 -9
  167. nuitka/optimizations/Tags.py +0 -1
  168. nuitka/optimizations/TraceCollections.py +6 -55
  169. nuitka/optimizations/ValueTraces.py +49 -1
  170. nuitka/plugins/PluginBase.py +26 -4
  171. nuitka/plugins/Plugins.py +49 -12
  172. nuitka/plugins/standard/AntiBloatPlugin.py +12 -2
  173. nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +0 -1
  174. nuitka/plugins/standard/DataFilesPlugin.py +2 -6
  175. nuitka/plugins/standard/DillPlugin.py +3 -3
  176. nuitka/plugins/standard/DllFilesPlugin.py +29 -23
  177. nuitka/plugins/standard/GiPlugin.py +1 -0
  178. nuitka/plugins/standard/ImplicitImports.py +9 -7
  179. nuitka/plugins/standard/MatplotlibPlugin.py +1 -0
  180. nuitka/plugins/standard/OptionsNannyPlugin.py +3 -7
  181. nuitka/plugins/standard/PkgResourcesPlugin.py +0 -1
  182. nuitka/plugins/standard/PmwPlugin.py +10 -9
  183. nuitka/plugins/standard/PySidePyQtPlugin.py +0 -28
  184. nuitka/plugins/standard/TensorflowPlugin.py +1 -0
  185. nuitka/plugins/standard/TorchPlugin.py +1 -0
  186. nuitka/plugins/standard/TrioPlugin.py +1 -0
  187. nuitka/plugins/standard/standard.nuitka-package.config.yml +242 -54
  188. nuitka/reports/CompilationReportReader.py +0 -1
  189. nuitka/reports/Reports.py +49 -5
  190. nuitka/specs/BuiltinParameterSpecs.py +10 -2
  191. nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
  192. nuitka/specs/BuiltinTypeOperationSpecs.py +0 -1
  193. nuitka/specs/HardImportSpecs.py +34 -1
  194. nuitka/specs/ParameterSpecs.py +11 -9
  195. nuitka/tools/environments/Virtualenv.py +0 -1
  196. nuitka/tools/specialize/CTypeDescriptions.py +15 -11
  197. nuitka/tools/specialize/SpecializeC.py +11 -9
  198. nuitka/tools/specialize/SpecializePython.py +57 -30
  199. nuitka/tools/testing/Common.py +24 -7
  200. nuitka/tools/testing/OutputComparison.py +4 -0
  201. nuitka/tools/testing/Pythons.py +0 -1
  202. nuitka/tools/testing/compare_with_cpython/__main__.py +0 -4
  203. nuitka/tools/watch/GitHub.py +4 -1
  204. nuitka/tools/watch/__main__.py +22 -1
  205. nuitka/tree/Building.py +3 -0
  206. nuitka/tree/InternalModule.py +0 -1
  207. nuitka/tree/ReformulationAssertStatements.py +1 -0
  208. nuitka/tree/ReformulationAssignmentStatements.py +26 -3
  209. nuitka/tree/ReformulationClasses3.py +23 -26
  210. nuitka/tree/ReformulationContractionExpressions.py +5 -3
  211. nuitka/tree/ReformulationDictionaryCreation.py +6 -5
  212. nuitka/tree/ReformulationExecStatements.py +8 -6
  213. nuitka/tree/ReformulationFunctionStatements.py +10 -6
  214. nuitka/tree/SourceHandling.py +8 -0
  215. nuitka/tree/TreeHelpers.py +6 -3
  216. nuitka/utils/AppDirs.py +6 -2
  217. nuitka/utils/CStrings.py +1 -1
  218. nuitka/utils/CommandLineOptions.py +0 -1
  219. nuitka/utils/Distributions.py +3 -3
  220. nuitka/utils/Download.py +5 -1
  221. nuitka/utils/Execution.py +6 -3
  222. nuitka/utils/FileOperations.py +62 -35
  223. nuitka/utils/Importing.py +4 -4
  224. nuitka/utils/InstanceCounters.py +1 -0
  225. nuitka/utils/MacOSApp.py +1 -0
  226. nuitka/utils/Shebang.py +1 -0
  227. nuitka/utils/Utils.py +39 -1
  228. nuitka/utils/WindowsFileUsage.py +4 -3
  229. {Nuitka_winsvc-2.1.5.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka-run.bat +0 -0
  230. {Nuitka_winsvc-2.1.5.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka.bat +0 -0
  231. {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/LICENSE.txt +0 -0
  232. {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/WHEEL +0 -0
  233. {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/entry_points.txt +0 -0
  234. {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/top_level.txt +0 -0
@@ -537,8 +537,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_LONG(PyObject *operand1, PyOb
537
537
 
538
538
  PyLongObject *operand2_long_object = (PyLongObject *)operand2;
539
539
 
540
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
541
- long r = MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object);
540
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
541
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object));
542
542
 
543
543
  clong_result = r;
544
544
  goto exit_result_ok_clong;
@@ -547,12 +547,12 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_LONG(PyObject *operand1, PyOb
547
547
  {
548
548
  PyLongObject *z;
549
549
 
550
- digit const *a_digits = operand1_long_object->ob_digit;
551
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
552
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
553
- digit const *b_digits = operand2_long_object->ob_digit;
554
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
555
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
550
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
551
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
552
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
553
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
554
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
555
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
556
556
 
557
557
  if (a_negative) {
558
558
  if (b_negative) {
@@ -561,7 +561,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_LONG(PyObject *operand1, PyOb
561
561
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
562
562
  }
563
563
 
564
- Py_SET_SIZE(z, -(Py_SIZE(z)));
564
+ Nuitka_LongFlipSign(z);
565
565
  } else {
566
566
  if (b_negative) {
567
567
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
@@ -760,8 +760,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_OBJECT_LONG(PyObject *operand1, Py
760
760
 
761
761
  PyLongObject *operand2_long_object = (PyLongObject *)operand2;
762
762
 
763
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
764
- long r = MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object);
763
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
764
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object));
765
765
 
766
766
  clong_result = r;
767
767
  goto exit_result_ok_clong;
@@ -770,12 +770,12 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_OBJECT_LONG(PyObject *operand1, Py
770
770
  {
771
771
  PyLongObject *z;
772
772
 
773
- digit const *a_digits = operand1_long_object->ob_digit;
774
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
775
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
776
- digit const *b_digits = operand2_long_object->ob_digit;
777
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
778
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
773
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
774
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
775
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
776
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
777
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
778
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
779
779
 
780
780
  if (a_negative) {
781
781
  if (b_negative) {
@@ -784,7 +784,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_OBJECT_LONG(PyObject *operand1, Py
784
784
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
785
785
  }
786
786
 
787
- Py_SET_SIZE(z, -(Py_SIZE(z)));
787
+ Nuitka_LongFlipSign(z);
788
788
  } else {
789
789
  if (b_negative) {
790
790
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
@@ -999,8 +999,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(PyObject *operand1, Py
999
999
 
1000
1000
  PyLongObject *operand2_long_object = (PyLongObject *)operand2;
1001
1001
 
1002
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
1003
- long r = MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object);
1002
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
1003
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) - MEDIUM_VALUE(operand2_long_object));
1004
1004
 
1005
1005
  clong_result = r;
1006
1006
  goto exit_result_ok_clong;
@@ -1009,12 +1009,12 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(PyObject *operand1, Py
1009
1009
  {
1010
1010
  PyLongObject *z;
1011
1011
 
1012
- digit const *a_digits = operand1_long_object->ob_digit;
1013
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
1014
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
1015
- digit const *b_digits = operand2_long_object->ob_digit;
1016
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
1017
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
1012
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
1013
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
1014
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
1015
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
1016
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
1017
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
1018
1018
 
1019
1019
  if (a_negative) {
1020
1020
  if (b_negative) {
@@ -1023,7 +1023,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(PyObject *operand1, Py
1023
1023
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
1024
1024
  }
1025
1025
 
1026
- Py_SET_SIZE(z, -(Py_SIZE(z)));
1026
+ Nuitka_LongFlipSign(z);
1027
1027
  } else {
1028
1028
  if (b_negative) {
1029
1029
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
@@ -1969,8 +1969,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_DIGIT(PyObject *operand1, lon
1969
1969
 
1970
1970
  PyLongObject *operand1_long_object = (PyLongObject *)operand1;
1971
1971
 
1972
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && (operand2 == 0 ? 0 : 1) <= 1) {
1973
- long r = MEDIUM_VALUE(operand1_long_object) - (sdigit)operand2;
1972
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && (operand2 == 0 ? 0 : 1) <= 1) {
1973
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) - (sdigit)operand2);
1974
1974
 
1975
1975
  clong_result = r;
1976
1976
  goto exit_result_ok_clong;
@@ -1979,9 +1979,9 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_DIGIT(PyObject *operand1, lon
1979
1979
  {
1980
1980
  PyLongObject *z;
1981
1981
 
1982
- digit const *a_digits = operand1_long_object->ob_digit;
1983
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
1984
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
1982
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
1983
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
1984
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
1985
1985
  digit const *b_digits = (digit *)&operand2;
1986
1986
  Py_ssize_t b_digit_count = (operand2 == 0 ? 0 : 1);
1987
1987
  bool b_negative = operand2 < 0;
@@ -1993,7 +1993,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_LONG_DIGIT(PyObject *operand1, lon
1993
1993
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
1994
1994
  }
1995
1995
 
1996
- Py_SET_SIZE(z, -(Py_SIZE(z)));
1996
+ Nuitka_LongFlipSign(z);
1997
1997
  } else {
1998
1998
  if (b_negative) {
1999
1999
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
@@ -2050,8 +2050,8 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_DIGIT_LONG(long operand1, PyObject
2050
2050
 
2051
2051
  PyLongObject *operand2_long_object = (PyLongObject *)operand2;
2052
2052
 
2053
- if ((operand1 == 0 ? 0 : 1) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
2054
- long r = (sdigit)operand1 - MEDIUM_VALUE(operand2_long_object);
2053
+ if ((operand1 == 0 ? 0 : 1) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
2054
+ long r = (long)((sdigit)operand1 - MEDIUM_VALUE(operand2_long_object));
2055
2055
 
2056
2056
  clong_result = r;
2057
2057
  goto exit_result_ok_clong;
@@ -2063,9 +2063,9 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_DIGIT_LONG(long operand1, PyObject
2063
2063
  digit const *a_digits = (digit *)&operand1;
2064
2064
  Py_ssize_t a_digit_count = (operand1 == 0 ? 0 : 1);
2065
2065
  bool a_negative = operand1 < 0;
2066
- digit const *b_digits = operand2_long_object->ob_digit;
2067
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
2068
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
2066
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
2067
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
2068
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
2069
2069
 
2070
2070
  if (a_negative) {
2071
2071
  if (b_negative) {
@@ -2074,7 +2074,7 @@ static PyObject *_BINARY_OPERATION_SUB_OBJECT_DIGIT_LONG(long operand1, PyObject
2074
2074
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
2075
2075
  }
2076
2076
 
2077
- Py_SET_SIZE(z, -(Py_SIZE(z)));
2077
+ Nuitka_LongFlipSign(z);
2078
2078
  } else {
2079
2079
  if (b_negative) {
2080
2080
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
@@ -627,11 +627,11 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_LONG(PyObject **operand1, PyObjec
627
627
 
628
628
  PyLongObject *operand2_long_object = (PyLongObject *)operand2;
629
629
 
630
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
631
- long r = MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object);
630
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
631
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object));
632
632
 
633
633
  if (Py_REFCNT(*operand1) == 1) {
634
- Nuitka_LongUpdateFromCLong(&*operand1, r);
634
+ Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
635
635
  goto exit_result_ok;
636
636
  } else {
637
637
  PyObject *obj = Nuitka_LongFromCLong(r);
@@ -644,16 +644,16 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_LONG(PyObject **operand1, PyObjec
644
644
  }
645
645
 
646
646
  if (Py_REFCNT(*operand1) == 1) {
647
- digit const *b_digits = operand2_long_object->ob_digit;
648
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
647
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
648
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
649
649
 
650
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
651
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
650
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
651
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
652
652
 
653
653
  if (a_negative) {
654
654
  if (b_negative) {
655
655
  *operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
656
- Py_SET_SIZE(*operand1, -Py_ABS(Py_SIZE(*operand1)));
656
+ Nuitka_LongSetSignNegative(*operand1);
657
657
  } else {
658
658
  *operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
659
659
  }
@@ -670,17 +670,17 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_LONG(PyObject **operand1, PyObjec
670
670
  {
671
671
  PyLongObject *z;
672
672
 
673
- digit const *a_digits = operand1_long_object->ob_digit;
674
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
675
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
676
- digit const *b_digits = operand2_long_object->ob_digit;
677
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
678
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
673
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
674
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
675
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
676
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
677
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
678
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
679
679
 
680
680
  if (a_negative) {
681
681
  if (b_negative) {
682
682
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
683
- Py_SET_SIZE(z, -(Py_SIZE(z)));
683
+ Nuitka_LongFlipSign(z);
684
684
  } else {
685
685
  z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
686
686
  }
@@ -932,11 +932,11 @@ static inline bool _INPLACE_OPERATION_ADD_OBJECT_LONG(PyObject **operand1, PyObj
932
932
 
933
933
  PyLongObject *operand2_long_object = (PyLongObject *)operand2;
934
934
 
935
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
936
- long r = MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object);
935
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
936
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object));
937
937
 
938
938
  if (Py_REFCNT(*operand1) == 1) {
939
- Nuitka_LongUpdateFromCLong(&*operand1, r);
939
+ Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
940
940
  goto exit_result_ok;
941
941
  } else {
942
942
  PyObject *obj = Nuitka_LongFromCLong(r);
@@ -949,16 +949,16 @@ static inline bool _INPLACE_OPERATION_ADD_OBJECT_LONG(PyObject **operand1, PyObj
949
949
  }
950
950
 
951
951
  if (Py_REFCNT(*operand1) == 1) {
952
- digit const *b_digits = operand2_long_object->ob_digit;
953
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
952
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
953
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
954
954
 
955
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
956
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
955
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
956
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
957
957
 
958
958
  if (a_negative) {
959
959
  if (b_negative) {
960
960
  *operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
961
- Py_SET_SIZE(*operand1, -Py_ABS(Py_SIZE(*operand1)));
961
+ Nuitka_LongSetSignNegative(*operand1);
962
962
  } else {
963
963
  *operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
964
964
  }
@@ -975,17 +975,17 @@ static inline bool _INPLACE_OPERATION_ADD_OBJECT_LONG(PyObject **operand1, PyObj
975
975
  {
976
976
  PyLongObject *z;
977
977
 
978
- digit const *a_digits = operand1_long_object->ob_digit;
979
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
980
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
981
- digit const *b_digits = operand2_long_object->ob_digit;
982
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
983
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
978
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
979
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
980
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
981
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
982
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
983
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
984
984
 
985
985
  if (a_negative) {
986
986
  if (b_negative) {
987
987
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
988
- Py_SET_SIZE(z, -(Py_SIZE(z)));
988
+ Nuitka_LongFlipSign(z);
989
989
  } else {
990
990
  z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
991
991
  }
@@ -1231,11 +1231,11 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_OBJECT(PyObject **operand1, PyObj
1231
1231
 
1232
1232
  PyLongObject *operand2_long_object = (PyLongObject *)operand2;
1233
1233
 
1234
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
1235
- long r = MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object);
1234
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && Nuitka_LongGetDigitSize(operand2_long_object) <= 1) {
1235
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object));
1236
1236
 
1237
1237
  if (Py_REFCNT(*operand1) == 1) {
1238
- Nuitka_LongUpdateFromCLong(&*operand1, r);
1238
+ Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
1239
1239
  goto exit_result_ok;
1240
1240
  } else {
1241
1241
  PyObject *obj = Nuitka_LongFromCLong(r);
@@ -1248,16 +1248,16 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_OBJECT(PyObject **operand1, PyObj
1248
1248
  }
1249
1249
 
1250
1250
  if (Py_REFCNT(*operand1) == 1) {
1251
- digit const *b_digits = operand2_long_object->ob_digit;
1252
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
1251
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
1252
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
1253
1253
 
1254
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
1255
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
1254
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
1255
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
1256
1256
 
1257
1257
  if (a_negative) {
1258
1258
  if (b_negative) {
1259
1259
  *operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
1260
- Py_SET_SIZE(*operand1, -Py_ABS(Py_SIZE(*operand1)));
1260
+ Nuitka_LongSetSignNegative(*operand1);
1261
1261
  } else {
1262
1262
  *operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
1263
1263
  }
@@ -1274,17 +1274,17 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_OBJECT(PyObject **operand1, PyObj
1274
1274
  {
1275
1275
  PyLongObject *z;
1276
1276
 
1277
- digit const *a_digits = operand1_long_object->ob_digit;
1278
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
1279
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
1280
- digit const *b_digits = operand2_long_object->ob_digit;
1281
- Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
1282
- bool b_negative = Py_SIZE(operand2_long_object) < 0;
1277
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
1278
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
1279
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
1280
+ digit const *b_digits = Nuitka_LongGetDigitPointer(operand2_long_object);
1281
+ Py_ssize_t b_digit_count = Nuitka_LongGetDigitSize(operand2_long_object);
1282
+ bool b_negative = Nuitka_LongIsNegative(operand2_long_object);
1283
1283
 
1284
1284
  if (a_negative) {
1285
1285
  if (b_negative) {
1286
1286
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
1287
- Py_SET_SIZE(z, -(Py_SIZE(z)));
1287
+ Nuitka_LongFlipSign(z);
1288
1288
  } else {
1289
1289
  z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
1290
1290
  }
@@ -2393,11 +2393,11 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
2393
2393
 
2394
2394
  PyLongObject *operand1_long_object = (PyLongObject *)*operand1;
2395
2395
 
2396
- if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && (operand2 == 0 ? 0 : 1) <= 1) {
2397
- long r = MEDIUM_VALUE(operand1_long_object) + (sdigit)operand2;
2396
+ if (Nuitka_LongGetDigitSize(operand1_long_object) <= 1 && (operand2 == 0 ? 0 : 1) <= 1) {
2397
+ long r = (long)(MEDIUM_VALUE(operand1_long_object) + (sdigit)operand2);
2398
2398
 
2399
2399
  if (Py_REFCNT(*operand1) == 1) {
2400
- Nuitka_LongUpdateFromCLong(&*operand1, r);
2400
+ Nuitka_LongUpdateFromCLong(&*operand1, (long)r);
2401
2401
  goto exit_result_ok;
2402
2402
  } else {
2403
2403
  PyObject *obj = Nuitka_LongFromCLong(r);
@@ -2413,13 +2413,13 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
2413
2413
  digit const *b_digits = (digit *)&operand2;
2414
2414
  Py_ssize_t b_digit_count = (operand2 == 0 ? 0 : 1);
2415
2415
 
2416
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
2416
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
2417
2417
  bool b_negative = operand2 < 0;
2418
2418
 
2419
2419
  if (a_negative) {
2420
2420
  if (b_negative) {
2421
2421
  *operand1 = _Nuitka_LongAddInplaceDigits(*operand1, b_digits, b_digit_count);
2422
- Py_SET_SIZE(*operand1, -Py_ABS(Py_SIZE(*operand1)));
2422
+ Nuitka_LongSetSignNegative(*operand1);
2423
2423
  } else {
2424
2424
  *operand1 = _Nuitka_LongSubInplaceDigits(*operand1, b_digits, b_digit_count, -1);
2425
2425
  }
@@ -2436,9 +2436,9 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
2436
2436
  {
2437
2437
  PyLongObject *z;
2438
2438
 
2439
- digit const *a_digits = operand1_long_object->ob_digit;
2440
- Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
2441
- bool a_negative = Py_SIZE(operand1_long_object) < 0;
2439
+ digit const *a_digits = Nuitka_LongGetDigitPointer(operand1_long_object);
2440
+ Py_ssize_t a_digit_count = Nuitka_LongGetDigitSize(operand1_long_object);
2441
+ bool a_negative = Nuitka_LongIsNegative(operand1_long_object);
2442
2442
  digit const *b_digits = (digit *)&operand2;
2443
2443
  Py_ssize_t b_digit_count = (operand2 == 0 ? 0 : 1);
2444
2444
  bool b_negative = operand2 < 0;
@@ -2446,7 +2446,7 @@ static inline bool _INPLACE_OPERATION_ADD_LONG_DIGIT(PyObject **operand1, long o
2446
2446
  if (a_negative) {
2447
2447
  if (b_negative) {
2448
2448
  z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
2449
- Py_SET_SIZE(z, -(Py_SIZE(z)));
2449
+ Nuitka_LongFlipSign(z);
2450
2450
  } else {
2451
2451
  z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
2452
2452
  }
@@ -96,7 +96,7 @@ NUITKA_MAY_BE_UNUSED static bool BYTES_ADD_INCREMENTAL(PyObject **operand1, PyOb
96
96
 
97
97
  NUITKA_MAY_BE_UNUSED static bool UNICODE_ADD_INCREMENTAL(PyThreadState *tstate, PyObject **operand1,
98
98
  PyObject *operand2) {
99
- Py_ssize_t operand2_size = PyUnicode_GET_SIZE(operand2);
99
+ Py_ssize_t operand2_size = PyUnicode_GET_LENGTH(operand2);
100
100
  if (operand2_size == 0) {
101
101
  return true;
102
102
  }