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_NE_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
|
|
@@ -73,7 +58,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
73
58
|
if (operand1 == operand2 && IS_SANE_TYPE(Py_TYPE(operand1))) {
|
|
74
59
|
bool r = false;
|
|
75
60
|
PyObject *result = BOOL_FROM(r);
|
|
76
|
-
|
|
61
|
+
Py_INCREF_IMMORTAL(result);
|
|
77
62
|
return result;
|
|
78
63
|
}
|
|
79
64
|
|
|
@@ -94,7 +79,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
94
79
|
// If the types are equal, we may get away immediately except for instances.
|
|
95
80
|
if (type1 == type2 && !PyInstance_Check(operand1)) {
|
|
96
81
|
|
|
97
|
-
richcmpfunc frich =
|
|
82
|
+
richcmpfunc frich = TP_RICHCOMPARE(type1);
|
|
98
83
|
|
|
99
84
|
if (frich != NULL) {
|
|
100
85
|
PyObject *result = (*frich)(operand1, operand2, Py_NE);
|
|
@@ -105,7 +90,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
105
90
|
return result;
|
|
106
91
|
}
|
|
107
92
|
|
|
108
|
-
|
|
93
|
+
Py_DECREF_IMMORTAL(result);
|
|
109
94
|
}
|
|
110
95
|
|
|
111
96
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -146,7 +131,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
146
131
|
|
|
147
132
|
bool r = c != 0;
|
|
148
133
|
PyObject *result = BOOL_FROM(r);
|
|
149
|
-
|
|
134
|
+
Py_INCREF_IMMORTAL(result);
|
|
150
135
|
return result;
|
|
151
136
|
}
|
|
152
137
|
}
|
|
@@ -155,7 +140,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
155
140
|
richcmpfunc f;
|
|
156
141
|
|
|
157
142
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
158
|
-
f =
|
|
143
|
+
f = TP_RICHCOMPARE(type2);
|
|
159
144
|
|
|
160
145
|
if (f != NULL) {
|
|
161
146
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -166,11 +151,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
166
151
|
return result;
|
|
167
152
|
}
|
|
168
153
|
|
|
169
|
-
|
|
154
|
+
Py_DECREF_IMMORTAL(result);
|
|
170
155
|
}
|
|
171
156
|
}
|
|
172
157
|
|
|
173
|
-
f =
|
|
158
|
+
f = TP_RICHCOMPARE(type1);
|
|
174
159
|
if (f != NULL) {
|
|
175
160
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
176
161
|
|
|
@@ -180,10 +165,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
180
165
|
return result;
|
|
181
166
|
}
|
|
182
167
|
|
|
183
|
-
|
|
168
|
+
Py_DECREF_IMMORTAL(result);
|
|
184
169
|
}
|
|
185
170
|
|
|
186
|
-
f =
|
|
171
|
+
f = TP_RICHCOMPARE(type2);
|
|
187
172
|
if (f != NULL) {
|
|
188
173
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
189
174
|
|
|
@@ -193,7 +178,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
193
178
|
return result;
|
|
194
179
|
}
|
|
195
180
|
|
|
196
|
-
|
|
181
|
+
Py_DECREF_IMMORTAL(result);
|
|
197
182
|
}
|
|
198
183
|
|
|
199
184
|
int c;
|
|
@@ -281,14 +266,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
281
266
|
|
|
282
267
|
bool r = c != 0;
|
|
283
268
|
PyObject *result = BOOL_FROM(r);
|
|
284
|
-
|
|
269
|
+
Py_INCREF_IMMORTAL(result);
|
|
285
270
|
return result;
|
|
286
271
|
#else
|
|
287
272
|
bool checked_reverse_op = false;
|
|
288
273
|
richcmpfunc f;
|
|
289
274
|
|
|
290
275
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
291
|
-
f =
|
|
276
|
+
f = TP_RICHCOMPARE(type2);
|
|
292
277
|
|
|
293
278
|
if (f != NULL) {
|
|
294
279
|
checked_reverse_op = true;
|
|
@@ -301,11 +286,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
301
286
|
return result;
|
|
302
287
|
}
|
|
303
288
|
|
|
304
|
-
|
|
289
|
+
Py_DECREF_IMMORTAL(result);
|
|
305
290
|
}
|
|
306
291
|
}
|
|
307
292
|
|
|
308
|
-
f =
|
|
293
|
+
f = TP_RICHCOMPARE(type1);
|
|
309
294
|
|
|
310
295
|
if (f != NULL) {
|
|
311
296
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -316,11 +301,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
316
301
|
return result;
|
|
317
302
|
}
|
|
318
303
|
|
|
319
|
-
|
|
304
|
+
Py_DECREF_IMMORTAL(result);
|
|
320
305
|
}
|
|
321
306
|
|
|
322
307
|
if (checked_reverse_op == false) {
|
|
323
|
-
f =
|
|
308
|
+
f = TP_RICHCOMPARE(type2);
|
|
324
309
|
|
|
325
310
|
if (f != NULL) {
|
|
326
311
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -331,7 +316,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
331
316
|
return result;
|
|
332
317
|
}
|
|
333
318
|
|
|
334
|
-
|
|
319
|
+
Py_DECREF_IMMORTAL(result);
|
|
335
320
|
}
|
|
336
321
|
}
|
|
337
322
|
|
|
@@ -343,13 +328,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
343
328
|
case Py_EQ: {
|
|
344
329
|
bool r = operand1 == operand2;
|
|
345
330
|
PyObject *result = BOOL_FROM(r);
|
|
346
|
-
|
|
331
|
+
Py_INCREF_IMMORTAL(result);
|
|
347
332
|
return result;
|
|
348
333
|
}
|
|
349
334
|
case Py_NE: {
|
|
350
335
|
bool r = operand1 != operand2;
|
|
351
336
|
PyObject *result = BOOL_FROM(r);
|
|
352
|
-
|
|
337
|
+
Py_INCREF_IMMORTAL(result);
|
|
353
338
|
return result;
|
|
354
339
|
}
|
|
355
340
|
default:
|
|
@@ -398,7 +383,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
398
383
|
// If the types are equal, we may get away immediately except for instances.
|
|
399
384
|
if (type1 == type2 && !PyInstance_Check(operand1)) {
|
|
400
385
|
|
|
401
|
-
richcmpfunc frich =
|
|
386
|
+
richcmpfunc frich = TP_RICHCOMPARE(type1);
|
|
402
387
|
|
|
403
388
|
if (frich != NULL) {
|
|
404
389
|
PyObject *result = (*frich)(operand1, operand2, Py_NE);
|
|
@@ -417,7 +402,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
417
402
|
}
|
|
418
403
|
}
|
|
419
404
|
|
|
420
|
-
|
|
405
|
+
Py_DECREF_IMMORTAL(result);
|
|
421
406
|
}
|
|
422
407
|
|
|
423
408
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -467,7 +452,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
467
452
|
richcmpfunc f;
|
|
468
453
|
|
|
469
454
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
470
|
-
f =
|
|
455
|
+
f = TP_RICHCOMPARE(type2);
|
|
471
456
|
|
|
472
457
|
if (f != NULL) {
|
|
473
458
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -486,11 +471,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
486
471
|
}
|
|
487
472
|
}
|
|
488
473
|
|
|
489
|
-
|
|
474
|
+
Py_DECREF_IMMORTAL(result);
|
|
490
475
|
}
|
|
491
476
|
}
|
|
492
477
|
|
|
493
|
-
f =
|
|
478
|
+
f = TP_RICHCOMPARE(type1);
|
|
494
479
|
if (f != NULL) {
|
|
495
480
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
496
481
|
|
|
@@ -508,10 +493,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
508
493
|
}
|
|
509
494
|
}
|
|
510
495
|
|
|
511
|
-
|
|
496
|
+
Py_DECREF_IMMORTAL(result);
|
|
512
497
|
}
|
|
513
498
|
|
|
514
|
-
f =
|
|
499
|
+
f = TP_RICHCOMPARE(type2);
|
|
515
500
|
if (f != NULL) {
|
|
516
501
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
517
502
|
|
|
@@ -529,7 +514,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
529
514
|
}
|
|
530
515
|
}
|
|
531
516
|
|
|
532
|
-
|
|
517
|
+
Py_DECREF_IMMORTAL(result);
|
|
533
518
|
}
|
|
534
519
|
|
|
535
520
|
int c;
|
|
@@ -624,7 +609,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
624
609
|
richcmpfunc f;
|
|
625
610
|
|
|
626
611
|
if (type1 != type2 && Nuitka_Type_IsSubtype(type2, type1)) {
|
|
627
|
-
f =
|
|
612
|
+
f = TP_RICHCOMPARE(type2);
|
|
628
613
|
|
|
629
614
|
if (f != NULL) {
|
|
630
615
|
checked_reverse_op = true;
|
|
@@ -645,11 +630,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
645
630
|
}
|
|
646
631
|
}
|
|
647
632
|
|
|
648
|
-
|
|
633
|
+
Py_DECREF_IMMORTAL(result);
|
|
649
634
|
}
|
|
650
635
|
}
|
|
651
636
|
|
|
652
|
-
f =
|
|
637
|
+
f = TP_RICHCOMPARE(type1);
|
|
653
638
|
|
|
654
639
|
if (f != NULL) {
|
|
655
640
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -668,11 +653,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
668
653
|
}
|
|
669
654
|
}
|
|
670
655
|
|
|
671
|
-
|
|
656
|
+
Py_DECREF_IMMORTAL(result);
|
|
672
657
|
}
|
|
673
658
|
|
|
674
659
|
if (checked_reverse_op == false) {
|
|
675
|
-
f =
|
|
660
|
+
f = TP_RICHCOMPARE(type2);
|
|
676
661
|
|
|
677
662
|
if (f != NULL) {
|
|
678
663
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -691,7 +676,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_OBJECT(PyObject *operand1, PyObject *op
|
|
|
691
676
|
}
|
|
692
677
|
}
|
|
693
678
|
|
|
694
|
-
|
|
679
|
+
Py_DECREF_IMMORTAL(result);
|
|
695
680
|
}
|
|
696
681
|
}
|
|
697
682
|
|
|
@@ -740,7 +725,7 @@ static PyObject *COMPARE_NE_OBJECT_STR_STR(PyObject *operand1, PyObject *operand
|
|
|
740
725
|
|
|
741
726
|
// Convert to target type.
|
|
742
727
|
PyObject *result = BOOL_FROM(r);
|
|
743
|
-
|
|
728
|
+
Py_INCREF_IMMORTAL(result);
|
|
744
729
|
return result;
|
|
745
730
|
}
|
|
746
731
|
|
|
@@ -752,7 +737,7 @@ static PyObject *COMPARE_NE_OBJECT_STR_STR(PyObject *operand1, PyObject *operand
|
|
|
752
737
|
|
|
753
738
|
// Convert to target type.
|
|
754
739
|
PyObject *result = BOOL_FROM(r);
|
|
755
|
-
|
|
740
|
+
Py_INCREF_IMMORTAL(result);
|
|
756
741
|
return result;
|
|
757
742
|
} else {
|
|
758
743
|
if ((a->ob_sval[0] == b->ob_sval[0]) && (memcmp(a->ob_sval, b->ob_sval, len_a) == 0)) {
|
|
@@ -760,18 +745,20 @@ static PyObject *COMPARE_NE_OBJECT_STR_STR(PyObject *operand1, PyObject *operand
|
|
|
760
745
|
|
|
761
746
|
// Convert to target type.
|
|
762
747
|
PyObject *result = BOOL_FROM(r);
|
|
763
|
-
|
|
748
|
+
Py_INCREF_IMMORTAL(result);
|
|
764
749
|
return result;
|
|
765
750
|
} else {
|
|
766
751
|
bool r = true;
|
|
767
752
|
|
|
768
753
|
// Convert to target type.
|
|
769
754
|
PyObject *result = BOOL_FROM(r);
|
|
770
|
-
|
|
755
|
+
Py_INCREF_IMMORTAL(result);
|
|
771
756
|
return result;
|
|
772
757
|
}
|
|
773
758
|
}
|
|
774
759
|
}
|
|
760
|
+
#endif
|
|
761
|
+
#if PYTHON_VERSION < 0x300
|
|
775
762
|
/* Code referring to "OBJECT" corresponds to any Python object and "STR" to Python2 'str'. */
|
|
776
763
|
PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operand2) {
|
|
777
764
|
|
|
@@ -806,7 +793,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
806
793
|
return result;
|
|
807
794
|
}
|
|
808
795
|
|
|
809
|
-
|
|
796
|
+
Py_DECREF_IMMORTAL(result);
|
|
810
797
|
}
|
|
811
798
|
|
|
812
799
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -847,7 +834,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
847
834
|
|
|
848
835
|
bool r = c != 0;
|
|
849
836
|
PyObject *result = BOOL_FROM(r);
|
|
850
|
-
|
|
837
|
+
Py_INCREF_IMMORTAL(result);
|
|
851
838
|
return result;
|
|
852
839
|
}
|
|
853
840
|
}
|
|
@@ -867,11 +854,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
867
854
|
return result;
|
|
868
855
|
}
|
|
869
856
|
|
|
870
|
-
|
|
857
|
+
Py_DECREF_IMMORTAL(result);
|
|
871
858
|
}
|
|
872
859
|
}
|
|
873
860
|
|
|
874
|
-
f =
|
|
861
|
+
f = TP_RICHCOMPARE(type1);
|
|
875
862
|
if (f != NULL) {
|
|
876
863
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
877
864
|
|
|
@@ -881,7 +868,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
881
868
|
return result;
|
|
882
869
|
}
|
|
883
870
|
|
|
884
|
-
|
|
871
|
+
Py_DECREF_IMMORTAL(result);
|
|
885
872
|
}
|
|
886
873
|
|
|
887
874
|
f = PyString_Type.tp_richcompare;
|
|
@@ -894,7 +881,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
894
881
|
return result;
|
|
895
882
|
}
|
|
896
883
|
|
|
897
|
-
|
|
884
|
+
Py_DECREF_IMMORTAL(result);
|
|
898
885
|
}
|
|
899
886
|
|
|
900
887
|
int c;
|
|
@@ -982,7 +969,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
982
969
|
|
|
983
970
|
bool r = c != 0;
|
|
984
971
|
PyObject *result = BOOL_FROM(r);
|
|
985
|
-
|
|
972
|
+
Py_INCREF_IMMORTAL(result);
|
|
986
973
|
return result;
|
|
987
974
|
#else
|
|
988
975
|
bool checked_reverse_op = false;
|
|
@@ -1002,11 +989,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1002
989
|
return result;
|
|
1003
990
|
}
|
|
1004
991
|
|
|
1005
|
-
|
|
992
|
+
Py_DECREF_IMMORTAL(result);
|
|
1006
993
|
}
|
|
1007
994
|
}
|
|
1008
995
|
|
|
1009
|
-
f =
|
|
996
|
+
f = TP_RICHCOMPARE(type1);
|
|
1010
997
|
|
|
1011
998
|
if (f != NULL) {
|
|
1012
999
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -1017,7 +1004,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1017
1004
|
return result;
|
|
1018
1005
|
}
|
|
1019
1006
|
|
|
1020
|
-
|
|
1007
|
+
Py_DECREF_IMMORTAL(result);
|
|
1021
1008
|
}
|
|
1022
1009
|
|
|
1023
1010
|
if (checked_reverse_op == false) {
|
|
@@ -1032,7 +1019,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1032
1019
|
return result;
|
|
1033
1020
|
}
|
|
1034
1021
|
|
|
1035
|
-
|
|
1022
|
+
Py_DECREF_IMMORTAL(result);
|
|
1036
1023
|
}
|
|
1037
1024
|
}
|
|
1038
1025
|
|
|
@@ -1044,13 +1031,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_STR(PyObject *operand1, PyObject *operan
|
|
|
1044
1031
|
case Py_EQ: {
|
|
1045
1032
|
bool r = operand1 == operand2;
|
|
1046
1033
|
PyObject *result = BOOL_FROM(r);
|
|
1047
|
-
|
|
1034
|
+
Py_INCREF_IMMORTAL(result);
|
|
1048
1035
|
return result;
|
|
1049
1036
|
}
|
|
1050
1037
|
case Py_NE: {
|
|
1051
1038
|
bool r = operand1 != operand2;
|
|
1052
1039
|
PyObject *result = BOOL_FROM(r);
|
|
1053
|
-
|
|
1040
|
+
Py_INCREF_IMMORTAL(result);
|
|
1054
1041
|
return result;
|
|
1055
1042
|
}
|
|
1056
1043
|
default:
|
|
@@ -1100,7 +1087,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1100
1087
|
return result;
|
|
1101
1088
|
}
|
|
1102
1089
|
|
|
1103
|
-
|
|
1090
|
+
Py_DECREF_IMMORTAL(result);
|
|
1104
1091
|
}
|
|
1105
1092
|
|
|
1106
1093
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1141,7 +1128,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1141
1128
|
|
|
1142
1129
|
bool r = c != 0;
|
|
1143
1130
|
PyObject *result = BOOL_FROM(r);
|
|
1144
|
-
|
|
1131
|
+
Py_INCREF_IMMORTAL(result);
|
|
1145
1132
|
return result;
|
|
1146
1133
|
}
|
|
1147
1134
|
}
|
|
@@ -1150,7 +1137,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1150
1137
|
richcmpfunc f;
|
|
1151
1138
|
|
|
1152
1139
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1153
|
-
f =
|
|
1140
|
+
f = TP_RICHCOMPARE(type2);
|
|
1154
1141
|
|
|
1155
1142
|
if (f != NULL) {
|
|
1156
1143
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -1161,7 +1148,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1161
1148
|
return result;
|
|
1162
1149
|
}
|
|
1163
1150
|
|
|
1164
|
-
|
|
1151
|
+
Py_DECREF_IMMORTAL(result);
|
|
1165
1152
|
}
|
|
1166
1153
|
}
|
|
1167
1154
|
|
|
@@ -1175,10 +1162,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1175
1162
|
return result;
|
|
1176
1163
|
}
|
|
1177
1164
|
|
|
1178
|
-
|
|
1165
|
+
Py_DECREF_IMMORTAL(result);
|
|
1179
1166
|
}
|
|
1180
1167
|
|
|
1181
|
-
f =
|
|
1168
|
+
f = TP_RICHCOMPARE(type2);
|
|
1182
1169
|
if (f != NULL) {
|
|
1183
1170
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
1184
1171
|
|
|
@@ -1188,7 +1175,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1188
1175
|
return result;
|
|
1189
1176
|
}
|
|
1190
1177
|
|
|
1191
|
-
|
|
1178
|
+
Py_DECREF_IMMORTAL(result);
|
|
1192
1179
|
}
|
|
1193
1180
|
|
|
1194
1181
|
int c;
|
|
@@ -1276,14 +1263,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1276
1263
|
|
|
1277
1264
|
bool r = c != 0;
|
|
1278
1265
|
PyObject *result = BOOL_FROM(r);
|
|
1279
|
-
|
|
1266
|
+
Py_INCREF_IMMORTAL(result);
|
|
1280
1267
|
return result;
|
|
1281
1268
|
#else
|
|
1282
1269
|
bool checked_reverse_op = false;
|
|
1283
1270
|
richcmpfunc f;
|
|
1284
1271
|
|
|
1285
1272
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1286
|
-
f =
|
|
1273
|
+
f = TP_RICHCOMPARE(type2);
|
|
1287
1274
|
|
|
1288
1275
|
if (f != NULL) {
|
|
1289
1276
|
checked_reverse_op = true;
|
|
@@ -1296,7 +1283,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1296
1283
|
return result;
|
|
1297
1284
|
}
|
|
1298
1285
|
|
|
1299
|
-
|
|
1286
|
+
Py_DECREF_IMMORTAL(result);
|
|
1300
1287
|
}
|
|
1301
1288
|
}
|
|
1302
1289
|
|
|
@@ -1311,11 +1298,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1311
1298
|
return result;
|
|
1312
1299
|
}
|
|
1313
1300
|
|
|
1314
|
-
|
|
1301
|
+
Py_DECREF_IMMORTAL(result);
|
|
1315
1302
|
}
|
|
1316
1303
|
|
|
1317
1304
|
if (checked_reverse_op == false) {
|
|
1318
|
-
f =
|
|
1305
|
+
f = TP_RICHCOMPARE(type2);
|
|
1319
1306
|
|
|
1320
1307
|
if (f != NULL) {
|
|
1321
1308
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -1326,7 +1313,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1326
1313
|
return result;
|
|
1327
1314
|
}
|
|
1328
1315
|
|
|
1329
|
-
|
|
1316
|
+
Py_DECREF_IMMORTAL(result);
|
|
1330
1317
|
}
|
|
1331
1318
|
}
|
|
1332
1319
|
|
|
@@ -1338,13 +1325,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_STR_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
1338
1325
|
case Py_EQ: {
|
|
1339
1326
|
bool r = operand1 == operand2;
|
|
1340
1327
|
PyObject *result = BOOL_FROM(r);
|
|
1341
|
-
|
|
1328
|
+
Py_INCREF_IMMORTAL(result);
|
|
1342
1329
|
return result;
|
|
1343
1330
|
}
|
|
1344
1331
|
case Py_NE: {
|
|
1345
1332
|
bool r = operand1 != operand2;
|
|
1346
1333
|
PyObject *result = BOOL_FROM(r);
|
|
1347
|
-
|
|
1334
|
+
Py_INCREF_IMMORTAL(result);
|
|
1348
1335
|
return result;
|
|
1349
1336
|
}
|
|
1350
1337
|
default:
|
|
@@ -1407,6 +1394,8 @@ static bool COMPARE_NE_CBOOL_STR_STR(PyObject *operand1, PyObject *operand2) {
|
|
|
1407
1394
|
}
|
|
1408
1395
|
}
|
|
1409
1396
|
}
|
|
1397
|
+
#endif
|
|
1398
|
+
#if PYTHON_VERSION < 0x300
|
|
1410
1399
|
/* Code referring to "OBJECT" corresponds to any Python object and "STR" to Python2 'str'. */
|
|
1411
1400
|
nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *operand2) {
|
|
1412
1401
|
|
|
@@ -1449,7 +1438,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1449
1438
|
}
|
|
1450
1439
|
}
|
|
1451
1440
|
|
|
1452
|
-
|
|
1441
|
+
Py_DECREF_IMMORTAL(result);
|
|
1453
1442
|
}
|
|
1454
1443
|
|
|
1455
1444
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1518,11 +1507,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1518
1507
|
}
|
|
1519
1508
|
}
|
|
1520
1509
|
|
|
1521
|
-
|
|
1510
|
+
Py_DECREF_IMMORTAL(result);
|
|
1522
1511
|
}
|
|
1523
1512
|
}
|
|
1524
1513
|
|
|
1525
|
-
f =
|
|
1514
|
+
f = TP_RICHCOMPARE(type1);
|
|
1526
1515
|
if (f != NULL) {
|
|
1527
1516
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
1528
1517
|
|
|
@@ -1540,7 +1529,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1540
1529
|
}
|
|
1541
1530
|
}
|
|
1542
1531
|
|
|
1543
|
-
|
|
1532
|
+
Py_DECREF_IMMORTAL(result);
|
|
1544
1533
|
}
|
|
1545
1534
|
|
|
1546
1535
|
f = PyString_Type.tp_richcompare;
|
|
@@ -1561,7 +1550,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1561
1550
|
}
|
|
1562
1551
|
}
|
|
1563
1552
|
|
|
1564
|
-
|
|
1553
|
+
Py_DECREF_IMMORTAL(result);
|
|
1565
1554
|
}
|
|
1566
1555
|
|
|
1567
1556
|
int c;
|
|
@@ -1677,11 +1666,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1677
1666
|
}
|
|
1678
1667
|
}
|
|
1679
1668
|
|
|
1680
|
-
|
|
1669
|
+
Py_DECREF_IMMORTAL(result);
|
|
1681
1670
|
}
|
|
1682
1671
|
}
|
|
1683
1672
|
|
|
1684
|
-
f =
|
|
1673
|
+
f = TP_RICHCOMPARE(type1);
|
|
1685
1674
|
|
|
1686
1675
|
if (f != NULL) {
|
|
1687
1676
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -1700,7 +1689,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1700
1689
|
}
|
|
1701
1690
|
}
|
|
1702
1691
|
|
|
1703
|
-
|
|
1692
|
+
Py_DECREF_IMMORTAL(result);
|
|
1704
1693
|
}
|
|
1705
1694
|
|
|
1706
1695
|
if (checked_reverse_op == false) {
|
|
@@ -1723,7 +1712,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_STR(PyObject *operand1, PyObject *opera
|
|
|
1723
1712
|
}
|
|
1724
1713
|
}
|
|
1725
1714
|
|
|
1726
|
-
|
|
1715
|
+
Py_DECREF_IMMORTAL(result);
|
|
1727
1716
|
}
|
|
1728
1717
|
}
|
|
1729
1718
|
|
|
@@ -1799,7 +1788,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1799
1788
|
}
|
|
1800
1789
|
}
|
|
1801
1790
|
|
|
1802
|
-
|
|
1791
|
+
Py_DECREF_IMMORTAL(result);
|
|
1803
1792
|
}
|
|
1804
1793
|
|
|
1805
1794
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -1849,7 +1838,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1849
1838
|
richcmpfunc f;
|
|
1850
1839
|
|
|
1851
1840
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
1852
|
-
f =
|
|
1841
|
+
f = TP_RICHCOMPARE(type2);
|
|
1853
1842
|
|
|
1854
1843
|
if (f != NULL) {
|
|
1855
1844
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -1868,7 +1857,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1868
1857
|
}
|
|
1869
1858
|
}
|
|
1870
1859
|
|
|
1871
|
-
|
|
1860
|
+
Py_DECREF_IMMORTAL(result);
|
|
1872
1861
|
}
|
|
1873
1862
|
}
|
|
1874
1863
|
|
|
@@ -1890,10 +1879,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1890
1879
|
}
|
|
1891
1880
|
}
|
|
1892
1881
|
|
|
1893
|
-
|
|
1882
|
+
Py_DECREF_IMMORTAL(result);
|
|
1894
1883
|
}
|
|
1895
1884
|
|
|
1896
|
-
f =
|
|
1885
|
+
f = TP_RICHCOMPARE(type2);
|
|
1897
1886
|
if (f != NULL) {
|
|
1898
1887
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
1899
1888
|
|
|
@@ -1911,7 +1900,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
1911
1900
|
}
|
|
1912
1901
|
}
|
|
1913
1902
|
|
|
1914
|
-
|
|
1903
|
+
Py_DECREF_IMMORTAL(result);
|
|
1915
1904
|
}
|
|
1916
1905
|
|
|
1917
1906
|
int c;
|
|
@@ -2006,7 +1995,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2006
1995
|
richcmpfunc f;
|
|
2007
1996
|
|
|
2008
1997
|
if (&PyString_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyString_Type)) {
|
|
2009
|
-
f =
|
|
1998
|
+
f = TP_RICHCOMPARE(type2);
|
|
2010
1999
|
|
|
2011
2000
|
if (f != NULL) {
|
|
2012
2001
|
checked_reverse_op = true;
|
|
@@ -2027,7 +2016,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2027
2016
|
}
|
|
2028
2017
|
}
|
|
2029
2018
|
|
|
2030
|
-
|
|
2019
|
+
Py_DECREF_IMMORTAL(result);
|
|
2031
2020
|
}
|
|
2032
2021
|
}
|
|
2033
2022
|
|
|
@@ -2050,11 +2039,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2050
2039
|
}
|
|
2051
2040
|
}
|
|
2052
2041
|
|
|
2053
|
-
|
|
2042
|
+
Py_DECREF_IMMORTAL(result);
|
|
2054
2043
|
}
|
|
2055
2044
|
|
|
2056
2045
|
if (checked_reverse_op == false) {
|
|
2057
|
-
f =
|
|
2046
|
+
f = TP_RICHCOMPARE(type2);
|
|
2058
2047
|
|
|
2059
2048
|
if (f != NULL) {
|
|
2060
2049
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -2073,7 +2062,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_STR_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
2073
2062
|
}
|
|
2074
2063
|
}
|
|
2075
2064
|
|
|
2076
|
-
|
|
2065
|
+
Py_DECREF_IMMORTAL(result);
|
|
2077
2066
|
}
|
|
2078
2067
|
}
|
|
2079
2068
|
|
|
@@ -2121,7 +2110,7 @@ static PyObject *COMPARE_NE_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
|
|
|
2121
2110
|
|
|
2122
2111
|
// Convert to target type.
|
|
2123
2112
|
PyObject *result = BOOL_FROM(r);
|
|
2124
|
-
|
|
2113
|
+
Py_INCREF_IMMORTAL(result);
|
|
2125
2114
|
return result;
|
|
2126
2115
|
}
|
|
2127
2116
|
|
|
@@ -2133,20 +2122,24 @@ static PyObject *COMPARE_NE_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
|
|
|
2133
2122
|
r = false;
|
|
2134
2123
|
} else {
|
|
2135
2124
|
int kind1 = PyUnicode_KIND(a);
|
|
2125
|
+
#if PYTHON_VERSION < 0x3c0
|
|
2136
2126
|
if (unlikely(kind1 == 0)) {
|
|
2137
|
-
int res = _PyUnicode_Ready((PyObject *)a);
|
|
2127
|
+
NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)a);
|
|
2138
2128
|
assert(res != -1);
|
|
2139
2129
|
kind1 = PyUnicode_KIND(a);
|
|
2140
2130
|
assert(kind1 != 0);
|
|
2141
2131
|
}
|
|
2132
|
+
#endif
|
|
2142
2133
|
|
|
2143
2134
|
int kind2 = PyUnicode_KIND(b);
|
|
2135
|
+
#if PYTHON_VERSION < 0x3c0
|
|
2144
2136
|
if (unlikely(kind2 == 0)) {
|
|
2145
|
-
int res = _PyUnicode_Ready((PyObject *)b);
|
|
2137
|
+
NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)b);
|
|
2146
2138
|
assert(res != -1);
|
|
2147
2139
|
kind2 = PyUnicode_KIND(b);
|
|
2148
2140
|
assert(kind2 != 0);
|
|
2149
2141
|
}
|
|
2142
|
+
#endif
|
|
2150
2143
|
|
|
2151
2144
|
if (kind1 != kind2) {
|
|
2152
2145
|
r = false;
|
|
@@ -2160,7 +2153,7 @@ static PyObject *COMPARE_NE_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
|
|
|
2160
2153
|
}
|
|
2161
2154
|
|
|
2162
2155
|
PyObject *result = BOOL_FROM(r == false);
|
|
2163
|
-
|
|
2156
|
+
Py_INCREF_IMMORTAL(result);
|
|
2164
2157
|
return result;
|
|
2165
2158
|
#else
|
|
2166
2159
|
bool r;
|
|
@@ -2177,7 +2170,7 @@ static PyObject *COMPARE_NE_OBJECT_UNICODE_UNICODE(PyObject *operand1, PyObject
|
|
|
2177
2170
|
}
|
|
2178
2171
|
|
|
2179
2172
|
PyObject *result = BOOL_FROM(r == false);
|
|
2180
|
-
|
|
2173
|
+
Py_INCREF_IMMORTAL(result);
|
|
2181
2174
|
return result;
|
|
2182
2175
|
#endif
|
|
2183
2176
|
}
|
|
@@ -2215,7 +2208,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2215
2208
|
return result;
|
|
2216
2209
|
}
|
|
2217
2210
|
|
|
2218
|
-
|
|
2211
|
+
Py_DECREF_IMMORTAL(result);
|
|
2219
2212
|
}
|
|
2220
2213
|
|
|
2221
2214
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2256,7 +2249,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2256
2249
|
|
|
2257
2250
|
bool r = c != 0;
|
|
2258
2251
|
PyObject *result = BOOL_FROM(r);
|
|
2259
|
-
|
|
2252
|
+
Py_INCREF_IMMORTAL(result);
|
|
2260
2253
|
return result;
|
|
2261
2254
|
}
|
|
2262
2255
|
}
|
|
@@ -2276,11 +2269,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2276
2269
|
return result;
|
|
2277
2270
|
}
|
|
2278
2271
|
|
|
2279
|
-
|
|
2272
|
+
Py_DECREF_IMMORTAL(result);
|
|
2280
2273
|
}
|
|
2281
2274
|
}
|
|
2282
2275
|
|
|
2283
|
-
f =
|
|
2276
|
+
f = TP_RICHCOMPARE(type1);
|
|
2284
2277
|
if (f != NULL) {
|
|
2285
2278
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
2286
2279
|
|
|
@@ -2290,7 +2283,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2290
2283
|
return result;
|
|
2291
2284
|
}
|
|
2292
2285
|
|
|
2293
|
-
|
|
2286
|
+
Py_DECREF_IMMORTAL(result);
|
|
2294
2287
|
}
|
|
2295
2288
|
|
|
2296
2289
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2303,7 +2296,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2303
2296
|
return result;
|
|
2304
2297
|
}
|
|
2305
2298
|
|
|
2306
|
-
|
|
2299
|
+
Py_DECREF_IMMORTAL(result);
|
|
2307
2300
|
}
|
|
2308
2301
|
|
|
2309
2302
|
int c;
|
|
@@ -2391,7 +2384,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2391
2384
|
|
|
2392
2385
|
bool r = c != 0;
|
|
2393
2386
|
PyObject *result = BOOL_FROM(r);
|
|
2394
|
-
|
|
2387
|
+
Py_INCREF_IMMORTAL(result);
|
|
2395
2388
|
return result;
|
|
2396
2389
|
#else
|
|
2397
2390
|
bool checked_reverse_op = false;
|
|
@@ -2411,11 +2404,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2411
2404
|
return result;
|
|
2412
2405
|
}
|
|
2413
2406
|
|
|
2414
|
-
|
|
2407
|
+
Py_DECREF_IMMORTAL(result);
|
|
2415
2408
|
}
|
|
2416
2409
|
}
|
|
2417
2410
|
|
|
2418
|
-
f =
|
|
2411
|
+
f = TP_RICHCOMPARE(type1);
|
|
2419
2412
|
|
|
2420
2413
|
if (f != NULL) {
|
|
2421
2414
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -2426,7 +2419,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2426
2419
|
return result;
|
|
2427
2420
|
}
|
|
2428
2421
|
|
|
2429
|
-
|
|
2422
|
+
Py_DECREF_IMMORTAL(result);
|
|
2430
2423
|
}
|
|
2431
2424
|
|
|
2432
2425
|
if (checked_reverse_op == false) {
|
|
@@ -2441,7 +2434,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2441
2434
|
return result;
|
|
2442
2435
|
}
|
|
2443
2436
|
|
|
2444
|
-
|
|
2437
|
+
Py_DECREF_IMMORTAL(result);
|
|
2445
2438
|
}
|
|
2446
2439
|
}
|
|
2447
2440
|
|
|
@@ -2453,13 +2446,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_UNICODE(PyObject *operand1, PyObject *op
|
|
|
2453
2446
|
case Py_EQ: {
|
|
2454
2447
|
bool r = operand1 == operand2;
|
|
2455
2448
|
PyObject *result = BOOL_FROM(r);
|
|
2456
|
-
|
|
2449
|
+
Py_INCREF_IMMORTAL(result);
|
|
2457
2450
|
return result;
|
|
2458
2451
|
}
|
|
2459
2452
|
case Py_NE: {
|
|
2460
2453
|
bool r = operand1 != operand2;
|
|
2461
2454
|
PyObject *result = BOOL_FROM(r);
|
|
2462
|
-
|
|
2455
|
+
Py_INCREF_IMMORTAL(result);
|
|
2463
2456
|
return result;
|
|
2464
2457
|
}
|
|
2465
2458
|
default:
|
|
@@ -2509,7 +2502,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2509
2502
|
return result;
|
|
2510
2503
|
}
|
|
2511
2504
|
|
|
2512
|
-
|
|
2505
|
+
Py_DECREF_IMMORTAL(result);
|
|
2513
2506
|
}
|
|
2514
2507
|
|
|
2515
2508
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2550,7 +2543,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2550
2543
|
|
|
2551
2544
|
bool r = c != 0;
|
|
2552
2545
|
PyObject *result = BOOL_FROM(r);
|
|
2553
|
-
|
|
2546
|
+
Py_INCREF_IMMORTAL(result);
|
|
2554
2547
|
return result;
|
|
2555
2548
|
}
|
|
2556
2549
|
}
|
|
@@ -2559,7 +2552,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2559
2552
|
richcmpfunc f;
|
|
2560
2553
|
|
|
2561
2554
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2562
|
-
f =
|
|
2555
|
+
f = TP_RICHCOMPARE(type2);
|
|
2563
2556
|
|
|
2564
2557
|
if (f != NULL) {
|
|
2565
2558
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -2570,7 +2563,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2570
2563
|
return result;
|
|
2571
2564
|
}
|
|
2572
2565
|
|
|
2573
|
-
|
|
2566
|
+
Py_DECREF_IMMORTAL(result);
|
|
2574
2567
|
}
|
|
2575
2568
|
}
|
|
2576
2569
|
|
|
@@ -2584,10 +2577,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2584
2577
|
return result;
|
|
2585
2578
|
}
|
|
2586
2579
|
|
|
2587
|
-
|
|
2580
|
+
Py_DECREF_IMMORTAL(result);
|
|
2588
2581
|
}
|
|
2589
2582
|
|
|
2590
|
-
f =
|
|
2583
|
+
f = TP_RICHCOMPARE(type2);
|
|
2591
2584
|
if (f != NULL) {
|
|
2592
2585
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
2593
2586
|
|
|
@@ -2597,7 +2590,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2597
2590
|
return result;
|
|
2598
2591
|
}
|
|
2599
2592
|
|
|
2600
|
-
|
|
2593
|
+
Py_DECREF_IMMORTAL(result);
|
|
2601
2594
|
}
|
|
2602
2595
|
|
|
2603
2596
|
int c;
|
|
@@ -2685,14 +2678,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2685
2678
|
|
|
2686
2679
|
bool r = c != 0;
|
|
2687
2680
|
PyObject *result = BOOL_FROM(r);
|
|
2688
|
-
|
|
2681
|
+
Py_INCREF_IMMORTAL(result);
|
|
2689
2682
|
return result;
|
|
2690
2683
|
#else
|
|
2691
2684
|
bool checked_reverse_op = false;
|
|
2692
2685
|
richcmpfunc f;
|
|
2693
2686
|
|
|
2694
2687
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
2695
|
-
f =
|
|
2688
|
+
f = TP_RICHCOMPARE(type2);
|
|
2696
2689
|
|
|
2697
2690
|
if (f != NULL) {
|
|
2698
2691
|
checked_reverse_op = true;
|
|
@@ -2705,7 +2698,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2705
2698
|
return result;
|
|
2706
2699
|
}
|
|
2707
2700
|
|
|
2708
|
-
|
|
2701
|
+
Py_DECREF_IMMORTAL(result);
|
|
2709
2702
|
}
|
|
2710
2703
|
}
|
|
2711
2704
|
|
|
@@ -2720,11 +2713,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2720
2713
|
return result;
|
|
2721
2714
|
}
|
|
2722
2715
|
|
|
2723
|
-
|
|
2716
|
+
Py_DECREF_IMMORTAL(result);
|
|
2724
2717
|
}
|
|
2725
2718
|
|
|
2726
2719
|
if (checked_reverse_op == false) {
|
|
2727
|
-
f =
|
|
2720
|
+
f = TP_RICHCOMPARE(type2);
|
|
2728
2721
|
|
|
2729
2722
|
if (f != NULL) {
|
|
2730
2723
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -2735,7 +2728,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2735
2728
|
return result;
|
|
2736
2729
|
}
|
|
2737
2730
|
|
|
2738
|
-
|
|
2731
|
+
Py_DECREF_IMMORTAL(result);
|
|
2739
2732
|
}
|
|
2740
2733
|
}
|
|
2741
2734
|
|
|
@@ -2747,13 +2740,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_UNICODE_OBJECT(PyObject *operand1, PyObject *op
|
|
|
2747
2740
|
case Py_EQ: {
|
|
2748
2741
|
bool r = operand1 == operand2;
|
|
2749
2742
|
PyObject *result = BOOL_FROM(r);
|
|
2750
|
-
|
|
2743
|
+
Py_INCREF_IMMORTAL(result);
|
|
2751
2744
|
return result;
|
|
2752
2745
|
}
|
|
2753
2746
|
case Py_NE: {
|
|
2754
2747
|
bool r = operand1 != operand2;
|
|
2755
2748
|
PyObject *result = BOOL_FROM(r);
|
|
2756
|
-
|
|
2749
|
+
Py_INCREF_IMMORTAL(result);
|
|
2757
2750
|
return result;
|
|
2758
2751
|
}
|
|
2759
2752
|
default:
|
|
@@ -2796,20 +2789,24 @@ static bool COMPARE_NE_CBOOL_UNICODE_UNICODE(PyObject *operand1, PyObject *opera
|
|
|
2796
2789
|
r = false;
|
|
2797
2790
|
} else {
|
|
2798
2791
|
int kind1 = PyUnicode_KIND(a);
|
|
2792
|
+
#if PYTHON_VERSION < 0x3c0
|
|
2799
2793
|
if (unlikely(kind1 == 0)) {
|
|
2800
|
-
int res = _PyUnicode_Ready((PyObject *)a);
|
|
2794
|
+
NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)a);
|
|
2801
2795
|
assert(res != -1);
|
|
2802
2796
|
kind1 = PyUnicode_KIND(a);
|
|
2803
2797
|
assert(kind1 != 0);
|
|
2804
2798
|
}
|
|
2799
|
+
#endif
|
|
2805
2800
|
|
|
2806
2801
|
int kind2 = PyUnicode_KIND(b);
|
|
2802
|
+
#if PYTHON_VERSION < 0x3c0
|
|
2807
2803
|
if (unlikely(kind2 == 0)) {
|
|
2808
|
-
int res = _PyUnicode_Ready((PyObject *)b);
|
|
2804
|
+
NUITKA_MAY_BE_UNUSED int res = _PyUnicode_Ready((PyObject *)b);
|
|
2809
2805
|
assert(res != -1);
|
|
2810
2806
|
kind2 = PyUnicode_KIND(b);
|
|
2811
2807
|
assert(kind2 != 0);
|
|
2812
2808
|
}
|
|
2809
|
+
#endif
|
|
2813
2810
|
|
|
2814
2811
|
if (kind1 != kind2) {
|
|
2815
2812
|
r = false;
|
|
@@ -2886,7 +2883,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2886
2883
|
}
|
|
2887
2884
|
}
|
|
2888
2885
|
|
|
2889
|
-
|
|
2886
|
+
Py_DECREF_IMMORTAL(result);
|
|
2890
2887
|
}
|
|
2891
2888
|
|
|
2892
2889
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -2955,11 +2952,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2955
2952
|
}
|
|
2956
2953
|
}
|
|
2957
2954
|
|
|
2958
|
-
|
|
2955
|
+
Py_DECREF_IMMORTAL(result);
|
|
2959
2956
|
}
|
|
2960
2957
|
}
|
|
2961
2958
|
|
|
2962
|
-
f =
|
|
2959
|
+
f = TP_RICHCOMPARE(type1);
|
|
2963
2960
|
if (f != NULL) {
|
|
2964
2961
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
2965
2962
|
|
|
@@ -2977,7 +2974,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2977
2974
|
}
|
|
2978
2975
|
}
|
|
2979
2976
|
|
|
2980
|
-
|
|
2977
|
+
Py_DECREF_IMMORTAL(result);
|
|
2981
2978
|
}
|
|
2982
2979
|
|
|
2983
2980
|
f = PyUnicode_Type.tp_richcompare;
|
|
@@ -2998,7 +2995,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
2998
2995
|
}
|
|
2999
2996
|
}
|
|
3000
2997
|
|
|
3001
|
-
|
|
2998
|
+
Py_DECREF_IMMORTAL(result);
|
|
3002
2999
|
}
|
|
3003
3000
|
|
|
3004
3001
|
int c;
|
|
@@ -3114,11 +3111,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3114
3111
|
}
|
|
3115
3112
|
}
|
|
3116
3113
|
|
|
3117
|
-
|
|
3114
|
+
Py_DECREF_IMMORTAL(result);
|
|
3118
3115
|
}
|
|
3119
3116
|
}
|
|
3120
3117
|
|
|
3121
|
-
f =
|
|
3118
|
+
f = TP_RICHCOMPARE(type1);
|
|
3122
3119
|
|
|
3123
3120
|
if (f != NULL) {
|
|
3124
3121
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -3137,7 +3134,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3137
3134
|
}
|
|
3138
3135
|
}
|
|
3139
3136
|
|
|
3140
|
-
|
|
3137
|
+
Py_DECREF_IMMORTAL(result);
|
|
3141
3138
|
}
|
|
3142
3139
|
|
|
3143
3140
|
if (checked_reverse_op == false) {
|
|
@@ -3160,7 +3157,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_UNICODE(PyObject *operand1, PyObject *o
|
|
|
3160
3157
|
}
|
|
3161
3158
|
}
|
|
3162
3159
|
|
|
3163
|
-
|
|
3160
|
+
Py_DECREF_IMMORTAL(result);
|
|
3164
3161
|
}
|
|
3165
3162
|
}
|
|
3166
3163
|
|
|
@@ -3236,7 +3233,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3236
3233
|
}
|
|
3237
3234
|
}
|
|
3238
3235
|
|
|
3239
|
-
|
|
3236
|
+
Py_DECREF_IMMORTAL(result);
|
|
3240
3237
|
}
|
|
3241
3238
|
|
|
3242
3239
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3286,7 +3283,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3286
3283
|
richcmpfunc f;
|
|
3287
3284
|
|
|
3288
3285
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3289
|
-
f =
|
|
3286
|
+
f = TP_RICHCOMPARE(type2);
|
|
3290
3287
|
|
|
3291
3288
|
if (f != NULL) {
|
|
3292
3289
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -3305,7 +3302,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3305
3302
|
}
|
|
3306
3303
|
}
|
|
3307
3304
|
|
|
3308
|
-
|
|
3305
|
+
Py_DECREF_IMMORTAL(result);
|
|
3309
3306
|
}
|
|
3310
3307
|
}
|
|
3311
3308
|
|
|
@@ -3327,10 +3324,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3327
3324
|
}
|
|
3328
3325
|
}
|
|
3329
3326
|
|
|
3330
|
-
|
|
3327
|
+
Py_DECREF_IMMORTAL(result);
|
|
3331
3328
|
}
|
|
3332
3329
|
|
|
3333
|
-
f =
|
|
3330
|
+
f = TP_RICHCOMPARE(type2);
|
|
3334
3331
|
if (f != NULL) {
|
|
3335
3332
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
3336
3333
|
|
|
@@ -3348,7 +3345,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3348
3345
|
}
|
|
3349
3346
|
}
|
|
3350
3347
|
|
|
3351
|
-
|
|
3348
|
+
Py_DECREF_IMMORTAL(result);
|
|
3352
3349
|
}
|
|
3353
3350
|
|
|
3354
3351
|
int c;
|
|
@@ -3443,7 +3440,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3443
3440
|
richcmpfunc f;
|
|
3444
3441
|
|
|
3445
3442
|
if (&PyUnicode_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyUnicode_Type)) {
|
|
3446
|
-
f =
|
|
3443
|
+
f = TP_RICHCOMPARE(type2);
|
|
3447
3444
|
|
|
3448
3445
|
if (f != NULL) {
|
|
3449
3446
|
checked_reverse_op = true;
|
|
@@ -3464,7 +3461,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3464
3461
|
}
|
|
3465
3462
|
}
|
|
3466
3463
|
|
|
3467
|
-
|
|
3464
|
+
Py_DECREF_IMMORTAL(result);
|
|
3468
3465
|
}
|
|
3469
3466
|
}
|
|
3470
3467
|
|
|
@@ -3487,11 +3484,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3487
3484
|
}
|
|
3488
3485
|
}
|
|
3489
3486
|
|
|
3490
|
-
|
|
3487
|
+
Py_DECREF_IMMORTAL(result);
|
|
3491
3488
|
}
|
|
3492
3489
|
|
|
3493
3490
|
if (checked_reverse_op == false) {
|
|
3494
|
-
f =
|
|
3491
|
+
f = TP_RICHCOMPARE(type2);
|
|
3495
3492
|
|
|
3496
3493
|
if (f != NULL) {
|
|
3497
3494
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -3510,7 +3507,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_UNICODE_OBJECT(PyObject *operand1, PyObject *o
|
|
|
3510
3507
|
}
|
|
3511
3508
|
}
|
|
3512
3509
|
|
|
3513
|
-
|
|
3510
|
+
Py_DECREF_IMMORTAL(result);
|
|
3514
3511
|
}
|
|
3515
3512
|
}
|
|
3516
3513
|
|
|
@@ -3560,7 +3557,7 @@ static PyObject *COMPARE_NE_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3560
3557
|
|
|
3561
3558
|
// Convert to target type.
|
|
3562
3559
|
PyObject *result = BOOL_FROM(r);
|
|
3563
|
-
|
|
3560
|
+
Py_INCREF_IMMORTAL(result);
|
|
3564
3561
|
return result;
|
|
3565
3562
|
}
|
|
3566
3563
|
|
|
@@ -3572,7 +3569,7 @@ static PyObject *COMPARE_NE_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3572
3569
|
|
|
3573
3570
|
// Convert to target type.
|
|
3574
3571
|
PyObject *result = BOOL_FROM(r);
|
|
3575
|
-
|
|
3572
|
+
Py_INCREF_IMMORTAL(result);
|
|
3576
3573
|
return result;
|
|
3577
3574
|
} else {
|
|
3578
3575
|
if ((a->ob_sval[0] == b->ob_sval[0]) && (memcmp(a->ob_sval, b->ob_sval, len_a) == 0)) {
|
|
@@ -3580,18 +3577,20 @@ static PyObject *COMPARE_NE_OBJECT_BYTES_BYTES(PyObject *operand1, PyObject *ope
|
|
|
3580
3577
|
|
|
3581
3578
|
// Convert to target type.
|
|
3582
3579
|
PyObject *result = BOOL_FROM(r);
|
|
3583
|
-
|
|
3580
|
+
Py_INCREF_IMMORTAL(result);
|
|
3584
3581
|
return result;
|
|
3585
3582
|
} else {
|
|
3586
3583
|
bool r = true;
|
|
3587
3584
|
|
|
3588
3585
|
// Convert to target type.
|
|
3589
3586
|
PyObject *result = BOOL_FROM(r);
|
|
3590
|
-
|
|
3587
|
+
Py_INCREF_IMMORTAL(result);
|
|
3591
3588
|
return result;
|
|
3592
3589
|
}
|
|
3593
3590
|
}
|
|
3594
3591
|
}
|
|
3592
|
+
#endif
|
|
3593
|
+
#if PYTHON_VERSION >= 0x300
|
|
3595
3594
|
/* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
|
|
3596
3595
|
PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
3597
3596
|
|
|
@@ -3626,7 +3625,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3626
3625
|
return result;
|
|
3627
3626
|
}
|
|
3628
3627
|
|
|
3629
|
-
|
|
3628
|
+
Py_DECREF_IMMORTAL(result);
|
|
3630
3629
|
}
|
|
3631
3630
|
|
|
3632
3631
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3667,7 +3666,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3667
3666
|
|
|
3668
3667
|
bool r = c != 0;
|
|
3669
3668
|
PyObject *result = BOOL_FROM(r);
|
|
3670
|
-
|
|
3669
|
+
Py_INCREF_IMMORTAL(result);
|
|
3671
3670
|
return result;
|
|
3672
3671
|
}
|
|
3673
3672
|
}
|
|
@@ -3687,11 +3686,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3687
3686
|
return result;
|
|
3688
3687
|
}
|
|
3689
3688
|
|
|
3690
|
-
|
|
3689
|
+
Py_DECREF_IMMORTAL(result);
|
|
3691
3690
|
}
|
|
3692
3691
|
}
|
|
3693
3692
|
|
|
3694
|
-
f =
|
|
3693
|
+
f = TP_RICHCOMPARE(type1);
|
|
3695
3694
|
if (f != NULL) {
|
|
3696
3695
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
3697
3696
|
|
|
@@ -3701,7 +3700,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3701
3700
|
return result;
|
|
3702
3701
|
}
|
|
3703
3702
|
|
|
3704
|
-
|
|
3703
|
+
Py_DECREF_IMMORTAL(result);
|
|
3705
3704
|
}
|
|
3706
3705
|
|
|
3707
3706
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -3714,7 +3713,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3714
3713
|
return result;
|
|
3715
3714
|
}
|
|
3716
3715
|
|
|
3717
|
-
|
|
3716
|
+
Py_DECREF_IMMORTAL(result);
|
|
3718
3717
|
}
|
|
3719
3718
|
|
|
3720
3719
|
int c;
|
|
@@ -3802,7 +3801,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3802
3801
|
|
|
3803
3802
|
bool r = c != 0;
|
|
3804
3803
|
PyObject *result = BOOL_FROM(r);
|
|
3805
|
-
|
|
3804
|
+
Py_INCREF_IMMORTAL(result);
|
|
3806
3805
|
return result;
|
|
3807
3806
|
#else
|
|
3808
3807
|
bool checked_reverse_op = false;
|
|
@@ -3822,11 +3821,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3822
3821
|
return result;
|
|
3823
3822
|
}
|
|
3824
3823
|
|
|
3825
|
-
|
|
3824
|
+
Py_DECREF_IMMORTAL(result);
|
|
3826
3825
|
}
|
|
3827
3826
|
}
|
|
3828
3827
|
|
|
3829
|
-
f =
|
|
3828
|
+
f = TP_RICHCOMPARE(type1);
|
|
3830
3829
|
|
|
3831
3830
|
if (f != NULL) {
|
|
3832
3831
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -3837,7 +3836,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3837
3836
|
return result;
|
|
3838
3837
|
}
|
|
3839
3838
|
|
|
3840
|
-
|
|
3839
|
+
Py_DECREF_IMMORTAL(result);
|
|
3841
3840
|
}
|
|
3842
3841
|
|
|
3843
3842
|
if (checked_reverse_op == false) {
|
|
@@ -3852,7 +3851,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3852
3851
|
return result;
|
|
3853
3852
|
}
|
|
3854
3853
|
|
|
3855
|
-
|
|
3854
|
+
Py_DECREF_IMMORTAL(result);
|
|
3856
3855
|
}
|
|
3857
3856
|
}
|
|
3858
3857
|
|
|
@@ -3864,13 +3863,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_BYTES(PyObject *operand1, PyObject *oper
|
|
|
3864
3863
|
case Py_EQ: {
|
|
3865
3864
|
bool r = operand1 == operand2;
|
|
3866
3865
|
PyObject *result = BOOL_FROM(r);
|
|
3867
|
-
|
|
3866
|
+
Py_INCREF_IMMORTAL(result);
|
|
3868
3867
|
return result;
|
|
3869
3868
|
}
|
|
3870
3869
|
case Py_NE: {
|
|
3871
3870
|
bool r = operand1 != operand2;
|
|
3872
3871
|
PyObject *result = BOOL_FROM(r);
|
|
3873
|
-
|
|
3872
|
+
Py_INCREF_IMMORTAL(result);
|
|
3874
3873
|
return result;
|
|
3875
3874
|
}
|
|
3876
3875
|
default:
|
|
@@ -3920,7 +3919,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3920
3919
|
return result;
|
|
3921
3920
|
}
|
|
3922
3921
|
|
|
3923
|
-
|
|
3922
|
+
Py_DECREF_IMMORTAL(result);
|
|
3924
3923
|
}
|
|
3925
3924
|
|
|
3926
3925
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -3961,7 +3960,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3961
3960
|
|
|
3962
3961
|
bool r = c != 0;
|
|
3963
3962
|
PyObject *result = BOOL_FROM(r);
|
|
3964
|
-
|
|
3963
|
+
Py_INCREF_IMMORTAL(result);
|
|
3965
3964
|
return result;
|
|
3966
3965
|
}
|
|
3967
3966
|
}
|
|
@@ -3970,7 +3969,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3970
3969
|
richcmpfunc f;
|
|
3971
3970
|
|
|
3972
3971
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
3973
|
-
f =
|
|
3972
|
+
f = TP_RICHCOMPARE(type2);
|
|
3974
3973
|
|
|
3975
3974
|
if (f != NULL) {
|
|
3976
3975
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -3981,7 +3980,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3981
3980
|
return result;
|
|
3982
3981
|
}
|
|
3983
3982
|
|
|
3984
|
-
|
|
3983
|
+
Py_DECREF_IMMORTAL(result);
|
|
3985
3984
|
}
|
|
3986
3985
|
}
|
|
3987
3986
|
|
|
@@ -3995,10 +3994,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
3995
3994
|
return result;
|
|
3996
3995
|
}
|
|
3997
3996
|
|
|
3998
|
-
|
|
3997
|
+
Py_DECREF_IMMORTAL(result);
|
|
3999
3998
|
}
|
|
4000
3999
|
|
|
4001
|
-
f =
|
|
4000
|
+
f = TP_RICHCOMPARE(type2);
|
|
4002
4001
|
if (f != NULL) {
|
|
4003
4002
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
4004
4003
|
|
|
@@ -4008,7 +4007,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4008
4007
|
return result;
|
|
4009
4008
|
}
|
|
4010
4009
|
|
|
4011
|
-
|
|
4010
|
+
Py_DECREF_IMMORTAL(result);
|
|
4012
4011
|
}
|
|
4013
4012
|
|
|
4014
4013
|
int c;
|
|
@@ -4096,14 +4095,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4096
4095
|
|
|
4097
4096
|
bool r = c != 0;
|
|
4098
4097
|
PyObject *result = BOOL_FROM(r);
|
|
4099
|
-
|
|
4098
|
+
Py_INCREF_IMMORTAL(result);
|
|
4100
4099
|
return result;
|
|
4101
4100
|
#else
|
|
4102
4101
|
bool checked_reverse_op = false;
|
|
4103
4102
|
richcmpfunc f;
|
|
4104
4103
|
|
|
4105
4104
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4106
|
-
f =
|
|
4105
|
+
f = TP_RICHCOMPARE(type2);
|
|
4107
4106
|
|
|
4108
4107
|
if (f != NULL) {
|
|
4109
4108
|
checked_reverse_op = true;
|
|
@@ -4116,7 +4115,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4116
4115
|
return result;
|
|
4117
4116
|
}
|
|
4118
4117
|
|
|
4119
|
-
|
|
4118
|
+
Py_DECREF_IMMORTAL(result);
|
|
4120
4119
|
}
|
|
4121
4120
|
}
|
|
4122
4121
|
|
|
@@ -4131,11 +4130,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4131
4130
|
return result;
|
|
4132
4131
|
}
|
|
4133
4132
|
|
|
4134
|
-
|
|
4133
|
+
Py_DECREF_IMMORTAL(result);
|
|
4135
4134
|
}
|
|
4136
4135
|
|
|
4137
4136
|
if (checked_reverse_op == false) {
|
|
4138
|
-
f =
|
|
4137
|
+
f = TP_RICHCOMPARE(type2);
|
|
4139
4138
|
|
|
4140
4139
|
if (f != NULL) {
|
|
4141
4140
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -4146,7 +4145,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4146
4145
|
return result;
|
|
4147
4146
|
}
|
|
4148
4147
|
|
|
4149
|
-
|
|
4148
|
+
Py_DECREF_IMMORTAL(result);
|
|
4150
4149
|
}
|
|
4151
4150
|
}
|
|
4152
4151
|
|
|
@@ -4158,13 +4157,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_BYTES_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
4158
4157
|
case Py_EQ: {
|
|
4159
4158
|
bool r = operand1 == operand2;
|
|
4160
4159
|
PyObject *result = BOOL_FROM(r);
|
|
4161
|
-
|
|
4160
|
+
Py_INCREF_IMMORTAL(result);
|
|
4162
4161
|
return result;
|
|
4163
4162
|
}
|
|
4164
4163
|
case Py_NE: {
|
|
4165
4164
|
bool r = operand1 != operand2;
|
|
4166
4165
|
PyObject *result = BOOL_FROM(r);
|
|
4167
|
-
|
|
4166
|
+
Py_INCREF_IMMORTAL(result);
|
|
4168
4167
|
return result;
|
|
4169
4168
|
}
|
|
4170
4169
|
default:
|
|
@@ -4227,6 +4226,8 @@ static bool COMPARE_NE_CBOOL_BYTES_BYTES(PyObject *operand1, PyObject *operand2)
|
|
|
4227
4226
|
}
|
|
4228
4227
|
}
|
|
4229
4228
|
}
|
|
4229
|
+
#endif
|
|
4230
|
+
#if PYTHON_VERSION >= 0x300
|
|
4230
4231
|
/* Code referring to "OBJECT" corresponds to any Python object and "BYTES" to Python3 'bytes'. */
|
|
4231
4232
|
nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *operand2) {
|
|
4232
4233
|
|
|
@@ -4269,7 +4270,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4269
4270
|
}
|
|
4270
4271
|
}
|
|
4271
4272
|
|
|
4272
|
-
|
|
4273
|
+
Py_DECREF_IMMORTAL(result);
|
|
4273
4274
|
}
|
|
4274
4275
|
|
|
4275
4276
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4338,11 +4339,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4338
4339
|
}
|
|
4339
4340
|
}
|
|
4340
4341
|
|
|
4341
|
-
|
|
4342
|
+
Py_DECREF_IMMORTAL(result);
|
|
4342
4343
|
}
|
|
4343
4344
|
}
|
|
4344
4345
|
|
|
4345
|
-
f =
|
|
4346
|
+
f = TP_RICHCOMPARE(type1);
|
|
4346
4347
|
if (f != NULL) {
|
|
4347
4348
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
4348
4349
|
|
|
@@ -4360,7 +4361,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4360
4361
|
}
|
|
4361
4362
|
}
|
|
4362
4363
|
|
|
4363
|
-
|
|
4364
|
+
Py_DECREF_IMMORTAL(result);
|
|
4364
4365
|
}
|
|
4365
4366
|
|
|
4366
4367
|
f = PyBytes_Type.tp_richcompare;
|
|
@@ -4381,7 +4382,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4381
4382
|
}
|
|
4382
4383
|
}
|
|
4383
4384
|
|
|
4384
|
-
|
|
4385
|
+
Py_DECREF_IMMORTAL(result);
|
|
4385
4386
|
}
|
|
4386
4387
|
|
|
4387
4388
|
int c;
|
|
@@ -4497,11 +4498,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4497
4498
|
}
|
|
4498
4499
|
}
|
|
4499
4500
|
|
|
4500
|
-
|
|
4501
|
+
Py_DECREF_IMMORTAL(result);
|
|
4501
4502
|
}
|
|
4502
4503
|
}
|
|
4503
4504
|
|
|
4504
|
-
f =
|
|
4505
|
+
f = TP_RICHCOMPARE(type1);
|
|
4505
4506
|
|
|
4506
4507
|
if (f != NULL) {
|
|
4507
4508
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -4520,7 +4521,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4520
4521
|
}
|
|
4521
4522
|
}
|
|
4522
4523
|
|
|
4523
|
-
|
|
4524
|
+
Py_DECREF_IMMORTAL(result);
|
|
4524
4525
|
}
|
|
4525
4526
|
|
|
4526
4527
|
if (checked_reverse_op == false) {
|
|
@@ -4543,7 +4544,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_BYTES(PyObject *operand1, PyObject *ope
|
|
|
4543
4544
|
}
|
|
4544
4545
|
}
|
|
4545
4546
|
|
|
4546
|
-
|
|
4547
|
+
Py_DECREF_IMMORTAL(result);
|
|
4547
4548
|
}
|
|
4548
4549
|
}
|
|
4549
4550
|
|
|
@@ -4619,7 +4620,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4619
4620
|
}
|
|
4620
4621
|
}
|
|
4621
4622
|
|
|
4622
|
-
|
|
4623
|
+
Py_DECREF_IMMORTAL(result);
|
|
4623
4624
|
}
|
|
4624
4625
|
|
|
4625
4626
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -4669,7 +4670,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4669
4670
|
richcmpfunc f;
|
|
4670
4671
|
|
|
4671
4672
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4672
|
-
f =
|
|
4673
|
+
f = TP_RICHCOMPARE(type2);
|
|
4673
4674
|
|
|
4674
4675
|
if (f != NULL) {
|
|
4675
4676
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -4688,7 +4689,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4688
4689
|
}
|
|
4689
4690
|
}
|
|
4690
4691
|
|
|
4691
|
-
|
|
4692
|
+
Py_DECREF_IMMORTAL(result);
|
|
4692
4693
|
}
|
|
4693
4694
|
}
|
|
4694
4695
|
|
|
@@ -4710,10 +4711,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4710
4711
|
}
|
|
4711
4712
|
}
|
|
4712
4713
|
|
|
4713
|
-
|
|
4714
|
+
Py_DECREF_IMMORTAL(result);
|
|
4714
4715
|
}
|
|
4715
4716
|
|
|
4716
|
-
f =
|
|
4717
|
+
f = TP_RICHCOMPARE(type2);
|
|
4717
4718
|
if (f != NULL) {
|
|
4718
4719
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
4719
4720
|
|
|
@@ -4731,7 +4732,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4731
4732
|
}
|
|
4732
4733
|
}
|
|
4733
4734
|
|
|
4734
|
-
|
|
4735
|
+
Py_DECREF_IMMORTAL(result);
|
|
4735
4736
|
}
|
|
4736
4737
|
|
|
4737
4738
|
int c;
|
|
@@ -4826,7 +4827,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4826
4827
|
richcmpfunc f;
|
|
4827
4828
|
|
|
4828
4829
|
if (&PyBytes_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyBytes_Type)) {
|
|
4829
|
-
f =
|
|
4830
|
+
f = TP_RICHCOMPARE(type2);
|
|
4830
4831
|
|
|
4831
4832
|
if (f != NULL) {
|
|
4832
4833
|
checked_reverse_op = true;
|
|
@@ -4847,7 +4848,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4847
4848
|
}
|
|
4848
4849
|
}
|
|
4849
4850
|
|
|
4850
|
-
|
|
4851
|
+
Py_DECREF_IMMORTAL(result);
|
|
4851
4852
|
}
|
|
4852
4853
|
}
|
|
4853
4854
|
|
|
@@ -4870,11 +4871,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4870
4871
|
}
|
|
4871
4872
|
}
|
|
4872
4873
|
|
|
4873
|
-
|
|
4874
|
+
Py_DECREF_IMMORTAL(result);
|
|
4874
4875
|
}
|
|
4875
4876
|
|
|
4876
4877
|
if (checked_reverse_op == false) {
|
|
4877
|
-
f =
|
|
4878
|
+
f = TP_RICHCOMPARE(type2);
|
|
4878
4879
|
|
|
4879
4880
|
if (f != NULL) {
|
|
4880
4881
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -4893,7 +4894,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_BYTES_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
4893
4894
|
}
|
|
4894
4895
|
}
|
|
4895
4896
|
|
|
4896
|
-
|
|
4897
|
+
Py_DECREF_IMMORTAL(result);
|
|
4897
4898
|
}
|
|
4898
4899
|
}
|
|
4899
4900
|
|
|
@@ -4961,7 +4962,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
4961
4962
|
return result;
|
|
4962
4963
|
}
|
|
4963
4964
|
|
|
4964
|
-
|
|
4965
|
+
Py_DECREF_IMMORTAL(result);
|
|
4965
4966
|
}
|
|
4966
4967
|
|
|
4967
4968
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5002,7 +5003,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5002
5003
|
|
|
5003
5004
|
bool r = c != 0;
|
|
5004
5005
|
PyObject *result = BOOL_FROM(r);
|
|
5005
|
-
|
|
5006
|
+
Py_INCREF_IMMORTAL(result);
|
|
5006
5007
|
return result;
|
|
5007
5008
|
}
|
|
5008
5009
|
}
|
|
@@ -5022,11 +5023,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5022
5023
|
return result;
|
|
5023
5024
|
}
|
|
5024
5025
|
|
|
5025
|
-
|
|
5026
|
+
Py_DECREF_IMMORTAL(result);
|
|
5026
5027
|
}
|
|
5027
5028
|
}
|
|
5028
5029
|
|
|
5029
|
-
f =
|
|
5030
|
+
f = TP_RICHCOMPARE(type1);
|
|
5030
5031
|
if (f != NULL) {
|
|
5031
5032
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
5032
5033
|
|
|
@@ -5036,7 +5037,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5036
5037
|
return result;
|
|
5037
5038
|
}
|
|
5038
5039
|
|
|
5039
|
-
|
|
5040
|
+
Py_DECREF_IMMORTAL(result);
|
|
5040
5041
|
}
|
|
5041
5042
|
|
|
5042
5043
|
f = NULL;
|
|
@@ -5049,7 +5050,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5049
5050
|
return result;
|
|
5050
5051
|
}
|
|
5051
5052
|
|
|
5052
|
-
|
|
5053
|
+
Py_DECREF_IMMORTAL(result);
|
|
5053
5054
|
}
|
|
5054
5055
|
|
|
5055
5056
|
int c;
|
|
@@ -5137,7 +5138,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5137
5138
|
|
|
5138
5139
|
bool r = c != 0;
|
|
5139
5140
|
PyObject *result = BOOL_FROM(r);
|
|
5140
|
-
|
|
5141
|
+
Py_INCREF_IMMORTAL(result);
|
|
5141
5142
|
return result;
|
|
5142
5143
|
#else
|
|
5143
5144
|
bool checked_reverse_op = false;
|
|
@@ -5157,11 +5158,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5157
5158
|
return result;
|
|
5158
5159
|
}
|
|
5159
5160
|
|
|
5160
|
-
|
|
5161
|
+
Py_DECREF_IMMORTAL(result);
|
|
5161
5162
|
}
|
|
5162
5163
|
}
|
|
5163
5164
|
|
|
5164
|
-
f =
|
|
5165
|
+
f = TP_RICHCOMPARE(type1);
|
|
5165
5166
|
|
|
5166
5167
|
if (f != NULL) {
|
|
5167
5168
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -5172,7 +5173,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5172
5173
|
return result;
|
|
5173
5174
|
}
|
|
5174
5175
|
|
|
5175
|
-
|
|
5176
|
+
Py_DECREF_IMMORTAL(result);
|
|
5176
5177
|
}
|
|
5177
5178
|
|
|
5178
5179
|
if (checked_reverse_op == false) {
|
|
@@ -5187,7 +5188,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5187
5188
|
return result;
|
|
5188
5189
|
}
|
|
5189
5190
|
|
|
5190
|
-
|
|
5191
|
+
Py_DECREF_IMMORTAL(result);
|
|
5191
5192
|
}
|
|
5192
5193
|
}
|
|
5193
5194
|
|
|
@@ -5199,13 +5200,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_INT(PyObject *operand1, PyObject *operan
|
|
|
5199
5200
|
case Py_EQ: {
|
|
5200
5201
|
bool r = operand1 == operand2;
|
|
5201
5202
|
PyObject *result = BOOL_FROM(r);
|
|
5202
|
-
|
|
5203
|
+
Py_INCREF_IMMORTAL(result);
|
|
5203
5204
|
return result;
|
|
5204
5205
|
}
|
|
5205
5206
|
case Py_NE: {
|
|
5206
5207
|
bool r = operand1 != operand2;
|
|
5207
5208
|
PyObject *result = BOOL_FROM(r);
|
|
5208
|
-
|
|
5209
|
+
Py_INCREF_IMMORTAL(result);
|
|
5209
5210
|
return result;
|
|
5210
5211
|
}
|
|
5211
5212
|
default:
|
|
@@ -5255,7 +5256,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5255
5256
|
return result;
|
|
5256
5257
|
}
|
|
5257
5258
|
|
|
5258
|
-
|
|
5259
|
+
Py_DECREF_IMMORTAL(result);
|
|
5259
5260
|
}
|
|
5260
5261
|
|
|
5261
5262
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5296,7 +5297,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5296
5297
|
|
|
5297
5298
|
bool r = c != 0;
|
|
5298
5299
|
PyObject *result = BOOL_FROM(r);
|
|
5299
|
-
|
|
5300
|
+
Py_INCREF_IMMORTAL(result);
|
|
5300
5301
|
return result;
|
|
5301
5302
|
}
|
|
5302
5303
|
}
|
|
@@ -5305,7 +5306,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5305
5306
|
richcmpfunc f;
|
|
5306
5307
|
|
|
5307
5308
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5308
|
-
f =
|
|
5309
|
+
f = TP_RICHCOMPARE(type2);
|
|
5309
5310
|
|
|
5310
5311
|
if (f != NULL) {
|
|
5311
5312
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -5316,7 +5317,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5316
5317
|
return result;
|
|
5317
5318
|
}
|
|
5318
5319
|
|
|
5319
|
-
|
|
5320
|
+
Py_DECREF_IMMORTAL(result);
|
|
5320
5321
|
}
|
|
5321
5322
|
}
|
|
5322
5323
|
|
|
@@ -5330,10 +5331,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5330
5331
|
return result;
|
|
5331
5332
|
}
|
|
5332
5333
|
|
|
5333
|
-
|
|
5334
|
+
Py_DECREF_IMMORTAL(result);
|
|
5334
5335
|
}
|
|
5335
5336
|
|
|
5336
|
-
f =
|
|
5337
|
+
f = TP_RICHCOMPARE(type2);
|
|
5337
5338
|
if (f != NULL) {
|
|
5338
5339
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
5339
5340
|
|
|
@@ -5343,7 +5344,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5343
5344
|
return result;
|
|
5344
5345
|
}
|
|
5345
5346
|
|
|
5346
|
-
|
|
5347
|
+
Py_DECREF_IMMORTAL(result);
|
|
5347
5348
|
}
|
|
5348
5349
|
|
|
5349
5350
|
int c;
|
|
@@ -5431,14 +5432,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5431
5432
|
|
|
5432
5433
|
bool r = c != 0;
|
|
5433
5434
|
PyObject *result = BOOL_FROM(r);
|
|
5434
|
-
|
|
5435
|
+
Py_INCREF_IMMORTAL(result);
|
|
5435
5436
|
return result;
|
|
5436
5437
|
#else
|
|
5437
5438
|
bool checked_reverse_op = false;
|
|
5438
5439
|
richcmpfunc f;
|
|
5439
5440
|
|
|
5440
5441
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5441
|
-
f =
|
|
5442
|
+
f = TP_RICHCOMPARE(type2);
|
|
5442
5443
|
|
|
5443
5444
|
if (f != NULL) {
|
|
5444
5445
|
checked_reverse_op = true;
|
|
@@ -5451,7 +5452,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5451
5452
|
return result;
|
|
5452
5453
|
}
|
|
5453
5454
|
|
|
5454
|
-
|
|
5455
|
+
Py_DECREF_IMMORTAL(result);
|
|
5455
5456
|
}
|
|
5456
5457
|
}
|
|
5457
5458
|
|
|
@@ -5466,11 +5467,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5466
5467
|
return result;
|
|
5467
5468
|
}
|
|
5468
5469
|
|
|
5469
|
-
|
|
5470
|
+
Py_DECREF_IMMORTAL(result);
|
|
5470
5471
|
}
|
|
5471
5472
|
|
|
5472
5473
|
if (checked_reverse_op == false) {
|
|
5473
|
-
f =
|
|
5474
|
+
f = TP_RICHCOMPARE(type2);
|
|
5474
5475
|
|
|
5475
5476
|
if (f != NULL) {
|
|
5476
5477
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -5481,7 +5482,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5481
5482
|
return result;
|
|
5482
5483
|
}
|
|
5483
5484
|
|
|
5484
|
-
|
|
5485
|
+
Py_DECREF_IMMORTAL(result);
|
|
5485
5486
|
}
|
|
5486
5487
|
}
|
|
5487
5488
|
|
|
@@ -5493,13 +5494,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_INT_OBJECT(PyObject *operand1, PyObject *operan
|
|
|
5493
5494
|
case Py_EQ: {
|
|
5494
5495
|
bool r = operand1 == operand2;
|
|
5495
5496
|
PyObject *result = BOOL_FROM(r);
|
|
5496
|
-
|
|
5497
|
+
Py_INCREF_IMMORTAL(result);
|
|
5497
5498
|
return result;
|
|
5498
5499
|
}
|
|
5499
5500
|
case Py_NE: {
|
|
5500
5501
|
bool r = operand1 != operand2;
|
|
5501
5502
|
PyObject *result = BOOL_FROM(r);
|
|
5502
|
-
|
|
5503
|
+
Py_INCREF_IMMORTAL(result);
|
|
5503
5504
|
return result;
|
|
5504
5505
|
}
|
|
5505
5506
|
default:
|
|
@@ -5557,7 +5558,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5557
5558
|
}
|
|
5558
5559
|
}
|
|
5559
5560
|
|
|
5560
|
-
|
|
5561
|
+
Py_DECREF_IMMORTAL(result);
|
|
5561
5562
|
}
|
|
5562
5563
|
|
|
5563
5564
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5626,11 +5627,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5626
5627
|
}
|
|
5627
5628
|
}
|
|
5628
5629
|
|
|
5629
|
-
|
|
5630
|
+
Py_DECREF_IMMORTAL(result);
|
|
5630
5631
|
}
|
|
5631
5632
|
}
|
|
5632
5633
|
|
|
5633
|
-
f =
|
|
5634
|
+
f = TP_RICHCOMPARE(type1);
|
|
5634
5635
|
if (f != NULL) {
|
|
5635
5636
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
5636
5637
|
|
|
@@ -5648,7 +5649,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5648
5649
|
}
|
|
5649
5650
|
}
|
|
5650
5651
|
|
|
5651
|
-
|
|
5652
|
+
Py_DECREF_IMMORTAL(result);
|
|
5652
5653
|
}
|
|
5653
5654
|
|
|
5654
5655
|
f = NULL;
|
|
@@ -5669,7 +5670,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5669
5670
|
}
|
|
5670
5671
|
}
|
|
5671
5672
|
|
|
5672
|
-
|
|
5673
|
+
Py_DECREF_IMMORTAL(result);
|
|
5673
5674
|
}
|
|
5674
5675
|
|
|
5675
5676
|
int c;
|
|
@@ -5785,11 +5786,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5785
5786
|
}
|
|
5786
5787
|
}
|
|
5787
5788
|
|
|
5788
|
-
|
|
5789
|
+
Py_DECREF_IMMORTAL(result);
|
|
5789
5790
|
}
|
|
5790
5791
|
}
|
|
5791
5792
|
|
|
5792
|
-
f =
|
|
5793
|
+
f = TP_RICHCOMPARE(type1);
|
|
5793
5794
|
|
|
5794
5795
|
if (f != NULL) {
|
|
5795
5796
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -5808,7 +5809,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5808
5809
|
}
|
|
5809
5810
|
}
|
|
5810
5811
|
|
|
5811
|
-
|
|
5812
|
+
Py_DECREF_IMMORTAL(result);
|
|
5812
5813
|
}
|
|
5813
5814
|
|
|
5814
5815
|
if (checked_reverse_op == false) {
|
|
@@ -5831,7 +5832,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_INT(PyObject *operand1, PyObject *opera
|
|
|
5831
5832
|
}
|
|
5832
5833
|
}
|
|
5833
5834
|
|
|
5834
|
-
|
|
5835
|
+
Py_DECREF_IMMORTAL(result);
|
|
5835
5836
|
}
|
|
5836
5837
|
}
|
|
5837
5838
|
|
|
@@ -5907,7 +5908,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5907
5908
|
}
|
|
5908
5909
|
}
|
|
5909
5910
|
|
|
5910
|
-
|
|
5911
|
+
Py_DECREF_IMMORTAL(result);
|
|
5911
5912
|
}
|
|
5912
5913
|
|
|
5913
5914
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -5957,7 +5958,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5957
5958
|
richcmpfunc f;
|
|
5958
5959
|
|
|
5959
5960
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
5960
|
-
f =
|
|
5961
|
+
f = TP_RICHCOMPARE(type2);
|
|
5961
5962
|
|
|
5962
5963
|
if (f != NULL) {
|
|
5963
5964
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -5976,7 +5977,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5976
5977
|
}
|
|
5977
5978
|
}
|
|
5978
5979
|
|
|
5979
|
-
|
|
5980
|
+
Py_DECREF_IMMORTAL(result);
|
|
5980
5981
|
}
|
|
5981
5982
|
}
|
|
5982
5983
|
|
|
@@ -5998,10 +5999,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
5998
5999
|
}
|
|
5999
6000
|
}
|
|
6000
6001
|
|
|
6001
|
-
|
|
6002
|
+
Py_DECREF_IMMORTAL(result);
|
|
6002
6003
|
}
|
|
6003
6004
|
|
|
6004
|
-
f =
|
|
6005
|
+
f = TP_RICHCOMPARE(type2);
|
|
6005
6006
|
if (f != NULL) {
|
|
6006
6007
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
6007
6008
|
|
|
@@ -6019,7 +6020,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6019
6020
|
}
|
|
6020
6021
|
}
|
|
6021
6022
|
|
|
6022
|
-
|
|
6023
|
+
Py_DECREF_IMMORTAL(result);
|
|
6023
6024
|
}
|
|
6024
6025
|
|
|
6025
6026
|
int c;
|
|
@@ -6114,7 +6115,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6114
6115
|
richcmpfunc f;
|
|
6115
6116
|
|
|
6116
6117
|
if (&PyInt_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyInt_Type)) {
|
|
6117
|
-
f =
|
|
6118
|
+
f = TP_RICHCOMPARE(type2);
|
|
6118
6119
|
|
|
6119
6120
|
if (f != NULL) {
|
|
6120
6121
|
checked_reverse_op = true;
|
|
@@ -6135,7 +6136,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6135
6136
|
}
|
|
6136
6137
|
}
|
|
6137
6138
|
|
|
6138
|
-
|
|
6139
|
+
Py_DECREF_IMMORTAL(result);
|
|
6139
6140
|
}
|
|
6140
6141
|
}
|
|
6141
6142
|
|
|
@@ -6158,11 +6159,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6158
6159
|
}
|
|
6159
6160
|
}
|
|
6160
6161
|
|
|
6161
|
-
|
|
6162
|
+
Py_DECREF_IMMORTAL(result);
|
|
6162
6163
|
}
|
|
6163
6164
|
|
|
6164
6165
|
if (checked_reverse_op == false) {
|
|
6165
|
-
f =
|
|
6166
|
+
f = TP_RICHCOMPARE(type2);
|
|
6166
6167
|
|
|
6167
6168
|
if (f != NULL) {
|
|
6168
6169
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -6181,7 +6182,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_INT_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6181
6182
|
}
|
|
6182
6183
|
}
|
|
6183
6184
|
|
|
6184
|
-
|
|
6185
|
+
Py_DECREF_IMMORTAL(result);
|
|
6185
6186
|
}
|
|
6186
6187
|
}
|
|
6187
6188
|
|
|
@@ -6228,13 +6229,15 @@ static PyObject *COMPARE_NE_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6228
6229
|
|
|
6229
6230
|
if (operand1_long_object == operand2_long_object) {
|
|
6230
6231
|
r = false;
|
|
6231
|
-
} else if (
|
|
6232
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6233
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6232
6234
|
r = true;
|
|
6233
6235
|
} else {
|
|
6234
|
-
Py_ssize_t i =
|
|
6236
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6235
6237
|
r = false;
|
|
6236
6238
|
while (--i >= 0) {
|
|
6237
|
-
if (operand1_long_object
|
|
6239
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6240
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6238
6241
|
r = true;
|
|
6239
6242
|
break;
|
|
6240
6243
|
}
|
|
@@ -6243,7 +6246,7 @@ static PyObject *COMPARE_NE_OBJECT_LONG_LONG(PyObject *operand1, PyObject *opera
|
|
|
6243
6246
|
|
|
6244
6247
|
// Convert to target type.
|
|
6245
6248
|
PyObject *result = BOOL_FROM(r);
|
|
6246
|
-
|
|
6249
|
+
Py_INCREF_IMMORTAL(result);
|
|
6247
6250
|
return result;
|
|
6248
6251
|
}
|
|
6249
6252
|
/* Code referring to "OBJECT" corresponds to any Python object and "LONG" to Python2 'long', Python3 'int'. */
|
|
@@ -6280,7 +6283,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6280
6283
|
return result;
|
|
6281
6284
|
}
|
|
6282
6285
|
|
|
6283
|
-
|
|
6286
|
+
Py_DECREF_IMMORTAL(result);
|
|
6284
6287
|
}
|
|
6285
6288
|
|
|
6286
6289
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6321,7 +6324,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6321
6324
|
|
|
6322
6325
|
bool r = c != 0;
|
|
6323
6326
|
PyObject *result = BOOL_FROM(r);
|
|
6324
|
-
|
|
6327
|
+
Py_INCREF_IMMORTAL(result);
|
|
6325
6328
|
return result;
|
|
6326
6329
|
}
|
|
6327
6330
|
}
|
|
@@ -6341,11 +6344,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6341
6344
|
return result;
|
|
6342
6345
|
}
|
|
6343
6346
|
|
|
6344
|
-
|
|
6347
|
+
Py_DECREF_IMMORTAL(result);
|
|
6345
6348
|
}
|
|
6346
6349
|
}
|
|
6347
6350
|
|
|
6348
|
-
f =
|
|
6351
|
+
f = TP_RICHCOMPARE(type1);
|
|
6349
6352
|
if (f != NULL) {
|
|
6350
6353
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
6351
6354
|
|
|
@@ -6355,7 +6358,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6355
6358
|
return result;
|
|
6356
6359
|
}
|
|
6357
6360
|
|
|
6358
|
-
|
|
6361
|
+
Py_DECREF_IMMORTAL(result);
|
|
6359
6362
|
}
|
|
6360
6363
|
|
|
6361
6364
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -6368,7 +6371,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6368
6371
|
return result;
|
|
6369
6372
|
}
|
|
6370
6373
|
|
|
6371
|
-
|
|
6374
|
+
Py_DECREF_IMMORTAL(result);
|
|
6372
6375
|
}
|
|
6373
6376
|
|
|
6374
6377
|
int c;
|
|
@@ -6456,7 +6459,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6456
6459
|
|
|
6457
6460
|
bool r = c != 0;
|
|
6458
6461
|
PyObject *result = BOOL_FROM(r);
|
|
6459
|
-
|
|
6462
|
+
Py_INCREF_IMMORTAL(result);
|
|
6460
6463
|
return result;
|
|
6461
6464
|
#else
|
|
6462
6465
|
bool checked_reverse_op = false;
|
|
@@ -6476,11 +6479,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6476
6479
|
return result;
|
|
6477
6480
|
}
|
|
6478
6481
|
|
|
6479
|
-
|
|
6482
|
+
Py_DECREF_IMMORTAL(result);
|
|
6480
6483
|
}
|
|
6481
6484
|
}
|
|
6482
6485
|
|
|
6483
|
-
f =
|
|
6486
|
+
f = TP_RICHCOMPARE(type1);
|
|
6484
6487
|
|
|
6485
6488
|
if (f != NULL) {
|
|
6486
6489
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -6491,7 +6494,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6491
6494
|
return result;
|
|
6492
6495
|
}
|
|
6493
6496
|
|
|
6494
|
-
|
|
6497
|
+
Py_DECREF_IMMORTAL(result);
|
|
6495
6498
|
}
|
|
6496
6499
|
|
|
6497
6500
|
if (checked_reverse_op == false) {
|
|
@@ -6506,7 +6509,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6506
6509
|
return result;
|
|
6507
6510
|
}
|
|
6508
6511
|
|
|
6509
|
-
|
|
6512
|
+
Py_DECREF_IMMORTAL(result);
|
|
6510
6513
|
}
|
|
6511
6514
|
}
|
|
6512
6515
|
|
|
@@ -6518,13 +6521,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LONG(PyObject *operand1, PyObject *opera
|
|
|
6518
6521
|
case Py_EQ: {
|
|
6519
6522
|
bool r = operand1 == operand2;
|
|
6520
6523
|
PyObject *result = BOOL_FROM(r);
|
|
6521
|
-
|
|
6524
|
+
Py_INCREF_IMMORTAL(result);
|
|
6522
6525
|
return result;
|
|
6523
6526
|
}
|
|
6524
6527
|
case Py_NE: {
|
|
6525
6528
|
bool r = operand1 != operand2;
|
|
6526
6529
|
PyObject *result = BOOL_FROM(r);
|
|
6527
|
-
|
|
6530
|
+
Py_INCREF_IMMORTAL(result);
|
|
6528
6531
|
return result;
|
|
6529
6532
|
}
|
|
6530
6533
|
default:
|
|
@@ -6574,7 +6577,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6574
6577
|
return result;
|
|
6575
6578
|
}
|
|
6576
6579
|
|
|
6577
|
-
|
|
6580
|
+
Py_DECREF_IMMORTAL(result);
|
|
6578
6581
|
}
|
|
6579
6582
|
|
|
6580
6583
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6615,7 +6618,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6615
6618
|
|
|
6616
6619
|
bool r = c != 0;
|
|
6617
6620
|
PyObject *result = BOOL_FROM(r);
|
|
6618
|
-
|
|
6621
|
+
Py_INCREF_IMMORTAL(result);
|
|
6619
6622
|
return result;
|
|
6620
6623
|
}
|
|
6621
6624
|
}
|
|
@@ -6624,7 +6627,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6624
6627
|
richcmpfunc f;
|
|
6625
6628
|
|
|
6626
6629
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6627
|
-
f =
|
|
6630
|
+
f = TP_RICHCOMPARE(type2);
|
|
6628
6631
|
|
|
6629
6632
|
if (f != NULL) {
|
|
6630
6633
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -6635,7 +6638,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6635
6638
|
return result;
|
|
6636
6639
|
}
|
|
6637
6640
|
|
|
6638
|
-
|
|
6641
|
+
Py_DECREF_IMMORTAL(result);
|
|
6639
6642
|
}
|
|
6640
6643
|
}
|
|
6641
6644
|
|
|
@@ -6649,10 +6652,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6649
6652
|
return result;
|
|
6650
6653
|
}
|
|
6651
6654
|
|
|
6652
|
-
|
|
6655
|
+
Py_DECREF_IMMORTAL(result);
|
|
6653
6656
|
}
|
|
6654
6657
|
|
|
6655
|
-
f =
|
|
6658
|
+
f = TP_RICHCOMPARE(type2);
|
|
6656
6659
|
if (f != NULL) {
|
|
6657
6660
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
6658
6661
|
|
|
@@ -6662,7 +6665,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6662
6665
|
return result;
|
|
6663
6666
|
}
|
|
6664
6667
|
|
|
6665
|
-
|
|
6668
|
+
Py_DECREF_IMMORTAL(result);
|
|
6666
6669
|
}
|
|
6667
6670
|
|
|
6668
6671
|
int c;
|
|
@@ -6750,14 +6753,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6750
6753
|
|
|
6751
6754
|
bool r = c != 0;
|
|
6752
6755
|
PyObject *result = BOOL_FROM(r);
|
|
6753
|
-
|
|
6756
|
+
Py_INCREF_IMMORTAL(result);
|
|
6754
6757
|
return result;
|
|
6755
6758
|
#else
|
|
6756
6759
|
bool checked_reverse_op = false;
|
|
6757
6760
|
richcmpfunc f;
|
|
6758
6761
|
|
|
6759
6762
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
6760
|
-
f =
|
|
6763
|
+
f = TP_RICHCOMPARE(type2);
|
|
6761
6764
|
|
|
6762
6765
|
if (f != NULL) {
|
|
6763
6766
|
checked_reverse_op = true;
|
|
@@ -6770,7 +6773,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6770
6773
|
return result;
|
|
6771
6774
|
}
|
|
6772
6775
|
|
|
6773
|
-
|
|
6776
|
+
Py_DECREF_IMMORTAL(result);
|
|
6774
6777
|
}
|
|
6775
6778
|
}
|
|
6776
6779
|
|
|
@@ -6785,11 +6788,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6785
6788
|
return result;
|
|
6786
6789
|
}
|
|
6787
6790
|
|
|
6788
|
-
|
|
6791
|
+
Py_DECREF_IMMORTAL(result);
|
|
6789
6792
|
}
|
|
6790
6793
|
|
|
6791
6794
|
if (checked_reverse_op == false) {
|
|
6792
|
-
f =
|
|
6795
|
+
f = TP_RICHCOMPARE(type2);
|
|
6793
6796
|
|
|
6794
6797
|
if (f != NULL) {
|
|
6795
6798
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -6800,7 +6803,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6800
6803
|
return result;
|
|
6801
6804
|
}
|
|
6802
6805
|
|
|
6803
|
-
|
|
6806
|
+
Py_DECREF_IMMORTAL(result);
|
|
6804
6807
|
}
|
|
6805
6808
|
}
|
|
6806
6809
|
|
|
@@ -6812,13 +6815,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
6812
6815
|
case Py_EQ: {
|
|
6813
6816
|
bool r = operand1 == operand2;
|
|
6814
6817
|
PyObject *result = BOOL_FROM(r);
|
|
6815
|
-
|
|
6818
|
+
Py_INCREF_IMMORTAL(result);
|
|
6816
6819
|
return result;
|
|
6817
6820
|
}
|
|
6818
6821
|
case Py_NE: {
|
|
6819
6822
|
bool r = operand1 != operand2;
|
|
6820
6823
|
PyObject *result = BOOL_FROM(r);
|
|
6821
|
-
|
|
6824
|
+
Py_INCREF_IMMORTAL(result);
|
|
6822
6825
|
return result;
|
|
6823
6826
|
}
|
|
6824
6827
|
default:
|
|
@@ -6848,13 +6851,15 @@ static bool COMPARE_NE_CBOOL_LONG_LONG(PyObject *operand1, PyObject *operand2) {
|
|
|
6848
6851
|
|
|
6849
6852
|
if (operand1_long_object == operand2_long_object) {
|
|
6850
6853
|
r = false;
|
|
6851
|
-
} else if (
|
|
6854
|
+
} else if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
6855
|
+
Nuitka_LongGetSignedDigitSize(operand2_long_object)) {
|
|
6852
6856
|
r = true;
|
|
6853
6857
|
} else {
|
|
6854
|
-
Py_ssize_t i =
|
|
6858
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
6855
6859
|
r = false;
|
|
6856
6860
|
while (--i >= 0) {
|
|
6857
|
-
if (operand1_long_object
|
|
6861
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] !=
|
|
6862
|
+
Nuitka_LongGetDigitPointer(operand2_long_object)[i]) {
|
|
6858
6863
|
r = true;
|
|
6859
6864
|
break;
|
|
6860
6865
|
}
|
|
@@ -6908,7 +6913,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6908
6913
|
}
|
|
6909
6914
|
}
|
|
6910
6915
|
|
|
6911
|
-
|
|
6916
|
+
Py_DECREF_IMMORTAL(result);
|
|
6912
6917
|
}
|
|
6913
6918
|
|
|
6914
6919
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -6977,11 +6982,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6977
6982
|
}
|
|
6978
6983
|
}
|
|
6979
6984
|
|
|
6980
|
-
|
|
6985
|
+
Py_DECREF_IMMORTAL(result);
|
|
6981
6986
|
}
|
|
6982
6987
|
}
|
|
6983
6988
|
|
|
6984
|
-
f =
|
|
6989
|
+
f = TP_RICHCOMPARE(type1);
|
|
6985
6990
|
if (f != NULL) {
|
|
6986
6991
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
6987
6992
|
|
|
@@ -6999,7 +7004,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
6999
7004
|
}
|
|
7000
7005
|
}
|
|
7001
7006
|
|
|
7002
|
-
|
|
7007
|
+
Py_DECREF_IMMORTAL(result);
|
|
7003
7008
|
}
|
|
7004
7009
|
|
|
7005
7010
|
f = (PYTHON_VERSION < 0x300 ? NULL : PyLong_Type.tp_richcompare);
|
|
@@ -7020,7 +7025,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7020
7025
|
}
|
|
7021
7026
|
}
|
|
7022
7027
|
|
|
7023
|
-
|
|
7028
|
+
Py_DECREF_IMMORTAL(result);
|
|
7024
7029
|
}
|
|
7025
7030
|
|
|
7026
7031
|
int c;
|
|
@@ -7136,11 +7141,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7136
7141
|
}
|
|
7137
7142
|
}
|
|
7138
7143
|
|
|
7139
|
-
|
|
7144
|
+
Py_DECREF_IMMORTAL(result);
|
|
7140
7145
|
}
|
|
7141
7146
|
}
|
|
7142
7147
|
|
|
7143
|
-
f =
|
|
7148
|
+
f = TP_RICHCOMPARE(type1);
|
|
7144
7149
|
|
|
7145
7150
|
if (f != NULL) {
|
|
7146
7151
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -7159,7 +7164,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7159
7164
|
}
|
|
7160
7165
|
}
|
|
7161
7166
|
|
|
7162
|
-
|
|
7167
|
+
Py_DECREF_IMMORTAL(result);
|
|
7163
7168
|
}
|
|
7164
7169
|
|
|
7165
7170
|
if (checked_reverse_op == false) {
|
|
@@ -7182,7 +7187,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LONG(PyObject *operand1, PyObject *oper
|
|
|
7182
7187
|
}
|
|
7183
7188
|
}
|
|
7184
7189
|
|
|
7185
|
-
|
|
7190
|
+
Py_DECREF_IMMORTAL(result);
|
|
7186
7191
|
}
|
|
7187
7192
|
}
|
|
7188
7193
|
|
|
@@ -7258,7 +7263,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7258
7263
|
}
|
|
7259
7264
|
}
|
|
7260
7265
|
|
|
7261
|
-
|
|
7266
|
+
Py_DECREF_IMMORTAL(result);
|
|
7262
7267
|
}
|
|
7263
7268
|
|
|
7264
7269
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7308,7 +7313,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7308
7313
|
richcmpfunc f;
|
|
7309
7314
|
|
|
7310
7315
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7311
|
-
f =
|
|
7316
|
+
f = TP_RICHCOMPARE(type2);
|
|
7312
7317
|
|
|
7313
7318
|
if (f != NULL) {
|
|
7314
7319
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -7327,7 +7332,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7327
7332
|
}
|
|
7328
7333
|
}
|
|
7329
7334
|
|
|
7330
|
-
|
|
7335
|
+
Py_DECREF_IMMORTAL(result);
|
|
7331
7336
|
}
|
|
7332
7337
|
}
|
|
7333
7338
|
|
|
@@ -7349,10 +7354,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7349
7354
|
}
|
|
7350
7355
|
}
|
|
7351
7356
|
|
|
7352
|
-
|
|
7357
|
+
Py_DECREF_IMMORTAL(result);
|
|
7353
7358
|
}
|
|
7354
7359
|
|
|
7355
|
-
f =
|
|
7360
|
+
f = TP_RICHCOMPARE(type2);
|
|
7356
7361
|
if (f != NULL) {
|
|
7357
7362
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
7358
7363
|
|
|
@@ -7370,7 +7375,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7370
7375
|
}
|
|
7371
7376
|
}
|
|
7372
7377
|
|
|
7373
|
-
|
|
7378
|
+
Py_DECREF_IMMORTAL(result);
|
|
7374
7379
|
}
|
|
7375
7380
|
|
|
7376
7381
|
int c;
|
|
@@ -7465,7 +7470,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7465
7470
|
richcmpfunc f;
|
|
7466
7471
|
|
|
7467
7472
|
if (&PyLong_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyLong_Type)) {
|
|
7468
|
-
f =
|
|
7473
|
+
f = TP_RICHCOMPARE(type2);
|
|
7469
7474
|
|
|
7470
7475
|
if (f != NULL) {
|
|
7471
7476
|
checked_reverse_op = true;
|
|
@@ -7486,7 +7491,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7486
7491
|
}
|
|
7487
7492
|
}
|
|
7488
7493
|
|
|
7489
|
-
|
|
7494
|
+
Py_DECREF_IMMORTAL(result);
|
|
7490
7495
|
}
|
|
7491
7496
|
}
|
|
7492
7497
|
|
|
@@ -7509,11 +7514,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7509
7514
|
}
|
|
7510
7515
|
}
|
|
7511
7516
|
|
|
7512
|
-
|
|
7517
|
+
Py_DECREF_IMMORTAL(result);
|
|
7513
7518
|
}
|
|
7514
7519
|
|
|
7515
7520
|
if (checked_reverse_op == false) {
|
|
7516
|
-
f =
|
|
7521
|
+
f = TP_RICHCOMPARE(type2);
|
|
7517
7522
|
|
|
7518
7523
|
if (f != NULL) {
|
|
7519
7524
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -7532,7 +7537,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LONG_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7532
7537
|
}
|
|
7533
7538
|
}
|
|
7534
7539
|
|
|
7535
|
-
|
|
7540
|
+
Py_DECREF_IMMORTAL(result);
|
|
7536
7541
|
}
|
|
7537
7542
|
}
|
|
7538
7543
|
|
|
@@ -7579,7 +7584,7 @@ static PyObject *COMPARE_NE_OBJECT_FLOAT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
7579
7584
|
|
|
7580
7585
|
// Convert to target type.
|
|
7581
7586
|
PyObject *result = BOOL_FROM(r);
|
|
7582
|
-
|
|
7587
|
+
Py_INCREF_IMMORTAL(result);
|
|
7583
7588
|
return result;
|
|
7584
7589
|
}
|
|
7585
7590
|
/* Code referring to "OBJECT" corresponds to any Python object and "FLOAT" to Python 'float'. */
|
|
@@ -7616,7 +7621,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7616
7621
|
return result;
|
|
7617
7622
|
}
|
|
7618
7623
|
|
|
7619
|
-
|
|
7624
|
+
Py_DECREF_IMMORTAL(result);
|
|
7620
7625
|
}
|
|
7621
7626
|
|
|
7622
7627
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7657,7 +7662,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7657
7662
|
|
|
7658
7663
|
bool r = c != 0;
|
|
7659
7664
|
PyObject *result = BOOL_FROM(r);
|
|
7660
|
-
|
|
7665
|
+
Py_INCREF_IMMORTAL(result);
|
|
7661
7666
|
return result;
|
|
7662
7667
|
}
|
|
7663
7668
|
}
|
|
@@ -7677,11 +7682,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7677
7682
|
return result;
|
|
7678
7683
|
}
|
|
7679
7684
|
|
|
7680
|
-
|
|
7685
|
+
Py_DECREF_IMMORTAL(result);
|
|
7681
7686
|
}
|
|
7682
7687
|
}
|
|
7683
7688
|
|
|
7684
|
-
f =
|
|
7689
|
+
f = TP_RICHCOMPARE(type1);
|
|
7685
7690
|
if (f != NULL) {
|
|
7686
7691
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
7687
7692
|
|
|
@@ -7691,7 +7696,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7691
7696
|
return result;
|
|
7692
7697
|
}
|
|
7693
7698
|
|
|
7694
|
-
|
|
7699
|
+
Py_DECREF_IMMORTAL(result);
|
|
7695
7700
|
}
|
|
7696
7701
|
|
|
7697
7702
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -7704,7 +7709,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7704
7709
|
return result;
|
|
7705
7710
|
}
|
|
7706
7711
|
|
|
7707
|
-
|
|
7712
|
+
Py_DECREF_IMMORTAL(result);
|
|
7708
7713
|
}
|
|
7709
7714
|
|
|
7710
7715
|
int c;
|
|
@@ -7792,7 +7797,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7792
7797
|
|
|
7793
7798
|
bool r = c != 0;
|
|
7794
7799
|
PyObject *result = BOOL_FROM(r);
|
|
7795
|
-
|
|
7800
|
+
Py_INCREF_IMMORTAL(result);
|
|
7796
7801
|
return result;
|
|
7797
7802
|
#else
|
|
7798
7803
|
bool checked_reverse_op = false;
|
|
@@ -7812,11 +7817,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7812
7817
|
return result;
|
|
7813
7818
|
}
|
|
7814
7819
|
|
|
7815
|
-
|
|
7820
|
+
Py_DECREF_IMMORTAL(result);
|
|
7816
7821
|
}
|
|
7817
7822
|
}
|
|
7818
7823
|
|
|
7819
|
-
f =
|
|
7824
|
+
f = TP_RICHCOMPARE(type1);
|
|
7820
7825
|
|
|
7821
7826
|
if (f != NULL) {
|
|
7822
7827
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -7827,7 +7832,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7827
7832
|
return result;
|
|
7828
7833
|
}
|
|
7829
7834
|
|
|
7830
|
-
|
|
7835
|
+
Py_DECREF_IMMORTAL(result);
|
|
7831
7836
|
}
|
|
7832
7837
|
|
|
7833
7838
|
if (checked_reverse_op == false) {
|
|
@@ -7842,7 +7847,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7842
7847
|
return result;
|
|
7843
7848
|
}
|
|
7844
7849
|
|
|
7845
|
-
|
|
7850
|
+
Py_DECREF_IMMORTAL(result);
|
|
7846
7851
|
}
|
|
7847
7852
|
}
|
|
7848
7853
|
|
|
@@ -7854,13 +7859,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_FLOAT(PyObject *operand1, PyObject *oper
|
|
|
7854
7859
|
case Py_EQ: {
|
|
7855
7860
|
bool r = operand1 == operand2;
|
|
7856
7861
|
PyObject *result = BOOL_FROM(r);
|
|
7857
|
-
|
|
7862
|
+
Py_INCREF_IMMORTAL(result);
|
|
7858
7863
|
return result;
|
|
7859
7864
|
}
|
|
7860
7865
|
case Py_NE: {
|
|
7861
7866
|
bool r = operand1 != operand2;
|
|
7862
7867
|
PyObject *result = BOOL_FROM(r);
|
|
7863
|
-
|
|
7868
|
+
Py_INCREF_IMMORTAL(result);
|
|
7864
7869
|
return result;
|
|
7865
7870
|
}
|
|
7866
7871
|
default:
|
|
@@ -7908,7 +7913,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7908
7913
|
return result;
|
|
7909
7914
|
}
|
|
7910
7915
|
|
|
7911
|
-
|
|
7916
|
+
Py_DECREF_IMMORTAL(result);
|
|
7912
7917
|
}
|
|
7913
7918
|
|
|
7914
7919
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -7949,7 +7954,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7949
7954
|
|
|
7950
7955
|
bool r = c != 0;
|
|
7951
7956
|
PyObject *result = BOOL_FROM(r);
|
|
7952
|
-
|
|
7957
|
+
Py_INCREF_IMMORTAL(result);
|
|
7953
7958
|
return result;
|
|
7954
7959
|
}
|
|
7955
7960
|
}
|
|
@@ -7958,7 +7963,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7958
7963
|
richcmpfunc f;
|
|
7959
7964
|
|
|
7960
7965
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
7961
|
-
f =
|
|
7966
|
+
f = TP_RICHCOMPARE(type2);
|
|
7962
7967
|
|
|
7963
7968
|
if (f != NULL) {
|
|
7964
7969
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -7969,7 +7974,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7969
7974
|
return result;
|
|
7970
7975
|
}
|
|
7971
7976
|
|
|
7972
|
-
|
|
7977
|
+
Py_DECREF_IMMORTAL(result);
|
|
7973
7978
|
}
|
|
7974
7979
|
}
|
|
7975
7980
|
|
|
@@ -7983,10 +7988,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7983
7988
|
return result;
|
|
7984
7989
|
}
|
|
7985
7990
|
|
|
7986
|
-
|
|
7991
|
+
Py_DECREF_IMMORTAL(result);
|
|
7987
7992
|
}
|
|
7988
7993
|
|
|
7989
|
-
f =
|
|
7994
|
+
f = TP_RICHCOMPARE(type2);
|
|
7990
7995
|
if (f != NULL) {
|
|
7991
7996
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
7992
7997
|
|
|
@@ -7996,7 +8001,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
7996
8001
|
return result;
|
|
7997
8002
|
}
|
|
7998
8003
|
|
|
7999
|
-
|
|
8004
|
+
Py_DECREF_IMMORTAL(result);
|
|
8000
8005
|
}
|
|
8001
8006
|
|
|
8002
8007
|
int c;
|
|
@@ -8084,14 +8089,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8084
8089
|
|
|
8085
8090
|
bool r = c != 0;
|
|
8086
8091
|
PyObject *result = BOOL_FROM(r);
|
|
8087
|
-
|
|
8092
|
+
Py_INCREF_IMMORTAL(result);
|
|
8088
8093
|
return result;
|
|
8089
8094
|
#else
|
|
8090
8095
|
bool checked_reverse_op = false;
|
|
8091
8096
|
richcmpfunc f;
|
|
8092
8097
|
|
|
8093
8098
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8094
|
-
f =
|
|
8099
|
+
f = TP_RICHCOMPARE(type2);
|
|
8095
8100
|
|
|
8096
8101
|
if (f != NULL) {
|
|
8097
8102
|
checked_reverse_op = true;
|
|
@@ -8104,7 +8109,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8104
8109
|
return result;
|
|
8105
8110
|
}
|
|
8106
8111
|
|
|
8107
|
-
|
|
8112
|
+
Py_DECREF_IMMORTAL(result);
|
|
8108
8113
|
}
|
|
8109
8114
|
}
|
|
8110
8115
|
|
|
@@ -8119,11 +8124,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8119
8124
|
return result;
|
|
8120
8125
|
}
|
|
8121
8126
|
|
|
8122
|
-
|
|
8127
|
+
Py_DECREF_IMMORTAL(result);
|
|
8123
8128
|
}
|
|
8124
8129
|
|
|
8125
8130
|
if (checked_reverse_op == false) {
|
|
8126
|
-
f =
|
|
8131
|
+
f = TP_RICHCOMPARE(type2);
|
|
8127
8132
|
|
|
8128
8133
|
if (f != NULL) {
|
|
8129
8134
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -8134,7 +8139,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8134
8139
|
return result;
|
|
8135
8140
|
}
|
|
8136
8141
|
|
|
8137
|
-
|
|
8142
|
+
Py_DECREF_IMMORTAL(result);
|
|
8138
8143
|
}
|
|
8139
8144
|
}
|
|
8140
8145
|
|
|
@@ -8146,13 +8151,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_FLOAT_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
8146
8151
|
case Py_EQ: {
|
|
8147
8152
|
bool r = operand1 == operand2;
|
|
8148
8153
|
PyObject *result = BOOL_FROM(r);
|
|
8149
|
-
|
|
8154
|
+
Py_INCREF_IMMORTAL(result);
|
|
8150
8155
|
return result;
|
|
8151
8156
|
}
|
|
8152
8157
|
case Py_NE: {
|
|
8153
8158
|
bool r = operand1 != operand2;
|
|
8154
8159
|
PyObject *result = BOOL_FROM(r);
|
|
8155
|
-
|
|
8160
|
+
Py_INCREF_IMMORTAL(result);
|
|
8156
8161
|
return result;
|
|
8157
8162
|
}
|
|
8158
8163
|
default:
|
|
@@ -8224,7 +8229,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8224
8229
|
}
|
|
8225
8230
|
}
|
|
8226
8231
|
|
|
8227
|
-
|
|
8232
|
+
Py_DECREF_IMMORTAL(result);
|
|
8228
8233
|
}
|
|
8229
8234
|
|
|
8230
8235
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8293,11 +8298,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8293
8298
|
}
|
|
8294
8299
|
}
|
|
8295
8300
|
|
|
8296
|
-
|
|
8301
|
+
Py_DECREF_IMMORTAL(result);
|
|
8297
8302
|
}
|
|
8298
8303
|
}
|
|
8299
8304
|
|
|
8300
|
-
f =
|
|
8305
|
+
f = TP_RICHCOMPARE(type1);
|
|
8301
8306
|
if (f != NULL) {
|
|
8302
8307
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
8303
8308
|
|
|
@@ -8315,7 +8320,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8315
8320
|
}
|
|
8316
8321
|
}
|
|
8317
8322
|
|
|
8318
|
-
|
|
8323
|
+
Py_DECREF_IMMORTAL(result);
|
|
8319
8324
|
}
|
|
8320
8325
|
|
|
8321
8326
|
f = PyFloat_Type.tp_richcompare;
|
|
@@ -8336,7 +8341,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8336
8341
|
}
|
|
8337
8342
|
}
|
|
8338
8343
|
|
|
8339
|
-
|
|
8344
|
+
Py_DECREF_IMMORTAL(result);
|
|
8340
8345
|
}
|
|
8341
8346
|
|
|
8342
8347
|
int c;
|
|
@@ -8452,11 +8457,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8452
8457
|
}
|
|
8453
8458
|
}
|
|
8454
8459
|
|
|
8455
|
-
|
|
8460
|
+
Py_DECREF_IMMORTAL(result);
|
|
8456
8461
|
}
|
|
8457
8462
|
}
|
|
8458
8463
|
|
|
8459
|
-
f =
|
|
8464
|
+
f = TP_RICHCOMPARE(type1);
|
|
8460
8465
|
|
|
8461
8466
|
if (f != NULL) {
|
|
8462
8467
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -8475,7 +8480,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8475
8480
|
}
|
|
8476
8481
|
}
|
|
8477
8482
|
|
|
8478
|
-
|
|
8483
|
+
Py_DECREF_IMMORTAL(result);
|
|
8479
8484
|
}
|
|
8480
8485
|
|
|
8481
8486
|
if (checked_reverse_op == false) {
|
|
@@ -8498,7 +8503,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_FLOAT(PyObject *operand1, PyObject *ope
|
|
|
8498
8503
|
}
|
|
8499
8504
|
}
|
|
8500
8505
|
|
|
8501
|
-
|
|
8506
|
+
Py_DECREF_IMMORTAL(result);
|
|
8502
8507
|
}
|
|
8503
8508
|
}
|
|
8504
8509
|
|
|
@@ -8572,7 +8577,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8572
8577
|
}
|
|
8573
8578
|
}
|
|
8574
8579
|
|
|
8575
|
-
|
|
8580
|
+
Py_DECREF_IMMORTAL(result);
|
|
8576
8581
|
}
|
|
8577
8582
|
|
|
8578
8583
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -8622,7 +8627,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8622
8627
|
richcmpfunc f;
|
|
8623
8628
|
|
|
8624
8629
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8625
|
-
f =
|
|
8630
|
+
f = TP_RICHCOMPARE(type2);
|
|
8626
8631
|
|
|
8627
8632
|
if (f != NULL) {
|
|
8628
8633
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -8641,7 +8646,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8641
8646
|
}
|
|
8642
8647
|
}
|
|
8643
8648
|
|
|
8644
|
-
|
|
8649
|
+
Py_DECREF_IMMORTAL(result);
|
|
8645
8650
|
}
|
|
8646
8651
|
}
|
|
8647
8652
|
|
|
@@ -8663,10 +8668,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8663
8668
|
}
|
|
8664
8669
|
}
|
|
8665
8670
|
|
|
8666
|
-
|
|
8671
|
+
Py_DECREF_IMMORTAL(result);
|
|
8667
8672
|
}
|
|
8668
8673
|
|
|
8669
|
-
f =
|
|
8674
|
+
f = TP_RICHCOMPARE(type2);
|
|
8670
8675
|
if (f != NULL) {
|
|
8671
8676
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
8672
8677
|
|
|
@@ -8684,7 +8689,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8684
8689
|
}
|
|
8685
8690
|
}
|
|
8686
8691
|
|
|
8687
|
-
|
|
8692
|
+
Py_DECREF_IMMORTAL(result);
|
|
8688
8693
|
}
|
|
8689
8694
|
|
|
8690
8695
|
int c;
|
|
@@ -8779,7 +8784,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8779
8784
|
richcmpfunc f;
|
|
8780
8785
|
|
|
8781
8786
|
if (&PyFloat_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyFloat_Type)) {
|
|
8782
|
-
f =
|
|
8787
|
+
f = TP_RICHCOMPARE(type2);
|
|
8783
8788
|
|
|
8784
8789
|
if (f != NULL) {
|
|
8785
8790
|
checked_reverse_op = true;
|
|
@@ -8800,7 +8805,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8800
8805
|
}
|
|
8801
8806
|
}
|
|
8802
8807
|
|
|
8803
|
-
|
|
8808
|
+
Py_DECREF_IMMORTAL(result);
|
|
8804
8809
|
}
|
|
8805
8810
|
}
|
|
8806
8811
|
|
|
@@ -8823,11 +8828,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8823
8828
|
}
|
|
8824
8829
|
}
|
|
8825
8830
|
|
|
8826
|
-
|
|
8831
|
+
Py_DECREF_IMMORTAL(result);
|
|
8827
8832
|
}
|
|
8828
8833
|
|
|
8829
8834
|
if (checked_reverse_op == false) {
|
|
8830
|
-
f =
|
|
8835
|
+
f = TP_RICHCOMPARE(type2);
|
|
8831
8836
|
|
|
8832
8837
|
if (f != NULL) {
|
|
8833
8838
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -8846,7 +8851,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_FLOAT_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
8846
8851
|
}
|
|
8847
8852
|
}
|
|
8848
8853
|
|
|
8849
|
-
|
|
8854
|
+
Py_DECREF_IMMORTAL(result);
|
|
8850
8855
|
}
|
|
8851
8856
|
}
|
|
8852
8857
|
|
|
@@ -8895,7 +8900,7 @@ static PyObject *COMPARE_NE_OBJECT_TUPLE_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
8895
8900
|
|
|
8896
8901
|
// Convert to target type.
|
|
8897
8902
|
PyObject *result = BOOL_FROM(r);
|
|
8898
|
-
|
|
8903
|
+
Py_INCREF_IMMORTAL(result);
|
|
8899
8904
|
return result;
|
|
8900
8905
|
}
|
|
8901
8906
|
|
|
@@ -8925,7 +8930,7 @@ static PyObject *COMPARE_NE_OBJECT_TUPLE_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
8925
8930
|
|
|
8926
8931
|
// Convert to target type.
|
|
8927
8932
|
PyObject *result = BOOL_FROM(r);
|
|
8928
|
-
|
|
8933
|
+
Py_INCREF_IMMORTAL(result);
|
|
8929
8934
|
return result;
|
|
8930
8935
|
}
|
|
8931
8936
|
/* Code referring to "OBJECT" corresponds to any Python object and "TUPLE" to Python 'tuple'. */
|
|
@@ -8962,7 +8967,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
8962
8967
|
return result;
|
|
8963
8968
|
}
|
|
8964
8969
|
|
|
8965
|
-
|
|
8970
|
+
Py_DECREF_IMMORTAL(result);
|
|
8966
8971
|
}
|
|
8967
8972
|
|
|
8968
8973
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9003,7 +9008,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9003
9008
|
|
|
9004
9009
|
bool r = c != 0;
|
|
9005
9010
|
PyObject *result = BOOL_FROM(r);
|
|
9006
|
-
|
|
9011
|
+
Py_INCREF_IMMORTAL(result);
|
|
9007
9012
|
return result;
|
|
9008
9013
|
}
|
|
9009
9014
|
}
|
|
@@ -9023,11 +9028,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9023
9028
|
return result;
|
|
9024
9029
|
}
|
|
9025
9030
|
|
|
9026
|
-
|
|
9031
|
+
Py_DECREF_IMMORTAL(result);
|
|
9027
9032
|
}
|
|
9028
9033
|
}
|
|
9029
9034
|
|
|
9030
|
-
f =
|
|
9035
|
+
f = TP_RICHCOMPARE(type1);
|
|
9031
9036
|
if (f != NULL) {
|
|
9032
9037
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
9033
9038
|
|
|
@@ -9037,7 +9042,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9037
9042
|
return result;
|
|
9038
9043
|
}
|
|
9039
9044
|
|
|
9040
|
-
|
|
9045
|
+
Py_DECREF_IMMORTAL(result);
|
|
9041
9046
|
}
|
|
9042
9047
|
|
|
9043
9048
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -9050,7 +9055,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9050
9055
|
return result;
|
|
9051
9056
|
}
|
|
9052
9057
|
|
|
9053
|
-
|
|
9058
|
+
Py_DECREF_IMMORTAL(result);
|
|
9054
9059
|
}
|
|
9055
9060
|
|
|
9056
9061
|
int c;
|
|
@@ -9138,7 +9143,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9138
9143
|
|
|
9139
9144
|
bool r = c != 0;
|
|
9140
9145
|
PyObject *result = BOOL_FROM(r);
|
|
9141
|
-
|
|
9146
|
+
Py_INCREF_IMMORTAL(result);
|
|
9142
9147
|
return result;
|
|
9143
9148
|
#else
|
|
9144
9149
|
bool checked_reverse_op = false;
|
|
@@ -9158,11 +9163,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9158
9163
|
return result;
|
|
9159
9164
|
}
|
|
9160
9165
|
|
|
9161
|
-
|
|
9166
|
+
Py_DECREF_IMMORTAL(result);
|
|
9162
9167
|
}
|
|
9163
9168
|
}
|
|
9164
9169
|
|
|
9165
|
-
f =
|
|
9170
|
+
f = TP_RICHCOMPARE(type1);
|
|
9166
9171
|
|
|
9167
9172
|
if (f != NULL) {
|
|
9168
9173
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -9173,7 +9178,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9173
9178
|
return result;
|
|
9174
9179
|
}
|
|
9175
9180
|
|
|
9176
|
-
|
|
9181
|
+
Py_DECREF_IMMORTAL(result);
|
|
9177
9182
|
}
|
|
9178
9183
|
|
|
9179
9184
|
if (checked_reverse_op == false) {
|
|
@@ -9188,7 +9193,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9188
9193
|
return result;
|
|
9189
9194
|
}
|
|
9190
9195
|
|
|
9191
|
-
|
|
9196
|
+
Py_DECREF_IMMORTAL(result);
|
|
9192
9197
|
}
|
|
9193
9198
|
}
|
|
9194
9199
|
|
|
@@ -9200,13 +9205,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_TUPLE(PyObject *operand1, PyObject *oper
|
|
|
9200
9205
|
case Py_EQ: {
|
|
9201
9206
|
bool r = operand1 == operand2;
|
|
9202
9207
|
PyObject *result = BOOL_FROM(r);
|
|
9203
|
-
|
|
9208
|
+
Py_INCREF_IMMORTAL(result);
|
|
9204
9209
|
return result;
|
|
9205
9210
|
}
|
|
9206
9211
|
case Py_NE: {
|
|
9207
9212
|
bool r = operand1 != operand2;
|
|
9208
9213
|
PyObject *result = BOOL_FROM(r);
|
|
9209
|
-
|
|
9214
|
+
Py_INCREF_IMMORTAL(result);
|
|
9210
9215
|
return result;
|
|
9211
9216
|
}
|
|
9212
9217
|
default:
|
|
@@ -9254,7 +9259,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9254
9259
|
return result;
|
|
9255
9260
|
}
|
|
9256
9261
|
|
|
9257
|
-
|
|
9262
|
+
Py_DECREF_IMMORTAL(result);
|
|
9258
9263
|
}
|
|
9259
9264
|
|
|
9260
9265
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9295,7 +9300,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9295
9300
|
|
|
9296
9301
|
bool r = c != 0;
|
|
9297
9302
|
PyObject *result = BOOL_FROM(r);
|
|
9298
|
-
|
|
9303
|
+
Py_INCREF_IMMORTAL(result);
|
|
9299
9304
|
return result;
|
|
9300
9305
|
}
|
|
9301
9306
|
}
|
|
@@ -9304,7 +9309,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9304
9309
|
richcmpfunc f;
|
|
9305
9310
|
|
|
9306
9311
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9307
|
-
f =
|
|
9312
|
+
f = TP_RICHCOMPARE(type2);
|
|
9308
9313
|
|
|
9309
9314
|
if (f != NULL) {
|
|
9310
9315
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -9315,7 +9320,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9315
9320
|
return result;
|
|
9316
9321
|
}
|
|
9317
9322
|
|
|
9318
|
-
|
|
9323
|
+
Py_DECREF_IMMORTAL(result);
|
|
9319
9324
|
}
|
|
9320
9325
|
}
|
|
9321
9326
|
|
|
@@ -9329,10 +9334,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9329
9334
|
return result;
|
|
9330
9335
|
}
|
|
9331
9336
|
|
|
9332
|
-
|
|
9337
|
+
Py_DECREF_IMMORTAL(result);
|
|
9333
9338
|
}
|
|
9334
9339
|
|
|
9335
|
-
f =
|
|
9340
|
+
f = TP_RICHCOMPARE(type2);
|
|
9336
9341
|
if (f != NULL) {
|
|
9337
9342
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
9338
9343
|
|
|
@@ -9342,7 +9347,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9342
9347
|
return result;
|
|
9343
9348
|
}
|
|
9344
9349
|
|
|
9345
|
-
|
|
9350
|
+
Py_DECREF_IMMORTAL(result);
|
|
9346
9351
|
}
|
|
9347
9352
|
|
|
9348
9353
|
int c;
|
|
@@ -9430,14 +9435,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9430
9435
|
|
|
9431
9436
|
bool r = c != 0;
|
|
9432
9437
|
PyObject *result = BOOL_FROM(r);
|
|
9433
|
-
|
|
9438
|
+
Py_INCREF_IMMORTAL(result);
|
|
9434
9439
|
return result;
|
|
9435
9440
|
#else
|
|
9436
9441
|
bool checked_reverse_op = false;
|
|
9437
9442
|
richcmpfunc f;
|
|
9438
9443
|
|
|
9439
9444
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
9440
|
-
f =
|
|
9445
|
+
f = TP_RICHCOMPARE(type2);
|
|
9441
9446
|
|
|
9442
9447
|
if (f != NULL) {
|
|
9443
9448
|
checked_reverse_op = true;
|
|
@@ -9450,7 +9455,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9450
9455
|
return result;
|
|
9451
9456
|
}
|
|
9452
9457
|
|
|
9453
|
-
|
|
9458
|
+
Py_DECREF_IMMORTAL(result);
|
|
9454
9459
|
}
|
|
9455
9460
|
}
|
|
9456
9461
|
|
|
@@ -9465,11 +9470,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9465
9470
|
return result;
|
|
9466
9471
|
}
|
|
9467
9472
|
|
|
9468
|
-
|
|
9473
|
+
Py_DECREF_IMMORTAL(result);
|
|
9469
9474
|
}
|
|
9470
9475
|
|
|
9471
9476
|
if (checked_reverse_op == false) {
|
|
9472
|
-
f =
|
|
9477
|
+
f = TP_RICHCOMPARE(type2);
|
|
9473
9478
|
|
|
9474
9479
|
if (f != NULL) {
|
|
9475
9480
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -9480,7 +9485,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9480
9485
|
return result;
|
|
9481
9486
|
}
|
|
9482
9487
|
|
|
9483
|
-
|
|
9488
|
+
Py_DECREF_IMMORTAL(result);
|
|
9484
9489
|
}
|
|
9485
9490
|
}
|
|
9486
9491
|
|
|
@@ -9492,13 +9497,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_TUPLE_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
9492
9497
|
case Py_EQ: {
|
|
9493
9498
|
bool r = operand1 == operand2;
|
|
9494
9499
|
PyObject *result = BOOL_FROM(r);
|
|
9495
|
-
|
|
9500
|
+
Py_INCREF_IMMORTAL(result);
|
|
9496
9501
|
return result;
|
|
9497
9502
|
}
|
|
9498
9503
|
case Py_NE: {
|
|
9499
9504
|
bool r = operand1 != operand2;
|
|
9500
9505
|
PyObject *result = BOOL_FROM(r);
|
|
9501
|
-
|
|
9506
|
+
Py_INCREF_IMMORTAL(result);
|
|
9502
9507
|
return result;
|
|
9503
9508
|
}
|
|
9504
9509
|
default:
|
|
@@ -9610,7 +9615,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9610
9615
|
}
|
|
9611
9616
|
}
|
|
9612
9617
|
|
|
9613
|
-
|
|
9618
|
+
Py_DECREF_IMMORTAL(result);
|
|
9614
9619
|
}
|
|
9615
9620
|
|
|
9616
9621
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -9679,11 +9684,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9679
9684
|
}
|
|
9680
9685
|
}
|
|
9681
9686
|
|
|
9682
|
-
|
|
9687
|
+
Py_DECREF_IMMORTAL(result);
|
|
9683
9688
|
}
|
|
9684
9689
|
}
|
|
9685
9690
|
|
|
9686
|
-
f =
|
|
9691
|
+
f = TP_RICHCOMPARE(type1);
|
|
9687
9692
|
if (f != NULL) {
|
|
9688
9693
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
9689
9694
|
|
|
@@ -9701,7 +9706,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9701
9706
|
}
|
|
9702
9707
|
}
|
|
9703
9708
|
|
|
9704
|
-
|
|
9709
|
+
Py_DECREF_IMMORTAL(result);
|
|
9705
9710
|
}
|
|
9706
9711
|
|
|
9707
9712
|
f = PyTuple_Type.tp_richcompare;
|
|
@@ -9722,7 +9727,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9722
9727
|
}
|
|
9723
9728
|
}
|
|
9724
9729
|
|
|
9725
|
-
|
|
9730
|
+
Py_DECREF_IMMORTAL(result);
|
|
9726
9731
|
}
|
|
9727
9732
|
|
|
9728
9733
|
int c;
|
|
@@ -9838,11 +9843,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9838
9843
|
}
|
|
9839
9844
|
}
|
|
9840
9845
|
|
|
9841
|
-
|
|
9846
|
+
Py_DECREF_IMMORTAL(result);
|
|
9842
9847
|
}
|
|
9843
9848
|
}
|
|
9844
9849
|
|
|
9845
|
-
f =
|
|
9850
|
+
f = TP_RICHCOMPARE(type1);
|
|
9846
9851
|
|
|
9847
9852
|
if (f != NULL) {
|
|
9848
9853
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -9861,7 +9866,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9861
9866
|
}
|
|
9862
9867
|
}
|
|
9863
9868
|
|
|
9864
|
-
|
|
9869
|
+
Py_DECREF_IMMORTAL(result);
|
|
9865
9870
|
}
|
|
9866
9871
|
|
|
9867
9872
|
if (checked_reverse_op == false) {
|
|
@@ -9884,7 +9889,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(PyObject *operand1, PyObject *ope
|
|
|
9884
9889
|
}
|
|
9885
9890
|
}
|
|
9886
9891
|
|
|
9887
|
-
|
|
9892
|
+
Py_DECREF_IMMORTAL(result);
|
|
9888
9893
|
}
|
|
9889
9894
|
}
|
|
9890
9895
|
|
|
@@ -9958,7 +9963,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
9958
9963
|
}
|
|
9959
9964
|
}
|
|
9960
9965
|
|
|
9961
|
-
|
|
9966
|
+
Py_DECREF_IMMORTAL(result);
|
|
9962
9967
|
}
|
|
9963
9968
|
|
|
9964
9969
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10008,7 +10013,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10008
10013
|
richcmpfunc f;
|
|
10009
10014
|
|
|
10010
10015
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
10011
|
-
f =
|
|
10016
|
+
f = TP_RICHCOMPARE(type2);
|
|
10012
10017
|
|
|
10013
10018
|
if (f != NULL) {
|
|
10014
10019
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -10027,7 +10032,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10027
10032
|
}
|
|
10028
10033
|
}
|
|
10029
10034
|
|
|
10030
|
-
|
|
10035
|
+
Py_DECREF_IMMORTAL(result);
|
|
10031
10036
|
}
|
|
10032
10037
|
}
|
|
10033
10038
|
|
|
@@ -10049,10 +10054,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10049
10054
|
}
|
|
10050
10055
|
}
|
|
10051
10056
|
|
|
10052
|
-
|
|
10057
|
+
Py_DECREF_IMMORTAL(result);
|
|
10053
10058
|
}
|
|
10054
10059
|
|
|
10055
|
-
f =
|
|
10060
|
+
f = TP_RICHCOMPARE(type2);
|
|
10056
10061
|
if (f != NULL) {
|
|
10057
10062
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
10058
10063
|
|
|
@@ -10070,7 +10075,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10070
10075
|
}
|
|
10071
10076
|
}
|
|
10072
10077
|
|
|
10073
|
-
|
|
10078
|
+
Py_DECREF_IMMORTAL(result);
|
|
10074
10079
|
}
|
|
10075
10080
|
|
|
10076
10081
|
int c;
|
|
@@ -10165,7 +10170,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10165
10170
|
richcmpfunc f;
|
|
10166
10171
|
|
|
10167
10172
|
if (&PyTuple_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyTuple_Type)) {
|
|
10168
|
-
f =
|
|
10173
|
+
f = TP_RICHCOMPARE(type2);
|
|
10169
10174
|
|
|
10170
10175
|
if (f != NULL) {
|
|
10171
10176
|
checked_reverse_op = true;
|
|
@@ -10186,7 +10191,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10186
10191
|
}
|
|
10187
10192
|
}
|
|
10188
10193
|
|
|
10189
|
-
|
|
10194
|
+
Py_DECREF_IMMORTAL(result);
|
|
10190
10195
|
}
|
|
10191
10196
|
}
|
|
10192
10197
|
|
|
@@ -10209,11 +10214,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10209
10214
|
}
|
|
10210
10215
|
}
|
|
10211
10216
|
|
|
10212
|
-
|
|
10217
|
+
Py_DECREF_IMMORTAL(result);
|
|
10213
10218
|
}
|
|
10214
10219
|
|
|
10215
10220
|
if (checked_reverse_op == false) {
|
|
10216
|
-
f =
|
|
10221
|
+
f = TP_RICHCOMPARE(type2);
|
|
10217
10222
|
|
|
10218
10223
|
if (f != NULL) {
|
|
10219
10224
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -10232,7 +10237,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_TUPLE_OBJECT(PyObject *operand1, PyObject *ope
|
|
|
10232
10237
|
}
|
|
10233
10238
|
}
|
|
10234
10239
|
|
|
10235
|
-
|
|
10240
|
+
Py_DECREF_IMMORTAL(result);
|
|
10236
10241
|
}
|
|
10237
10242
|
}
|
|
10238
10243
|
|
|
@@ -10279,22 +10284,19 @@ static PyObject *COMPARE_NE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10279
10284
|
PyListObject *a = (PyListObject *)operand1;
|
|
10280
10285
|
PyListObject *b = (PyListObject *)operand2;
|
|
10281
10286
|
|
|
10282
|
-
|
|
10283
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10284
|
-
|
|
10285
|
-
if (len_a != len_b) {
|
|
10287
|
+
if (Py_SIZE(a) != Py_SIZE(b)) {
|
|
10286
10288
|
bool r = true;
|
|
10287
10289
|
|
|
10288
10290
|
// Convert to target type.
|
|
10289
10291
|
PyObject *result = BOOL_FROM(r);
|
|
10290
|
-
|
|
10292
|
+
Py_INCREF_IMMORTAL(result);
|
|
10291
10293
|
return result;
|
|
10292
10294
|
}
|
|
10293
10295
|
|
|
10294
10296
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10295
10297
|
|
|
10296
10298
|
Py_ssize_t i;
|
|
10297
|
-
for (i = 0; i <
|
|
10299
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10298
10300
|
PyObject *aa = a->ob_item[i];
|
|
10299
10301
|
PyObject *bb = b->ob_item[i];
|
|
10300
10302
|
|
|
@@ -10302,7 +10304,11 @@ static PyObject *COMPARE_NE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10302
10304
|
continue;
|
|
10303
10305
|
}
|
|
10304
10306
|
|
|
10307
|
+
Py_INCREF(aa);
|
|
10308
|
+
Py_INCREF(bb);
|
|
10305
10309
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10310
|
+
Py_DECREF(aa);
|
|
10311
|
+
Py_DECREF(bb);
|
|
10306
10312
|
|
|
10307
10313
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10308
10314
|
return NULL;
|
|
@@ -10313,11 +10319,17 @@ static PyObject *COMPARE_NE_OBJECT_LIST_LIST(PyObject *operand1, PyObject *opera
|
|
|
10313
10319
|
}
|
|
10314
10320
|
}
|
|
10315
10321
|
|
|
10316
|
-
bool r
|
|
10322
|
+
bool r;
|
|
10323
|
+
|
|
10324
|
+
if (i >= Py_SIZE(a) || i >= Py_SIZE(b)) {
|
|
10325
|
+
r = Py_SIZE(a) != Py_SIZE(b);
|
|
10326
|
+
} else {
|
|
10327
|
+
r = res == NUITKA_BOOL_FALSE;
|
|
10328
|
+
}
|
|
10317
10329
|
|
|
10318
10330
|
// Convert to target type.
|
|
10319
10331
|
PyObject *result = BOOL_FROM(r);
|
|
10320
|
-
|
|
10332
|
+
Py_INCREF_IMMORTAL(result);
|
|
10321
10333
|
return result;
|
|
10322
10334
|
}
|
|
10323
10335
|
/* Code referring to "OBJECT" corresponds to any Python object and "LIST" to Python 'list'. */
|
|
@@ -10354,7 +10366,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10354
10366
|
return result;
|
|
10355
10367
|
}
|
|
10356
10368
|
|
|
10357
|
-
|
|
10369
|
+
Py_DECREF_IMMORTAL(result);
|
|
10358
10370
|
}
|
|
10359
10371
|
|
|
10360
10372
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10395,7 +10407,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10395
10407
|
|
|
10396
10408
|
bool r = c != 0;
|
|
10397
10409
|
PyObject *result = BOOL_FROM(r);
|
|
10398
|
-
|
|
10410
|
+
Py_INCREF_IMMORTAL(result);
|
|
10399
10411
|
return result;
|
|
10400
10412
|
}
|
|
10401
10413
|
}
|
|
@@ -10415,11 +10427,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10415
10427
|
return result;
|
|
10416
10428
|
}
|
|
10417
10429
|
|
|
10418
|
-
|
|
10430
|
+
Py_DECREF_IMMORTAL(result);
|
|
10419
10431
|
}
|
|
10420
10432
|
}
|
|
10421
10433
|
|
|
10422
|
-
f =
|
|
10434
|
+
f = TP_RICHCOMPARE(type1);
|
|
10423
10435
|
if (f != NULL) {
|
|
10424
10436
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
10425
10437
|
|
|
@@ -10429,7 +10441,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10429
10441
|
return result;
|
|
10430
10442
|
}
|
|
10431
10443
|
|
|
10432
|
-
|
|
10444
|
+
Py_DECREF_IMMORTAL(result);
|
|
10433
10445
|
}
|
|
10434
10446
|
|
|
10435
10447
|
f = PyList_Type.tp_richcompare;
|
|
@@ -10442,7 +10454,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10442
10454
|
return result;
|
|
10443
10455
|
}
|
|
10444
10456
|
|
|
10445
|
-
|
|
10457
|
+
Py_DECREF_IMMORTAL(result);
|
|
10446
10458
|
}
|
|
10447
10459
|
|
|
10448
10460
|
int c;
|
|
@@ -10530,7 +10542,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10530
10542
|
|
|
10531
10543
|
bool r = c != 0;
|
|
10532
10544
|
PyObject *result = BOOL_FROM(r);
|
|
10533
|
-
|
|
10545
|
+
Py_INCREF_IMMORTAL(result);
|
|
10534
10546
|
return result;
|
|
10535
10547
|
#else
|
|
10536
10548
|
bool checked_reverse_op = false;
|
|
@@ -10550,11 +10562,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10550
10562
|
return result;
|
|
10551
10563
|
}
|
|
10552
10564
|
|
|
10553
|
-
|
|
10565
|
+
Py_DECREF_IMMORTAL(result);
|
|
10554
10566
|
}
|
|
10555
10567
|
}
|
|
10556
10568
|
|
|
10557
|
-
f =
|
|
10569
|
+
f = TP_RICHCOMPARE(type1);
|
|
10558
10570
|
|
|
10559
10571
|
if (f != NULL) {
|
|
10560
10572
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -10565,7 +10577,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10565
10577
|
return result;
|
|
10566
10578
|
}
|
|
10567
10579
|
|
|
10568
|
-
|
|
10580
|
+
Py_DECREF_IMMORTAL(result);
|
|
10569
10581
|
}
|
|
10570
10582
|
|
|
10571
10583
|
if (checked_reverse_op == false) {
|
|
@@ -10580,7 +10592,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10580
10592
|
return result;
|
|
10581
10593
|
}
|
|
10582
10594
|
|
|
10583
|
-
|
|
10595
|
+
Py_DECREF_IMMORTAL(result);
|
|
10584
10596
|
}
|
|
10585
10597
|
}
|
|
10586
10598
|
|
|
@@ -10592,13 +10604,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_OBJECT_LIST(PyObject *operand1, PyObject *opera
|
|
|
10592
10604
|
case Py_EQ: {
|
|
10593
10605
|
bool r = operand1 == operand2;
|
|
10594
10606
|
PyObject *result = BOOL_FROM(r);
|
|
10595
|
-
|
|
10607
|
+
Py_INCREF_IMMORTAL(result);
|
|
10596
10608
|
return result;
|
|
10597
10609
|
}
|
|
10598
10610
|
case Py_NE: {
|
|
10599
10611
|
bool r = operand1 != operand2;
|
|
10600
10612
|
PyObject *result = BOOL_FROM(r);
|
|
10601
|
-
|
|
10613
|
+
Py_INCREF_IMMORTAL(result);
|
|
10602
10614
|
return result;
|
|
10603
10615
|
}
|
|
10604
10616
|
default:
|
|
@@ -10646,7 +10658,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10646
10658
|
return result;
|
|
10647
10659
|
}
|
|
10648
10660
|
|
|
10649
|
-
|
|
10661
|
+
Py_DECREF_IMMORTAL(result);
|
|
10650
10662
|
}
|
|
10651
10663
|
|
|
10652
10664
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -10687,7 +10699,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10687
10699
|
|
|
10688
10700
|
bool r = c != 0;
|
|
10689
10701
|
PyObject *result = BOOL_FROM(r);
|
|
10690
|
-
|
|
10702
|
+
Py_INCREF_IMMORTAL(result);
|
|
10691
10703
|
return result;
|
|
10692
10704
|
}
|
|
10693
10705
|
}
|
|
@@ -10696,7 +10708,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10696
10708
|
richcmpfunc f;
|
|
10697
10709
|
|
|
10698
10710
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10699
|
-
f =
|
|
10711
|
+
f = TP_RICHCOMPARE(type2);
|
|
10700
10712
|
|
|
10701
10713
|
if (f != NULL) {
|
|
10702
10714
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -10707,7 +10719,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10707
10719
|
return result;
|
|
10708
10720
|
}
|
|
10709
10721
|
|
|
10710
|
-
|
|
10722
|
+
Py_DECREF_IMMORTAL(result);
|
|
10711
10723
|
}
|
|
10712
10724
|
}
|
|
10713
10725
|
|
|
@@ -10721,10 +10733,10 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10721
10733
|
return result;
|
|
10722
10734
|
}
|
|
10723
10735
|
|
|
10724
|
-
|
|
10736
|
+
Py_DECREF_IMMORTAL(result);
|
|
10725
10737
|
}
|
|
10726
10738
|
|
|
10727
|
-
f =
|
|
10739
|
+
f = TP_RICHCOMPARE(type2);
|
|
10728
10740
|
if (f != NULL) {
|
|
10729
10741
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
10730
10742
|
|
|
@@ -10734,7 +10746,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10734
10746
|
return result;
|
|
10735
10747
|
}
|
|
10736
10748
|
|
|
10737
|
-
|
|
10749
|
+
Py_DECREF_IMMORTAL(result);
|
|
10738
10750
|
}
|
|
10739
10751
|
|
|
10740
10752
|
int c;
|
|
@@ -10822,14 +10834,14 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10822
10834
|
|
|
10823
10835
|
bool r = c != 0;
|
|
10824
10836
|
PyObject *result = BOOL_FROM(r);
|
|
10825
|
-
|
|
10837
|
+
Py_INCREF_IMMORTAL(result);
|
|
10826
10838
|
return result;
|
|
10827
10839
|
#else
|
|
10828
10840
|
bool checked_reverse_op = false;
|
|
10829
10841
|
richcmpfunc f;
|
|
10830
10842
|
|
|
10831
10843
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
10832
|
-
f =
|
|
10844
|
+
f = TP_RICHCOMPARE(type2);
|
|
10833
10845
|
|
|
10834
10846
|
if (f != NULL) {
|
|
10835
10847
|
checked_reverse_op = true;
|
|
@@ -10842,7 +10854,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10842
10854
|
return result;
|
|
10843
10855
|
}
|
|
10844
10856
|
|
|
10845
|
-
|
|
10857
|
+
Py_DECREF_IMMORTAL(result);
|
|
10846
10858
|
}
|
|
10847
10859
|
}
|
|
10848
10860
|
|
|
@@ -10857,11 +10869,11 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10857
10869
|
return result;
|
|
10858
10870
|
}
|
|
10859
10871
|
|
|
10860
|
-
|
|
10872
|
+
Py_DECREF_IMMORTAL(result);
|
|
10861
10873
|
}
|
|
10862
10874
|
|
|
10863
10875
|
if (checked_reverse_op == false) {
|
|
10864
|
-
f =
|
|
10876
|
+
f = TP_RICHCOMPARE(type2);
|
|
10865
10877
|
|
|
10866
10878
|
if (f != NULL) {
|
|
10867
10879
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -10872,7 +10884,7 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10872
10884
|
return result;
|
|
10873
10885
|
}
|
|
10874
10886
|
|
|
10875
|
-
|
|
10887
|
+
Py_DECREF_IMMORTAL(result);
|
|
10876
10888
|
}
|
|
10877
10889
|
}
|
|
10878
10890
|
|
|
@@ -10884,13 +10896,13 @@ PyObject *RICH_COMPARE_NE_OBJECT_LIST_OBJECT(PyObject *operand1, PyObject *opera
|
|
|
10884
10896
|
case Py_EQ: {
|
|
10885
10897
|
bool r = operand1 == operand2;
|
|
10886
10898
|
PyObject *result = BOOL_FROM(r);
|
|
10887
|
-
|
|
10899
|
+
Py_INCREF_IMMORTAL(result);
|
|
10888
10900
|
return result;
|
|
10889
10901
|
}
|
|
10890
10902
|
case Py_NE: {
|
|
10891
10903
|
bool r = operand1 != operand2;
|
|
10892
10904
|
PyObject *result = BOOL_FROM(r);
|
|
10893
|
-
|
|
10905
|
+
Py_INCREF_IMMORTAL(result);
|
|
10894
10906
|
return result;
|
|
10895
10907
|
}
|
|
10896
10908
|
default:
|
|
@@ -10919,10 +10931,7 @@ static nuitka_bool COMPARE_NE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10919
10931
|
PyListObject *a = (PyListObject *)operand1;
|
|
10920
10932
|
PyListObject *b = (PyListObject *)operand2;
|
|
10921
10933
|
|
|
10922
|
-
|
|
10923
|
-
Py_ssize_t len_b = Py_SIZE(b);
|
|
10924
|
-
|
|
10925
|
-
if (len_a != len_b) {
|
|
10934
|
+
if (Py_SIZE(a) != Py_SIZE(b)) {
|
|
10926
10935
|
bool r = true;
|
|
10927
10936
|
|
|
10928
10937
|
// Convert to target type.
|
|
@@ -10934,7 +10943,7 @@ static nuitka_bool COMPARE_NE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10934
10943
|
nuitka_bool res = NUITKA_BOOL_TRUE;
|
|
10935
10944
|
|
|
10936
10945
|
Py_ssize_t i;
|
|
10937
|
-
for (i = 0; i <
|
|
10946
|
+
for (i = 0; i < Py_SIZE(a) && i < Py_SIZE(b); i++) {
|
|
10938
10947
|
PyObject *aa = a->ob_item[i];
|
|
10939
10948
|
PyObject *bb = b->ob_item[i];
|
|
10940
10949
|
|
|
@@ -10942,7 +10951,11 @@ static nuitka_bool COMPARE_NE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10942
10951
|
continue;
|
|
10943
10952
|
}
|
|
10944
10953
|
|
|
10954
|
+
Py_INCREF(aa);
|
|
10955
|
+
Py_INCREF(bb);
|
|
10945
10956
|
res = RICH_COMPARE_EQ_NBOOL_OBJECT_OBJECT(aa, bb);
|
|
10957
|
+
Py_DECREF(aa);
|
|
10958
|
+
Py_DECREF(bb);
|
|
10946
10959
|
|
|
10947
10960
|
if (res == NUITKA_BOOL_EXCEPTION) {
|
|
10948
10961
|
return NUITKA_BOOL_EXCEPTION;
|
|
@@ -10953,7 +10966,13 @@ static nuitka_bool COMPARE_NE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *oper
|
|
|
10953
10966
|
}
|
|
10954
10967
|
}
|
|
10955
10968
|
|
|
10956
|
-
bool r
|
|
10969
|
+
bool r;
|
|
10970
|
+
|
|
10971
|
+
if (i >= Py_SIZE(a) || i >= Py_SIZE(b)) {
|
|
10972
|
+
r = Py_SIZE(a) != Py_SIZE(b);
|
|
10973
|
+
} else {
|
|
10974
|
+
r = res == NUITKA_BOOL_FALSE;
|
|
10975
|
+
}
|
|
10957
10976
|
|
|
10958
10977
|
// Convert to target type.
|
|
10959
10978
|
nuitka_bool result = r ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE;
|
|
@@ -11002,7 +11021,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11002
11021
|
}
|
|
11003
11022
|
}
|
|
11004
11023
|
|
|
11005
|
-
|
|
11024
|
+
Py_DECREF_IMMORTAL(result);
|
|
11006
11025
|
}
|
|
11007
11026
|
|
|
11008
11027
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -11071,11 +11090,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11071
11090
|
}
|
|
11072
11091
|
}
|
|
11073
11092
|
|
|
11074
|
-
|
|
11093
|
+
Py_DECREF_IMMORTAL(result);
|
|
11075
11094
|
}
|
|
11076
11095
|
}
|
|
11077
11096
|
|
|
11078
|
-
f =
|
|
11097
|
+
f = TP_RICHCOMPARE(type1);
|
|
11079
11098
|
if (f != NULL) {
|
|
11080
11099
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
11081
11100
|
|
|
@@ -11093,7 +11112,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11093
11112
|
}
|
|
11094
11113
|
}
|
|
11095
11114
|
|
|
11096
|
-
|
|
11115
|
+
Py_DECREF_IMMORTAL(result);
|
|
11097
11116
|
}
|
|
11098
11117
|
|
|
11099
11118
|
f = PyList_Type.tp_richcompare;
|
|
@@ -11114,7 +11133,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11114
11133
|
}
|
|
11115
11134
|
}
|
|
11116
11135
|
|
|
11117
|
-
|
|
11136
|
+
Py_DECREF_IMMORTAL(result);
|
|
11118
11137
|
}
|
|
11119
11138
|
|
|
11120
11139
|
int c;
|
|
@@ -11230,11 +11249,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11230
11249
|
}
|
|
11231
11250
|
}
|
|
11232
11251
|
|
|
11233
|
-
|
|
11252
|
+
Py_DECREF_IMMORTAL(result);
|
|
11234
11253
|
}
|
|
11235
11254
|
}
|
|
11236
11255
|
|
|
11237
|
-
f =
|
|
11256
|
+
f = TP_RICHCOMPARE(type1);
|
|
11238
11257
|
|
|
11239
11258
|
if (f != NULL) {
|
|
11240
11259
|
PyObject *result = (*f)(operand1, operand2, Py_NE);
|
|
@@ -11253,7 +11272,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11253
11272
|
}
|
|
11254
11273
|
}
|
|
11255
11274
|
|
|
11256
|
-
|
|
11275
|
+
Py_DECREF_IMMORTAL(result);
|
|
11257
11276
|
}
|
|
11258
11277
|
|
|
11259
11278
|
if (checked_reverse_op == false) {
|
|
@@ -11276,7 +11295,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_OBJECT_LIST(PyObject *operand1, PyObject *oper
|
|
|
11276
11295
|
}
|
|
11277
11296
|
}
|
|
11278
11297
|
|
|
11279
|
-
|
|
11298
|
+
Py_DECREF_IMMORTAL(result);
|
|
11280
11299
|
}
|
|
11281
11300
|
}
|
|
11282
11301
|
|
|
@@ -11350,7 +11369,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11350
11369
|
}
|
|
11351
11370
|
}
|
|
11352
11371
|
|
|
11353
|
-
|
|
11372
|
+
Py_DECREF_IMMORTAL(result);
|
|
11354
11373
|
}
|
|
11355
11374
|
|
|
11356
11375
|
// No rich comparison worked, but maybe compare works.
|
|
@@ -11400,7 +11419,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11400
11419
|
richcmpfunc f;
|
|
11401
11420
|
|
|
11402
11421
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11403
|
-
f =
|
|
11422
|
+
f = TP_RICHCOMPARE(type2);
|
|
11404
11423
|
|
|
11405
11424
|
if (f != NULL) {
|
|
11406
11425
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -11419,7 +11438,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11419
11438
|
}
|
|
11420
11439
|
}
|
|
11421
11440
|
|
|
11422
|
-
|
|
11441
|
+
Py_DECREF_IMMORTAL(result);
|
|
11423
11442
|
}
|
|
11424
11443
|
}
|
|
11425
11444
|
|
|
@@ -11441,10 +11460,10 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11441
11460
|
}
|
|
11442
11461
|
}
|
|
11443
11462
|
|
|
11444
|
-
|
|
11463
|
+
Py_DECREF_IMMORTAL(result);
|
|
11445
11464
|
}
|
|
11446
11465
|
|
|
11447
|
-
f =
|
|
11466
|
+
f = TP_RICHCOMPARE(type2);
|
|
11448
11467
|
if (f != NULL) {
|
|
11449
11468
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
11450
11469
|
|
|
@@ -11462,7 +11481,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11462
11481
|
}
|
|
11463
11482
|
}
|
|
11464
11483
|
|
|
11465
|
-
|
|
11484
|
+
Py_DECREF_IMMORTAL(result);
|
|
11466
11485
|
}
|
|
11467
11486
|
|
|
11468
11487
|
int c;
|
|
@@ -11557,7 +11576,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11557
11576
|
richcmpfunc f;
|
|
11558
11577
|
|
|
11559
11578
|
if (&PyList_Type != type2 && Nuitka_Type_IsSubtype(type2, &PyList_Type)) {
|
|
11560
|
-
f =
|
|
11579
|
+
f = TP_RICHCOMPARE(type2);
|
|
11561
11580
|
|
|
11562
11581
|
if (f != NULL) {
|
|
11563
11582
|
checked_reverse_op = true;
|
|
@@ -11578,7 +11597,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11578
11597
|
}
|
|
11579
11598
|
}
|
|
11580
11599
|
|
|
11581
|
-
|
|
11600
|
+
Py_DECREF_IMMORTAL(result);
|
|
11582
11601
|
}
|
|
11583
11602
|
}
|
|
11584
11603
|
|
|
@@ -11601,11 +11620,11 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11601
11620
|
}
|
|
11602
11621
|
}
|
|
11603
11622
|
|
|
11604
|
-
|
|
11623
|
+
Py_DECREF_IMMORTAL(result);
|
|
11605
11624
|
}
|
|
11606
11625
|
|
|
11607
11626
|
if (checked_reverse_op == false) {
|
|
11608
|
-
f =
|
|
11627
|
+
f = TP_RICHCOMPARE(type2);
|
|
11609
11628
|
|
|
11610
11629
|
if (f != NULL) {
|
|
11611
11630
|
PyObject *result = (*f)(operand2, operand1, Py_NE);
|
|
@@ -11624,7 +11643,7 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_OBJECT(PyObject *operand1, PyObject *oper
|
|
|
11624
11643
|
}
|
|
11625
11644
|
}
|
|
11626
11645
|
|
|
11627
|
-
|
|
11646
|
+
Py_DECREF_IMMORTAL(result);
|
|
11628
11647
|
}
|
|
11629
11648
|
}
|
|
11630
11649
|
|
|
@@ -11662,7 +11681,6 @@ nuitka_bool RICH_COMPARE_NE_NBOOL_LIST_LIST(PyObject *operand1, PyObject *operan
|
|
|
11662
11681
|
return COMPARE_NE_NBOOL_LIST_LIST(operand1, operand2);
|
|
11663
11682
|
}
|
|
11664
11683
|
|
|
11665
|
-
#if PYTHON_VERSION < 0x300
|
|
11666
11684
|
static PyObject *COMPARE_NE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11667
11685
|
CHECK_OBJECT(operand1);
|
|
11668
11686
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11681,7 +11699,7 @@ static PyObject *COMPARE_NE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11681
11699
|
}
|
|
11682
11700
|
|
|
11683
11701
|
Py_ssize_t operand2_digit_count = 0;
|
|
11684
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11702
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11685
11703
|
{
|
|
11686
11704
|
unsigned long t = operand2_abs_ival;
|
|
11687
11705
|
|
|
@@ -11694,17 +11712,18 @@ static PyObject *COMPARE_NE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11694
11712
|
}
|
|
11695
11713
|
}
|
|
11696
11714
|
|
|
11697
|
-
Py_ssize_t operand2_size =
|
|
11715
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11716
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11698
11717
|
|
|
11699
11718
|
bool r;
|
|
11700
11719
|
|
|
11701
|
-
if (
|
|
11720
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11702
11721
|
r = true;
|
|
11703
11722
|
} else {
|
|
11704
|
-
Py_ssize_t i =
|
|
11723
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11705
11724
|
r = false;
|
|
11706
11725
|
while (--i >= 0) {
|
|
11707
|
-
if (operand1_long_object
|
|
11726
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11708
11727
|
r = true;
|
|
11709
11728
|
break;
|
|
11710
11729
|
}
|
|
@@ -11713,9 +11732,10 @@ static PyObject *COMPARE_NE_OBJECT_LONG_CLONG(PyObject *operand1, long operand2)
|
|
|
11713
11732
|
|
|
11714
11733
|
// Convert to target type.
|
|
11715
11734
|
PyObject *result = BOOL_FROM(r);
|
|
11716
|
-
|
|
11735
|
+
Py_INCREF_IMMORTAL(result);
|
|
11717
11736
|
return result;
|
|
11718
11737
|
}
|
|
11738
|
+
#if PYTHON_VERSION < 0x300
|
|
11719
11739
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11720
11740
|
PyObject *RICH_COMPARE_NE_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11721
11741
|
|
|
@@ -11723,7 +11743,6 @@ PyObject *RICH_COMPARE_NE_OBJECT_LONG_INT(PyObject *operand1, PyObject *operand2
|
|
|
11723
11743
|
}
|
|
11724
11744
|
#endif
|
|
11725
11745
|
|
|
11726
|
-
#if PYTHON_VERSION < 0x300
|
|
11727
11746
|
static bool COMPARE_NE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
11728
11747
|
CHECK_OBJECT(operand1);
|
|
11729
11748
|
assert(PyLong_CheckExact(operand1));
|
|
@@ -11742,7 +11761,7 @@ static bool COMPARE_NE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11742
11761
|
}
|
|
11743
11762
|
|
|
11744
11763
|
Py_ssize_t operand2_digit_count = 0;
|
|
11745
|
-
digit operand2_digits[5]; // Could be more minimal and depend on sizeof(digit)
|
|
11764
|
+
digit operand2_digits[5] = {0}; // Could be more minimal and depend on sizeof(digit)
|
|
11746
11765
|
{
|
|
11747
11766
|
unsigned long t = operand2_abs_ival;
|
|
11748
11767
|
|
|
@@ -11755,17 +11774,18 @@ static bool COMPARE_NE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11755
11774
|
}
|
|
11756
11775
|
}
|
|
11757
11776
|
|
|
11758
|
-
Py_ssize_t operand2_size =
|
|
11777
|
+
NUITKA_MAY_BE_UNUSED Py_ssize_t operand2_size =
|
|
11778
|
+
operand2_is_negative == false ? operand2_digit_count : -operand2_digit_count;
|
|
11759
11779
|
|
|
11760
11780
|
bool r;
|
|
11761
11781
|
|
|
11762
|
-
if (
|
|
11782
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) != operand2_size) {
|
|
11763
11783
|
r = true;
|
|
11764
11784
|
} else {
|
|
11765
|
-
Py_ssize_t i =
|
|
11785
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11766
11786
|
r = false;
|
|
11767
11787
|
while (--i >= 0) {
|
|
11768
|
-
if (operand1_long_object
|
|
11788
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != operand2_digits[i]) {
|
|
11769
11789
|
r = true;
|
|
11770
11790
|
break;
|
|
11771
11791
|
}
|
|
@@ -11777,6 +11797,7 @@ static bool COMPARE_NE_CBOOL_LONG_CLONG(PyObject *operand1, long operand2) {
|
|
|
11777
11797
|
|
|
11778
11798
|
return result;
|
|
11779
11799
|
}
|
|
11800
|
+
#if PYTHON_VERSION < 0x300
|
|
11780
11801
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "INT" to Python2 'int'. */
|
|
11781
11802
|
bool RICH_COMPARE_NE_CBOOL_LONG_INT(PyObject *operand1, PyObject *operand2) {
|
|
11782
11803
|
|
|
@@ -11796,9 +11817,11 @@ static PyObject *COMPARE_NE_OBJECT_INT_CLONG(PyObject *operand1, long operand2)
|
|
|
11796
11817
|
|
|
11797
11818
|
// Convert to target type.
|
|
11798
11819
|
PyObject *result = BOOL_FROM(r);
|
|
11799
|
-
|
|
11820
|
+
Py_INCREF_IMMORTAL(result);
|
|
11800
11821
|
return result;
|
|
11801
11822
|
}
|
|
11823
|
+
#endif
|
|
11824
|
+
#if PYTHON_VERSION < 0x300
|
|
11802
11825
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11803
11826
|
PyObject *RICH_COMPARE_NE_OBJECT_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11804
11827
|
|
|
@@ -11821,6 +11844,8 @@ static bool COMPARE_NE_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
|
11821
11844
|
|
|
11822
11845
|
return result;
|
|
11823
11846
|
}
|
|
11847
|
+
#endif
|
|
11848
|
+
#if PYTHON_VERSION < 0x300
|
|
11824
11849
|
/* Code referring to "INT" corresponds to Python2 'int' and "CLONG" to C platform long value. */
|
|
11825
11850
|
bool RICH_COMPARE_NE_CBOOL_INT_CLONG(PyObject *operand1, long operand2) {
|
|
11826
11851
|
|
|
@@ -11837,13 +11862,14 @@ static PyObject *COMPARE_NE_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11837
11862
|
|
|
11838
11863
|
bool r;
|
|
11839
11864
|
|
|
11840
|
-
if (
|
|
11865
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11866
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11841
11867
|
r = true;
|
|
11842
11868
|
} else {
|
|
11843
|
-
Py_ssize_t i =
|
|
11869
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11844
11870
|
r = false;
|
|
11845
11871
|
while (--i >= 0) {
|
|
11846
|
-
if (operand1_long_object
|
|
11872
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11847
11873
|
r = true;
|
|
11848
11874
|
break;
|
|
11849
11875
|
}
|
|
@@ -11852,7 +11878,7 @@ static PyObject *COMPARE_NE_OBJECT_LONG_DIGIT(PyObject *operand1, long operand2)
|
|
|
11852
11878
|
|
|
11853
11879
|
// Convert to target type.
|
|
11854
11880
|
PyObject *result = BOOL_FROM(r);
|
|
11855
|
-
|
|
11881
|
+
Py_INCREF_IMMORTAL(result);
|
|
11856
11882
|
return result;
|
|
11857
11883
|
}
|
|
11858
11884
|
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "DIGIT" to C platform digit value for long
|
|
@@ -11871,13 +11897,14 @@ static bool COMPARE_NE_CBOOL_LONG_DIGIT(PyObject *operand1, long operand2) {
|
|
|
11871
11897
|
|
|
11872
11898
|
bool r;
|
|
11873
11899
|
|
|
11874
|
-
if (
|
|
11900
|
+
if (Nuitka_LongGetSignedDigitSize(operand1_long_object) !=
|
|
11901
|
+
(Py_ssize_t)((operand2 == 0) ? 0 : ((operand2 < 0) ? -1 : 1))) {
|
|
11875
11902
|
r = true;
|
|
11876
11903
|
} else {
|
|
11877
|
-
Py_ssize_t i =
|
|
11904
|
+
Py_ssize_t i = Nuitka_LongGetDigitSize(operand1_long_object);
|
|
11878
11905
|
r = false;
|
|
11879
11906
|
while (--i >= 0) {
|
|
11880
|
-
if (operand1_long_object
|
|
11907
|
+
if (Nuitka_LongGetDigitPointer(operand1_long_object)[i] != (digit)Py_ABS(operand2)) {
|
|
11881
11908
|
r = true;
|
|
11882
11909
|
break;
|
|
11883
11910
|
}
|
|
@@ -11907,7 +11934,7 @@ static PyObject *COMPARE_NE_OBJECT_FLOAT_CFLOAT(PyObject *operand1, double opera
|
|
|
11907
11934
|
|
|
11908
11935
|
// Convert to target type.
|
|
11909
11936
|
PyObject *result = BOOL_FROM(r);
|
|
11910
|
-
|
|
11937
|
+
Py_INCREF_IMMORTAL(result);
|
|
11911
11938
|
return result;
|
|
11912
11939
|
}
|
|
11913
11940
|
/* Code referring to "FLOAT" corresponds to Python 'float' and "CFLOAT" to C platform float value. */
|
|
@@ -11935,3 +11962,18 @@ bool RICH_COMPARE_NE_CBOOL_FLOAT_CFLOAT(PyObject *operand1, double operand2) {
|
|
|
11935
11962
|
|
|
11936
11963
|
return COMPARE_NE_CBOOL_FLOAT_CFLOAT(operand1, operand2);
|
|
11937
11964
|
}
|
|
11965
|
+
|
|
11966
|
+
// Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
11967
|
+
// integrates with CPython, but also works on its own.
|
|
11968
|
+
//
|
|
11969
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
11970
|
+
// you may not use this file except in compliance with the License.
|
|
11971
|
+
// You may obtain a copy of the License at
|
|
11972
|
+
//
|
|
11973
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
11974
|
+
//
|
|
11975
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11976
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11977
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11978
|
+
// See the License for the specific language governing permissions and
|
|
11979
|
+
// limitations under the License.
|