Nuitka-winsvc 1.8__cp311-cp311-win_amd64.whl → 2.5.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.
- Nuitka_winsvc-1.8.data/scripts/nuitka-run.bat → Nuitka_winsvc-2.5.1.data/scripts/nuitka-run.cmd +9 -9
- Nuitka_winsvc-1.8.data/scripts/nuitka.bat → Nuitka_winsvc-2.5.1.data/scripts/nuitka.cmd +15 -15
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/METADATA +5 -3
- Nuitka_winsvc-2.5.1.dist-info/RECORD +977 -0
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +49 -17
- nuitka/BytecodeCaching.py +24 -20
- nuitka/Bytecodes.py +23 -19
- nuitka/CacheCleanup.py +28 -23
- nuitka/Constants.py +19 -17
- nuitka/Errors.py +23 -17
- nuitka/HardImportRegistry.py +408 -0
- nuitka/MainControl.py +209 -116
- nuitka/ModuleRegistry.py +83 -20
- nuitka/OptionParsing.py +467 -221
- nuitka/Options.py +701 -225
- nuitka/OutputDirectories.py +47 -23
- nuitka/PostProcessing.py +133 -79
- nuitka/Progress.py +73 -24
- nuitka/PythonFlavors.py +141 -32
- nuitka/PythonOperators.py +18 -17
- nuitka/PythonVersions.py +107 -19
- nuitka/Serialization.py +70 -55
- nuitka/SourceCodeReferences.py +19 -17
- nuitka/Tracing.py +176 -70
- nuitka/TreeXML.py +31 -26
- nuitka/Variables.py +39 -41
- nuitka/Version.py +22 -8
- nuitka/__init__.py +5 -4
- nuitka/__main__.py +95 -29
- nuitka/__past__.py +44 -34
- nuitka/build/Backend.scons +243 -141
- nuitka/build/CCompilerVersion.scons +45 -31
- nuitka/build/DataComposerInterface.py +20 -17
- nuitka/build/Onefile.scons +56 -54
- nuitka/build/SconsCaching.py +105 -92
- nuitka/build/SconsCompilerSettings.py +167 -68
- nuitka/build/SconsHacks.py +25 -19
- nuitka/build/SconsInterface.py +155 -54
- nuitka/build/SconsProgress.py +19 -18
- nuitka/build/SconsSpawn.py +62 -33
- nuitka/build/SconsUtils.py +152 -55
- nuitka/build/__init__.py +5 -4
- nuitka/build/include/nuitka/allocator.h +228 -22
- nuitka/build/include/nuitka/builtins.h +17 -17
- nuitka/build/include/nuitka/calling.h +24 -24
- nuitka/build/include/nuitka/checkers.h +17 -18
- nuitka/build/include/nuitka/checksum_tools.h +14 -19
- nuitka/build/include/nuitka/compiled_asyncgen.h +28 -25
- nuitka/build/include/nuitka/compiled_cell.h +33 -18
- nuitka/build/include/nuitka/compiled_coroutine.h +18 -18
- nuitka/build/include/nuitka/compiled_frame.h +93 -54
- nuitka/build/include/nuitka/compiled_function.h +42 -20
- nuitka/build/include/nuitka/compiled_generator.h +24 -18
- nuitka/build/include/nuitka/compiled_method.h +17 -18
- nuitka/build/include/nuitka/constants.h +35 -18
- nuitka/build/include/nuitka/constants_blob.h +17 -17
- nuitka/build/include/nuitka/debug_settings.h +60 -0
- nuitka/build/include/nuitka/environment_variables.h +30 -0
- nuitka/build/include/nuitka/environment_variables_system.h +45 -0
- nuitka/build/include/nuitka/exception_groups.h +23 -26
- nuitka/build/include/nuitka/exceptions.h +717 -171
- nuitka/build/include/nuitka/filesystem_paths.h +26 -20
- nuitka/build/include/nuitka/freelists.h +38 -18
- nuitka/build/include/nuitka/helper/attributes.h +24 -22
- nuitka/build/include/nuitka/helper/boolean.h +17 -17
- nuitka/build/include/nuitka/helper/bytearrays.h +17 -17
- nuitka/build/include/nuitka/helper/bytes.h +14 -15
- nuitka/build/include/nuitka/helper/calling_generated.h +69 -69
- nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_eq.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_ge.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_gt.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_le.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_lt.h +17 -17
- nuitka/build/include/nuitka/helper/comparisons_ne.h +17 -17
- nuitka/build/include/nuitka/helper/complex.h +17 -17
- nuitka/build/include/nuitka/helper/dictionaries.h +89 -51
- nuitka/build/include/nuitka/helper/floats.h +17 -18
- nuitka/build/include/nuitka/helper/import_hard.h +25 -17
- nuitka/build/include/nuitka/helper/indexes.h +17 -18
- nuitka/build/include/nuitka/helper/ints.h +115 -54
- nuitka/build/include/nuitka/helper/iterators.h +99 -51
- nuitka/build/include/nuitka/helper/lists.h +26 -24
- nuitka/build/include/nuitka/helper/lists_generated.h +22 -22
- nuitka/build/include/nuitka/helper/mappings.h +17 -18
- nuitka/build/include/nuitka/helper/operations.h +20 -17
- nuitka/build/include/nuitka/helper/operations_binary_add.h +23 -17
- nuitka/build/include/nuitka/helper/operations_binary_bitand.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_bitor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_divmod.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
- nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_lshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_matmult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_mod.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_mult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_pow.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_rshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +23 -17
- nuitka/build/include/nuitka/helper/operations_binary_truediv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_builtin_types.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +20 -17
- nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_mod.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_mult.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_pow.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +17 -17
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +20 -17
- nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +17 -17
- nuitka/build/include/nuitka/helper/raising.h +68 -37
- nuitka/build/include/nuitka/helper/rangeobjects.h +17 -17
- nuitka/build/include/nuitka/helper/richcomparisons.h +21 -14
- nuitka/build/include/nuitka/helper/sequences.h +19 -13
- nuitka/build/include/nuitka/helper/sets.h +11 -12
- nuitka/build/include/nuitka/helper/slices.h +31 -25
- nuitka/build/include/nuitka/helper/strings.h +16 -17
- nuitka/build/include/nuitka/helper/subscripts.h +18 -201
- nuitka/build/include/nuitka/helper/tuples.h +64 -52
- nuitka/build/include/nuitka/helpers.h +50 -22
- nuitka/build/include/nuitka/importing.h +28 -21
- nuitka/build/include/nuitka/jit_sources.h +25 -0
- nuitka/build/include/nuitka/prelude.h +163 -71
- nuitka/build/include/nuitka/printing.h +29 -22
- nuitka/build/include/nuitka/python_pgo.h +19 -18
- nuitka/build/include/nuitka/safe_string_ops.h +20 -18
- nuitka/build/include/nuitka/threading.h +45 -32
- nuitka/build/include/nuitka/tracing.h +28 -18
- nuitka/build/include/nuitka/type_aliases.h +30 -0
- nuitka/build/include/nuitka/unfreezing.h +29 -23
- nuitka/build/inline_copy/bin/scons.py +14 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/ListVariable.py +6 -6
- nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +0 -3
- nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
- nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
- nuitka/build/inline_copy/stubgen/six.py +998 -0
- nuitka/build/inline_copy/stubgen/stubgen.py +307 -0
- nuitka/build/inline_copy/tqdm/tqdm/__init__.py +2 -2
- nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +4 -1
- nuitka/build/inline_copy/tqdm/tqdm/utils.py +14 -8
- nuitka/build/inline_copy/tqdm/tqdm/version.py +1 -8
- nuitka/build/inline_copy/zlib/LICENSE +22 -0
- nuitka/build/inline_copy/zlib/crc32.c +1049 -0
- nuitka/build/inline_copy/zlib/crc32.h +9446 -0
- nuitka/build/inline_copy/zlib/zconf.h +551 -0
- nuitka/build/inline_copy/zlib/zlib.h +1938 -0
- nuitka/build/inline_copy/zlib/zutil.h +275 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +221 -221
- nuitka/build/static_src/CompiledCellType.c +69 -44
- nuitka/build/static_src/CompiledCodeHelpers.c +276 -159
- nuitka/build/static_src/CompiledCoroutineType.c +229 -226
- nuitka/build/static_src/CompiledFrameType.c +323 -138
- nuitka/build/static_src/CompiledFunctionType.c +547 -231
- nuitka/build/static_src/CompiledGeneratorType.c +416 -290
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +593 -228
- nuitka/build/static_src/CompiledMethodType.c +91 -82
- nuitka/build/static_src/HelpersAllocator.c +352 -45
- nuitka/build/static_src/HelpersAttributes.c +30 -72
- nuitka/build/static_src/HelpersBuiltin.c +65 -46
- nuitka/build/static_src/HelpersBuiltinTypeMethods.c +17 -17
- nuitka/build/static_src/HelpersBytes.c +19 -20
- nuitka/build/static_src/HelpersCalling.c +40 -37
- nuitka/build/static_src/HelpersCallingGenerated.c +1061 -242
- nuitka/build/static_src/HelpersChecksumTools.c +35 -21
- nuitka/build/static_src/HelpersClasses.c +17 -17
- nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
- nuitka/build/static_src/HelpersComparisonEq.c +536 -496
- nuitka/build/static_src/HelpersComparisonEqUtils.c +22 -19
- nuitka/build/static_src/HelpersComparisonGe.c +531 -501
- nuitka/build/static_src/HelpersComparisonGt.c +530 -500
- nuitka/build/static_src/HelpersComparisonLe.c +531 -501
- nuitka/build/static_src/HelpersComparisonLt.c +530 -500
- nuitka/build/static_src/HelpersComparisonNe.c +538 -496
- nuitka/build/static_src/HelpersConsole.c +122 -0
- nuitka/build/static_src/HelpersConstantsBlob.c +550 -521
- nuitka/build/static_src/HelpersDeepcopy.c +33 -33
- nuitka/build/static_src/HelpersDictionaries.c +232 -63
- nuitka/build/static_src/HelpersDictionariesGenerated.c +130 -127
- nuitka/build/static_src/HelpersDumpBacktraces.c +63 -0
- nuitka/build/static_src/HelpersEnvironmentVariables.c +65 -0
- nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +93 -0
- nuitka/build/static_src/HelpersExceptions.c +147 -62
- nuitka/build/static_src/HelpersFiles.c +116 -22
- nuitka/build/static_src/HelpersFilesystemPaths.c +292 -181
- nuitka/build/static_src/HelpersFloats.c +37 -31
- nuitka/build/static_src/HelpersHeapStorage.c +21 -17
- nuitka/build/static_src/HelpersImport.c +61 -29
- nuitka/build/static_src/HelpersImportHard.c +74 -61
- nuitka/build/static_src/HelpersJitSources.c +46 -0
- nuitka/build/static_src/HelpersLists.c +237 -58
- nuitka/build/static_src/HelpersListsGenerated.c +41 -41
- nuitka/build/static_src/HelpersMappings.c +17 -17
- nuitka/build/static_src/HelpersMatching.c +137 -51
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +397 -152
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +102 -52
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +55 -55
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +55 -55
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +55 -55
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +49 -43
- nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +17 -17
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +55 -49
- nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +20 -21
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +83 -83
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +25 -24
- nuitka/build/static_src/HelpersOperationBinaryMod.c +129 -117
- nuitka/build/static_src/HelpersOperationBinaryMult.c +98 -82
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +33 -30
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +55 -49
- nuitka/build/static_src/HelpersOperationBinaryPow.c +68 -68
- nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +12 -12
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +51 -51
- nuitka/build/static_src/HelpersOperationBinarySub.c +309 -88
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +49 -43
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +333 -163
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +24 -22
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +58 -58
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +58 -58
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +58 -58
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +73 -68
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +64 -64
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +38 -37
- nuitka/build/static_src/HelpersOperationInplaceMod.c +145 -140
- nuitka/build/static_src/HelpersOperationInplaceMult.c +89 -84
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +73 -68
- nuitka/build/static_src/HelpersOperationInplacePow.c +82 -82
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +48 -48
- nuitka/build/static_src/HelpersOperationInplaceSub.c +275 -122
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +68 -63
- nuitka/build/static_src/HelpersProfiling.c +25 -24
- nuitka/build/static_src/HelpersPythonPgo.c +22 -22
- nuitka/build/static_src/HelpersRaising.c +296 -283
- nuitka/build/static_src/HelpersSafeStrings.c +34 -22
- nuitka/build/static_src/HelpersSequences.c +18 -19
- nuitka/build/static_src/HelpersSlices.c +29 -23
- nuitka/build/static_src/HelpersStrings.c +235 -38
- nuitka/build/static_src/HelpersTuples.c +46 -34
- nuitka/build/static_src/HelpersTypes.c +166 -25
- nuitka/build/static_src/InspectPatcher.c +108 -27
- nuitka/build/static_src/MainProgram.c +464 -280
- nuitka/build/static_src/MetaPathBasedLoader.c +381 -257
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +39 -26
- nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +17 -18
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +227 -29
- nuitka/build/static_src/OnefileBootstrap.c +281 -164
- nuitka/build/static_src/OnefileSplashScreen.cpp +51 -27
- nuitka/code_generation/AsyncgenCodes.py +21 -23
- nuitka/code_generation/AttributeCodes.py +31 -27
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +290 -184
- nuitka/code_generation/BranchCodes.py +19 -17
- nuitka/code_generation/BuiltinCodes.py +29 -18
- nuitka/code_generation/CallCodes.py +35 -33
- nuitka/code_generation/ClassCodes.py +19 -17
- nuitka/code_generation/CodeGeneration.py +61 -28
- nuitka/code_generation/CodeHelperSelection.py +20 -18
- nuitka/code_generation/CodeHelpers.py +28 -21
- nuitka/code_generation/CodeObjectCodes.py +36 -26
- nuitka/code_generation/ComparisonCodes.py +51 -22
- nuitka/code_generation/ComparisonHelperDefinitions.py +42 -25
- nuitka/code_generation/ConditionalCodes.py +19 -17
- nuitka/code_generation/ConstantCodes.py +82 -28
- nuitka/code_generation/Contexts.py +180 -42
- nuitka/code_generation/CoroutineCodes.py +21 -23
- nuitka/code_generation/CtypesCodes.py +19 -17
- nuitka/code_generation/DictCodes.py +28 -26
- nuitka/code_generation/Emission.py +21 -18
- nuitka/code_generation/ErrorCodes.py +57 -79
- nuitka/code_generation/EvalCodes.py +24 -20
- nuitka/code_generation/ExceptionCodes.py +182 -104
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +45 -27
- nuitka/code_generation/ExpressionCodes.py +19 -17
- nuitka/code_generation/FrameCodes.py +28 -31
- nuitka/code_generation/FunctionCodes.py +26 -27
- nuitka/code_generation/GeneratorCodes.py +25 -26
- nuitka/code_generation/GlobalConstants.py +51 -25
- nuitka/code_generation/GlobalsLocalsCodes.py +23 -21
- nuitka/code_generation/IdCodes.py +19 -17
- nuitka/code_generation/ImportCodes.py +90 -50
- nuitka/code_generation/Indentation.py +23 -22
- nuitka/code_generation/IndexCodes.py +19 -17
- nuitka/code_generation/InjectCCodes.py +14 -12
- nuitka/code_generation/IntegerCodes.py +19 -17
- nuitka/code_generation/IteratorCodes.py +86 -71
- nuitka/code_generation/JitCodes.py +44 -0
- nuitka/code_generation/LabelCodes.py +19 -17
- nuitka/code_generation/LineNumberCodes.py +20 -20
- nuitka/code_generation/ListCodes.py +32 -36
- nuitka/code_generation/LoaderCodes.py +22 -17
- nuitka/code_generation/LocalsDictCodes.py +56 -32
- nuitka/code_generation/LoopCodes.py +19 -17
- nuitka/code_generation/MatchCodes.py +42 -22
- nuitka/code_generation/ModuleCodes.py +71 -29
- nuitka/code_generation/Namify.py +27 -23
- nuitka/code_generation/NetworkxCodes.py +51 -0
- nuitka/code_generation/OperationCodes.py +80 -51
- nuitka/code_generation/PackageResourceCodes.py +96 -23
- nuitka/code_generation/PrintCodes.py +19 -17
- nuitka/code_generation/PythonAPICodes.py +19 -17
- nuitka/code_generation/RaisingCodes.py +183 -107
- nuitka/code_generation/Reports.py +32 -22
- nuitka/code_generation/ReturnCodes.py +20 -32
- nuitka/code_generation/SetCodes.py +19 -17
- nuitka/code_generation/SliceCodes.py +22 -20
- nuitka/code_generation/StringCodes.py +19 -17
- nuitka/code_generation/SubscriptCodes.py +24 -30
- nuitka/code_generation/TensorflowCodes.py +54 -0
- nuitka/code_generation/TryCodes.py +31 -41
- nuitka/code_generation/TupleCodes.py +20 -18
- nuitka/code_generation/TypeAliasCodes.py +119 -0
- nuitka/code_generation/VariableCodes.py +118 -55
- nuitka/code_generation/VariableDeclarations.py +28 -25
- nuitka/code_generation/YieldCodes.py +23 -21
- nuitka/code_generation/__init__.py +5 -4
- nuitka/code_generation/c_types/CTypeBases.py +29 -19
- nuitka/code_generation/c_types/CTypeBooleans.py +19 -17
- nuitka/code_generation/c_types/CTypeCFloats.py +19 -17
- nuitka/code_generation/c_types/CTypeCLongs.py +19 -18
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +22 -17
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +22 -21
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +89 -43
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +20 -18
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +43 -31
- nuitka/code_generation/c_types/CTypeVoids.py +20 -17
- nuitka/code_generation/c_types/__init__.py +5 -4
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +20 -19
- nuitka/code_generation/templates/CodeTemplatesConstants.py +143 -39
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +20 -19
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +33 -33
- nuitka/code_generation/templates/CodeTemplatesFrames.py +36 -27
- nuitka/code_generation/templates/CodeTemplatesFunction.py +20 -19
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +21 -19
- nuitka/code_generation/templates/CodeTemplatesIterators.py +19 -53
- nuitka/code_generation/templates/CodeTemplatesLoader.py +25 -19
- nuitka/code_generation/templates/CodeTemplatesModules.py +278 -169
- nuitka/code_generation/templates/CodeTemplatesVariables.py +115 -27
- nuitka/code_generation/templates/TemplateDebugWrapper.py +19 -18
- nuitka/code_generation/templates/__init__.py +5 -4
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +19 -19
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +21 -21
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +79 -28
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +22 -22
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +19 -19
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +19 -19
- nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +74 -106
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +19 -20
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +19 -19
- nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +6 -6
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +23 -23
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +35 -35
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +37 -37
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +18 -18
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +50 -38
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +27 -27
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +37 -37
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +31 -31
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +35 -31
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +20 -20
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +28 -28
- nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +48 -48
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +21 -18
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +27 -25
- nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +17 -17
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +21 -18
- nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +17 -17
- nuitka/containers/Namedtuples.py +25 -18
- nuitka/containers/OrderedSets.py +105 -5
- nuitka/containers/OrderedSetsFallback.py +19 -17
- nuitka/containers/__init__.py +5 -4
- nuitka/distutils/Build.py +33 -18
- nuitka/distutils/DistutilCommands.py +84 -33
- nuitka/distutils/__init__.py +5 -4
- nuitka/finalizations/Finalization.py +21 -18
- nuitka/finalizations/FinalizeMarkups.py +31 -55
- nuitka/finalizations/__init__.py +5 -4
- nuitka/freezer/DependsExe.py +60 -30
- nuitka/freezer/DllDependenciesCommon.py +47 -20
- nuitka/freezer/DllDependenciesMacOS.py +165 -58
- nuitka/freezer/DllDependenciesPosix.py +29 -19
- nuitka/freezer/DllDependenciesWin32.py +55 -33
- nuitka/freezer/ImportDetection.py +23 -17
- nuitka/freezer/IncludedDataFiles.py +142 -48
- nuitka/freezer/IncludedEntryPoints.py +104 -39
- nuitka/freezer/Onefile.py +32 -22
- nuitka/freezer/Standalone.py +166 -53
- nuitka/freezer/__init__.py +5 -4
- nuitka/importing/IgnoreListing.py +19 -17
- nuitka/importing/ImportCache.py +24 -21
- nuitka/importing/ImportResolving.py +103 -95
- nuitka/importing/Importing.py +319 -98
- nuitka/importing/PreloadedPackages.py +21 -18
- nuitka/importing/Recursion.py +142 -47
- nuitka/importing/StandardLibrary.py +96 -80
- nuitka/importing/__init__.py +5 -4
- nuitka/nodes/AsyncgenNodes.py +22 -23
- nuitka/nodes/AttributeLookupNodes.py +19 -17
- nuitka/nodes/AttributeNodes.py +19 -17
- nuitka/nodes/AttributeNodesGenerated.py +49 -24
- nuitka/nodes/BuiltinAllNodes.py +19 -17
- nuitka/nodes/BuiltinAnyNodes.py +19 -17
- nuitka/nodes/BuiltinComplexNodes.py +20 -17
- nuitka/nodes/BuiltinDecodingNodes.py +19 -17
- nuitka/nodes/BuiltinDecoratorNodes.py +19 -17
- nuitka/nodes/BuiltinDictNodes.py +19 -17
- nuitka/nodes/BuiltinFormatNodes.py +20 -17
- nuitka/nodes/BuiltinHashNodes.py +19 -17
- nuitka/nodes/BuiltinInputNodes.py +19 -17
- nuitka/nodes/BuiltinIntegerNodes.py +19 -17
- nuitka/nodes/BuiltinIteratorNodes.py +25 -21
- nuitka/nodes/BuiltinLenNodes.py +19 -17
- nuitka/nodes/BuiltinNextNodes.py +19 -17
- nuitka/nodes/BuiltinOpenNodes.py +52 -18
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +40 -23
- nuitka/nodes/BuiltinRangeNodes.py +21 -19
- nuitka/nodes/BuiltinRefNodes.py +73 -40
- nuitka/nodes/BuiltinSumNodes.py +20 -18
- nuitka/nodes/BuiltinTypeNodes.py +19 -17
- nuitka/nodes/BuiltinVarsNodes.py +19 -18
- nuitka/nodes/BytesNodes.py +19 -17
- nuitka/nodes/CallNodes.py +19 -17
- nuitka/nodes/Checkers.py +19 -17
- nuitka/nodes/ChildrenHavingMixins.py +1624 -283
- nuitka/nodes/ClassNodes.py +49 -29
- nuitka/nodes/CodeObjectSpecs.py +29 -18
- nuitka/nodes/ComparisonNodes.py +19 -17
- nuitka/nodes/ConditionalNodes.py +24 -25
- nuitka/nodes/ConstantRefNodes.py +57 -17
- nuitka/nodes/ContainerMakingNodes.py +19 -17
- nuitka/nodes/ContainerOperationNodes.py +19 -17
- nuitka/nodes/CoroutineNodes.py +22 -23
- nuitka/nodes/CtypesNodes.py +19 -18
- nuitka/nodes/DictionaryNodes.py +19 -18
- nuitka/nodes/ExceptionNodes.py +131 -43
- nuitka/nodes/ExecEvalNodes.py +19 -17
- nuitka/nodes/ExpressionBases.py +34 -26
- nuitka/nodes/ExpressionBasesGenerated.py +341 -35
- nuitka/nodes/ExpressionShapeMixins.py +19 -17
- nuitka/nodes/FrameNodes.py +41 -28
- nuitka/nodes/FunctionAttributeNodes.py +19 -17
- nuitka/nodes/FunctionNodes.py +84 -38
- nuitka/nodes/FutureSpecs.py +35 -20
- nuitka/nodes/GeneratorNodes.py +24 -25
- nuitka/nodes/GlobalsLocalsNodes.py +22 -17
- nuitka/nodes/HardImportNodesGenerated.py +746 -148
- nuitka/nodes/ImportHardNodes.py +46 -38
- nuitka/nodes/ImportNodes.py +438 -448
- nuitka/nodes/IndicatorMixins.py +19 -17
- nuitka/nodes/InjectCNodes.py +19 -18
- nuitka/nodes/IterationHandles.py +55 -34
- nuitka/nodes/KeyValuePairNodes.py +19 -17
- nuitka/nodes/ListOperationNodes.py +33 -21
- nuitka/nodes/LocalsDictNodes.py +19 -17
- nuitka/nodes/LocalsScopes.py +41 -41
- nuitka/nodes/LoopNodes.py +28 -17
- nuitka/nodes/MatchNodes.py +37 -24
- nuitka/nodes/ModuleAttributeNodes.py +18 -35
- nuitka/nodes/ModuleNodes.py +90 -31
- nuitka/nodes/NetworkxNodes.py +45 -0
- nuitka/nodes/NodeBases.py +73 -44
- nuitka/nodes/NodeMakingHelpers.py +92 -69
- nuitka/nodes/NodeMetaClasses.py +45 -28
- nuitka/nodes/OperatorNodes.py +28 -26
- nuitka/nodes/OperatorNodesUnary.py +148 -20
- nuitka/nodes/OsSysNodes.py +97 -18
- nuitka/nodes/OutlineNodes.py +24 -22
- nuitka/nodes/PackageMetadataNodes.py +37 -27
- nuitka/nodes/PackageResourceNodes.py +29 -23
- nuitka/nodes/PrintNodes.py +19 -17
- nuitka/nodes/ReturnNodes.py +20 -18
- nuitka/nodes/SideEffectNodes.py +19 -17
- nuitka/nodes/SliceNodes.py +20 -18
- nuitka/nodes/StatementBasesGenerated.py +125 -79
- nuitka/nodes/StatementNodes.py +27 -24
- nuitka/nodes/StrNodes.py +19 -17
- nuitka/nodes/StringConcatenationNodes.py +20 -17
- nuitka/nodes/SubscriptNodes.py +27 -25
- nuitka/nodes/TensorflowNodes.py +38 -0
- nuitka/nodes/TryNodes.py +19 -17
- nuitka/nodes/TypeMatchNodes.py +19 -17
- nuitka/nodes/TypeNodes.py +68 -18
- nuitka/nodes/VariableAssignNodes.py +122 -64
- nuitka/nodes/VariableDelNodes.py +19 -17
- nuitka/nodes/VariableNameNodes.py +19 -17
- nuitka/nodes/VariableRefNodes.py +63 -26
- nuitka/nodes/VariableReleaseNodes.py +19 -17
- nuitka/nodes/YieldNodes.py +21 -19
- nuitka/nodes/__init__.py +5 -4
- nuitka/nodes/shapes/BuiltinTypeShapes.py +169 -46
- nuitka/nodes/shapes/ControlFlowDescriptions.py +19 -17
- nuitka/nodes/shapes/ShapeMixins.py +57 -17
- nuitka/nodes/shapes/StandardShapes.py +80 -21
- nuitka/nodes/shapes/__init__.py +5 -4
- nuitka/optimizations/BytecodeDemotion.py +21 -18
- nuitka/optimizations/FunctionInlining.py +22 -23
- nuitka/optimizations/Graphs.py +19 -17
- nuitka/optimizations/Optimization.py +39 -35
- nuitka/optimizations/OptimizeBuiltinCalls.py +31 -27
- nuitka/optimizations/Tags.py +19 -18
- nuitka/optimizations/TraceCollections.py +67 -24
- nuitka/optimizations/ValueTraces.py +92 -25
- nuitka/optimizations/__init__.py +5 -4
- nuitka/pgo/PGO.py +33 -23
- nuitka/pgo/__init__.py +5 -4
- nuitka/plugins/PluginBase.py +655 -112
- nuitka/plugins/Plugins.py +247 -61
- nuitka/plugins/YamlPluginBase.py +121 -0
- nuitka/plugins/__init__.py +5 -4
- nuitka/plugins/standard/AntiBloatPlugin.py +374 -135
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +20 -19
- nuitka/plugins/standard/DataFilesPlugin.py +65 -29
- nuitka/plugins/standard/DelvewheelPlugin.py +32 -24
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +37 -0
- nuitka/plugins/standard/DillPlugin/dill-postLoad.py +256 -0
- nuitka/plugins/standard/DillPlugin.py +42 -134
- nuitka/plugins/standard/DllFilesPlugin.py +125 -42
- nuitka/plugins/standard/EnumPlugin.py +19 -17
- nuitka/plugins/standard/EventletPlugin.py +19 -17
- nuitka/plugins/standard/GeventPlugin.py +19 -17
- nuitka/plugins/standard/GiPlugin.py +44 -28
- nuitka/plugins/standard/GlfwPlugin.py +20 -17
- nuitka/plugins/standard/ImplicitImports.py +403 -54
- nuitka/plugins/standard/KivyPlugin.py +24 -20
- nuitka/plugins/standard/MatplotlibPlugin.py +99 -42
- nuitka/plugins/standard/MultiprocessingPlugin.py +35 -39
- nuitka/plugins/standard/NumpyPlugin.py +19 -17
- nuitka/plugins/standard/OptionsNannyPlugin.py +48 -76
- nuitka/plugins/standard/PbrPlugin.py +21 -19
- nuitka/plugins/standard/PkgResourcesPlugin.py +34 -23
- nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
- nuitka/plugins/standard/PmwPlugin.py +30 -27
- nuitka/plugins/standard/PySidePyQtPlugin.py +82 -80
- nuitka/plugins/standard/PywebViewPlugin.py +19 -17
- nuitka/plugins/standard/SpacyPlugin.py +136 -0
- nuitka/plugins/standard/TensorflowPlugin.py +20 -17
- nuitka/plugins/standard/TkinterPlugin.py +102 -108
- nuitka/plugins/standard/TorchPlugin.py +20 -17
- nuitka/plugins/standard/TransformersPlugin.py +90 -231
- nuitka/plugins/standard/TrioPlugin.py +18 -15
- nuitka/plugins/standard/UpxPlugin.py +21 -19
- nuitka/plugins/standard/__init__.py +5 -4
- nuitka/plugins/standard/standard.nuitka-package.config.yml +3925 -1293
- nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +14 -14
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +154 -66
- nuitka/reports/CompilationReportReader.py +79 -0
- nuitka/reports/LicenseReport.rst.j2 +21 -21
- nuitka/reports/Reports.py +363 -76
- nuitka/reports/__init__.py +5 -4
- nuitka/specs/BuiltinBytesOperationSpecs.py +18 -17
- nuitka/specs/BuiltinDictOperationSpecs.py +18 -17
- nuitka/specs/BuiltinListOperationSpecs.py +18 -17
- nuitka/specs/BuiltinParameterSpecs.py +35 -21
- nuitka/specs/BuiltinStrOperationSpecs.py +19 -18
- nuitka/specs/BuiltinTypeOperationSpecs.py +18 -18
- nuitka/specs/BuiltinUnicodeOperationSpecs.py +18 -17
- nuitka/specs/HardImportSpecs.py +74 -22
- nuitka/specs/ParameterSpecs.py +60 -45
- nuitka/specs/__init__.py +5 -4
- nuitka/tools/Basics.py +20 -18
- nuitka/tools/__init__.py +5 -4
- nuitka/tools/commercial/__init__.py +7 -6
- nuitka/tools/data_composer/DataComposer.py +78 -62
- nuitka/tools/data_composer/__init__.py +5 -4
- nuitka/tools/data_composer/__main__.py +18 -17
- nuitka/tools/environments/CreateEnvironment.py +20 -17
- nuitka/tools/environments/Virtualenv.py +60 -32
- nuitka/tools/environments/__init__.py +5 -4
- nuitka/tools/general/__init__.py +5 -4
- nuitka/tools/general/dll_report/__init__.py +5 -4
- nuitka/tools/general/dll_report/__main__.py +29 -22
- nuitka/tools/general/find_module/FindModuleCode.py +35 -22
- nuitka/tools/general/find_module/__init__.py +5 -4
- nuitka/tools/onefile_compressor/OnefileCompressor.py +213 -131
- nuitka/tools/onefile_compressor/__init__.py +5 -4
- nuitka/tools/onefile_compressor/__main__.py +18 -17
- nuitka/tools/podman/Podman.py +19 -17
- nuitka/tools/podman/__init__.py +5 -4
- nuitka/tools/podman/__main__.py +35 -19
- nuitka/tools/profiler/__init__.py +5 -4
- nuitka/tools/profiler/__main__.py +18 -17
- nuitka/tools/scanning/DisplayPackageDLLs.py +47 -22
- nuitka/tools/scanning/DisplayPackageData.py +31 -19
- nuitka/tools/scanning/__init__.py +5 -4
- nuitka/tools/specialize/CTypeDescriptions.py +251 -80
- nuitka/tools/specialize/Common.py +18 -17
- nuitka/tools/specialize/SpecializeC.py +248 -82
- nuitka/tools/specialize/SpecializePython.py +108 -45
- nuitka/tools/specialize/__init__.py +5 -4
- nuitka/tools/testing/Common.py +175 -114
- nuitka/tools/testing/Constructs.py +19 -17
- nuitka/tools/testing/OutputComparison.py +54 -18
- nuitka/tools/testing/Pythons.py +19 -18
- nuitka/tools/testing/RuntimeTracing.py +20 -19
- nuitka/tools/testing/SearchModes.py +26 -20
- nuitka/tools/testing/Valgrind.py +19 -17
- nuitka/tools/testing/__init__.py +5 -4
- nuitka/tools/testing/check_reference_counts/__init__.py +5 -4
- nuitka/tools/testing/check_reference_counts/__main__.py +18 -18
- nuitka/tools/testing/compare_with_cpython/__init__.py +5 -4
- nuitka/tools/testing/compare_with_cpython/__main__.py +39 -30
- nuitka/tools/testing/find_sxs_modules/__init__.py +5 -4
- nuitka/tools/testing/find_sxs_modules/__main__.py +17 -17
- nuitka/tools/testing/measure_construct_performance/__init__.py +5 -4
- nuitka/tools/testing/measure_construct_performance/__main__.py +23 -33
- nuitka/tools/testing/run_nuitka_tests/__init__.py +5 -4
- nuitka/tools/testing/run_nuitka_tests/__main__.py +134 -51
- nuitka/tools/watch/AutoStage.py +145 -0
- nuitka/tools/watch/GitHub.py +113 -0
- nuitka/tools/watch/__init__.py +5 -4
- nuitka/tools/watch/__main__.py +322 -91
- nuitka/tree/Building.py +184 -182
- nuitka/tree/ComplexCallHelperFunctions.py +84 -58
- nuitka/tree/Extractions.py +19 -17
- nuitka/tree/InternalModule.py +29 -20
- nuitka/tree/Operations.py +19 -17
- nuitka/tree/ReformulationAssertStatements.py +51 -31
- nuitka/tree/ReformulationAssignmentStatements.py +96 -91
- nuitka/tree/ReformulationBooleanExpressions.py +19 -17
- nuitka/tree/ReformulationCallExpressions.py +20 -18
- nuitka/tree/ReformulationClasses.py +45 -39
- nuitka/tree/ReformulationClasses3.py +239 -116
- nuitka/tree/ReformulationComparisonExpressions.py +29 -35
- nuitka/tree/ReformulationContractionExpressions.py +58 -55
- nuitka/tree/ReformulationDictionaryCreation.py +41 -35
- nuitka/tree/ReformulationExecStatements.py +42 -39
- nuitka/tree/ReformulationForLoopStatements.py +30 -34
- nuitka/tree/ReformulationFunctionStatements.py +59 -55
- nuitka/tree/ReformulationImportStatements.py +34 -29
- nuitka/tree/ReformulationLambdaExpressions.py +23 -24
- nuitka/tree/ReformulationMatchStatements.py +246 -92
- nuitka/tree/ReformulationMultidist.py +22 -18
- nuitka/tree/ReformulationNamespacePackages.py +55 -46
- nuitka/tree/ReformulationPrintStatements.py +23 -24
- nuitka/tree/ReformulationSequenceCreation.py +50 -49
- nuitka/tree/ReformulationSubscriptExpressions.py +19 -17
- nuitka/tree/ReformulationTryExceptStatements.py +19 -17
- nuitka/tree/ReformulationTryFinallyStatements.py +34 -17
- nuitka/tree/ReformulationWhileLoopStatements.py +19 -17
- nuitka/tree/ReformulationWithStatements.py +39 -41
- nuitka/tree/ReformulationYieldExpressions.py +44 -24
- nuitka/tree/SourceHandling.py +76 -31
- nuitka/tree/SyntaxErrors.py +19 -17
- nuitka/tree/TreeHelpers.py +33 -20
- nuitka/tree/VariableClosure.py +35 -39
- nuitka/tree/__init__.py +5 -4
- nuitka/utils/AppDirs.py +41 -20
- nuitka/utils/CStrings.py +66 -21
- nuitka/utils/CommandLineOptions.py +111 -22
- nuitka/utils/Distributions.py +445 -54
- nuitka/utils/Download.py +89 -57
- nuitka/utils/Execution.py +102 -58
- nuitka/utils/FileOperations.py +357 -128
- nuitka/utils/Hashing.py +55 -33
- nuitka/utils/Images.py +26 -19
- nuitka/utils/Importing.py +119 -37
- nuitka/utils/InlineCopies.py +52 -0
- nuitka/utils/InstalledPythons.py +85 -75
- nuitka/utils/InstanceCounters.py +20 -17
- nuitka/utils/Jinja2.py +30 -22
- nuitka/utils/Json.py +21 -19
- nuitka/utils/MacOSApp.py +26 -18
- nuitka/utils/MemoryUsage.py +20 -18
- nuitka/utils/ModuleNames.py +42 -26
- nuitka/utils/PackageResources.py +44 -0
- nuitka/utils/ReExecute.py +50 -28
- nuitka/utils/Rest.py +20 -17
- nuitka/utils/SharedLibraries.py +161 -75
- nuitka/utils/Shebang.py +20 -17
- nuitka/utils/Signing.py +63 -18
- nuitka/utils/SlotMetaClasses.py +57 -0
- nuitka/utils/StaticLibraries.py +83 -56
- nuitka/utils/ThreadedExecutor.py +18 -17
- nuitka/utils/Timing.py +22 -20
- nuitka/utils/Utils.py +132 -25
- nuitka/utils/WindowsFileUsage.py +22 -20
- nuitka/utils/WindowsResources.py +25 -18
- nuitka/utils/Yaml.py +62 -24
- nuitka/utils/__init__.py +5 -4
- Nuitka_winsvc-1.8.dist-info/RECORD +0 -905
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm_gui.py +0 -9
- nuitka/build/inline_copy/tqdm/tqdm/gui.py +0 -191
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-1.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/top_level.txt +0 -0
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
// Copyright
|
|
2
|
-
|
|
3
|
-
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
4
|
-
// integrates with CPython, but also works on its own.
|
|
5
|
-
//
|
|
6
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
// you may not use this file except in compliance with the License.
|
|
8
|
-
// You may obtain a copy of the License at
|
|
9
|
-
//
|
|
10
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
//
|
|
12
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
// See the License for the specific language governing permissions and
|
|
16
|
-
// limitations under the License.
|
|
17
|
-
//
|
|
1
|
+
// Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
|
+
|
|
18
3
|
/* WARNING, this code is GENERATED. Modify the template HelperOperationComparison.c.j2 instead! */
|
|
19
4
|
|
|
20
5
|
/* This file is included from another C file, help IDEs to still parse it on its own. */
|
|
@@ -38,7 +23,7 @@ static PyObject *COMPARE_GT_OBJECT_INT_INT(PyObject *operand1, PyObject *operand
|
|
|
38
23
|
|
|
39
24
|
// Convert to target type.
|
|
40
25
|
PyObject *result = BOOL_FROM(r);
|
|
41
|
-
|
|
26
|
+
Py_INCREF_IMMORTAL(result);
|
|
42
27
|
return result;
|
|
43
28
|
}
|
|
44
29
|
#endif
|
|
@@ -86,7 +71,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
86
71
|
// If the types are equal, we may get away immediately except for instances.
|
|
87
72
|
if (type1 == type2 && !PyInstance_Check(operand1)) {
|
|
88
73
|
|
|
89
|
-
richcmpfunc frich =
|
|
74
|
+
richcmpfunc frich = TP_RICHCOMPARE(type1);
|
|
90
75
|
|
|
91
76
|
if (frich != NULL) {
|
|
92
77
|
PyObject *result = (*frich)(operand1, operand2, Py_GT);
|
|
@@ -97,7 +82,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
97
82
|
return result;
|
|
98
83
|
}
|
|
99
84
|
|
|
100
|
-
|
|
85
|
+
Py_DECREF_IMMORTAL(result);
|
|
101
86
|
}
|
|
102
87
|
|
|
103
88
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -138,7 +123,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
138
123
|
|
|
139
124
|
bool r = c != 0;
|
|
140
125
|
PyObject *result = BOOL_FROM(r);
|
|
141
|
-
|
|
126
|
+
Py_INCREF_IMMORTAL(result);
|
|
142
127
|
return result;
|
|
143
128
|
}
|
|
144
129
|
}
|
|
@@ -147,7 +132,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
147
132
|
richcmpfunc f;
|
|
148
133
|
|
|
149
134
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
150
|
-
f =
|
|
135
|
+
f = TP_RICHCOMPARE(type2);
|
|
151
136
|
|
|
152
137
|
if (f != NULL) {
|
|
153
138
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -158,11 +143,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
158
143
|
return result;
|
|
159
144
|
}
|
|
160
145
|
|
|
161
|
-
|
|
146
|
+
Py_DECREF_IMMORTAL(result);
|
|
162
147
|
}
|
|
163
148
|
}
|
|
164
149
|
|
|
165
|
-
f =
|
|
150
|
+
f = TP_RICHCOMPARE(type1);
|
|
166
151
|
if (f != NULL) {
|
|
167
152
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
168
153
|
|
|
@@ -172,10 +157,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
172
157
|
return result;
|
|
173
158
|
}
|
|
174
159
|
|
|
175
|
-
|
|
160
|
+
Py_DECREF_IMMORTAL(result);
|
|
176
161
|
}
|
|
177
162
|
|
|
178
|
-
f =
|
|
163
|
+
f = TP_RICHCOMPARE(type2);
|
|
179
164
|
if (f != NULL) {
|
|
180
165
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
181
166
|
|
|
@@ -185,7 +170,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
185
170
|
return result;
|
|
186
171
|
}
|
|
187
172
|
|
|
188
|
-
|
|
173
|
+
Py_DECREF_IMMORTAL(result);
|
|
189
174
|
}
|
|
190
175
|
|
|
191
176
|
int c;
|
|
@@ -273,14 +258,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
273
258
|
|
|
274
259
|
bool r = c != 0;
|
|
275
260
|
PyObject *result = BOOL_FROM(r);
|
|
276
|
-
|
|
261
|
+
Py_INCREF_IMMORTAL(result);
|
|
277
262
|
return result;
|
|
278
263
|
#else
|
|
279
264
|
bool checked_reverse_op = false;
|
|
280
265
|
richcmpfunc f;
|
|
281
266
|
|
|
282
267
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
283
|
-
f =
|
|
268
|
+
f = TP_RICHCOMPARE(type2);
|
|
284
269
|
|
|
285
270
|
if (f != NULL) {
|
|
286
271
|
checked_reverse_op = true;
|
|
@@ -293,11 +278,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
293
278
|
return result;
|
|
294
279
|
}
|
|
295
280
|
|
|
296
|
-
|
|
281
|
+
Py_DECREF_IMMORTAL(result);
|
|
297
282
|
}
|
|
298
283
|
}
|
|
299
284
|
|
|
300
|
-
f =
|
|
285
|
+
f = TP_RICHCOMPARE(type1);
|
|
301
286
|
|
|
302
287
|
if (f != NULL) {
|
|
303
288
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -308,11 +293,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
308
293
|
return result;
|
|
309
294
|
}
|
|
310
295
|
|
|
311
|
-
|
|
296
|
+
Py_DECREF_IMMORTAL(result);
|
|
312
297
|
}
|
|
313
298
|
|
|
314
299
|
if (checked_reverse_op == false) {
|
|
315
|
-
f =
|
|
300
|
+
f = TP_RICHCOMPARE(type2);
|
|
316
301
|
|
|
317
302
|
if (f != NULL) {
|
|
318
303
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -323,7 +308,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
323
308
|
return result;
|
|
324
309
|
}
|
|
325
310
|
|
|
326
|
-
|
|
311
|
+
Py_DECREF_IMMORTAL(result);
|
|
327
312
|
}
|
|
328
313
|
}
|
|
329
314
|
|
|
@@ -335,13 +320,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
335
320
|
case Py_EQ: {
|
|
336
321
|
bool r = operand1 == operand2;
|
|
337
322
|
PyObject *result = BOOL_FROM(r);
|
|
338
|
-
|
|
323
|
+
Py_INCREF_IMMORTAL(result);
|
|
339
324
|
return result;
|
|
340
325
|
}
|
|
341
326
|
case Py_NE: {
|
|
342
327
|
bool r = operand1 != operand2;
|
|
343
328
|
PyObject *result = BOOL_FROM(r);
|
|
344
|
-
|
|
329
|
+
Py_INCREF_IMMORTAL(result);
|
|
345
330
|
return result;
|
|
346
331
|
}
|
|
347
332
|
default:
|
|
@@ -382,7 +367,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
382
367
|
// If the types are equal, we may get away immediately except for instances.
|
|
383
368
|
if (type1 == type2 && !PyInstance_Check(operand1)) {
|
|
384
369
|
|
|
385
|
-
richcmpfunc frich =
|
|
370
|
+
richcmpfunc frich = TP_RICHCOMPARE(type1);
|
|
386
371
|
|
|
387
372
|
if (frich != NULL) {
|
|
388
373
|
PyObject *result = (*frich)(operand1, operand2, Py_GT);
|
|
@@ -401,7 +386,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
401
386
|
}
|
|
402
387
|
}
|
|
403
388
|
|
|
404
|
-
|
|
389
|
+
Py_DECREF_IMMORTAL(result);
|
|
405
390
|
}
|
|
406
391
|
|
|
407
392
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -451,7 +436,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
451
436
|
richcmpfunc f;
|
|
452
437
|
|
|
453
438
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
454
|
-
f =
|
|
439
|
+
f = TP_RICHCOMPARE(type2);
|
|
455
440
|
|
|
456
441
|
if (f != NULL) {
|
|
457
442
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -470,11 +455,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
470
455
|
}
|
|
471
456
|
}
|
|
472
457
|
|
|
473
|
-
|
|
458
|
+
Py_DECREF_IMMORTAL(result);
|
|
474
459
|
}
|
|
475
460
|
}
|
|
476
461
|
|
|
477
|
-
f =
|
|
462
|
+
f = TP_RICHCOMPARE(type1);
|
|
478
463
|
if (f != NULL) {
|
|
479
464
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
480
465
|
|
|
@@ -492,10 +477,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
492
477
|
}
|
|
493
478
|
}
|
|
494
479
|
|
|
495
|
-
|
|
480
|
+
Py_DECREF_IMMORTAL(result);
|
|
496
481
|
}
|
|
497
482
|
|
|
498
|
-
f =
|
|
483
|
+
f = TP_RICHCOMPARE(type2);
|
|
499
484
|
if (f != NULL) {
|
|
500
485
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
501
486
|
|
|
@@ -513,7 +498,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
513
498
|
}
|
|
514
499
|
}
|
|
515
500
|
|
|
516
|
-
|
|
501
|
+
Py_DECREF_IMMORTAL(result);
|
|
517
502
|
}
|
|
518
503
|
|
|
519
504
|
int c;
|
|
@@ -608,7 +593,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
608
593
|
richcmpfunc f;
|
|
609
594
|
|
|
610
595
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
611
|
-
f =
|
|
596
|
+
f = TP_RICHCOMPARE(type2);
|
|
612
597
|
|
|
613
598
|
if (f != NULL) {
|
|
614
599
|
checked_reverse_op = true;
|
|
@@ -629,11 +614,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
629
614
|
}
|
|
630
615
|
}
|
|
631
616
|
|
|
632
|
-
|
|
617
|
+
Py_DECREF_IMMORTAL(result);
|
|
633
618
|
}
|
|
634
619
|
}
|
|
635
620
|
|
|
636
|
-
f =
|
|
621
|
+
f = TP_RICHCOMPARE(type1);
|
|
637
622
|
|
|
638
623
|
if (f != NULL) {
|
|
639
624
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -652,11 +637,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
652
637
|
}
|
|
653
638
|
}
|
|
654
639
|
|
|
655
|
-
|
|
640
|
+
Py_DECREF_IMMORTAL(result);
|
|
656
641
|
}
|
|
657
642
|
|
|
658
643
|
if (checked_reverse_op == false) {
|
|
659
|
-
f =
|
|
644
|
+
f = TP_RICHCOMPARE(type2);
|
|
660
645
|
|
|
661
646
|
if (f != NULL) {
|
|
662
647
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -675,7 +660,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
675
660
|
}
|
|
676
661
|
}
|
|
677
662
|
|
|
678
|
-
|
|
663
|
+
Py_DECREF_IMMORTAL(result);
|
|
679
664
|
}
|
|
680
665
|
}
|
|
681
666
|
|
|
@@ -724,7 +709,7 @@ static PyObject *COMPARE_GT_OBJECT_STR_STR(PyObject *operand1, PyObject *operand
|
|
|
724
709
|
|
|
725
710
|
// Convert to target type.
|
|
726
711
|
PyObject *result = BOOL_FROM(r);
|
|
727
|
-
|
|
712
|
+
Py_INCREF_IMMORTAL(result);
|
|
728
713
|
return result;
|
|
729
714
|
}
|
|
730
715
|
|
|
@@ -752,9 +737,11 @@ static PyObject *COMPARE_GT_OBJECT_STR_STR(PyObject *operand1, PyObject *operand
|
|
|
752
737
|
|
|
753
738
|
// Convert to target type.
|
|
754
739
|
PyObject *result = BOOL_FROM(c != 0);
|
|
755
|
-
|
|
740
|
+
Py_INCREF_IMMORTAL(result);
|
|
756
741
|
return result;
|
|
757
742
|
}
|
|
743
|
+
#endif
|
|
744
|
+
#if PYTHON_VERSION < 0x300
|
|
758
745
|
/* Code referring to "OBJECT" corresponds to any Python object and "STR" to Python2 'str'. */
|
|
759
746
|
PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operand2) {
|
|
760
747
|
|
|
@@ -789,7 +776,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
789
776
|
return result;
|
|
790
777
|
}
|
|
791
778
|
|
|
792
|
-
|
|
779
|
+
Py_DECREF_IMMORTAL(result);
|
|
793
780
|
}
|
|
794
781
|
|
|
795
782
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -830,7 +817,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
830
817
|
|
|
831
818
|
bool r = c != 0;
|
|
832
819
|
PyObject *result = BOOL_FROM(r);
|
|
833
|
-
|
|
820
|
+
Py_INCREF_IMMORTAL(result);
|
|
834
821
|
return result;
|
|
835
822
|
}
|
|
836
823
|
}
|
|
@@ -850,11 +837,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
850
837
|
return result;
|
|
851
838
|
}
|
|
852
839
|
|
|
853
|
-
|
|
840
|
+
Py_DECREF_IMMORTAL(result);
|
|
854
841
|
}
|
|
855
842
|
}
|
|
856
843
|
|
|
857
|
-
f =
|
|
844
|
+
f = TP_RICHCOMPARE(type1);
|
|
858
845
|
if (f != NULL) {
|
|
859
846
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
860
847
|
|
|
@@ -864,7 +851,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
864
851
|
return result;
|
|
865
852
|
}
|
|
866
853
|
|
|
867
|
-
|
|
854
|
+
Py_DECREF_IMMORTAL(result);
|
|
868
855
|
}
|
|
869
856
|
|
|
870
857
|
f = PyString_Type.tp_richcompare;
|
|
@@ -877,7 +864,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
877
864
|
return result;
|
|
878
865
|
}
|
|
879
866
|
|
|
880
|
-
|
|
867
|
+
Py_DECREF_IMMORTAL(result);
|
|
881
868
|
}
|
|
882
869
|
|
|
883
870
|
int c;
|
|
@@ -965,7 +952,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
965
952
|
|
|
966
953
|
bool r = c != 0;
|
|
967
954
|
PyObject *result = BOOL_FROM(r);
|
|
968
|
-
|
|
955
|
+
Py_INCREF_IMMORTAL(result);
|
|
969
956
|
return result;
|
|
970
957
|
#else
|
|
971
958
|
bool checked_reverse_op = false;
|
|
@@ -985,11 +972,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
985
972
|
return result;
|
|
986
973
|
}
|
|
987
974
|
|
|
988
|
-
|
|
975
|
+
Py_DECREF_IMMORTAL(result);
|
|
989
976
|
}
|
|
990
977
|
}
|
|
991
978
|
|
|
992
|
-
f =
|
|
979
|
+
f = TP_RICHCOMPARE(type1);
|
|
993
980
|
|
|
994
981
|
if (f != NULL) {
|
|
995
982
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -1000,7 +987,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1000
987
|
return result;
|
|
1001
988
|
}
|
|
1002
989
|
|
|
1003
|
-
|
|
990
|
+
Py_DECREF_IMMORTAL(result);
|
|
1004
991
|
}
|
|
1005
992
|
|
|
1006
993
|
if (checked_reverse_op == false) {
|
|
@@ -1015,7 +1002,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1015
1002
|
return result;
|
|
1016
1003
|
}
|
|
1017
1004
|
|
|
1018
|
-
|
|
1005
|
+
Py_DECREF_IMMORTAL(result);
|
|
1019
1006
|
}
|
|
1020
1007
|
}
|
|
1021
1008
|
|
|
@@ -1027,13 +1014,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1027
1014
|
case Py_EQ: {
|
|
1028
1015
|
bool r = operand1 == operand2;
|
|
1029
1016
|
PyObject *result = BOOL_FROM(r);
|
|
1030
|
-
|
|
1017
|
+
Py_INCREF_IMMORTAL(result);
|
|
1031
1018
|
return result;
|
|
1032
1019
|
}
|
|
1033
1020
|
case Py_NE: {
|
|
1034
1021
|
bool r = operand1 != operand2;
|
|
1035
1022
|
PyObject *result = BOOL_FROM(r);
|
|
1036
|
-
|
|
1023
|
+
Py_INCREF_IMMORTAL(result);
|
|
1037
1024
|
return result;
|
|
1038
1025
|
}
|
|
1039
1026
|
default:
|
|
@@ -1083,7 +1070,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1083
1070
|
return result;
|
|
1084
1071
|
}
|
|
1085
1072
|
|
|
1086
|
-
|
|
1073
|
+
Py_DECREF_IMMORTAL(result);
|
|
1087
1074
|
}
|
|
1088
1075
|
|
|
1089
1076
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1124,7 +1111,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1124
1111
|
|
|
1125
1112
|
bool r = c != 0;
|
|
1126
1113
|
PyObject *result = BOOL_FROM(r);
|
|
1127
|
-
|
|
1114
|
+
Py_INCREF_IMMORTAL(result);
|
|
1128
1115
|
return result;
|
|
1129
1116
|
}
|
|
1130
1117
|
}
|
|
@@ -1133,7 +1120,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1133
1120
|
richcmpfunc f;
|
|
1134
1121
|
|
|
1135
1122
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1136
|
-
f =
|
|
1123
|
+
f = TP_RICHCOMPARE(type2);
|
|
1137
1124
|
|
|
1138
1125
|
if (f != NULL) {
|
|
1139
1126
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -1144,7 +1131,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1144
1131
|
return result;
|
|
1145
1132
|
}
|
|
1146
1133
|
|
|
1147
|
-
|
|
1134
|
+
Py_DECREF_IMMORTAL(result);
|
|
1148
1135
|
}
|
|
1149
1136
|
}
|
|
1150
1137
|
|
|
@@ -1158,10 +1145,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1158
1145
|
return result;
|
|
1159
1146
|
}
|
|
1160
1147
|
|
|
1161
|
-
|
|
1148
|
+
Py_DECREF_IMMORTAL(result);
|
|
1162
1149
|
}
|
|
1163
1150
|
|
|
1164
|
-
f =
|
|
1151
|
+
f = TP_RICHCOMPARE(type2);
|
|
1165
1152
|
if (f != NULL) {
|
|
1166
1153
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
1167
1154
|
|
|
@@ -1171,7 +1158,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1171
1158
|
return result;
|
|
1172
1159
|
}
|
|
1173
1160
|
|
|
1174
|
-
|
|
1161
|
+
Py_DECREF_IMMORTAL(result);
|
|
1175
1162
|
}
|
|
1176
1163
|
|
|
1177
1164
|
int c;
|
|
@@ -1259,14 +1246,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1259
1246
|
|
|
1260
1247
|
bool r = c != 0;
|
|
1261
1248
|
PyObject *result = BOOL_FROM(r);
|
|
1262
|
-
|
|
1249
|
+
Py_INCREF_IMMORTAL(result);
|
|
1263
1250
|
return result;
|
|
1264
1251
|
#else
|
|
1265
1252
|
bool checked_reverse_op = false;
|
|
1266
1253
|
richcmpfunc f;
|
|
1267
1254
|
|
|
1268
1255
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1269
|
-
f =
|
|
1256
|
+
f = TP_RICHCOMPARE(type2);
|
|
1270
1257
|
|
|
1271
1258
|
if (f != NULL) {
|
|
1272
1259
|
checked_reverse_op = true;
|
|
@@ -1279,7 +1266,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1279
1266
|
return result;
|
|
1280
1267
|
}
|
|
1281
1268
|
|
|
1282
|
-
|
|
1269
|
+
Py_DECREF_IMMORTAL(result);
|
|
1283
1270
|
}
|
|
1284
1271
|
}
|
|
1285
1272
|
|
|
@@ -1294,11 +1281,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1294
1281
|
return result;
|
|
1295
1282
|
}
|
|
1296
1283
|
|
|
1297
|
-
|
|
1284
|
+
Py_DECREF_IMMORTAL(result);
|
|
1298
1285
|
}
|
|
1299
1286
|
|
|
1300
1287
|
if (checked_reverse_op == false) {
|
|
1301
|
-
f =
|
|
1288
|
+
f = TP_RICHCOMPARE(type2);
|
|
1302
1289
|
|
|
1303
1290
|
if (f != NULL) {
|
|
1304
1291
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -1309,7 +1296,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1309
1296
|
return result;
|
|
1310
1297
|
}
|
|
1311
1298
|
|
|
1312
|
-
|
|
1299
|
+
Py_DECREF_IMMORTAL(result);
|
|
1313
1300
|
}
|
|
1314
1301
|
}
|
|
1315
1302
|
|
|
@@ -1321,13 +1308,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1321
1308
|
case Py_EQ: {
|
|
1322
1309
|
bool r = operand1 == operand2;
|
|
1323
1310
|
PyObject *result = BOOL_FROM(r);
|
|
1324
|
-
|
|
1311
|
+
Py_INCREF_IMMORTAL(result);
|
|
1325
1312
|
return result;
|
|
1326
1313
|
}
|
|
1327
1314
|
case Py_NE: {
|
|
1328
1315
|
bool r = operand1 != operand2;
|
|
1329
1316
|
PyObject *result = BOOL_FROM(r);
|
|
1330
|
-
|
|
1317
|
+
Py_INCREF_IMMORTAL(result);
|
|
1331
1318
|
return result;
|
|
1332
1319
|
}
|
|
1333
1320
|
default:
|
|
@@ -1389,6 +1376,8 @@ static bool COMPARE_GT_CBOOL_STR_STR(PyObject *operand1, PyObject *operand2) {
|
|
|
1389
1376
|
|
|
1390
1377
|
return result;
|
|
1391
1378
|
}
|
|
1379
|
+
#endif
|
|
1380
|
+
#if PYTHON_VERSION < 0x300
|
|
1392
1381
|
/* Code referring to "OBJECT" corresponds to any Python object and "STR" to Python2 'str'. */
|
|
1393
1382
|
nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *operand2) {
|
|
1394
1383
|
|
|
@@ -1431,7 +1420,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1431
1420
|
}
|
|
1432
1421
|
}
|
|
1433
1422
|
|
|
1434
|
-
|
|
1423
|
+
Py_DECREF_IMMORTAL(result);
|
|
1435
1424
|
}
|
|
1436
1425
|
|
|
1437
1426
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1500,11 +1489,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1500
1489
|
}
|
|
1501
1490
|
}
|
|
1502
1491
|
|
|
1503
|
-
|
|
1492
|
+
Py_DECREF_IMMORTAL(result);
|
|
1504
1493
|
}
|
|
1505
1494
|
}
|
|
1506
1495
|
|
|
1507
|
-
f =
|
|
1496
|
+
f = TP_RICHCOMPARE(type1);
|
|
1508
1497
|
if (f != NULL) {
|
|
1509
1498
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
1510
1499
|
|
|
@@ -1522,7 +1511,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1522
1511
|
}
|
|
1523
1512
|
}
|
|
1524
1513
|
|
|
1525
|
-
|
|
1514
|
+
Py_DECREF_IMMORTAL(result);
|
|
1526
1515
|
}
|
|
1527
1516
|
|
|
1528
1517
|
f = PyString_Type.tp_richcompare;
|
|
@@ -1543,7 +1532,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1543
1532
|
}
|
|
1544
1533
|
}
|
|
1545
1534
|
|
|
1546
|
-
|
|
1535
|
+
Py_DECREF_IMMORTAL(result);
|
|
1547
1536
|
}
|
|
1548
1537
|
|
|
1549
1538
|
int c;
|
|
@@ -1659,11 +1648,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1659
1648
|
}
|
|
1660
1649
|
}
|
|
1661
1650
|
|
|
1662
|
-
|
|
1651
|
+
Py_DECREF_IMMORTAL(result);
|
|
1663
1652
|
}
|
|
1664
1653
|
}
|
|
1665
1654
|
|
|
1666
|
-
f =
|
|
1655
|
+
f = TP_RICHCOMPARE(type1);
|
|
1667
1656
|
|
|
1668
1657
|
if (f != NULL) {
|
|
1669
1658
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -1682,7 +1671,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1682
1671
|
}
|
|
1683
1672
|
}
|
|
1684
1673
|
|
|
1685
|
-
|
|
1674
|
+
Py_DECREF_IMMORTAL(result);
|
|
1686
1675
|
}
|
|
1687
1676
|
|
|
1688
1677
|
if (checked_reverse_op == false) {
|
|
@@ -1705,7 +1694,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1705
1694
|
}
|
|
1706
1695
|
}
|
|
1707
1696
|
|
|
1708
|
-
|
|
1697
|
+
Py_DECREF_IMMORTAL(result);
|
|
1709
1698
|
}
|
|
1710
1699
|
}
|
|
1711
1700
|
|
|
@@ -1781,7 +1770,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1781
1770
|
}
|
|
1782
1771
|
}
|
|
1783
1772
|
|
|
1784
|
-
|
|
1773
|
+
Py_DECREF_IMMORTAL(result);
|
|
1785
1774
|
}
|
|
1786
1775
|
|
|
1787
1776
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1831,7 +1820,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1831
1820
|
richcmpfunc f;
|
|
1832
1821
|
|
|
1833
1822
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1834
|
-
f =
|
|
1823
|
+
f = TP_RICHCOMPARE(type2);
|
|
1835
1824
|
|
|
1836
1825
|
if (f != NULL) {
|
|
1837
1826
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -1850,7 +1839,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1850
1839
|
}
|
|
1851
1840
|
}
|
|
1852
1841
|
|
|
1853
|
-
|
|
1842
|
+
Py_DECREF_IMMORTAL(result);
|
|
1854
1843
|
}
|
|
1855
1844
|
}
|
|
1856
1845
|
|
|
@@ -1872,10 +1861,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1872
1861
|
}
|
|
1873
1862
|
}
|
|
1874
1863
|
|
|
1875
|
-
|
|
1864
|
+
Py_DECREF_IMMORTAL(result);
|
|
1876
1865
|
}
|
|
1877
1866
|
|
|
1878
|
-
f =
|
|
1867
|
+
f = TP_RICHCOMPARE(type2);
|
|
1879
1868
|
if (f != NULL) {
|
|
1880
1869
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
1881
1870
|
|
|
@@ -1893,7 +1882,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1893
1882
|
}
|
|
1894
1883
|
}
|
|
1895
1884
|
|
|
1896
|
-
|
|
1885
|
+
Py_DECREF_IMMORTAL(result);
|
|
1897
1886
|
}
|
|
1898
1887
|
|
|
1899
1888
|
int c;
|
|
@@ -1988,7 +1977,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1988
1977
|
richcmpfunc f;
|
|
1989
1978
|
|
|
1990
1979
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1991
|
-
f =
|
|
1980
|
+
f = TP_RICHCOMPARE(type2);
|
|
1992
1981
|
|
|
1993
1982
|
if (f != NULL) {
|
|
1994
1983
|
checked_reverse_op = true;
|
|
@@ -2009,7 +1998,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2009
1998
|
}
|
|
2010
1999
|
}
|
|
2011
2000
|
|
|
2012
|
-
|
|
2001
|
+
Py_DECREF_IMMORTAL(result);
|
|
2013
2002
|
}
|
|
2014
2003
|
}
|
|
2015
2004
|
|
|
@@ -2032,11 +2021,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2032
2021
|
}
|
|
2033
2022
|
}
|
|
2034
2023
|
|
|
2035
|
-
|
|
2024
|
+
Py_DECREF_IMMORTAL(result);
|
|
2036
2025
|
}
|
|
2037
2026
|
|
|
2038
2027
|
if (checked_reverse_op == false) {
|
|
2039
|
-
f =
|
|
2028
|
+
f = TP_RICHCOMPARE(type2);
|
|
2040
2029
|
|
|
2041
2030
|
if (f != NULL) {
|
|
2042
2031
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -2055,7 +2044,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2055
2044
|
}
|
|
2056
2045
|
}
|
|
2057
2046
|
|
|
2058
|
-
|
|
2047
|
+
Py_DECREF_IMMORTAL(result);
|
|
2059
2048
|
}
|
|
2060
2049
|
}
|
|
2061
2050
|
|
|
@@ -2103,7 +2092,7 @@ static PyObject *COMPARE_GT_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
|
|
|
2103
2092
|
|
|
2104
2093
|
// Convert to target type.
|
|
2105
2094
|
PyObject *result = BOOL_FROM(r);
|
|
2106
|
-
|
|
2095
|
+
Py_INCREF_IMMORTAL(result);
|
|
2107
2096
|
return result;
|
|
2108
2097
|
}
|
|
2109
2098
|
|
|
@@ -2146,7 +2135,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2146
2135
|
return result;
|
|
2147
2136
|
}
|
|
2148
2137
|
|
|
2149
|
-
|
|
2138
|
+
Py_DECREF_IMMORTAL(result);
|
|
2150
2139
|
}
|
|
2151
2140
|
|
|
2152
2141
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2187,7 +2176,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2187
2176
|
|
|
2188
2177
|
bool r = c != 0;
|
|
2189
2178
|
PyObject *result = BOOL_FROM(r);
|
|
2190
|
-
|
|
2179
|
+
Py_INCREF_IMMORTAL(result);
|
|
2191
2180
|
return result;
|
|
2192
2181
|
}
|
|
2193
2182
|
}
|
|
@@ -2207,11 +2196,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2207
2196
|
return result;
|
|
2208
2197
|
}
|
|
2209
2198
|
|
|
2210
|
-
|
|
2199
|
+
Py_DECREF_IMMORTAL(result);
|
|
2211
2200
|
}
|
|
2212
2201
|
}
|
|
2213
2202
|
|
|
2214
|
-
f =
|
|
2203
|
+
f = TP_RICHCOMPARE(type1);
|
|
2215
2204
|
if (f != NULL) {
|
|
2216
2205
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
2217
2206
|
|
|
@@ -2221,7 +2210,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2221
2210
|
return result;
|
|
2222
2211
|
}
|
|
2223
2212
|
|
|
2224
|
-
|
|
2213
|
+
Py_DECREF_IMMORTAL(result);
|
|
2225
2214
|
}
|
|
2226
2215
|
|
|
2227
2216
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2234,7 +2223,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2234
2223
|
return result;
|
|
2235
2224
|
}
|
|
2236
2225
|
|
|
2237
|
-
|
|
2226
|
+
Py_DECREF_IMMORTAL(result);
|
|
2238
2227
|
}
|
|
2239
2228
|
|
|
2240
2229
|
int c;
|
|
@@ -2322,7 +2311,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2322
2311
|
|
|
2323
2312
|
bool r = c != 0;
|
|
2324
2313
|
PyObject *result = BOOL_FROM(r);
|
|
2325
|
-
|
|
2314
|
+
Py_INCREF_IMMORTAL(result);
|
|
2326
2315
|
return result;
|
|
2327
2316
|
#else
|
|
2328
2317
|
bool checked_reverse_op = false;
|
|
@@ -2342,11 +2331,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2342
2331
|
return result;
|
|
2343
2332
|
}
|
|
2344
2333
|
|
|
2345
|
-
|
|
2334
|
+
Py_DECREF_IMMORTAL(result);
|
|
2346
2335
|
}
|
|
2347
2336
|
}
|
|
2348
2337
|
|
|
2349
|
-
f =
|
|
2338
|
+
f = TP_RICHCOMPARE(type1);
|
|
2350
2339
|
|
|
2351
2340
|
if (f != NULL) {
|
|
2352
2341
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -2357,7 +2346,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2357
2346
|
return result;
|
|
2358
2347
|
}
|
|
2359
2348
|
|
|
2360
|
-
|
|
2349
|
+
Py_DECREF_IMMORTAL(result);
|
|
2361
2350
|
}
|
|
2362
2351
|
|
|
2363
2352
|
if (checked_reverse_op == false) {
|
|
@@ -2372,7 +2361,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2372
2361
|
return result;
|
|
2373
2362
|
}
|
|
2374
2363
|
|
|
2375
|
-
|
|
2364
|
+
Py_DECREF_IMMORTAL(result);
|
|
2376
2365
|
}
|
|
2377
2366
|
}
|
|
2378
2367
|
|
|
@@ -2384,13 +2373,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2384
2373
|
case Py_EQ: {
|
|
2385
2374
|
bool r = operand1 == operand2;
|
|
2386
2375
|
PyObject *result = BOOL_FROM(r);
|
|
2387
|
-
|
|
2376
|
+
Py_INCREF_IMMORTAL(result);
|
|
2388
2377
|
return result;
|
|
2389
2378
|
}
|
|
2390
2379
|
case Py_NE: {
|
|
2391
2380
|
bool r = operand1 != operand2;
|
|
2392
2381
|
PyObject *result = BOOL_FROM(r);
|
|
2393
|
-
|
|
2382
|
+
Py_INCREF_IMMORTAL(result);
|
|
2394
2383
|
return result;
|
|
2395
2384
|
}
|
|
2396
2385
|
default:
|
|
@@ -2440,7 +2429,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2440
2429
|
return result;
|
|
2441
2430
|
}
|
|
2442
2431
|
|
|
2443
|
-
|
|
2432
|
+
Py_DECREF_IMMORTAL(result);
|
|
2444
2433
|
}
|
|
2445
2434
|
|
|
2446
2435
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2481,7 +2470,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2481
2470
|
|
|
2482
2471
|
bool r = c != 0;
|
|
2483
2472
|
PyObject *result = BOOL_FROM(r);
|
|
2484
|
-
|
|
2473
|
+
Py_INCREF_IMMORTAL(result);
|
|
2485
2474
|
return result;
|
|
2486
2475
|
}
|
|
2487
2476
|
}
|
|
@@ -2490,7 +2479,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2490
2479
|
richcmpfunc f;
|
|
2491
2480
|
|
|
2492
2481
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2493
|
-
f =
|
|
2482
|
+
f = TP_RICHCOMPARE(type2);
|
|
2494
2483
|
|
|
2495
2484
|
if (f != NULL) {
|
|
2496
2485
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -2501,7 +2490,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2501
2490
|
return result;
|
|
2502
2491
|
}
|
|
2503
2492
|
|
|
2504
|
-
|
|
2493
|
+
Py_DECREF_IMMORTAL(result);
|
|
2505
2494
|
}
|
|
2506
2495
|
}
|
|
2507
2496
|
|
|
@@ -2515,10 +2504,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2515
2504
|
return result;
|
|
2516
2505
|
}
|
|
2517
2506
|
|
|
2518
|
-
|
|
2507
|
+
Py_DECREF_IMMORTAL(result);
|
|
2519
2508
|
}
|
|
2520
2509
|
|
|
2521
|
-
f =
|
|
2510
|
+
f = TP_RICHCOMPARE(type2);
|
|
2522
2511
|
if (f != NULL) {
|
|
2523
2512
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
2524
2513
|
|
|
@@ -2528,7 +2517,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2528
2517
|
return result;
|
|
2529
2518
|
}
|
|
2530
2519
|
|
|
2531
|
-
|
|
2520
|
+
Py_DECREF_IMMORTAL(result);
|
|
2532
2521
|
}
|
|
2533
2522
|
|
|
2534
2523
|
int c;
|
|
@@ -2616,14 +2605,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2616
2605
|
|
|
2617
2606
|
bool r = c != 0;
|
|
2618
2607
|
PyObject *result = BOOL_FROM(r);
|
|
2619
|
-
|
|
2608
|
+
Py_INCREF_IMMORTAL(result);
|
|
2620
2609
|
return result;
|
|
2621
2610
|
#else
|
|
2622
2611
|
bool checked_reverse_op = false;
|
|
2623
2612
|
richcmpfunc f;
|
|
2624
2613
|
|
|
2625
2614
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2626
|
-
f =
|
|
2615
|
+
f = TP_RICHCOMPARE(type2);
|
|
2627
2616
|
|
|
2628
2617
|
if (f != NULL) {
|
|
2629
2618
|
checked_reverse_op = true;
|
|
@@ -2636,7 +2625,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2636
2625
|
return result;
|
|
2637
2626
|
}
|
|
2638
2627
|
|
|
2639
|
-
|
|
2628
|
+
Py_DECREF_IMMORTAL(result);
|
|
2640
2629
|
}
|
|
2641
2630
|
}
|
|
2642
2631
|
|
|
@@ -2651,11 +2640,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2651
2640
|
return result;
|
|
2652
2641
|
}
|
|
2653
2642
|
|
|
2654
|
-
|
|
2643
|
+
Py_DECREF_IMMORTAL(result);
|
|
2655
2644
|
}
|
|
2656
2645
|
|
|
2657
2646
|
if (checked_reverse_op == false) {
|
|
2658
|
-
f =
|
|
2647
|
+
f = TP_RICHCOMPARE(type2);
|
|
2659
2648
|
|
|
2660
2649
|
if (f != NULL) {
|
|
2661
2650
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -2666,7 +2655,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2666
2655
|
return result;
|
|
2667
2656
|
}
|
|
2668
2657
|
|
|
2669
|
-
|
|
2658
|
+
Py_DECREF_IMMORTAL(result);
|
|
2670
2659
|
}
|
|
2671
2660
|
}
|
|
2672
2661
|
|
|
@@ -2678,13 +2667,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2678
2667
|
case Py_EQ: {
|
|
2679
2668
|
bool r = operand1 == operand2;
|
|
2680
2669
|
PyObject *result = BOOL_FROM(r);
|
|
2681
|
-
|
|
2670
|
+
Py_INCREF_IMMORTAL(result);
|
|
2682
2671
|
return result;
|
|
2683
2672
|
}
|
|
2684
2673
|
case Py_NE: {
|
|
2685
2674
|
bool r = operand1 != operand2;
|
|
2686
2675
|
PyObject *result = BOOL_FROM(r);
|
|
2687
|
-
|
|
2676
|
+
Py_INCREF_IMMORTAL(result);
|
|
2688
2677
|
return result;
|
|
2689
2678
|
}
|
|
2690
2679
|
default:
|
|
@@ -2724,7 +2713,7 @@ static bool COMPARE_GT_CBOOL_UNICODE_UNICODE(PyObject *operand1, PyObject *opera
|
|
|
2724
2713
|
|
|
2725
2714
|
// Convert to target type if necessary
|
|
2726
2715
|
bool result = r == Py_True;
|
|
2727
|
-
|
|
2716
|
+
Py_DECREF_IMMORTAL(r);
|
|
2728
2717
|
|
|
2729
2718
|
return result;
|
|
2730
2719
|
}
|
|
@@ -2770,7 +2759,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2770
2759
|
}
|
|
2771
2760
|
}
|
|
2772
2761
|
|
|
2773
|
-
|
|
2762
|
+
Py_DECREF_IMMORTAL(result);
|
|
2774
2763
|
}
|
|
2775
2764
|
|
|
2776
2765
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2839,11 +2828,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2839
2828
|
}
|
|
2840
2829
|
}
|
|
2841
2830
|
|
|
2842
|
-
|
|
2831
|
+
Py_DECREF_IMMORTAL(result);
|
|
2843
2832
|
}
|
|
2844
2833
|
}
|
|
2845
2834
|
|
|
2846
|
-
f =
|
|
2835
|
+
f = TP_RICHCOMPARE(type1);
|
|
2847
2836
|
if (f != NULL) {
|
|
2848
2837
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
2849
2838
|
|
|
@@ -2861,7 +2850,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2861
2850
|
}
|
|
2862
2851
|
}
|
|
2863
2852
|
|
|
2864
|
-
|
|
2853
|
+
Py_DECREF_IMMORTAL(result);
|
|
2865
2854
|
}
|
|
2866
2855
|
|
|
2867
2856
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2882,7 +2871,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2882
2871
|
}
|
|
2883
2872
|
}
|
|
2884
2873
|
|
|
2885
|
-
|
|
2874
|
+
Py_DECREF_IMMORTAL(result);
|
|
2886
2875
|
}
|
|
2887
2876
|
|
|
2888
2877
|
int c;
|
|
@@ -2998,11 +2987,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2998
2987
|
}
|
|
2999
2988
|
}
|
|
3000
2989
|
|
|
3001
|
-
|
|
2990
|
+
Py_DECREF_IMMORTAL(result);
|
|
3002
2991
|
}
|
|
3003
2992
|
}
|
|
3004
2993
|
|
|
3005
|
-
f =
|
|
2994
|
+
f = TP_RICHCOMPARE(type1);
|
|
3006
2995
|
|
|
3007
2996
|
if (f != NULL) {
|
|
3008
2997
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -3021,7 +3010,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3021
3010
|
}
|
|
3022
3011
|
}
|
|
3023
3012
|
|
|
3024
|
-
|
|
3013
|
+
Py_DECREF_IMMORTAL(result);
|
|
3025
3014
|
}
|
|
3026
3015
|
|
|
3027
3016
|
if (checked_reverse_op == false) {
|
|
@@ -3044,7 +3033,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3044
3033
|
}
|
|
3045
3034
|
}
|
|
3046
3035
|
|
|
3047
|
-
|
|
3036
|
+
Py_DECREF_IMMORTAL(result);
|
|
3048
3037
|
}
|
|
3049
3038
|
}
|
|
3050
3039
|
|
|
@@ -3120,7 +3109,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3120
3109
|
}
|
|
3121
3110
|
}
|
|
3122
3111
|
|
|
3123
|
-
|
|
3112
|
+
Py_DECREF_IMMORTAL(result);
|
|
3124
3113
|
}
|
|
3125
3114
|
|
|
3126
3115
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3170,7 +3159,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3170
3159
|
richcmpfunc f;
|
|
3171
3160
|
|
|
3172
3161
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3173
|
-
f =
|
|
3162
|
+
f = TP_RICHCOMPARE(type2);
|
|
3174
3163
|
|
|
3175
3164
|
if (f != NULL) {
|
|
3176
3165
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -3189,7 +3178,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3189
3178
|
}
|
|
3190
3179
|
}
|
|
3191
3180
|
|
|
3192
|
-
|
|
3181
|
+
Py_DECREF_IMMORTAL(result);
|
|
3193
3182
|
}
|
|
3194
3183
|
}
|
|
3195
3184
|
|
|
@@ -3211,10 +3200,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3211
3200
|
}
|
|
3212
3201
|
}
|
|
3213
3202
|
|
|
3214
|
-
|
|
3203
|
+
Py_DECREF_IMMORTAL(result);
|
|
3215
3204
|
}
|
|
3216
3205
|
|
|
3217
|
-
f =
|
|
3206
|
+
f = TP_RICHCOMPARE(type2);
|
|
3218
3207
|
if (f != NULL) {
|
|
3219
3208
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
3220
3209
|
|
|
@@ -3232,7 +3221,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3232
3221
|
}
|
|
3233
3222
|
}
|
|
3234
3223
|
|
|
3235
|
-
|
|
3224
|
+
Py_DECREF_IMMORTAL(result);
|
|
3236
3225
|
}
|
|
3237
3226
|
|
|
3238
3227
|
int c;
|
|
@@ -3327,7 +3316,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3327
3316
|
richcmpfunc f;
|
|
3328
3317
|
|
|
3329
3318
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3330
|
-
f =
|
|
3319
|
+
f = TP_RICHCOMPARE(type2);
|
|
3331
3320
|
|
|
3332
3321
|
if (f != NULL) {
|
|
3333
3322
|
checked_reverse_op = true;
|
|
@@ -3348,7 +3337,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3348
3337
|
}
|
|
3349
3338
|
}
|
|
3350
3339
|
|
|
3351
|
-
|
|
3340
|
+
Py_DECREF_IMMORTAL(result);
|
|
3352
3341
|
}
|
|
3353
3342
|
}
|
|
3354
3343
|
|
|
@@ -3371,11 +3360,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3371
3360
|
}
|
|
3372
3361
|
}
|
|
3373
3362
|
|
|
3374
|
-
|
|
3363
|
+
Py_DECREF_IMMORTAL(result);
|
|
3375
3364
|
}
|
|
3376
3365
|
|
|
3377
3366
|
if (checked_reverse_op == false) {
|
|
3378
|
-
f =
|
|
3367
|
+
f = TP_RICHCOMPARE(type2);
|
|
3379
3368
|
|
|
3380
3369
|
if (f != NULL) {
|
|
3381
3370
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -3394,7 +3383,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3394
3383
|
}
|
|
3395
3384
|
}
|
|
3396
3385
|
|
|
3397
|
-
|
|
3386
|
+
Py_DECREF_IMMORTAL(result);
|
|
3398
3387
|
}
|
|
3399
3388
|
}
|
|
3400
3389
|
|
|
@@ -3444,7 +3433,7 @@ static PyObject *COMPARE_GT_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3444
3433
|
|
|
3445
3434
|
// Convert to target type.
|
|
3446
3435
|
PyObject *result = BOOL_FROM(r);
|
|
3447
|
-
|
|
3436
|
+
Py_INCREF_IMMORTAL(result);
|
|
3448
3437
|
return result;
|
|
3449
3438
|
}
|
|
3450
3439
|
|
|
@@ -3472,9 +3461,11 @@ static PyObject *COMPARE_GT_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3472
3461
|
|
|
3473
3462
|
// Convert to target type.
|
|
3474
3463
|
PyObject *result = BOOL_FROM(c != 0);
|
|
3475
|
-
|
|
3464
|
+
Py_INCREF_IMMORTAL(result);
|
|
3476
3465
|
return result;
|
|
3477
3466
|
}
|
|
3467
|
+
#endif
|
|
3468
|
+
#if PYTHON_VERSION >= 0x300
|
|
3478
3469
|
/* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
|
|
3479
3470
|
PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
3480
3471
|
|
|
@@ -3509,7 +3500,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3509
3500
|
return result;
|
|
3510
3501
|
}
|
|
3511
3502
|
|
|
3512
|
-
|
|
3503
|
+
Py_DECREF_IMMORTAL(result);
|
|
3513
3504
|
}
|
|
3514
3505
|
|
|
3515
3506
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3550,7 +3541,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3550
3541
|
|
|
3551
3542
|
bool r = c != 0;
|
|
3552
3543
|
PyObject *result = BOOL_FROM(r);
|
|
3553
|
-
|
|
3544
|
+
Py_INCREF_IMMORTAL(result);
|
|
3554
3545
|
return result;
|
|
3555
3546
|
}
|
|
3556
3547
|
}
|
|
@@ -3570,11 +3561,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3570
3561
|
return result;
|
|
3571
3562
|
}
|
|
3572
3563
|
|
|
3573
|
-
|
|
3564
|
+
Py_DECREF_IMMORTAL(result);
|
|
3574
3565
|
}
|
|
3575
3566
|
}
|
|
3576
3567
|
|
|
3577
|
-
f =
|
|
3568
|
+
f = TP_RICHCOMPARE(type1);
|
|
3578
3569
|
if (f != NULL) {
|
|
3579
3570
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
3580
3571
|
|
|
@@ -3584,7 +3575,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3584
3575
|
return result;
|
|
3585
3576
|
}
|
|
3586
3577
|
|
|
3587
|
-
|
|
3578
|
+
Py_DECREF_IMMORTAL(result);
|
|
3588
3579
|
}
|
|
3589
3580
|
|
|
3590
3581
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -3597,7 +3588,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3597
3588
|
return result;
|
|
3598
3589
|
}
|
|
3599
3590
|
|
|
3600
|
-
|
|
3591
|
+
Py_DECREF_IMMORTAL(result);
|
|
3601
3592
|
}
|
|
3602
3593
|
|
|
3603
3594
|
int c;
|
|
@@ -3685,7 +3676,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3685
3676
|
|
|
3686
3677
|
bool r = c != 0;
|
|
3687
3678
|
PyObject *result = BOOL_FROM(r);
|
|
3688
|
-
|
|
3679
|
+
Py_INCREF_IMMORTAL(result);
|
|
3689
3680
|
return result;
|
|
3690
3681
|
#else
|
|
3691
3682
|
bool checked_reverse_op = false;
|
|
@@ -3705,11 +3696,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3705
3696
|
return result;
|
|
3706
3697
|
}
|
|
3707
3698
|
|
|
3708
|
-
|
|
3699
|
+
Py_DECREF_IMMORTAL(result);
|
|
3709
3700
|
}
|
|
3710
3701
|
}
|
|
3711
3702
|
|
|
3712
|
-
f =
|
|
3703
|
+
f = TP_RICHCOMPARE(type1);
|
|
3713
3704
|
|
|
3714
3705
|
if (f != NULL) {
|
|
3715
3706
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -3720,7 +3711,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3720
3711
|
return result;
|
|
3721
3712
|
}
|
|
3722
3713
|
|
|
3723
|
-
|
|
3714
|
+
Py_DECREF_IMMORTAL(result);
|
|
3724
3715
|
}
|
|
3725
3716
|
|
|
3726
3717
|
if (checked_reverse_op == false) {
|
|
@@ -3735,7 +3726,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3735
3726
|
return result;
|
|
3736
3727
|
}
|
|
3737
3728
|
|
|
3738
|
-
|
|
3729
|
+
Py_DECREF_IMMORTAL(result);
|
|
3739
3730
|
}
|
|
3740
3731
|
}
|
|
3741
3732
|
|
|
@@ -3747,13 +3738,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3747
3738
|
case Py_EQ: {
|
|
3748
3739
|
bool r = operand1 == operand2;
|
|
3749
3740
|
PyObject *result = BOOL_FROM(r);
|
|
3750
|
-
|
|
3741
|
+
Py_INCREF_IMMORTAL(result);
|
|
3751
3742
|
return result;
|
|
3752
3743
|
}
|
|
3753
3744
|
case Py_NE: {
|
|
3754
3745
|
bool r = operand1 != operand2;
|
|
3755
3746
|
PyObject *result = BOOL_FROM(r);
|
|
3756
|
-
|
|
3747
|
+
Py_INCREF_IMMORTAL(result);
|
|
3757
3748
|
return result;
|
|
3758
3749
|
}
|
|
3759
3750
|
default:
|
|
@@ -3803,7 +3794,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3803
3794
|
return result;
|
|
3804
3795
|
}
|
|
3805
3796
|
|
|
3806
|
-
|
|
3797
|
+
Py_DECREF_IMMORTAL(result);
|
|
3807
3798
|
}
|
|
3808
3799
|
|
|
3809
3800
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3844,7 +3835,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3844
3835
|
|
|
3845
3836
|
bool r = c != 0;
|
|
3846
3837
|
PyObject *result = BOOL_FROM(r);
|
|
3847
|
-
|
|
3838
|
+
Py_INCREF_IMMORTAL(result);
|
|
3848
3839
|
return result;
|
|
3849
3840
|
}
|
|
3850
3841
|
}
|
|
@@ -3853,7 +3844,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3853
3844
|
richcmpfunc f;
|
|
3854
3845
|
|
|
3855
3846
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
3856
|
-
f =
|
|
3847
|
+
f = TP_RICHCOMPARE(type2);
|
|
3857
3848
|
|
|
3858
3849
|
if (f != NULL) {
|
|
3859
3850
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -3864,7 +3855,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3864
3855
|
return result;
|
|
3865
3856
|
}
|
|
3866
3857
|
|
|
3867
|
-
|
|
3858
|
+
Py_DECREF_IMMORTAL(result);
|
|
3868
3859
|
}
|
|
3869
3860
|
}
|
|
3870
3861
|
|
|
@@ -3878,10 +3869,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3878
3869
|
return result;
|
|
3879
3870
|
}
|
|
3880
3871
|
|
|
3881
|
-
|
|
3872
|
+
Py_DECREF_IMMORTAL(result);
|
|
3882
3873
|
}
|
|
3883
3874
|
|
|
3884
|
-
f =
|
|
3875
|
+
f = TP_RICHCOMPARE(type2);
|
|
3885
3876
|
if (f != NULL) {
|
|
3886
3877
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
3887
3878
|
|
|
@@ -3891,7 +3882,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3891
3882
|
return result;
|
|
3892
3883
|
}
|
|
3893
3884
|
|
|
3894
|
-
|
|
3885
|
+
Py_DECREF_IMMORTAL(result);
|
|
3895
3886
|
}
|
|
3896
3887
|
|
|
3897
3888
|
int c;
|
|
@@ -3979,14 +3970,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3979
3970
|
|
|
3980
3971
|
bool r = c != 0;
|
|
3981
3972
|
PyObject *result = BOOL_FROM(r);
|
|
3982
|
-
|
|
3973
|
+
Py_INCREF_IMMORTAL(result);
|
|
3983
3974
|
return result;
|
|
3984
3975
|
#else
|
|
3985
3976
|
bool checked_reverse_op = false;
|
|
3986
3977
|
richcmpfunc f;
|
|
3987
3978
|
|
|
3988
3979
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
3989
|
-
f =
|
|
3980
|
+
f = TP_RICHCOMPARE(type2);
|
|
3990
3981
|
|
|
3991
3982
|
if (f != NULL) {
|
|
3992
3983
|
checked_reverse_op = true;
|
|
@@ -3999,7 +3990,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3999
3990
|
return result;
|
|
4000
3991
|
}
|
|
4001
3992
|
|
|
4002
|
-
|
|
3993
|
+
Py_DECREF_IMMORTAL(result);
|
|
4003
3994
|
}
|
|
4004
3995
|
}
|
|
4005
3996
|
|
|
@@ -4014,11 +4005,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4014
4005
|
return result;
|
|
4015
4006
|
}
|
|
4016
4007
|
|
|
4017
|
-
|
|
4008
|
+
Py_DECREF_IMMORTAL(result);
|
|
4018
4009
|
}
|
|
4019
4010
|
|
|
4020
4011
|
if (checked_reverse_op == false) {
|
|
4021
|
-
f =
|
|
4012
|
+
f = TP_RICHCOMPARE(type2);
|
|
4022
4013
|
|
|
4023
4014
|
if (f != NULL) {
|
|
4024
4015
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -4029,7 +4020,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4029
4020
|
return result;
|
|
4030
4021
|
}
|
|
4031
4022
|
|
|
4032
|
-
|
|
4023
|
+
Py_DECREF_IMMORTAL(result);
|
|
4033
4024
|
}
|
|
4034
4025
|
}
|
|
4035
4026
|
|
|
@@ -4041,13 +4032,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4041
4032
|
case Py_EQ: {
|
|
4042
4033
|
bool r = operand1 == operand2;
|
|
4043
4034
|
PyObject *result = BOOL_FROM(r);
|
|
4044
|
-
|
|
4035
|
+
Py_INCREF_IMMORTAL(result);
|
|
4045
4036
|
return result;
|
|
4046
4037
|
}
|
|
4047
4038
|
case Py_NE: {
|
|
4048
4039
|
bool r = operand1 != operand2;
|
|
4049
4040
|
PyObject *result = BOOL_FROM(r);
|
|
4050
|
-
|
|
4041
|
+
Py_INCREF_IMMORTAL(result);
|
|
4051
4042
|
return result;
|
|
4052
4043
|
}
|
|
4053
4044
|
default:
|
|
@@ -4109,6 +4100,8 @@ static bool COMPARE_GT_CBOOL_BYTES_BYTES(PyObject *operand1, PyObject *operand2)
|
|
|
4109
4100
|
|
|
4110
4101
|
return result;
|
|
4111
4102
|
}
|
|
4103
|
+
#endif
|
|
4104
|
+
#if PYTHON_VERSION >= 0x300
|
|
4112
4105
|
/* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
|
|
4113
4106
|
nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
4114
4107
|
|
|
@@ -4151,7 +4144,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4151
4144
|
}
|
|
4152
4145
|
}
|
|
4153
4146
|
|
|
4154
|
-
|
|
4147
|
+
Py_DECREF_IMMORTAL(result);
|
|
4155
4148
|
}
|
|
4156
4149
|
|
|
4157
4150
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4220,11 +4213,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4220
4213
|
}
|
|
4221
4214
|
}
|
|
4222
4215
|
|
|
4223
|
-
|
|
4216
|
+
Py_DECREF_IMMORTAL(result);
|
|
4224
4217
|
}
|
|
4225
4218
|
}
|
|
4226
4219
|
|
|
4227
|
-
f =
|
|
4220
|
+
f = TP_RICHCOMPARE(type1);
|
|
4228
4221
|
if (f != NULL) {
|
|
4229
4222
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
4230
4223
|
|
|
@@ -4242,7 +4235,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4242
4235
|
}
|
|
4243
4236
|
}
|
|
4244
4237
|
|
|
4245
|
-
|
|
4238
|
+
Py_DECREF_IMMORTAL(result);
|
|
4246
4239
|
}
|
|
4247
4240
|
|
|
4248
4241
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -4263,7 +4256,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4263
4256
|
}
|
|
4264
4257
|
}
|
|
4265
4258
|
|
|
4266
|
-
|
|
4259
|
+
Py_DECREF_IMMORTAL(result);
|
|
4267
4260
|
}
|
|
4268
4261
|
|
|
4269
4262
|
int c;
|
|
@@ -4379,11 +4372,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4379
4372
|
}
|
|
4380
4373
|
}
|
|
4381
4374
|
|
|
4382
|
-
|
|
4375
|
+
Py_DECREF_IMMORTAL(result);
|
|
4383
4376
|
}
|
|
4384
4377
|
}
|
|
4385
4378
|
|
|
4386
|
-
f =
|
|
4379
|
+
f = TP_RICHCOMPARE(type1);
|
|
4387
4380
|
|
|
4388
4381
|
if (f != NULL) {
|
|
4389
4382
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -4402,7 +4395,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4402
4395
|
}
|
|
4403
4396
|
}
|
|
4404
4397
|
|
|
4405
|
-
|
|
4398
|
+
Py_DECREF_IMMORTAL(result);
|
|
4406
4399
|
}
|
|
4407
4400
|
|
|
4408
4401
|
if (checked_reverse_op == false) {
|
|
@@ -4425,7 +4418,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4425
4418
|
}
|
|
4426
4419
|
}
|
|
4427
4420
|
|
|
4428
|
-
|
|
4421
|
+
Py_DECREF_IMMORTAL(result);
|
|
4429
4422
|
}
|
|
4430
4423
|
}
|
|
4431
4424
|
|
|
@@ -4501,7 +4494,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4501
4494
|
}
|
|
4502
4495
|
}
|
|
4503
4496
|
|
|
4504
|
-
|
|
4497
|
+
Py_DECREF_IMMORTAL(result);
|
|
4505
4498
|
}
|
|
4506
4499
|
|
|
4507
4500
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4551,7 +4544,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4551
4544
|
richcmpfunc f;
|
|
4552
4545
|
|
|
4553
4546
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4554
|
-
f =
|
|
4547
|
+
f = TP_RICHCOMPARE(type2);
|
|
4555
4548
|
|
|
4556
4549
|
if (f != NULL) {
|
|
4557
4550
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -4570,7 +4563,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4570
4563
|
}
|
|
4571
4564
|
}
|
|
4572
4565
|
|
|
4573
|
-
|
|
4566
|
+
Py_DECREF_IMMORTAL(result);
|
|
4574
4567
|
}
|
|
4575
4568
|
}
|
|
4576
4569
|
|
|
@@ -4592,10 +4585,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4592
4585
|
}
|
|
4593
4586
|
}
|
|
4594
4587
|
|
|
4595
|
-
|
|
4588
|
+
Py_DECREF_IMMORTAL(result);
|
|
4596
4589
|
}
|
|
4597
4590
|
|
|
4598
|
-
f =
|
|
4591
|
+
f = TP_RICHCOMPARE(type2);
|
|
4599
4592
|
if (f != NULL) {
|
|
4600
4593
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
4601
4594
|
|
|
@@ -4613,7 +4606,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4613
4606
|
}
|
|
4614
4607
|
}
|
|
4615
4608
|
|
|
4616
|
-
|
|
4609
|
+
Py_DECREF_IMMORTAL(result);
|
|
4617
4610
|
}
|
|
4618
4611
|
|
|
4619
4612
|
int c;
|
|
@@ -4708,7 +4701,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4708
4701
|
richcmpfunc f;
|
|
4709
4702
|
|
|
4710
4703
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4711
|
-
f =
|
|
4704
|
+
f = TP_RICHCOMPARE(type2);
|
|
4712
4705
|
|
|
4713
4706
|
if (f != NULL) {
|
|
4714
4707
|
checked_reverse_op = true;
|
|
@@ -4729,7 +4722,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4729
4722
|
}
|
|
4730
4723
|
}
|
|
4731
4724
|
|
|
4732
|
-
|
|
4725
|
+
Py_DECREF_IMMORTAL(result);
|
|
4733
4726
|
}
|
|
4734
4727
|
}
|
|
4735
4728
|
|
|
@@ -4752,11 +4745,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4752
4745
|
}
|
|
4753
4746
|
}
|
|
4754
4747
|
|
|
4755
|
-
|
|
4748
|
+
Py_DECREF_IMMORTAL(result);
|
|
4756
4749
|
}
|
|
4757
4750
|
|
|
4758
4751
|
if (checked_reverse_op == false) {
|
|
4759
|
-
f =
|
|
4752
|
+
f = TP_RICHCOMPARE(type2);
|
|
4760
4753
|
|
|
4761
4754
|
if (f != NULL) {
|
|
4762
4755
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -4775,7 +4768,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4775
4768
|
}
|
|
4776
4769
|
}
|
|
4777
4770
|
|
|
4778
|
-
|
|
4771
|
+
Py_DECREF_IMMORTAL(result);
|
|
4779
4772
|
}
|
|
4780
4773
|
}
|
|
4781
4774
|
|
|
@@ -4843,7 +4836,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4843
4836
|
return result;
|
|
4844
4837
|
}
|
|
4845
4838
|
|
|
4846
|
-
|
|
4839
|
+
Py_DECREF_IMMORTAL(result);
|
|
4847
4840
|
}
|
|
4848
4841
|
|
|
4849
4842
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4884,7 +4877,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4884
4877
|
|
|
4885
4878
|
bool r = c != 0;
|
|
4886
4879
|
PyObject *result = BOOL_FROM(r);
|
|
4887
|
-
|
|
4880
|
+
Py_INCREF_IMMORTAL(result);
|
|
4888
4881
|
return result;
|
|
4889
4882
|
}
|
|
4890
4883
|
}
|
|
@@ -4904,11 +4897,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4904
4897
|
return result;
|
|
4905
4898
|
}
|
|
4906
4899
|
|
|
4907
|
-
|
|
4900
|
+
Py_DECREF_IMMORTAL(result);
|
|
4908
4901
|
}
|
|
4909
4902
|
}
|
|
4910
4903
|
|
|
4911
|
-
f =
|
|
4904
|
+
f = TP_RICHCOMPARE(type1);
|
|
4912
4905
|
if (f != NULL) {
|
|
4913
4906
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
4914
4907
|
|
|
@@ -4918,7 +4911,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4918
4911
|
return result;
|
|
4919
4912
|
}
|
|
4920
4913
|
|
|
4921
|
-
|
|
4914
|
+
Py_DECREF_IMMORTAL(result);
|
|
4922
4915
|
}
|
|
4923
4916
|
|
|
4924
4917
|
f = NULL;
|
|
@@ -4931,7 +4924,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4931
4924
|
return result;
|
|
4932
4925
|
}
|
|
4933
4926
|
|
|
4934
|
-
|
|
4927
|
+
Py_DECREF_IMMORTAL(result);
|
|
4935
4928
|
}
|
|
4936
4929
|
|
|
4937
4930
|
int c;
|
|
@@ -5019,7 +5012,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5019
5012
|
|
|
5020
5013
|
bool r = c != 0;
|
|
5021
5014
|
PyObject *result = BOOL_FROM(r);
|
|
5022
|
-
|
|
5015
|
+
Py_INCREF_IMMORTAL(result);
|
|
5023
5016
|
return result;
|
|
5024
5017
|
#else
|
|
5025
5018
|
bool checked_reverse_op = false;
|
|
@@ -5039,11 +5032,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5039
5032
|
return result;
|
|
5040
5033
|
}
|
|
5041
5034
|
|
|
5042
|
-
|
|
5035
|
+
Py_DECREF_IMMORTAL(result);
|
|
5043
5036
|
}
|
|
5044
5037
|
}
|
|
5045
5038
|
|
|
5046
|
-
f =
|
|
5039
|
+
f = TP_RICHCOMPARE(type1);
|
|
5047
5040
|
|
|
5048
5041
|
if (f != NULL) {
|
|
5049
5042
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -5054,7 +5047,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5054
5047
|
return result;
|
|
5055
5048
|
}
|
|
5056
5049
|
|
|
5057
|
-
|
|
5050
|
+
Py_DECREF_IMMORTAL(result);
|
|
5058
5051
|
}
|
|
5059
5052
|
|
|
5060
5053
|
if (checked_reverse_op == false) {
|
|
@@ -5069,7 +5062,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5069
5062
|
return result;
|
|
5070
5063
|
}
|
|
5071
5064
|
|
|
5072
|
-
|
|
5065
|
+
Py_DECREF_IMMORTAL(result);
|
|
5073
5066
|
}
|
|
5074
5067
|
}
|
|
5075
5068
|
|
|
@@ -5081,13 +5074,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5081
5074
|
case Py_EQ: {
|
|
5082
5075
|
bool r = operand1 == operand2;
|
|
5083
5076
|
PyObject *result = BOOL_FROM(r);
|
|
5084
|
-
|
|
5077
|
+
Py_INCREF_IMMORTAL(result);
|
|
5085
5078
|
return result;
|
|
5086
5079
|
}
|
|
5087
5080
|
case Py_NE: {
|
|
5088
5081
|
bool r = operand1 != operand2;
|
|
5089
5082
|
PyObject *result = BOOL_FROM(r);
|
|
5090
|
-
|
|
5083
|
+
Py_INCREF_IMMORTAL(result);
|
|
5091
5084
|
return result;
|
|
5092
5085
|
}
|
|
5093
5086
|
default:
|
|
@@ -5137,7 +5130,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5137
5130
|
return result;
|
|
5138
5131
|
}
|
|
5139
5132
|
|
|
5140
|
-
|
|
5133
|
+
Py_DECREF_IMMORTAL(result);
|
|
5141
5134
|
}
|
|
5142
5135
|
|
|
5143
5136
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5178,7 +5171,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5178
5171
|
|
|
5179
5172
|
bool r = c != 0;
|
|
5180
5173
|
PyObject *result = BOOL_FROM(r);
|
|
5181
|
-
|
|
5174
|
+
Py_INCREF_IMMORTAL(result);
|
|
5182
5175
|
return result;
|
|
5183
5176
|
}
|
|
5184
5177
|
}
|
|
@@ -5187,7 +5180,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5187
5180
|
richcmpfunc f;
|
|
5188
5181
|
|
|
5189
5182
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5190
|
-
f =
|
|
5183
|
+
f = TP_RICHCOMPARE(type2);
|
|
5191
5184
|
|
|
5192
5185
|
if (f != NULL) {
|
|
5193
5186
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -5198,7 +5191,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5198
5191
|
return result;
|
|
5199
5192
|
}
|
|
5200
5193
|
|
|
5201
|
-
|
|
5194
|
+
Py_DECREF_IMMORTAL(result);
|
|
5202
5195
|
}
|
|
5203
5196
|
}
|
|
5204
5197
|
|
|
@@ -5212,10 +5205,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5212
5205
|
return result;
|
|
5213
5206
|
}
|
|
5214
5207
|
|
|
5215
|
-
|
|
5208
|
+
Py_DECREF_IMMORTAL(result);
|
|
5216
5209
|
}
|
|
5217
5210
|
|
|
5218
|
-
f =
|
|
5211
|
+
f = TP_RICHCOMPARE(type2);
|
|
5219
5212
|
if (f != NULL) {
|
|
5220
5213
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
5221
5214
|
|
|
@@ -5225,7 +5218,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5225
5218
|
return result;
|
|
5226
5219
|
}
|
|
5227
5220
|
|
|
5228
|
-
|
|
5221
|
+
Py_DECREF_IMMORTAL(result);
|
|
5229
5222
|
}
|
|
5230
5223
|
|
|
5231
5224
|
int c;
|
|
@@ -5313,14 +5306,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5313
5306
|
|
|
5314
5307
|
bool r = c != 0;
|
|
5315
5308
|
PyObject *result = BOOL_FROM(r);
|
|
5316
|
-
|
|
5309
|
+
Py_INCREF_IMMORTAL(result);
|
|
5317
5310
|
return result;
|
|
5318
5311
|
#else
|
|
5319
5312
|
bool checked_reverse_op = false;
|
|
5320
5313
|
richcmpfunc f;
|
|
5321
5314
|
|
|
5322
5315
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5323
|
-
f =
|
|
5316
|
+
f = TP_RICHCOMPARE(type2);
|
|
5324
5317
|
|
|
5325
5318
|
if (f != NULL) {
|
|
5326
5319
|
checked_reverse_op = true;
|
|
@@ -5333,7 +5326,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5333
5326
|
return result;
|
|
5334
5327
|
}
|
|
5335
5328
|
|
|
5336
|
-
|
|
5329
|
+
Py_DECREF_IMMORTAL(result);
|
|
5337
5330
|
}
|
|
5338
5331
|
}
|
|
5339
5332
|
|
|
@@ -5348,11 +5341,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5348
5341
|
return result;
|
|
5349
5342
|
}
|
|
5350
5343
|
|
|
5351
|
-
|
|
5344
|
+
Py_DECREF_IMMORTAL(result);
|
|
5352
5345
|
}
|
|
5353
5346
|
|
|
5354
5347
|
if (checked_reverse_op == false) {
|
|
5355
|
-
f =
|
|
5348
|
+
f = TP_RICHCOMPARE(type2);
|
|
5356
5349
|
|
|
5357
5350
|
if (f != NULL) {
|
|
5358
5351
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -5363,7 +5356,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5363
5356
|
return result;
|
|
5364
5357
|
}
|
|
5365
5358
|
|
|
5366
|
-
|
|
5359
|
+
Py_DECREF_IMMORTAL(result);
|
|
5367
5360
|
}
|
|
5368
5361
|
}
|
|
5369
5362
|
|
|
@@ -5375,13 +5368,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5375
5368
|
case Py_EQ: {
|
|
5376
5369
|
bool r = operand1 == operand2;
|
|
5377
5370
|
PyObject *result = BOOL_FROM(r);
|
|
5378
|
-
|
|
5371
|
+
Py_INCREF_IMMORTAL(result);
|
|
5379
5372
|
return result;
|
|
5380
5373
|
}
|
|
5381
5374
|
case Py_NE: {
|
|
5382
5375
|
bool r = operand1 != operand2;
|
|
5383
5376
|
PyObject *result = BOOL_FROM(r);
|
|
5384
|
-
|
|
5377
|
+
Py_INCREF_IMMORTAL(result);
|
|
5385
5378
|
return result;
|
|
5386
5379
|
}
|
|
5387
5380
|
default:
|
|
@@ -5439,7 +5432,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5439
5432
|
}
|
|
5440
5433
|
}
|
|
5441
5434
|
|
|
5442
|
-
|
|
5435
|
+
Py_DECREF_IMMORTAL(result);
|
|
5443
5436
|
}
|
|
5444
5437
|
|
|
5445
5438
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5508,11 +5501,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5508
5501
|
}
|
|
5509
5502
|
}
|
|
5510
5503
|
|
|
5511
|
-
|
|
5504
|
+
Py_DECREF_IMMORTAL(result);
|
|
5512
5505
|
}
|
|
5513
5506
|
}
|
|
5514
5507
|
|
|
5515
|
-
f =
|
|
5508
|
+
f = TP_RICHCOMPARE(type1);
|
|
5516
5509
|
if (f != NULL) {
|
|
5517
5510
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
5518
5511
|
|
|
@@ -5530,7 +5523,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5530
5523
|
}
|
|
5531
5524
|
}
|
|
5532
5525
|
|
|
5533
|
-
|
|
5526
|
+
Py_DECREF_IMMORTAL(result);
|
|
5534
5527
|
}
|
|
5535
5528
|
|
|
5536
5529
|
f = NULL;
|
|
@@ -5551,7 +5544,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5551
5544
|
}
|
|
5552
5545
|
}
|
|
5553
5546
|
|
|
5554
|
-
|
|
5547
|
+
Py_DECREF_IMMORTAL(result);
|
|
5555
5548
|
}
|
|
5556
5549
|
|
|
5557
5550
|
int c;
|
|
@@ -5667,11 +5660,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5667
5660
|
}
|
|
5668
5661
|
}
|
|
5669
5662
|
|
|
5670
|
-
|
|
5663
|
+
Py_DECREF_IMMORTAL(result);
|
|
5671
5664
|
}
|
|
5672
5665
|
}
|
|
5673
5666
|
|
|
5674
|
-
f =
|
|
5667
|
+
f = TP_RICHCOMPARE(type1);
|
|
5675
5668
|
|
|
5676
5669
|
if (f != NULL) {
|
|
5677
5670
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -5690,7 +5683,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5690
5683
|
}
|
|
5691
5684
|
}
|
|
5692
5685
|
|
|
5693
|
-
|
|
5686
|
+
Py_DECREF_IMMORTAL(result);
|
|
5694
5687
|
}
|
|
5695
5688
|
|
|
5696
5689
|
if (checked_reverse_op == false) {
|
|
@@ -5713,7 +5706,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5713
5706
|
}
|
|
5714
5707
|
}
|
|
5715
5708
|
|
|
5716
|
-
|
|
5709
|
+
Py_DECREF_IMMORTAL(result);
|
|
5717
5710
|
}
|
|
5718
5711
|
}
|
|
5719
5712
|
|
|
@@ -5789,7 +5782,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5789
5782
|
}
|
|
5790
5783
|
}
|
|
5791
5784
|
|
|
5792
|
-
|
|
5785
|
+
Py_DECREF_IMMORTAL(result);
|
|
5793
5786
|
}
|
|
5794
5787
|
|
|
5795
5788
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5839,7 +5832,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5839
5832
|
richcmpfunc f;
|
|
5840
5833
|
|
|
5841
5834
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5842
|
-
f =
|
|
5835
|
+
f = TP_RICHCOMPARE(type2);
|
|
5843
5836
|
|
|
5844
5837
|
if (f != NULL) {
|
|
5845
5838
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -5858,7 +5851,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5858
5851
|
}
|
|
5859
5852
|
}
|
|
5860
5853
|
|
|
5861
|
-
|
|
5854
|
+
Py_DECREF_IMMORTAL(result);
|
|
5862
5855
|
}
|
|
5863
5856
|
}
|
|
5864
5857
|
|
|
@@ -5880,10 +5873,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5880
5873
|
}
|
|
5881
5874
|
}
|
|
5882
5875
|
|
|
5883
|
-
|
|
5876
|
+
Py_DECREF_IMMORTAL(result);
|
|
5884
5877
|
}
|
|
5885
5878
|
|
|
5886
|
-
f =
|
|
5879
|
+
f = TP_RICHCOMPARE(type2);
|
|
5887
5880
|
if (f != NULL) {
|
|
5888
5881
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
5889
5882
|
|
|
@@ -5901,7 +5894,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5901
5894
|
}
|
|
5902
5895
|
}
|
|
5903
5896
|
|
|
5904
|
-
|
|
5897
|
+
Py_DECREF_IMMORTAL(result);
|
|
5905
5898
|
}
|
|
5906
5899
|
|
|
5907
5900
|
int c;
|
|
@@ -5996,7 +5989,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5996
5989
|
richcmpfunc f;
|
|
5997
5990
|
|
|
5998
5991
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5999
|
-
f =
|
|
5992
|
+
f = TP_RICHCOMPARE(type2);
|
|
6000
5993
|
|
|
6001
5994
|
if (f != NULL) {
|
|
6002
5995
|
checked_reverse_op = true;
|
|
@@ -6017,7 +6010,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6017
6010
|
}
|
|
6018
6011
|
}
|
|
6019
6012
|
|
|
6020
|
-
|
|
6013
|
+
Py_DECREF_IMMORTAL(result);
|
|
6021
6014
|
}
|
|
6022
6015
|
}
|
|
6023
6016
|
|
|
@@ -6040,11 +6033,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6040
6033
|
}
|
|
6041
6034
|
}
|
|
6042
6035
|
|
|
6043
|
-
|
|
6036
|
+
Py_DECREF_IMMORTAL(result);
|
|
6044
6037
|
}
|
|
6045
6038
|
|
|
6046
6039
|
if (checked_reverse_op == false) {
|
|
6047
|
-
f =
|
|
6040
|
+
f = TP_RICHCOMPARE(type2);
|
|
6048
6041
|
|
|
6049
6042
|
if (f != NULL) {
|
|
6050
6043
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -6063,7 +6056,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6063
6056
|
}
|
|
6064
6057
|
}
|
|
6065
6058
|
|
|
6066
|
-
|
|
6059
|
+
Py_DECREF_IMMORTAL(result);
|
|
6067
6060
|
}
|
|
6068
6061
|
}
|
|
6069
6062
|
|
|
@@ -6110,15 +6103,19 @@ static PyObject *COMPARE_GT_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6110
6103
|
|
|
6111
6104
|
if (operand1_long_object == operand2_long_object) {
|
|
6112
6105
|
r = false;
|
|
6113
|
-
} else if (
|
|
6114
|
-
|
|
6106
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6107
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6108
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - Nuitka_LongGetSignedDigitSize(operand2_long_object) >
|
|
6109
|
+
0;
|
|
6115
6110
|
} else {
|
|
6116
|
-
Py_ssize_t i =
|
|
6111
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6117
6112
|
r = false;
|
|
6118
6113
|
while (--i >= 0) {
|
|
6119
|
-
if (operand1_long_object
|
|
6120
|
-
|
|
6121
|
-
|
|
6114
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6115
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6116
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] >
|
|
6117
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i];
|
|
6118
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
6122
6119
|
r = !r;
|
|
6123
6120
|
}
|
|
6124
6121
|
break;
|
|
@@ -6128,7 +6125,7 @@ static PyObject *COMPARE_GT_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6128
6125
|
|
|
6129
6126
|
// Convert to target type.
|
|
6130
6127
|
PyObject *result = BOOL_FROM(r);
|
|
6131
|
-
|
|
6128
|
+
Py_INCREF_IMMORTAL(result);
|
|
6132
6129
|
return result;
|
|
6133
6130
|
}
|
|
6134
6131
|
/* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
|
|
@@ -6165,7 +6162,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6165
6162
|
return result;
|
|
6166
6163
|
}
|
|
6167
6164
|
|
|
6168
|
-
|
|
6165
|
+
Py_DECREF_IMMORTAL(result);
|
|
6169
6166
|
}
|
|
6170
6167
|
|
|
6171
6168
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6206,7 +6203,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6206
6203
|
|
|
6207
6204
|
bool r = c != 0;
|
|
6208
6205
|
PyObject *result = BOOL_FROM(r);
|
|
6209
|
-
|
|
6206
|
+
Py_INCREF_IMMORTAL(result);
|
|
6210
6207
|
return result;
|
|
6211
6208
|
}
|
|
6212
6209
|
}
|
|
@@ -6226,11 +6223,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6226
6223
|
return result;
|
|
6227
6224
|
}
|
|
6228
6225
|
|
|
6229
|
-
|
|
6226
|
+
Py_DECREF_IMMORTAL(result);
|
|
6230
6227
|
}
|
|
6231
6228
|
}
|
|
6232
6229
|
|
|
6233
|
-
f =
|
|
6230
|
+
f = TP_RICHCOMPARE(type1);
|
|
6234
6231
|
if (f != NULL) {
|
|
6235
6232
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
6236
6233
|
|
|
@@ -6240,7 +6237,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6240
6237
|
return result;
|
|
6241
6238
|
}
|
|
6242
6239
|
|
|
6243
|
-
|
|
6240
|
+
Py_DECREF_IMMORTAL(result);
|
|
6244
6241
|
}
|
|
6245
6242
|
|
|
6246
6243
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -6253,7 +6250,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6253
6250
|
return result;
|
|
6254
6251
|
}
|
|
6255
6252
|
|
|
6256
|
-
|
|
6253
|
+
Py_DECREF_IMMORTAL(result);
|
|
6257
6254
|
}
|
|
6258
6255
|
|
|
6259
6256
|
int c;
|
|
@@ -6341,7 +6338,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6341
6338
|
|
|
6342
6339
|
bool r = c != 0;
|
|
6343
6340
|
PyObject *result = BOOL_FROM(r);
|
|
6344
|
-
|
|
6341
|
+
Py_INCREF_IMMORTAL(result);
|
|
6345
6342
|
return result;
|
|
6346
6343
|
#else
|
|
6347
6344
|
bool checked_reverse_op = false;
|
|
@@ -6361,11 +6358,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6361
6358
|
return result;
|
|
6362
6359
|
}
|
|
6363
6360
|
|
|
6364
|
-
|
|
6361
|
+
Py_DECREF_IMMORTAL(result);
|
|
6365
6362
|
}
|
|
6366
6363
|
}
|
|
6367
6364
|
|
|
6368
|
-
f =
|
|
6365
|
+
f = TP_RICHCOMPARE(type1);
|
|
6369
6366
|
|
|
6370
6367
|
if (f != NULL) {
|
|
6371
6368
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -6376,7 +6373,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6376
6373
|
return result;
|
|
6377
6374
|
}
|
|
6378
6375
|
|
|
6379
|
-
|
|
6376
|
+
Py_DECREF_IMMORTAL(result);
|
|
6380
6377
|
}
|
|
6381
6378
|
|
|
6382
6379
|
if (checked_reverse_op == false) {
|
|
@@ -6391,7 +6388,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6391
6388
|
return result;
|
|
6392
6389
|
}
|
|
6393
6390
|
|
|
6394
|
-
|
|
6391
|
+
Py_DECREF_IMMORTAL(result);
|
|
6395
6392
|
}
|
|
6396
6393
|
}
|
|
6397
6394
|
|
|
@@ -6403,13 +6400,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6403
6400
|
case Py_EQ: {
|
|
6404
6401
|
bool r = operand1 == operand2;
|
|
6405
6402
|
PyObject *result = BOOL_FROM(r);
|
|
6406
|
-
|
|
6403
|
+
Py_INCREF_IMMORTAL(result);
|
|
6407
6404
|
return result;
|
|
6408
6405
|
}
|
|
6409
6406
|
case Py_NE: {
|
|
6410
6407
|
bool r = operand1 != operand2;
|
|
6411
6408
|
PyObject *result = BOOL_FROM(r);
|
|
6412
|
-
|
|
6409
|
+
Py_INCREF_IMMORTAL(result);
|
|
6413
6410
|
return result;
|
|
6414
6411
|
}
|
|
6415
6412
|
default:
|
|
@@ -6459,7 +6456,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6459
6456
|
return result;
|
|
6460
6457
|
}
|
|
6461
6458
|
|
|
6462
|
-
|
|
6459
|
+
Py_DECREF_IMMORTAL(result);
|
|
6463
6460
|
}
|
|
6464
6461
|
|
|
6465
6462
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6500,7 +6497,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6500
6497
|
|
|
6501
6498
|
bool r = c != 0;
|
|
6502
6499
|
PyObject *result = BOOL_FROM(r);
|
|
6503
|
-
|
|
6500
|
+
Py_INCREF_IMMORTAL(result);
|
|
6504
6501
|
return result;
|
|
6505
6502
|
}
|
|
6506
6503
|
}
|
|
@@ -6509,7 +6506,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6509
6506
|
richcmpfunc f;
|
|
6510
6507
|
|
|
6511
6508
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6512
|
-
f =
|
|
6509
|
+
f = TP_RICHCOMPARE(type2);
|
|
6513
6510
|
|
|
6514
6511
|
if (f != NULL) {
|
|
6515
6512
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -6520,7 +6517,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6520
6517
|
return result;
|
|
6521
6518
|
}
|
|
6522
6519
|
|
|
6523
|
-
|
|
6520
|
+
Py_DECREF_IMMORTAL(result);
|
|
6524
6521
|
}
|
|
6525
6522
|
}
|
|
6526
6523
|
|
|
@@ -6534,10 +6531,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6534
6531
|
return result;
|
|
6535
6532
|
}
|
|
6536
6533
|
|
|
6537
|
-
|
|
6534
|
+
Py_DECREF_IMMORTAL(result);
|
|
6538
6535
|
}
|
|
6539
6536
|
|
|
6540
|
-
f =
|
|
6537
|
+
f = TP_RICHCOMPARE(type2);
|
|
6541
6538
|
if (f != NULL) {
|
|
6542
6539
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
6543
6540
|
|
|
@@ -6547,7 +6544,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6547
6544
|
return result;
|
|
6548
6545
|
}
|
|
6549
6546
|
|
|
6550
|
-
|
|
6547
|
+
Py_DECREF_IMMORTAL(result);
|
|
6551
6548
|
}
|
|
6552
6549
|
|
|
6553
6550
|
int c;
|
|
@@ -6635,14 +6632,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6635
6632
|
|
|
6636
6633
|
bool r = c != 0;
|
|
6637
6634
|
PyObject *result = BOOL_FROM(r);
|
|
6638
|
-
|
|
6635
|
+
Py_INCREF_IMMORTAL(result);
|
|
6639
6636
|
return result;
|
|
6640
6637
|
#else
|
|
6641
6638
|
bool checked_reverse_op = false;
|
|
6642
6639
|
richcmpfunc f;
|
|
6643
6640
|
|
|
6644
6641
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6645
|
-
f =
|
|
6642
|
+
f = TP_RICHCOMPARE(type2);
|
|
6646
6643
|
|
|
6647
6644
|
if (f != NULL) {
|
|
6648
6645
|
checked_reverse_op = true;
|
|
@@ -6655,7 +6652,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6655
6652
|
return result;
|
|
6656
6653
|
}
|
|
6657
6654
|
|
|
6658
|
-
|
|
6655
|
+
Py_DECREF_IMMORTAL(result);
|
|
6659
6656
|
}
|
|
6660
6657
|
}
|
|
6661
6658
|
|
|
@@ -6670,11 +6667,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6670
6667
|
return result;
|
|
6671
6668
|
}
|
|
6672
6669
|
|
|
6673
|
-
|
|
6670
|
+
Py_DECREF_IMMORTAL(result);
|
|
6674
6671
|
}
|
|
6675
6672
|
|
|
6676
6673
|
if (checked_reverse_op == false) {
|
|
6677
|
-
f =
|
|
6674
|
+
f = TP_RICHCOMPARE(type2);
|
|
6678
6675
|
|
|
6679
6676
|
if (f != NULL) {
|
|
6680
6677
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -6685,7 +6682,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6685
6682
|
return result;
|
|
6686
6683
|
}
|
|
6687
6684
|
|
|
6688
|
-
|
|
6685
|
+
Py_DECREF_IMMORTAL(result);
|
|
6689
6686
|
}
|
|
6690
6687
|
}
|
|
6691
6688
|
|
|
@@ -6697,13 +6694,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6697
6694
|
case Py_EQ: {
|
|
6698
6695
|
bool r = operand1 == operand2;
|
|
6699
6696
|
PyObject *result = BOOL_FROM(r);
|
|
6700
|
-
|
|
6697
|
+
Py_INCREF_IMMORTAL(result);
|
|
6701
6698
|
return result;
|
|
6702
6699
|
}
|
|
6703
6700
|
case Py_NE: {
|
|
6704
6701
|
bool r = operand1 != operand2;
|
|
6705
6702
|
PyObject *result = BOOL_FROM(r);
|
|
6706
|
-
|
|
6703
|
+
Py_INCREF_IMMORTAL(result);
|
|
6707
6704
|
return result;
|
|
6708
6705
|
}
|
|
6709
6706
|
default:
|
|
@@ -6733,15 +6730,19 @@ static bool COMPARE_GT_CBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2) {
|
|
|
6733
6730
|
|
|
6734
6731
|
if (operand1_long_object == operand2_long_object) {
|
|
6735
6732
|
r = false;
|
|
6736
|
-
} else if (
|
|
6737
|
-
|
|
6733
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6734
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6735
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - Nuitka_LongGetSignedDigitSize(operand2_long_object) >
|
|
6736
|
+
0;
|
|
6738
6737
|
} else {
|
|
6739
|
-
Py_ssize_t i =
|
|
6738
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6740
6739
|
r = false;
|
|
6741
6740
|
while (--i >= 0) {
|
|
6742
|
-
if (operand1_long_object
|
|
6743
|
-
|
|
6744
|
-
|
|
6741
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6742
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6743
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] >
|
|
6744
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i];
|
|
6745
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
6745
6746
|
r = !r;
|
|
6746
6747
|
}
|
|
6747
6748
|
break;
|
|
@@ -6796,7 +6797,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6796
6797
|
}
|
|
6797
6798
|
}
|
|
6798
6799
|
|
|
6799
|
-
|
|
6800
|
+
Py_DECREF_IMMORTAL(result);
|
|
6800
6801
|
}
|
|
6801
6802
|
|
|
6802
6803
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6865,11 +6866,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6865
6866
|
}
|
|
6866
6867
|
}
|
|
6867
6868
|
|
|
6868
|
-
|
|
6869
|
+
Py_DECREF_IMMORTAL(result);
|
|
6869
6870
|
}
|
|
6870
6871
|
}
|
|
6871
6872
|
|
|
6872
|
-
f =
|
|
6873
|
+
f = TP_RICHCOMPARE(type1);
|
|
6873
6874
|
if (f != NULL) {
|
|
6874
6875
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
6875
6876
|
|
|
@@ -6887,7 +6888,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6887
6888
|
}
|
|
6888
6889
|
}
|
|
6889
6890
|
|
|
6890
|
-
|
|
6891
|
+
Py_DECREF_IMMORTAL(result);
|
|
6891
6892
|
}
|
|
6892
6893
|
|
|
6893
6894
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -6908,7 +6909,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6908
6909
|
}
|
|
6909
6910
|
}
|
|
6910
6911
|
|
|
6911
|
-
|
|
6912
|
+
Py_DECREF_IMMORTAL(result);
|
|
6912
6913
|
}
|
|
6913
6914
|
|
|
6914
6915
|
int c;
|
|
@@ -7024,11 +7025,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7024
7025
|
}
|
|
7025
7026
|
}
|
|
7026
7027
|
|
|
7027
|
-
|
|
7028
|
+
Py_DECREF_IMMORTAL(result);
|
|
7028
7029
|
}
|
|
7029
7030
|
}
|
|
7030
7031
|
|
|
7031
|
-
f =
|
|
7032
|
+
f = TP_RICHCOMPARE(type1);
|
|
7032
7033
|
|
|
7033
7034
|
if (f != NULL) {
|
|
7034
7035
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -7047,7 +7048,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7047
7048
|
}
|
|
7048
7049
|
}
|
|
7049
7050
|
|
|
7050
|
-
|
|
7051
|
+
Py_DECREF_IMMORTAL(result);
|
|
7051
7052
|
}
|
|
7052
7053
|
|
|
7053
7054
|
if (checked_reverse_op == false) {
|
|
@@ -7070,7 +7071,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7070
7071
|
}
|
|
7071
7072
|
}
|
|
7072
7073
|
|
|
7073
|
-
|
|
7074
|
+
Py_DECREF_IMMORTAL(result);
|
|
7074
7075
|
}
|
|
7075
7076
|
}
|
|
7076
7077
|
|
|
@@ -7146,7 +7147,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7146
7147
|
}
|
|
7147
7148
|
}
|
|
7148
7149
|
|
|
7149
|
-
|
|
7150
|
+
Py_DECREF_IMMORTAL(result);
|
|
7150
7151
|
}
|
|
7151
7152
|
|
|
7152
7153
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7196,7 +7197,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7196
7197
|
richcmpfunc f;
|
|
7197
7198
|
|
|
7198
7199
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7199
|
-
f =
|
|
7200
|
+
f = TP_RICHCOMPARE(type2);
|
|
7200
7201
|
|
|
7201
7202
|
if (f != NULL) {
|
|
7202
7203
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -7215,7 +7216,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7215
7216
|
}
|
|
7216
7217
|
}
|
|
7217
7218
|
|
|
7218
|
-
|
|
7219
|
+
Py_DECREF_IMMORTAL(result);
|
|
7219
7220
|
}
|
|
7220
7221
|
}
|
|
7221
7222
|
|
|
@@ -7237,10 +7238,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7237
7238
|
}
|
|
7238
7239
|
}
|
|
7239
7240
|
|
|
7240
|
-
|
|
7241
|
+
Py_DECREF_IMMORTAL(result);
|
|
7241
7242
|
}
|
|
7242
7243
|
|
|
7243
|
-
f =
|
|
7244
|
+
f = TP_RICHCOMPARE(type2);
|
|
7244
7245
|
if (f != NULL) {
|
|
7245
7246
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
7246
7247
|
|
|
@@ -7258,7 +7259,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7258
7259
|
}
|
|
7259
7260
|
}
|
|
7260
7261
|
|
|
7261
|
-
|
|
7262
|
+
Py_DECREF_IMMORTAL(result);
|
|
7262
7263
|
}
|
|
7263
7264
|
|
|
7264
7265
|
int c;
|
|
@@ -7353,7 +7354,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7353
7354
|
richcmpfunc f;
|
|
7354
7355
|
|
|
7355
7356
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7356
|
-
f =
|
|
7357
|
+
f = TP_RICHCOMPARE(type2);
|
|
7357
7358
|
|
|
7358
7359
|
if (f != NULL) {
|
|
7359
7360
|
checked_reverse_op = true;
|
|
@@ -7374,7 +7375,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7374
7375
|
}
|
|
7375
7376
|
}
|
|
7376
7377
|
|
|
7377
|
-
|
|
7378
|
+
Py_DECREF_IMMORTAL(result);
|
|
7378
7379
|
}
|
|
7379
7380
|
}
|
|
7380
7381
|
|
|
@@ -7397,11 +7398,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7397
7398
|
}
|
|
7398
7399
|
}
|
|
7399
7400
|
|
|
7400
|
-
|
|
7401
|
+
Py_DECREF_IMMORTAL(result);
|
|
7401
7402
|
}
|
|
7402
7403
|
|
|
7403
7404
|
if (checked_reverse_op == false) {
|
|
7404
|
-
f =
|
|
7405
|
+
f = TP_RICHCOMPARE(type2);
|
|
7405
7406
|
|
|
7406
7407
|
if (f != NULL) {
|
|
7407
7408
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -7420,7 +7421,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7420
7421
|
}
|
|
7421
7422
|
}
|
|
7422
7423
|
|
|
7423
|
-
|
|
7424
|
+
Py_DECREF_IMMORTAL(result);
|
|
7424
7425
|
}
|
|
7425
7426
|
}
|
|
7426
7427
|
|
|
@@ -7467,7 +7468,7 @@ static PyObject *COMPARE_GT_OBJECT_FLOAT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
7467
7468
|
|
|
7468
7469
|
// Convert to target type.
|
|
7469
7470
|
PyObject *result = BOOL_FROM(r);
|
|
7470
|
-
|
|
7471
|
+
Py_INCREF_IMMORTAL(result);
|
|
7471
7472
|
return result;
|
|
7472
7473
|
}
|
|
7473
7474
|
/* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
|
|
@@ -7504,7 +7505,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7504
7505
|
return result;
|
|
7505
7506
|
}
|
|
7506
7507
|
|
|
7507
|
-
|
|
7508
|
+
Py_DECREF_IMMORTAL(result);
|
|
7508
7509
|
}
|
|
7509
7510
|
|
|
7510
7511
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7545,7 +7546,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7545
7546
|
|
|
7546
7547
|
bool r = c != 0;
|
|
7547
7548
|
PyObject *result = BOOL_FROM(r);
|
|
7548
|
-
|
|
7549
|
+
Py_INCREF_IMMORTAL(result);
|
|
7549
7550
|
return result;
|
|
7550
7551
|
}
|
|
7551
7552
|
}
|
|
@@ -7565,11 +7566,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7565
7566
|
return result;
|
|
7566
7567
|
}
|
|
7567
7568
|
|
|
7568
|
-
|
|
7569
|
+
Py_DECREF_IMMORTAL(result);
|
|
7569
7570
|
}
|
|
7570
7571
|
}
|
|
7571
7572
|
|
|
7572
|
-
f =
|
|
7573
|
+
f = TP_RICHCOMPARE(type1);
|
|
7573
7574
|
if (f != NULL) {
|
|
7574
7575
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
7575
7576
|
|
|
@@ -7579,7 +7580,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7579
7580
|
return result;
|
|
7580
7581
|
}
|
|
7581
7582
|
|
|
7582
|
-
|
|
7583
|
+
Py_DECREF_IMMORTAL(result);
|
|
7583
7584
|
}
|
|
7584
7585
|
|
|
7585
7586
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -7592,7 +7593,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7592
7593
|
return result;
|
|
7593
7594
|
}
|
|
7594
7595
|
|
|
7595
|
-
|
|
7596
|
+
Py_DECREF_IMMORTAL(result);
|
|
7596
7597
|
}
|
|
7597
7598
|
|
|
7598
7599
|
int c;
|
|
@@ -7680,7 +7681,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7680
7681
|
|
|
7681
7682
|
bool r = c != 0;
|
|
7682
7683
|
PyObject *result = BOOL_FROM(r);
|
|
7683
|
-
|
|
7684
|
+
Py_INCREF_IMMORTAL(result);
|
|
7684
7685
|
return result;
|
|
7685
7686
|
#else
|
|
7686
7687
|
bool checked_reverse_op = false;
|
|
@@ -7700,11 +7701,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7700
7701
|
return result;
|
|
7701
7702
|
}
|
|
7702
7703
|
|
|
7703
|
-
|
|
7704
|
+
Py_DECREF_IMMORTAL(result);
|
|
7704
7705
|
}
|
|
7705
7706
|
}
|
|
7706
7707
|
|
|
7707
|
-
f =
|
|
7708
|
+
f = TP_RICHCOMPARE(type1);
|
|
7708
7709
|
|
|
7709
7710
|
if (f != NULL) {
|
|
7710
7711
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -7715,7 +7716,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7715
7716
|
return result;
|
|
7716
7717
|
}
|
|
7717
7718
|
|
|
7718
|
-
|
|
7719
|
+
Py_DECREF_IMMORTAL(result);
|
|
7719
7720
|
}
|
|
7720
7721
|
|
|
7721
7722
|
if (checked_reverse_op == false) {
|
|
@@ -7730,7 +7731,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7730
7731
|
return result;
|
|
7731
7732
|
}
|
|
7732
7733
|
|
|
7733
|
-
|
|
7734
|
+
Py_DECREF_IMMORTAL(result);
|
|
7734
7735
|
}
|
|
7735
7736
|
}
|
|
7736
7737
|
|
|
@@ -7742,13 +7743,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7742
7743
|
case Py_EQ: {
|
|
7743
7744
|
bool r = operand1 == operand2;
|
|
7744
7745
|
PyObject *result = BOOL_FROM(r);
|
|
7745
|
-
|
|
7746
|
+
Py_INCREF_IMMORTAL(result);
|
|
7746
7747
|
return result;
|
|
7747
7748
|
}
|
|
7748
7749
|
case Py_NE: {
|
|
7749
7750
|
bool r = operand1 != operand2;
|
|
7750
7751
|
PyObject *result = BOOL_FROM(r);
|
|
7751
|
-
|
|
7752
|
+
Py_INCREF_IMMORTAL(result);
|
|
7752
7753
|
return result;
|
|
7753
7754
|
}
|
|
7754
7755
|
default:
|
|
@@ -7796,7 +7797,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7796
7797
|
return result;
|
|
7797
7798
|
}
|
|
7798
7799
|
|
|
7799
|
-
|
|
7800
|
+
Py_DECREF_IMMORTAL(result);
|
|
7800
7801
|
}
|
|
7801
7802
|
|
|
7802
7803
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7837,7 +7838,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7837
7838
|
|
|
7838
7839
|
bool r = c != 0;
|
|
7839
7840
|
PyObject *result = BOOL_FROM(r);
|
|
7840
|
-
|
|
7841
|
+
Py_INCREF_IMMORTAL(result);
|
|
7841
7842
|
return result;
|
|
7842
7843
|
}
|
|
7843
7844
|
}
|
|
@@ -7846,7 +7847,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7846
7847
|
richcmpfunc f;
|
|
7847
7848
|
|
|
7848
7849
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
7849
|
-
f =
|
|
7850
|
+
f = TP_RICHCOMPARE(type2);
|
|
7850
7851
|
|
|
7851
7852
|
if (f != NULL) {
|
|
7852
7853
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -7857,7 +7858,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7857
7858
|
return result;
|
|
7858
7859
|
}
|
|
7859
7860
|
|
|
7860
|
-
|
|
7861
|
+
Py_DECREF_IMMORTAL(result);
|
|
7861
7862
|
}
|
|
7862
7863
|
}
|
|
7863
7864
|
|
|
@@ -7871,10 +7872,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7871
7872
|
return result;
|
|
7872
7873
|
}
|
|
7873
7874
|
|
|
7874
|
-
|
|
7875
|
+
Py_DECREF_IMMORTAL(result);
|
|
7875
7876
|
}
|
|
7876
7877
|
|
|
7877
|
-
f =
|
|
7878
|
+
f = TP_RICHCOMPARE(type2);
|
|
7878
7879
|
if (f != NULL) {
|
|
7879
7880
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
7880
7881
|
|
|
@@ -7884,7 +7885,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7884
7885
|
return result;
|
|
7885
7886
|
}
|
|
7886
7887
|
|
|
7887
|
-
|
|
7888
|
+
Py_DECREF_IMMORTAL(result);
|
|
7888
7889
|
}
|
|
7889
7890
|
|
|
7890
7891
|
int c;
|
|
@@ -7972,14 +7973,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7972
7973
|
|
|
7973
7974
|
bool r = c != 0;
|
|
7974
7975
|
PyObject *result = BOOL_FROM(r);
|
|
7975
|
-
|
|
7976
|
+
Py_INCREF_IMMORTAL(result);
|
|
7976
7977
|
return result;
|
|
7977
7978
|
#else
|
|
7978
7979
|
bool checked_reverse_op = false;
|
|
7979
7980
|
richcmpfunc f;
|
|
7980
7981
|
|
|
7981
7982
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
7982
|
-
f =
|
|
7983
|
+
f = TP_RICHCOMPARE(type2);
|
|
7983
7984
|
|
|
7984
7985
|
if (f != NULL) {
|
|
7985
7986
|
checked_reverse_op = true;
|
|
@@ -7992,7 +7993,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7992
7993
|
return result;
|
|
7993
7994
|
}
|
|
7994
7995
|
|
|
7995
|
-
|
|
7996
|
+
Py_DECREF_IMMORTAL(result);
|
|
7996
7997
|
}
|
|
7997
7998
|
}
|
|
7998
7999
|
|
|
@@ -8007,11 +8008,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8007
8008
|
return result;
|
|
8008
8009
|
}
|
|
8009
8010
|
|
|
8010
|
-
|
|
8011
|
+
Py_DECREF_IMMORTAL(result);
|
|
8011
8012
|
}
|
|
8012
8013
|
|
|
8013
8014
|
if (checked_reverse_op == false) {
|
|
8014
|
-
f =
|
|
8015
|
+
f = TP_RICHCOMPARE(type2);
|
|
8015
8016
|
|
|
8016
8017
|
if (f != NULL) {
|
|
8017
8018
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -8022,7 +8023,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8022
8023
|
return result;
|
|
8023
8024
|
}
|
|
8024
8025
|
|
|
8025
|
-
|
|
8026
|
+
Py_DECREF_IMMORTAL(result);
|
|
8026
8027
|
}
|
|
8027
8028
|
}
|
|
8028
8029
|
|
|
@@ -8034,13 +8035,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8034
8035
|
case Py_EQ: {
|
|
8035
8036
|
bool r = operand1 == operand2;
|
|
8036
8037
|
PyObject *result = BOOL_FROM(r);
|
|
8037
|
-
|
|
8038
|
+
Py_INCREF_IMMORTAL(result);
|
|
8038
8039
|
return result;
|
|
8039
8040
|
}
|
|
8040
8041
|
case Py_NE: {
|
|
8041
8042
|
bool r = operand1 != operand2;
|
|
8042
8043
|
PyObject *result = BOOL_FROM(r);
|
|
8043
|
-
|
|
8044
|
+
Py_INCREF_IMMORTAL(result);
|
|
8044
8045
|
return result;
|
|
8045
8046
|
}
|
|
8046
8047
|
default:
|
|
@@ -8112,7 +8113,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8112
8113
|
}
|
|
8113
8114
|
}
|
|
8114
8115
|
|
|
8115
|
-
|
|
8116
|
+
Py_DECREF_IMMORTAL(result);
|
|
8116
8117
|
}
|
|
8117
8118
|
|
|
8118
8119
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8181,11 +8182,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8181
8182
|
}
|
|
8182
8183
|
}
|
|
8183
8184
|
|
|
8184
|
-
|
|
8185
|
+
Py_DECREF_IMMORTAL(result);
|
|
8185
8186
|
}
|
|
8186
8187
|
}
|
|
8187
8188
|
|
|
8188
|
-
f =
|
|
8189
|
+
f = TP_RICHCOMPARE(type1);
|
|
8189
8190
|
if (f != NULL) {
|
|
8190
8191
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
8191
8192
|
|
|
@@ -8203,7 +8204,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8203
8204
|
}
|
|
8204
8205
|
}
|
|
8205
8206
|
|
|
8206
|
-
|
|
8207
|
+
Py_DECREF_IMMORTAL(result);
|
|
8207
8208
|
}
|
|
8208
8209
|
|
|
8209
8210
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -8224,7 +8225,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8224
8225
|
}
|
|
8225
8226
|
}
|
|
8226
8227
|
|
|
8227
|
-
|
|
8228
|
+
Py_DECREF_IMMORTAL(result);
|
|
8228
8229
|
}
|
|
8229
8230
|
|
|
8230
8231
|
int c;
|
|
@@ -8340,11 +8341,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8340
8341
|
}
|
|
8341
8342
|
}
|
|
8342
8343
|
|
|
8343
|
-
|
|
8344
|
+
Py_DECREF_IMMORTAL(result);
|
|
8344
8345
|
}
|
|
8345
8346
|
}
|
|
8346
8347
|
|
|
8347
|
-
f =
|
|
8348
|
+
f = TP_RICHCOMPARE(type1);
|
|
8348
8349
|
|
|
8349
8350
|
if (f != NULL) {
|
|
8350
8351
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -8363,7 +8364,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8363
8364
|
}
|
|
8364
8365
|
}
|
|
8365
8366
|
|
|
8366
|
-
|
|
8367
|
+
Py_DECREF_IMMORTAL(result);
|
|
8367
8368
|
}
|
|
8368
8369
|
|
|
8369
8370
|
if (checked_reverse_op == false) {
|
|
@@ -8386,7 +8387,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8386
8387
|
}
|
|
8387
8388
|
}
|
|
8388
8389
|
|
|
8389
|
-
|
|
8390
|
+
Py_DECREF_IMMORTAL(result);
|
|
8390
8391
|
}
|
|
8391
8392
|
}
|
|
8392
8393
|
|
|
@@ -8460,7 +8461,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8460
8461
|
}
|
|
8461
8462
|
}
|
|
8462
8463
|
|
|
8463
|
-
|
|
8464
|
+
Py_DECREF_IMMORTAL(result);
|
|
8464
8465
|
}
|
|
8465
8466
|
|
|
8466
8467
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8510,7 +8511,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8510
8511
|
richcmpfunc f;
|
|
8511
8512
|
|
|
8512
8513
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8513
|
-
f =
|
|
8514
|
+
f = TP_RICHCOMPARE(type2);
|
|
8514
8515
|
|
|
8515
8516
|
if (f != NULL) {
|
|
8516
8517
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -8529,7 +8530,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8529
8530
|
}
|
|
8530
8531
|
}
|
|
8531
8532
|
|
|
8532
|
-
|
|
8533
|
+
Py_DECREF_IMMORTAL(result);
|
|
8533
8534
|
}
|
|
8534
8535
|
}
|
|
8535
8536
|
|
|
@@ -8551,10 +8552,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8551
8552
|
}
|
|
8552
8553
|
}
|
|
8553
8554
|
|
|
8554
|
-
|
|
8555
|
+
Py_DECREF_IMMORTAL(result);
|
|
8555
8556
|
}
|
|
8556
8557
|
|
|
8557
|
-
f =
|
|
8558
|
+
f = TP_RICHCOMPARE(type2);
|
|
8558
8559
|
if (f != NULL) {
|
|
8559
8560
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
8560
8561
|
|
|
@@ -8572,7 +8573,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8572
8573
|
}
|
|
8573
8574
|
}
|
|
8574
8575
|
|
|
8575
|
-
|
|
8576
|
+
Py_DECREF_IMMORTAL(result);
|
|
8576
8577
|
}
|
|
8577
8578
|
|
|
8578
8579
|
int c;
|
|
@@ -8667,7 +8668,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8667
8668
|
richcmpfunc f;
|
|
8668
8669
|
|
|
8669
8670
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8670
|
-
f =
|
|
8671
|
+
f = TP_RICHCOMPARE(type2);
|
|
8671
8672
|
|
|
8672
8673
|
if (f != NULL) {
|
|
8673
8674
|
checked_reverse_op = true;
|
|
@@ -8688,7 +8689,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8688
8689
|
}
|
|
8689
8690
|
}
|
|
8690
8691
|
|
|
8691
|
-
|
|
8692
|
+
Py_DECREF_IMMORTAL(result);
|
|
8692
8693
|
}
|
|
8693
8694
|
}
|
|
8694
8695
|
|
|
@@ -8711,11 +8712,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8711
8712
|
}
|
|
8712
8713
|
}
|
|
8713
8714
|
|
|
8714
|
-
|
|
8715
|
+
Py_DECREF_IMMORTAL(result);
|
|
8715
8716
|
}
|
|
8716
8717
|
|
|
8717
8718
|
if (checked_reverse_op == false) {
|
|
8718
|
-
f =
|
|
8719
|
+
f = TP_RICHCOMPARE(type2);
|
|
8719
8720
|
|
|
8720
8721
|
if (f != NULL) {
|
|
8721
8722
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -8734,7 +8735,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8734
8735
|
}
|
|
8735
8736
|
}
|
|
8736
8737
|
|
|
8737
|
-
|
|
8738
|
+
Py_DECREF_IMMORTAL(result);
|
|
8738
8739
|
}
|
|
8739
8740
|
}
|
|
8740
8741
|
|
|
@@ -8807,7 +8808,7 @@ static PyObject *COMPARE_GT_OBJECT_TUPLE_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
8807
8808
|
|
|
8808
8809
|
// Convert to target type.
|
|
8809
8810
|
PyObject *result = BOOL_FROM(r);
|
|
8810
|
-
|
|
8811
|
+
Py_INCREF_IMMORTAL(result);
|
|
8811
8812
|
return result;
|
|
8812
8813
|
}
|
|
8813
8814
|
|
|
@@ -8847,7 +8848,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8847
8848
|
return result;
|
|
8848
8849
|
}
|
|
8849
8850
|
|
|
8850
|
-
|
|
8851
|
+
Py_DECREF_IMMORTAL(result);
|
|
8851
8852
|
}
|
|
8852
8853
|
|
|
8853
8854
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8888,7 +8889,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8888
8889
|
|
|
8889
8890
|
bool r = c != 0;
|
|
8890
8891
|
PyObject *result = BOOL_FROM(r);
|
|
8891
|
-
|
|
8892
|
+
Py_INCREF_IMMORTAL(result);
|
|
8892
8893
|
return result;
|
|
8893
8894
|
}
|
|
8894
8895
|
}
|
|
@@ -8908,11 +8909,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8908
8909
|
return result;
|
|
8909
8910
|
}
|
|
8910
8911
|
|
|
8911
|
-
|
|
8912
|
+
Py_DECREF_IMMORTAL(result);
|
|
8912
8913
|
}
|
|
8913
8914
|
}
|
|
8914
8915
|
|
|
8915
|
-
f =
|
|
8916
|
+
f = TP_RICHCOMPARE(type1);
|
|
8916
8917
|
if (f != NULL) {
|
|
8917
8918
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
8918
8919
|
|
|
@@ -8922,7 +8923,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8922
8923
|
return result;
|
|
8923
8924
|
}
|
|
8924
8925
|
|
|
8925
|
-
|
|
8926
|
+
Py_DECREF_IMMORTAL(result);
|
|
8926
8927
|
}
|
|
8927
8928
|
|
|
8928
8929
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -8935,7 +8936,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8935
8936
|
return result;
|
|
8936
8937
|
}
|
|
8937
8938
|
|
|
8938
|
-
|
|
8939
|
+
Py_DECREF_IMMORTAL(result);
|
|
8939
8940
|
}
|
|
8940
8941
|
|
|
8941
8942
|
int c;
|
|
@@ -9023,7 +9024,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9023
9024
|
|
|
9024
9025
|
bool r = c != 0;
|
|
9025
9026
|
PyObject *result = BOOL_FROM(r);
|
|
9026
|
-
|
|
9027
|
+
Py_INCREF_IMMORTAL(result);
|
|
9027
9028
|
return result;
|
|
9028
9029
|
#else
|
|
9029
9030
|
bool checked_reverse_op = false;
|
|
@@ -9043,11 +9044,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9043
9044
|
return result;
|
|
9044
9045
|
}
|
|
9045
9046
|
|
|
9046
|
-
|
|
9047
|
+
Py_DECREF_IMMORTAL(result);
|
|
9047
9048
|
}
|
|
9048
9049
|
}
|
|
9049
9050
|
|
|
9050
|
-
f =
|
|
9051
|
+
f = TP_RICHCOMPARE(type1);
|
|
9051
9052
|
|
|
9052
9053
|
if (f != NULL) {
|
|
9053
9054
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -9058,7 +9059,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9058
9059
|
return result;
|
|
9059
9060
|
}
|
|
9060
9061
|
|
|
9061
|
-
|
|
9062
|
+
Py_DECREF_IMMORTAL(result);
|
|
9062
9063
|
}
|
|
9063
9064
|
|
|
9064
9065
|
if (checked_reverse_op == false) {
|
|
@@ -9073,7 +9074,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9073
9074
|
return result;
|
|
9074
9075
|
}
|
|
9075
9076
|
|
|
9076
|
-
|
|
9077
|
+
Py_DECREF_IMMORTAL(result);
|
|
9077
9078
|
}
|
|
9078
9079
|
}
|
|
9079
9080
|
|
|
@@ -9085,13 +9086,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9085
9086
|
case Py_EQ: {
|
|
9086
9087
|
bool r = operand1 == operand2;
|
|
9087
9088
|
PyObject *result = BOOL_FROM(r);
|
|
9088
|
-
|
|
9089
|
+
Py_INCREF_IMMORTAL(result);
|
|
9089
9090
|
return result;
|
|
9090
9091
|
}
|
|
9091
9092
|
case Py_NE: {
|
|
9092
9093
|
bool r = operand1 != operand2;
|
|
9093
9094
|
PyObject *result = BOOL_FROM(r);
|
|
9094
|
-
|
|
9095
|
+
Py_INCREF_IMMORTAL(result);
|
|
9095
9096
|
return result;
|
|
9096
9097
|
}
|
|
9097
9098
|
default:
|
|
@@ -9139,7 +9140,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9139
9140
|
return result;
|
|
9140
9141
|
}
|
|
9141
9142
|
|
|
9142
|
-
|
|
9143
|
+
Py_DECREF_IMMORTAL(result);
|
|
9143
9144
|
}
|
|
9144
9145
|
|
|
9145
9146
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9180,7 +9181,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9180
9181
|
|
|
9181
9182
|
bool r = c != 0;
|
|
9182
9183
|
PyObject *result = BOOL_FROM(r);
|
|
9183
|
-
|
|
9184
|
+
Py_INCREF_IMMORTAL(result);
|
|
9184
9185
|
return result;
|
|
9185
9186
|
}
|
|
9186
9187
|
}
|
|
@@ -9189,7 +9190,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9189
9190
|
richcmpfunc f;
|
|
9190
9191
|
|
|
9191
9192
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9192
|
-
f =
|
|
9193
|
+
f = TP_RICHCOMPARE(type2);
|
|
9193
9194
|
|
|
9194
9195
|
if (f != NULL) {
|
|
9195
9196
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -9200,7 +9201,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9200
9201
|
return result;
|
|
9201
9202
|
}
|
|
9202
9203
|
|
|
9203
|
-
|
|
9204
|
+
Py_DECREF_IMMORTAL(result);
|
|
9204
9205
|
}
|
|
9205
9206
|
}
|
|
9206
9207
|
|
|
@@ -9214,10 +9215,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9214
9215
|
return result;
|
|
9215
9216
|
}
|
|
9216
9217
|
|
|
9217
|
-
|
|
9218
|
+
Py_DECREF_IMMORTAL(result);
|
|
9218
9219
|
}
|
|
9219
9220
|
|
|
9220
|
-
f =
|
|
9221
|
+
f = TP_RICHCOMPARE(type2);
|
|
9221
9222
|
if (f != NULL) {
|
|
9222
9223
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
9223
9224
|
|
|
@@ -9227,7 +9228,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9227
9228
|
return result;
|
|
9228
9229
|
}
|
|
9229
9230
|
|
|
9230
|
-
|
|
9231
|
+
Py_DECREF_IMMORTAL(result);
|
|
9231
9232
|
}
|
|
9232
9233
|
|
|
9233
9234
|
int c;
|
|
@@ -9315,14 +9316,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9315
9316
|
|
|
9316
9317
|
bool r = c != 0;
|
|
9317
9318
|
PyObject *result = BOOL_FROM(r);
|
|
9318
|
-
|
|
9319
|
+
Py_INCREF_IMMORTAL(result);
|
|
9319
9320
|
return result;
|
|
9320
9321
|
#else
|
|
9321
9322
|
bool checked_reverse_op = false;
|
|
9322
9323
|
richcmpfunc f;
|
|
9323
9324
|
|
|
9324
9325
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9325
|
-
f =
|
|
9326
|
+
f = TP_RICHCOMPARE(type2);
|
|
9326
9327
|
|
|
9327
9328
|
if (f != NULL) {
|
|
9328
9329
|
checked_reverse_op = true;
|
|
@@ -9335,7 +9336,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9335
9336
|
return result;
|
|
9336
9337
|
}
|
|
9337
9338
|
|
|
9338
|
-
|
|
9339
|
+
Py_DECREF_IMMORTAL(result);
|
|
9339
9340
|
}
|
|
9340
9341
|
}
|
|
9341
9342
|
|
|
@@ -9350,11 +9351,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9350
9351
|
return result;
|
|
9351
9352
|
}
|
|
9352
9353
|
|
|
9353
|
-
|
|
9354
|
+
Py_DECREF_IMMORTAL(result);
|
|
9354
9355
|
}
|
|
9355
9356
|
|
|
9356
9357
|
if (checked_reverse_op == false) {
|
|
9357
|
-
f =
|
|
9358
|
+
f = TP_RICHCOMPARE(type2);
|
|
9358
9359
|
|
|
9359
9360
|
if (f != NULL) {
|
|
9360
9361
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -9365,7 +9366,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9365
9366
|
return result;
|
|
9366
9367
|
}
|
|
9367
9368
|
|
|
9368
|
-
|
|
9369
|
+
Py_DECREF_IMMORTAL(result);
|
|
9369
9370
|
}
|
|
9370
9371
|
}
|
|
9371
9372
|
|
|
@@ -9377,13 +9378,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9377
9378
|
case Py_EQ: {
|
|
9378
9379
|
bool r = operand1 == operand2;
|
|
9379
9380
|
PyObject *result = BOOL_FROM(r);
|
|
9380
|
-
|
|
9381
|
+
Py_INCREF_IMMORTAL(result);
|
|
9381
9382
|
return result;
|
|
9382
9383
|
}
|
|
9383
9384
|
case Py_NE: {
|
|
9384
9385
|
bool r = operand1 != operand2;
|
|
9385
9386
|
PyObject *result = BOOL_FROM(r);
|
|
9386
|
-
|
|
9387
|
+
Py_INCREF_IMMORTAL(result);
|
|
9387
9388
|
return result;
|
|
9388
9389
|
}
|
|
9389
9390
|
default:
|
|
@@ -9492,7 +9493,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9492
9493
|
}
|
|
9493
9494
|
}
|
|
9494
9495
|
|
|
9495
|
-
|
|
9496
|
+
Py_DECREF_IMMORTAL(result);
|
|
9496
9497
|
}
|
|
9497
9498
|
|
|
9498
9499
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9561,11 +9562,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9561
9562
|
}
|
|
9562
9563
|
}
|
|
9563
9564
|
|
|
9564
|
-
|
|
9565
|
+
Py_DECREF_IMMORTAL(result);
|
|
9565
9566
|
}
|
|
9566
9567
|
}
|
|
9567
9568
|
|
|
9568
|
-
f =
|
|
9569
|
+
f = TP_RICHCOMPARE(type1);
|
|
9569
9570
|
if (f != NULL) {
|
|
9570
9571
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
9571
9572
|
|
|
@@ -9583,7 +9584,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9583
9584
|
}
|
|
9584
9585
|
}
|
|
9585
9586
|
|
|
9586
|
-
|
|
9587
|
+
Py_DECREF_IMMORTAL(result);
|
|
9587
9588
|
}
|
|
9588
9589
|
|
|
9589
9590
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -9604,7 +9605,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9604
9605
|
}
|
|
9605
9606
|
}
|
|
9606
9607
|
|
|
9607
|
-
|
|
9608
|
+
Py_DECREF_IMMORTAL(result);
|
|
9608
9609
|
}
|
|
9609
9610
|
|
|
9610
9611
|
int c;
|
|
@@ -9720,11 +9721,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9720
9721
|
}
|
|
9721
9722
|
}
|
|
9722
9723
|
|
|
9723
|
-
|
|
9724
|
+
Py_DECREF_IMMORTAL(result);
|
|
9724
9725
|
}
|
|
9725
9726
|
}
|
|
9726
9727
|
|
|
9727
|
-
f =
|
|
9728
|
+
f = TP_RICHCOMPARE(type1);
|
|
9728
9729
|
|
|
9729
9730
|
if (f != NULL) {
|
|
9730
9731
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -9743,7 +9744,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9743
9744
|
}
|
|
9744
9745
|
}
|
|
9745
9746
|
|
|
9746
|
-
|
|
9747
|
+
Py_DECREF_IMMORTAL(result);
|
|
9747
9748
|
}
|
|
9748
9749
|
|
|
9749
9750
|
if (checked_reverse_op == false) {
|
|
@@ -9766,7 +9767,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9766
9767
|
}
|
|
9767
9768
|
}
|
|
9768
9769
|
|
|
9769
|
-
|
|
9770
|
+
Py_DECREF_IMMORTAL(result);
|
|
9770
9771
|
}
|
|
9771
9772
|
}
|
|
9772
9773
|
|
|
@@ -9840,7 +9841,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9840
9841
|
}
|
|
9841
9842
|
}
|
|
9842
9843
|
|
|
9843
|
-
|
|
9844
|
+
Py_DECREF_IMMORTAL(result);
|
|
9844
9845
|
}
|
|
9845
9846
|
|
|
9846
9847
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9890,7 +9891,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9890
9891
|
richcmpfunc f;
|
|
9891
9892
|
|
|
9892
9893
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9893
|
-
f =
|
|
9894
|
+
f = TP_RICHCOMPARE(type2);
|
|
9894
9895
|
|
|
9895
9896
|
if (f != NULL) {
|
|
9896
9897
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -9909,7 +9910,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9909
9910
|
}
|
|
9910
9911
|
}
|
|
9911
9912
|
|
|
9912
|
-
|
|
9913
|
+
Py_DECREF_IMMORTAL(result);
|
|
9913
9914
|
}
|
|
9914
9915
|
}
|
|
9915
9916
|
|
|
@@ -9931,10 +9932,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9931
9932
|
}
|
|
9932
9933
|
}
|
|
9933
9934
|
|
|
9934
|
-
|
|
9935
|
+
Py_DECREF_IMMORTAL(result);
|
|
9935
9936
|
}
|
|
9936
9937
|
|
|
9937
|
-
f =
|
|
9938
|
+
f = TP_RICHCOMPARE(type2);
|
|
9938
9939
|
if (f != NULL) {
|
|
9939
9940
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
9940
9941
|
|
|
@@ -9952,7 +9953,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9952
9953
|
}
|
|
9953
9954
|
}
|
|
9954
9955
|
|
|
9955
|
-
|
|
9956
|
+
Py_DECREF_IMMORTAL(result);
|
|
9956
9957
|
}
|
|
9957
9958
|
|
|
9958
9959
|
int c;
|
|
@@ -10047,7 +10048,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10047
10048
|
richcmpfunc f;
|
|
10048
10049
|
|
|
10049
10050
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
10050
|
-
f =
|
|
10051
|
+
f = TP_RICHCOMPARE(type2);
|
|
10051
10052
|
|
|
10052
10053
|
if (f != NULL) {
|
|
10053
10054
|
checked_reverse_op = true;
|
|
@@ -10068,7 +10069,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10068
10069
|
}
|
|
10069
10070
|
}
|
|
10070
10071
|
|
|
10071
|
-
|
|
10072
|
+
Py_DECREF_IMMORTAL(result);
|
|
10072
10073
|
}
|
|
10073
10074
|
}
|
|
10074
10075
|
|
|
@@ -10091,11 +10092,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10091
10092
|
}
|
|
10092
10093
|
}
|
|
10093
10094
|
|
|
10094
|
-
|
|
10095
|
+
Py_DECREF_IMMORTAL(result);
|
|
10095
10096
|
}
|
|
10096
10097
|
|
|
10097
10098
|
if (checked_reverse_op == false) {
|
|
10098
|
-
f =
|
|
10099
|
+
f = TP_RICHCOMPARE(type2);
|
|
10099
10100
|
|
|
10100
10101
|
if (f != NULL) {
|
|
10101
10102
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -10114,7 +10115,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10114
10115
|
}
|
|
10115
10116
|
}
|
|
10116
10117
|
|
|
10117
|
-
|
|
10118
|
+
Py_DECREF_IMMORTAL(result);
|
|
10118
10119
|
}
|
|
10119
10120
|
}
|
|
10120
10121
|
|
|
@@ -10161,14 +10162,11 @@ static PyObject *COMPARE_GT_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10161
10162
|
PyListObject *a = (PyListObject *)operand1;
|
|
10162
10163
|
PyListObject *b = (PyListObject *)operand2;
|
|
10163
10164
|
|
|
10164
|
-
Py_ssize_t len_a = Py_SIZE(a);
|
|
10165
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10166
|
-
|
|
10167
10165
|
bool found = false;
|
|
10168
10166
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10169
10167
|
|
|
10170
10168
|
Py_ssize_t i;
|
|
10171
|
-
for (i = 0; i <
|
|
10169
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10172
10170
|
PyObject *aa = a->ob_item[i];
|
|
10173
10171
|
PyObject *bb = b->ob_item[i];
|
|
10174
10172
|
|
|
@@ -10176,7 +10174,11 @@ static PyObject *COMPARE_GT_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10176
10174
|
continue;
|
|
10177
10175
|
}
|
|
10178
10176
|
|
|
10177
|
+
Py_INCREF(aa);
|
|
10178
|
+
Py_INCREF(bb);
|
|
10179
10179
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10180
|
+
Py_DECREF(aa);
|
|
10181
|
+
Py_DECREF(bb);
|
|
10180
10182
|
|
|
10181
10183
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10182
10184
|
return NULL;
|
|
@@ -10189,11 +10191,11 @@ static PyObject *COMPARE_GT_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10189
10191
|
}
|
|
10190
10192
|
|
|
10191
10193
|
if (found == false) {
|
|
10192
|
-
bool r =
|
|
10194
|
+
bool r = Py_SIZE(a) > Py_SIZE(b);
|
|
10193
10195
|
|
|
10194
10196
|
// Convert to target type.
|
|
10195
10197
|
PyObject *result = BOOL_FROM(r);
|
|
10196
|
-
|
|
10198
|
+
Py_INCREF_IMMORTAL(result);
|
|
10197
10199
|
return result;
|
|
10198
10200
|
}
|
|
10199
10201
|
|
|
@@ -10233,7 +10235,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10233
10235
|
return result;
|
|
10234
10236
|
}
|
|
10235
10237
|
|
|
10236
|
-
|
|
10238
|
+
Py_DECREF_IMMORTAL(result);
|
|
10237
10239
|
}
|
|
10238
10240
|
|
|
10239
10241
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10274,7 +10276,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10274
10276
|
|
|
10275
10277
|
bool r = c != 0;
|
|
10276
10278
|
PyObject *result = BOOL_FROM(r);
|
|
10277
|
-
|
|
10279
|
+
Py_INCREF_IMMORTAL(result);
|
|
10278
10280
|
return result;
|
|
10279
10281
|
}
|
|
10280
10282
|
}
|
|
@@ -10294,11 +10296,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10294
10296
|
return result;
|
|
10295
10297
|
}
|
|
10296
10298
|
|
|
10297
|
-
|
|
10299
|
+
Py_DECREF_IMMORTAL(result);
|
|
10298
10300
|
}
|
|
10299
10301
|
}
|
|
10300
10302
|
|
|
10301
|
-
f =
|
|
10303
|
+
f = TP_RICHCOMPARE(type1);
|
|
10302
10304
|
if (f != NULL) {
|
|
10303
10305
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
10304
10306
|
|
|
@@ -10308,7 +10310,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10308
10310
|
return result;
|
|
10309
10311
|
}
|
|
10310
10312
|
|
|
10311
|
-
|
|
10313
|
+
Py_DECREF_IMMORTAL(result);
|
|
10312
10314
|
}
|
|
10313
10315
|
|
|
10314
10316
|
f = PyList_Type.tp_richcompare;
|
|
@@ -10321,7 +10323,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10321
10323
|
return result;
|
|
10322
10324
|
}
|
|
10323
10325
|
|
|
10324
|
-
|
|
10326
|
+
Py_DECREF_IMMORTAL(result);
|
|
10325
10327
|
}
|
|
10326
10328
|
|
|
10327
10329
|
int c;
|
|
@@ -10409,7 +10411,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10409
10411
|
|
|
10410
10412
|
bool r = c != 0;
|
|
10411
10413
|
PyObject *result = BOOL_FROM(r);
|
|
10412
|
-
|
|
10414
|
+
Py_INCREF_IMMORTAL(result);
|
|
10413
10415
|
return result;
|
|
10414
10416
|
#else
|
|
10415
10417
|
bool checked_reverse_op = false;
|
|
@@ -10429,11 +10431,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10429
10431
|
return result;
|
|
10430
10432
|
}
|
|
10431
10433
|
|
|
10432
|
-
|
|
10434
|
+
Py_DECREF_IMMORTAL(result);
|
|
10433
10435
|
}
|
|
10434
10436
|
}
|
|
10435
10437
|
|
|
10436
|
-
f =
|
|
10438
|
+
f = TP_RICHCOMPARE(type1);
|
|
10437
10439
|
|
|
10438
10440
|
if (f != NULL) {
|
|
10439
10441
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -10444,7 +10446,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10444
10446
|
return result;
|
|
10445
10447
|
}
|
|
10446
10448
|
|
|
10447
|
-
|
|
10449
|
+
Py_DECREF_IMMORTAL(result);
|
|
10448
10450
|
}
|
|
10449
10451
|
|
|
10450
10452
|
if (checked_reverse_op == false) {
|
|
@@ -10459,7 +10461,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10459
10461
|
return result;
|
|
10460
10462
|
}
|
|
10461
10463
|
|
|
10462
|
-
|
|
10464
|
+
Py_DECREF_IMMORTAL(result);
|
|
10463
10465
|
}
|
|
10464
10466
|
}
|
|
10465
10467
|
|
|
@@ -10471,13 +10473,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10471
10473
|
case Py_EQ: {
|
|
10472
10474
|
bool r = operand1 == operand2;
|
|
10473
10475
|
PyObject *result = BOOL_FROM(r);
|
|
10474
|
-
|
|
10476
|
+
Py_INCREF_IMMORTAL(result);
|
|
10475
10477
|
return result;
|
|
10476
10478
|
}
|
|
10477
10479
|
case Py_NE: {
|
|
10478
10480
|
bool r = operand1 != operand2;
|
|
10479
10481
|
PyObject *result = BOOL_FROM(r);
|
|
10480
|
-
|
|
10482
|
+
Py_INCREF_IMMORTAL(result);
|
|
10481
10483
|
return result;
|
|
10482
10484
|
}
|
|
10483
10485
|
default:
|
|
@@ -10525,7 +10527,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10525
10527
|
return result;
|
|
10526
10528
|
}
|
|
10527
10529
|
|
|
10528
|
-
|
|
10530
|
+
Py_DECREF_IMMORTAL(result);
|
|
10529
10531
|
}
|
|
10530
10532
|
|
|
10531
10533
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10566,7 +10568,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10566
10568
|
|
|
10567
10569
|
bool r = c != 0;
|
|
10568
10570
|
PyObject *result = BOOL_FROM(r);
|
|
10569
|
-
|
|
10571
|
+
Py_INCREF_IMMORTAL(result);
|
|
10570
10572
|
return result;
|
|
10571
10573
|
}
|
|
10572
10574
|
}
|
|
@@ -10575,7 +10577,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10575
10577
|
richcmpfunc f;
|
|
10576
10578
|
|
|
10577
10579
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10578
|
-
f =
|
|
10580
|
+
f = TP_RICHCOMPARE(type2);
|
|
10579
10581
|
|
|
10580
10582
|
if (f != NULL) {
|
|
10581
10583
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -10586,7 +10588,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10586
10588
|
return result;
|
|
10587
10589
|
}
|
|
10588
10590
|
|
|
10589
|
-
|
|
10591
|
+
Py_DECREF_IMMORTAL(result);
|
|
10590
10592
|
}
|
|
10591
10593
|
}
|
|
10592
10594
|
|
|
@@ -10600,10 +10602,10 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10600
10602
|
return result;
|
|
10601
10603
|
}
|
|
10602
10604
|
|
|
10603
|
-
|
|
10605
|
+
Py_DECREF_IMMORTAL(result);
|
|
10604
10606
|
}
|
|
10605
10607
|
|
|
10606
|
-
f =
|
|
10608
|
+
f = TP_RICHCOMPARE(type2);
|
|
10607
10609
|
if (f != NULL) {
|
|
10608
10610
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
10609
10611
|
|
|
@@ -10613,7 +10615,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10613
10615
|
return result;
|
|
10614
10616
|
}
|
|
10615
10617
|
|
|
10616
|
-
|
|
10618
|
+
Py_DECREF_IMMORTAL(result);
|
|
10617
10619
|
}
|
|
10618
10620
|
|
|
10619
10621
|
int c;
|
|
@@ -10701,14 +10703,14 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10701
10703
|
|
|
10702
10704
|
bool r = c != 0;
|
|
10703
10705
|
PyObject *result = BOOL_FROM(r);
|
|
10704
|
-
|
|
10706
|
+
Py_INCREF_IMMORTAL(result);
|
|
10705
10707
|
return result;
|
|
10706
10708
|
#else
|
|
10707
10709
|
bool checked_reverse_op = false;
|
|
10708
10710
|
richcmpfunc f;
|
|
10709
10711
|
|
|
10710
10712
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10711
|
-
f =
|
|
10713
|
+
f = TP_RICHCOMPARE(type2);
|
|
10712
10714
|
|
|
10713
10715
|
if (f != NULL) {
|
|
10714
10716
|
checked_reverse_op = true;
|
|
@@ -10721,7 +10723,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10721
10723
|
return result;
|
|
10722
10724
|
}
|
|
10723
10725
|
|
|
10724
|
-
|
|
10726
|
+
Py_DECREF_IMMORTAL(result);
|
|
10725
10727
|
}
|
|
10726
10728
|
}
|
|
10727
10729
|
|
|
@@ -10736,11 +10738,11 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10736
10738
|
return result;
|
|
10737
10739
|
}
|
|
10738
10740
|
|
|
10739
|
-
|
|
10741
|
+
Py_DECREF_IMMORTAL(result);
|
|
10740
10742
|
}
|
|
10741
10743
|
|
|
10742
10744
|
if (checked_reverse_op == false) {
|
|
10743
|
-
f =
|
|
10745
|
+
f = TP_RICHCOMPARE(type2);
|
|
10744
10746
|
|
|
10745
10747
|
if (f != NULL) {
|
|
10746
10748
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -10751,7 +10753,7 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10751
10753
|
return result;
|
|
10752
10754
|
}
|
|
10753
10755
|
|
|
10754
|
-
|
|
10756
|
+
Py_DECREF_IMMORTAL(result);
|
|
10755
10757
|
}
|
|
10756
10758
|
}
|
|
10757
10759
|
|
|
@@ -10763,13 +10765,13 @@ PyObject *RICH_COMPARE_GT_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10763
10765
|
case Py_EQ: {
|
|
10764
10766
|
bool r = operand1 == operand2;
|
|
10765
10767
|
PyObject *result = BOOL_FROM(r);
|
|
10766
|
-
|
|
10768
|
+
Py_INCREF_IMMORTAL(result);
|
|
10767
10769
|
return result;
|
|
10768
10770
|
}
|
|
10769
10771
|
case Py_NE: {
|
|
10770
10772
|
bool r = operand1 != operand2;
|
|
10771
10773
|
PyObject *result = BOOL_FROM(r);
|
|
10772
|
-
|
|
10774
|
+
Py_INCREF_IMMORTAL(result);
|
|
10773
10775
|
return result;
|
|
10774
10776
|
}
|
|
10775
10777
|
default:
|
|
@@ -10798,14 +10800,11 @@ static nuitka_bool COMPARE_GT_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10798
10800
|
PyListObject *a = (PyListObject *)operand1;
|
|
10799
10801
|
PyListObject *b = (PyListObject *)operand2;
|
|
10800
10802
|
|
|
10801
|
-
Py_ssize_t len_a = Py_SIZE(a);
|
|
10802
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10803
|
-
|
|
10804
10803
|
bool found = false;
|
|
10805
10804
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10806
10805
|
|
|
10807
10806
|
Py_ssize_t i;
|
|
10808
|
-
for (i = 0; i <
|
|
10807
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10809
10808
|
PyObject *aa = a->ob_item[i];
|
|
10810
10809
|
PyObject *bb = b->ob_item[i];
|
|
10811
10810
|
|
|
@@ -10813,7 +10812,11 @@ static nuitka_bool COMPARE_GT_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10813
10812
|
continue;
|
|
10814
10813
|
}
|
|
10815
10814
|
|
|
10815
|
+
Py_INCREF(aa);
|
|
10816
|
+
Py_INCREF(bb);
|
|
10816
10817
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10818
|
+
Py_DECREF(aa);
|
|
10819
|
+
Py_DECREF(bb);
|
|
10817
10820
|
|
|
10818
10821
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10819
10822
|
return NUITKA_BOOL_EXCEPTION;
|
|
@@ -10826,7 +10829,7 @@ static nuitka_bool COMPARE_GT_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10826
10829
|
}
|
|
10827
10830
|
|
|
10828
10831
|
if (found == false) {
|
|
10829
|
-
bool r =
|
|
10832
|
+
bool r = Py_SIZE(a) > Py_SIZE(b);
|
|
10830
10833
|
|
|
10831
10834
|
// Convert to target type.
|
|
10832
10835
|
nuitka_bool result = r ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
|
|
@@ -10878,7 +10881,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10878
10881
|
}
|
|
10879
10882
|
}
|
|
10880
10883
|
|
|
10881
|
-
|
|
10884
|
+
Py_DECREF_IMMORTAL(result);
|
|
10882
10885
|
}
|
|
10883
10886
|
|
|
10884
10887
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10947,11 +10950,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10947
10950
|
}
|
|
10948
10951
|
}
|
|
10949
10952
|
|
|
10950
|
-
|
|
10953
|
+
Py_DECREF_IMMORTAL(result);
|
|
10951
10954
|
}
|
|
10952
10955
|
}
|
|
10953
10956
|
|
|
10954
|
-
f =
|
|
10957
|
+
f = TP_RICHCOMPARE(type1);
|
|
10955
10958
|
if (f != NULL) {
|
|
10956
10959
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
10957
10960
|
|
|
@@ -10969,7 +10972,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10969
10972
|
}
|
|
10970
10973
|
}
|
|
10971
10974
|
|
|
10972
|
-
|
|
10975
|
+
Py_DECREF_IMMORTAL(result);
|
|
10973
10976
|
}
|
|
10974
10977
|
|
|
10975
10978
|
f = PyList_Type.tp_richcompare;
|
|
@@ -10990,7 +10993,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
10990
10993
|
}
|
|
10991
10994
|
}
|
|
10992
10995
|
|
|
10993
|
-
|
|
10996
|
+
Py_DECREF_IMMORTAL(result);
|
|
10994
10997
|
}
|
|
10995
10998
|
|
|
10996
10999
|
int c;
|
|
@@ -11106,11 +11109,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11106
11109
|
}
|
|
11107
11110
|
}
|
|
11108
11111
|
|
|
11109
|
-
|
|
11112
|
+
Py_DECREF_IMMORTAL(result);
|
|
11110
11113
|
}
|
|
11111
11114
|
}
|
|
11112
11115
|
|
|
11113
|
-
f =
|
|
11116
|
+
f = TP_RICHCOMPARE(type1);
|
|
11114
11117
|
|
|
11115
11118
|
if (f != NULL) {
|
|
11116
11119
|
PyObject *result = (*f)(operand1, operand2, Py_GT);
|
|
@@ -11129,7 +11132,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11129
11132
|
}
|
|
11130
11133
|
}
|
|
11131
11134
|
|
|
11132
|
-
|
|
11135
|
+
Py_DECREF_IMMORTAL(result);
|
|
11133
11136
|
}
|
|
11134
11137
|
|
|
11135
11138
|
if (checked_reverse_op == false) {
|
|
@@ -11152,7 +11155,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11152
11155
|
}
|
|
11153
11156
|
}
|
|
11154
11157
|
|
|
11155
|
-
|
|
11158
|
+
Py_DECREF_IMMORTAL(result);
|
|
11156
11159
|
}
|
|
11157
11160
|
}
|
|
11158
11161
|
|
|
@@ -11226,7 +11229,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11226
11229
|
}
|
|
11227
11230
|
}
|
|
11228
11231
|
|
|
11229
|
-
|
|
11232
|
+
Py_DECREF_IMMORTAL(result);
|
|
11230
11233
|
}
|
|
11231
11234
|
|
|
11232
11235
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -11276,7 +11279,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11276
11279
|
richcmpfunc f;
|
|
11277
11280
|
|
|
11278
11281
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11279
|
-
f =
|
|
11282
|
+
f = TP_RICHCOMPARE(type2);
|
|
11280
11283
|
|
|
11281
11284
|
if (f != NULL) {
|
|
11282
11285
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -11295,7 +11298,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11295
11298
|
}
|
|
11296
11299
|
}
|
|
11297
11300
|
|
|
11298
|
-
|
|
11301
|
+
Py_DECREF_IMMORTAL(result);
|
|
11299
11302
|
}
|
|
11300
11303
|
}
|
|
11301
11304
|
|
|
@@ -11317,10 +11320,10 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11317
11320
|
}
|
|
11318
11321
|
}
|
|
11319
11322
|
|
|
11320
|
-
|
|
11323
|
+
Py_DECREF_IMMORTAL(result);
|
|
11321
11324
|
}
|
|
11322
11325
|
|
|
11323
|
-
f =
|
|
11326
|
+
f = TP_RICHCOMPARE(type2);
|
|
11324
11327
|
if (f != NULL) {
|
|
11325
11328
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
11326
11329
|
|
|
@@ -11338,7 +11341,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11338
11341
|
}
|
|
11339
11342
|
}
|
|
11340
11343
|
|
|
11341
|
-
|
|
11344
|
+
Py_DECREF_IMMORTAL(result);
|
|
11342
11345
|
}
|
|
11343
11346
|
|
|
11344
11347
|
int c;
|
|
@@ -11433,7 +11436,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11433
11436
|
richcmpfunc f;
|
|
11434
11437
|
|
|
11435
11438
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11436
|
-
f =
|
|
11439
|
+
f = TP_RICHCOMPARE(type2);
|
|
11437
11440
|
|
|
11438
11441
|
if (f != NULL) {
|
|
11439
11442
|
checked_reverse_op = true;
|
|
@@ -11454,7 +11457,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11454
11457
|
}
|
|
11455
11458
|
}
|
|
11456
11459
|
|
|
11457
|
-
|
|
11460
|
+
Py_DECREF_IMMORTAL(result);
|
|
11458
11461
|
}
|
|
11459
11462
|
}
|
|
11460
11463
|
|
|
@@ -11477,11 +11480,11 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11477
11480
|
}
|
|
11478
11481
|
}
|
|
11479
11482
|
|
|
11480
|
-
|
|
11483
|
+
Py_DECREF_IMMORTAL(result);
|
|
11481
11484
|
}
|
|
11482
11485
|
|
|
11483
11486
|
if (checked_reverse_op == false) {
|
|
11484
|
-
f =
|
|
11487
|
+
f = TP_RICHCOMPARE(type2);
|
|
11485
11488
|
|
|
11486
11489
|
if (f != NULL) {
|
|
11487
11490
|
PyObject *result = (*f)(operand2, operand1, Py_LT);
|
|
@@ -11500,7 +11503,7 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11500
11503
|
}
|
|
11501
11504
|
}
|
|
11502
11505
|
|
|
11503
|
-
|
|
11506
|
+
Py_DECREF_IMMORTAL(result);
|
|
11504
11507
|
}
|
|
11505
11508
|
}
|
|
11506
11509
|
|
|
@@ -11538,7 +11541,6 @@ nuitka_bool RICH_COMPARE_GT_NBOOL_LIST_LIST(PyObject *operand1, PyObject *operan
|
|
|
11538
11541
|
return COMPARE_GT_NBOOL_LIST_LIST(operand1, operand2);
|
|
11539
11542
|
}
|
|
11540
11543
|
|
|
11541
|
-
#if PYTHON_VERSION < 0x300
|
|
11542
11544
|
static PyObject *COMPARE_GT_OBJECT_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11543
11545
|
CHECK_OBJECT(operand1);
|
|
11544
11546
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11557,7 +11559,7 @@ static PyObject *COMPARE_GT_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11557
11559
|
}
|
|
11558
11560
|
|
|
11559
11561
|
Py_ssize_t operand2_digit_count = 0;
|
|
11560
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11562
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11561
11563
|
{
|
|
11562
11564
|
unsigned long t = operand2_abs_ival;
|
|
11563
11565
|
|
|
@@ -11570,19 +11572,20 @@ static PyObject *COMPARE_GT_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11570
11572
|
}
|
|
11571
11573
|
}
|
|
11572
11574
|
|
|
11573
|
-
Py_ssize_t operand2_size =
|
|
11575
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11576
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11574
11577
|
|
|
11575
11578
|
bool r;
|
|
11576
11579
|
|
|
11577
|
-
if (
|
|
11578
|
-
r =
|
|
11580
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11581
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - operand2_size > 0;
|
|
11579
11582
|
} else {
|
|
11580
|
-
Py_ssize_t i =
|
|
11583
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11581
11584
|
r = false;
|
|
11582
11585
|
while (--i >= 0) {
|
|
11583
|
-
if (operand1_long_object
|
|
11584
|
-
r = operand1_long_object
|
|
11585
|
-
if (
|
|
11586
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11587
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > operand2_digits[i];
|
|
11588
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11586
11589
|
r = !r;
|
|
11587
11590
|
}
|
|
11588
11591
|
break;
|
|
@@ -11592,9 +11595,10 @@ static PyObject *COMPARE_GT_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11592
11595
|
|
|
11593
11596
|
// Convert to target type.
|
|
11594
11597
|
PyObject *result = BOOL_FROM(r);
|
|
11595
|
-
|
|
11598
|
+
Py_INCREF_IMMORTAL(result);
|
|
11596
11599
|
return result;
|
|
11597
11600
|
}
|
|
11601
|
+
#if PYTHON_VERSION < 0x300
|
|
11598
11602
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11599
11603
|
PyObject *RICH_COMPARE_GT_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11600
11604
|
|
|
@@ -11602,7 +11606,6 @@ PyObject *RICH_COMPARE_GT_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2
|
|
|
11602
11606
|
}
|
|
11603
11607
|
#endif
|
|
11604
11608
|
|
|
11605
|
-
#if PYTHON_VERSION < 0x300
|
|
11606
11609
|
static bool COMPARE_GT_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11607
11610
|
CHECK_OBJECT(operand1);
|
|
11608
11611
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11621,7 +11624,7 @@ static bool COMPARE_GT_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11621
11624
|
}
|
|
11622
11625
|
|
|
11623
11626
|
Py_ssize_t operand2_digit_count = 0;
|
|
11624
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11627
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11625
11628
|
{
|
|
11626
11629
|
unsigned long t = operand2_abs_ival;
|
|
11627
11630
|
|
|
@@ -11634,19 +11637,20 @@ static bool COMPARE_GT_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11634
11637
|
}
|
|
11635
11638
|
}
|
|
11636
11639
|
|
|
11637
|
-
Py_ssize_t operand2_size =
|
|
11640
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11641
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11638
11642
|
|
|
11639
11643
|
bool r;
|
|
11640
11644
|
|
|
11641
|
-
if (
|
|
11642
|
-
r =
|
|
11645
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11646
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) - operand2_size > 0;
|
|
11643
11647
|
} else {
|
|
11644
|
-
Py_ssize_t i =
|
|
11648
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11645
11649
|
r = false;
|
|
11646
11650
|
while (--i >= 0) {
|
|
11647
|
-
if (operand1_long_object
|
|
11648
|
-
r = operand1_long_object
|
|
11649
|
-
if (
|
|
11651
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11652
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > operand2_digits[i];
|
|
11653
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11650
11654
|
r = !r;
|
|
11651
11655
|
}
|
|
11652
11656
|
break;
|
|
@@ -11659,6 +11663,7 @@ static bool COMPARE_GT_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11659
11663
|
|
|
11660
11664
|
return result;
|
|
11661
11665
|
}
|
|
11666
|
+
#if PYTHON_VERSION < 0x300
|
|
11662
11667
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11663
11668
|
bool RICH_COMPARE_GT_CBOOL_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11664
11669
|
|
|
@@ -11678,9 +11683,11 @@ static PyObject *COMPARE_GT_OBJECT_INT_CLONG(PyObject *operand1, long operand2)
|
|
|
11678
11683
|
|
|
11679
11684
|
// Convert to target type.
|
|
11680
11685
|
PyObject *result = BOOL_FROM(r);
|
|
11681
|
-
|
|
11686
|
+
Py_INCREF_IMMORTAL(result);
|
|
11682
11687
|
return result;
|
|
11683
11688
|
}
|
|
11689
|
+
#endif
|
|
11690
|
+
#if PYTHON_VERSION < 0x300
|
|
11684
11691
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11685
11692
|
PyObject *RICH_COMPARE_GT_OBJECT_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11686
11693
|
|
|
@@ -11703,6 +11710,8 @@ static bool COMPARE_GT_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
|
11703
11710
|
|
|
11704
11711
|
return result;
|
|
11705
11712
|
}
|
|
11713
|
+
#endif
|
|
11714
|
+
#if PYTHON_VERSION < 0x300
|
|
11706
11715
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11707
11716
|
bool RICH_COMPARE_GT_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11708
11717
|
|
|
@@ -11719,15 +11728,18 @@ static PyObject *COMPARE_GT_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11719
11728
|
|
|
11720
11729
|
bool r;
|
|
11721
11730
|
|
|
11722
|
-
if (
|
|
11723
|
-
|
|
11731
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11732
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11733
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) -
|
|
11734
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1)) >
|
|
11735
|
+
0;
|
|
11724
11736
|
} else {
|
|
11725
|
-
Py_ssize_t i =
|
|
11737
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11726
11738
|
r = false;
|
|
11727
11739
|
while (--i >= 0) {
|
|
11728
|
-
if (operand1_long_object
|
|
11729
|
-
r = operand1_long_object
|
|
11730
|
-
if (
|
|
11740
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11741
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > (digit)Py_ABS(operand2);
|
|
11742
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11731
11743
|
r = !r;
|
|
11732
11744
|
}
|
|
11733
11745
|
break;
|
|
@@ -11737,7 +11749,7 @@ static PyObject *COMPARE_GT_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11737
11749
|
|
|
11738
11750
|
// Convert to target type.
|
|
11739
11751
|
PyObject *result = BOOL_FROM(r);
|
|
11740
|
-
|
|
11752
|
+
Py_INCREF_IMMORTAL(result);
|
|
11741
11753
|
return result;
|
|
11742
11754
|
}
|
|
11743
11755
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "DIGIT" to C platform digit value for long
|
|
@@ -11756,15 +11768,18 @@ static bool COMPARE_GT_CBOOL_LONG_DIGIT(PyObject *operand1, long operand2) {
|
|
|
11756
11768
|
|
|
11757
11769
|
bool r;
|
|
11758
11770
|
|
|
11759
|
-
if (
|
|
11760
|
-
|
|
11771
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11772
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11773
|
+
r = Nuitka_LongGetSignedDigitSize(operand1_long_object) -
|
|
11774
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1)) >
|
|
11775
|
+
0;
|
|
11761
11776
|
} else {
|
|
11762
|
-
Py_ssize_t i =
|
|
11777
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11763
11778
|
r = false;
|
|
11764
11779
|
while (--i >= 0) {
|
|
11765
|
-
if (operand1_long_object
|
|
11766
|
-
r = operand1_long_object
|
|
11767
|
-
if (
|
|
11780
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11781
|
+
r = Nuitka_LongGetDigitPointer(operand1_long_object)[i] > (digit)Py_ABS(operand2);
|
|
11782
|
+
if (Nuitka_LongIsNegative(operand1_long_object)) {
|
|
11768
11783
|
r = !r;
|
|
11769
11784
|
}
|
|
11770
11785
|
break;
|
|
@@ -11795,7 +11810,7 @@ static PyObject *COMPARE_GT_OBJECT_FLOAT_CFLOAT(PyObject *operand1, double opera
|
|
|
11795
11810
|
|
|
11796
11811
|
// Convert to target type.
|
|
11797
11812
|
PyObject *result = BOOL_FROM(r);
|
|
11798
|
-
|
|
11813
|
+
Py_INCREF_IMMORTAL(result);
|
|
11799
11814
|
return result;
|
|
11800
11815
|
}
|
|
11801
11816
|
/* Code referring to "FLOAT" corresponds to Python 'float' and "CFLOAT" to C platform float value. */
|
|
@@ -11823,3 +11838,18 @@ bool RICH_COMPARE_GT_CBOOL_FLOAT_CFLOAT(PyObject *operand1, double operand2) {
|
|
|
11823
11838
|
|
|
11824
11839
|
return COMPARE_GT_CBOOL_FLOAT_CFLOAT(operand1, operand2);
|
|
11825
11840
|
}
|
|
11841
|
+
|
|
11842
|
+
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
11843
|
+
// integrates with CPython, but also works on its own.
|
|
11844
|
+
//
|
|
11845
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
11846
|
+
// you may not use this file except in compliance with the License.
|
|
11847
|
+
// You may obtain a copy of the License at
|
|
11848
|
+
//
|
|
11849
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
11850
|
+
//
|
|
11851
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11852
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11853
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11854
|
+
// See the License for the specific language governing permissions and
|
|
11855
|
+
// limitations under the License.
|