pytron-kit 0.3.12__py3-none-macosx_11_0_universal2.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.
- pytron/__init__.py +112 -0
- pytron/application.py +562 -0
- pytron/apputils/__init__.py +0 -0
- pytron/apputils/chrome_ipc.py +203 -0
- pytron/apputils/codegen.py +261 -0
- pytron/apputils/config.py +303 -0
- pytron/apputils/deadmansswitch.py +47 -0
- pytron/apputils/extras.py +76 -0
- pytron/apputils/native.py +148 -0
- pytron/apputils/shell.py +73 -0
- pytron/apputils/windows.py +286 -0
- pytron/cli.py +384 -0
- pytron/commands/__init__.py +0 -0
- pytron/commands/android.py +28 -0
- pytron/commands/build.py +26 -0
- pytron/commands/doctor.py +221 -0
- pytron/commands/engine.py +23 -0
- pytron/commands/frontend.py +60 -0
- pytron/commands/harvest.py +112 -0
- pytron/commands/helpers.py +239 -0
- pytron/commands/info.py +50 -0
- pytron/commands/init.py +521 -0
- pytron/commands/install.py +294 -0
- pytron/commands/login.py +130 -0
- pytron/commands/package.py +228 -0
- pytron/commands/plugin.py +442 -0
- pytron/commands/run.py +312 -0
- pytron/commands/scan.py +210 -0
- pytron/commands/show.py +23 -0
- pytron/commands/uninstall.py +150 -0
- pytron/commands/utils.py +42 -0
- pytron/commands/workflow.py +95 -0
- pytron/console.py +133 -0
- pytron/core.py +18 -0
- pytron/dependencies/WebView2Loader.dll +0 -0
- pytron/dependencies/__init__.py +1 -0
- pytron/dependencies/pytron_native.so +0 -0
- pytron/engines/chrome/adapter.py +445 -0
- pytron/engines/chrome/engine.py +576 -0
- pytron/engines/chrome/forge.py +147 -0
- pytron/engines/chrome/shell/package.json +8 -0
- pytron/engines/chrome/shell/preload.js +12 -0
- pytron/engines/chrome/shell/shell.js +534 -0
- pytron/exceptions.py +36 -0
- pytron/inspector.py +201 -0
- pytron/inspector_ui.py +512 -0
- pytron/installer/Installation.nsi +236 -0
- pytron/installer/header.bmp +0 -0
- pytron/installer/pytron.ico +0 -0
- pytron/installer/sidebar.bmp +0 -0
- pytron/llms.md +98 -0
- pytron/manifests/README.md +29 -0
- pytron/manifests/windows-utf8.manifest +44 -0
- pytron/menu.py +128 -0
- pytron/nsis-setup.exe +0 -0
- pytron/pack/__init__.py +0 -0
- pytron/pack/assets.py +131 -0
- pytron/pack/compilers.py +289 -0
- pytron/pack/crystal.py +297 -0
- pytron/pack/graph.py +377 -0
- pytron/pack/inference.py +157 -0
- pytron/pack/installers.py +402 -0
- pytron/pack/introspect.py +357 -0
- pytron/pack/metadata.py +213 -0
- pytron/pack/modules.py +618 -0
- pytron/pack/nuitka.py +108 -0
- pytron/pack/pipeline.py +107 -0
- pytron/pack/pyinstaller.py +176 -0
- pytron/pack/rust_engine.py +273 -0
- pytron/pack/secure.py +309 -0
- pytron/pack/secure_loader/bin/pytron_rust_bootloader +0 -0
- pytron/pack/secure_loader/icon.ico +0 -0
- pytron/pack/utils.py +110 -0
- pytron/pack/virtual_root.py +124 -0
- pytron/platforms/__init__.py +0 -0
- pytron/platforms/android/__init__.py +3 -0
- pytron/platforms/android/android.py +103 -0
- pytron/platforms/android/builder.py +736 -0
- pytron/platforms/android/ops/build.py +79 -0
- pytron/platforms/android/ops/init.py +63 -0
- pytron/platforms/android/ops/run.py +79 -0
- pytron/platforms/android/ops/sync.py +770 -0
- pytron/platforms/android/ops/utils.py +8 -0
- pytron/platforms/android/shell/README.md +30 -0
- pytron/platforms/android/shell/app/build.gradle +64 -0
- pytron/platforms/android/shell/app/src/main/AndroidManifest.xml +29 -0
- pytron/platforms/android/shell/app/src/main/assets/python/main.py +86 -0
- pytron/platforms/android/shell/app/src/main/assets/python/python314.zip +0 -0
- pytron/platforms/android/shell/app/src/main/cpp/CMakeLists.txt +25 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/Python.h +155 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/abstract.h +915 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/audit.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bltinmodule.h +14 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/boolobject.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bytearrayobject.h +44 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bytesobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/ceval.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/codecs.h +176 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/compile.h +22 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/complexobject.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/abstract.h +104 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/audit.h +8 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytearrayobject.h +38 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytesobject.h +42 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/cellobject.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/ceval.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/classobject.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/code.h +340 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/compile.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/complexobject.h +33 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/context.h +107 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/critical_section.h +154 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/descrobject.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/dictobject.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileobject.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileutils.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/floatobject.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/frameobject.h +35 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/funcobject.h +185 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/genobject.h +56 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/import.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/initconfig.h +334 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/listobject.h +53 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/lock.h +74 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longintrepr.h +184 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longobject.h +89 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/memoryobject.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/methodobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/modsupport.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/monitoring.h +269 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/object.h +493 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/objimpl.h +104 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/odictobject.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/picklebufobject.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pthread_stubs.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic.h +614 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_gcc.h +615 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_msc.h +1197 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_std.h +1112 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyctype.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pydebug.h +38 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyerrors.h +132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyfpe.h +15 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyframe.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyhash.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pylifecycle.h +89 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pymem.h +84 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystate.h +275 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystats.h +194 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythonrun.h +96 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythread.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pytime.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/setobject.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/traceback.h +13 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tracemalloc.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tupleobject.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/unicodeobject.h +773 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/warnings.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/weakrefobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/critical_section.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/datetime.h +267 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/descrobject.h +100 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/dictobject.h +108 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/dynamic_annotations.h +499 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/enumobject.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/errcode.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/exports.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/fileobject.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/fileutils.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/floatobject.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/frameobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/genericaliasobject.h +14 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/import.h +103 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/atomic.h +392 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/internal.h +969 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/prim.h +329 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/track.h +147 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/types.h +721 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc.h +565 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_abstract.h +61 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_asdl.h +112 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast.h +945 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast_state.h +271 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_atexit.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_audit.h +35 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_backoff.h +133 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bitutils.h +186 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_blocks_output_buffer.h +321 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_brc.h +73 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytes_methods.h +82 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytesobject.h +149 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_c_array.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_call.h +206 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_capsule.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_cell.h +75 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval.h +390 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval_state.h +48 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_code.h +671 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_codecs.h +76 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_compile.h +230 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_complexobject.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_condvar.h +93 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_context.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_critical_section.h +237 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp.h +406 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp_data_registry.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_debug_offsets.h +379 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_descrobject.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict.h +410 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict_state.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dtoa.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_signal.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_trampoline.h +70 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_exceptions.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_faulthandler.h +100 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils.h +320 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils_windows.h +98 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_floatobject.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_flowgraph.h +47 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_format.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_frame.h +61 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist.h +111 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist_state.h +70 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_function.h +53 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gc.h +378 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_genobject.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_getopt.h +22 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gil.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects_fini_generated.h +1592 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_strings.h +854 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hamt.h +113 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hashtable.h +150 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_import.h +141 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_importdl.h +139 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_index_pool.h +36 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_initconfig.h +197 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruction_sequence.h +83 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruments.h +127 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp.h +109 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp_structs.h +977 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe.h +401 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe_structs.h +95 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpolation.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_intrinsics.h +51 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_jit.h +29 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_list.h +81 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_llist.h +106 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_lock.h +236 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_long.h +319 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_magic_number.h +305 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_memoryobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_mimalloc.h +69 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_modsupport.h +99 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_moduleobject.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_namespace.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object.h +1029 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_alloc.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_deferred.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_stack.h +95 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_state.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc.h +702 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc_init.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_metadata.h +2117 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_utils.h +90 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_optimizer.h +318 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parking_lot.h +97 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parser.h +78 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pathconfig.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyarena.h +68 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyatomic_ft_wrappers.h +174 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pybuffer.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyerrors.h +213 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyhash.h +91 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pylifecycle.h +136 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymath.h +205 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem_init.h +103 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystate.h +339 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystats.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythonrun.h +68 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythread.h +172 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_qsbr.h +172 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_range.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime.h +63 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init.h +239 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init_generated.h +1589 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_structs.h +310 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_semaphore.h +67 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_setobject.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_signal.h +108 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sliceobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stackref.h +791 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stats.h +97 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_strhex.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structs.h +88 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structseq.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_symtable.h +201 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sysmodule.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_template.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_time.h +334 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_token.h +110 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_traceback.h +111 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tracemalloc.h +164 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tstate.h +88 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tuple.h +75 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typedefs.h +18 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typeobject.h +155 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typevarobject.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ucnhash.h +36 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject.h +308 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject_generated.h +3132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unionobject.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uniqueid.h +57 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_ids.h +335 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_metadata.h +1204 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_warnings.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_weakref.h +133 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/intrcheck.h +23 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/iterobject.h +24 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/listobject.h +55 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/lock.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/longobject.h +178 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/marshal.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/memoryobject.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/methodobject.h +146 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/modsupport.h +146 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/moduleobject.h +122 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/monitoring.h +18 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/object.h +828 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/objimpl.h +211 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/opcode.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/opcode_ids.h +259 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/osdefs.h +57 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/osmodule.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/patchlevel.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/py_curses.h +117 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyatomic.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pybuffer.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pycapsule.h +58 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyconfig.h +2088 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pydtrace.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyerrors.h +335 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyexpat.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyframe.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyhash.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pylifecycle.h +80 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymacconfig.h +91 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymacro.h +243 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymath.h +65 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymem.h +110 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyport.h +710 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystate.h +132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystats.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystrcmp.h +23 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystrtod.h +37 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pythonrun.h +42 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pythread.h +131 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pytypedefs.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/rangeobject.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/refcount.h +555 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/setobject.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/sliceobject.h +69 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/structmember.h +56 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/structseq.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/sysmodule.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/traceback.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/tupleobject.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/typeslots.h +96 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/unicodeobject.h +1029 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/warnings.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/weakrefobject.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/pytron_bridge.cpp +224 -0
- pytron/platforms/android/shell/app/src/main/java/com/pytron/shell/MainActivity.kt +208 -0
- pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- pytron/platforms/android/shell/build.gradle +11 -0
- pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.jar +0 -0
- pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.properties +5 -0
- pytron/platforms/android/shell/gradle.properties +2 -0
- pytron/platforms/android/shell/gradlew.bat +85 -0
- pytron/platforms/android/shell/settings.gradle +16 -0
- pytron/platforms/darwin.py +82 -0
- pytron/platforms/darwin_ops/libs.py +31 -0
- pytron/platforms/darwin_ops/system.py +182 -0
- pytron/platforms/darwin_ops/utils.py +85 -0
- pytron/platforms/darwin_ops/webview.py +5 -0
- pytron/platforms/darwin_ops/window.py +102 -0
- pytron/platforms/interface.py +152 -0
- pytron/platforms/linux.py +82 -0
- pytron/platforms/linux_ops/libs.py +49 -0
- pytron/platforms/linux_ops/system.py +316 -0
- pytron/platforms/linux_ops/utils.py +19 -0
- pytron/platforms/linux_ops/webview.py +5 -0
- pytron/platforms/linux_ops/window.py +115 -0
- pytron/platforms/windows.py +136 -0
- pytron/platforms/windows_ops/__init__.py +0 -0
- pytron/platforms/windows_ops/constants.py +126 -0
- pytron/platforms/windows_ops/system.py +518 -0
- pytron/platforms/windows_ops/utils.py +3 -0
- pytron/platforms/windows_ops/webview.py +5 -0
- pytron/platforms/windows_ops/window.py +361 -0
- pytron/plugin.py +467 -0
- pytron/rcedit-x64.exe +0 -0
- pytron/router.py +146 -0
- pytron/serializer.py +240 -0
- pytron/shortcuts.py +279 -0
- pytron/state.py +76 -0
- pytron/tray.py +399 -0
- pytron/updater.py +181 -0
- pytron/utf8_hook.py +112 -0
- pytron/utils.py +44 -0
- pytron/webview.py +722 -0
- pytron_kit-0.3.12.dist-info/METADATA +131 -0
- pytron_kit-0.3.12.dist-info/RECORD +419 -0
- pytron_kit-0.3.12.dist-info/WHEEL +5 -0
- pytron_kit-0.3.12.dist-info/entry_points.txt +2 -0
- pytron_kit-0.3.12.dist-info/licenses/LICENSE +201 -0
- pytron_kit-0.3.12.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_HAMT_H
|
|
2
|
+
#define Py_INTERNAL_HAMT_H
|
|
3
|
+
|
|
4
|
+
#ifndef Py_BUILD_CORE
|
|
5
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include "pycore_structs.h" // PyHamtNode
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
HAMT tree is shaped by hashes of keys. Every group of 5 bits of a hash denotes
|
|
12
|
+
the exact position of the key in one level of the tree. Since we're using
|
|
13
|
+
32 bit hashes, we can have at most 7 such levels. Although if there are
|
|
14
|
+
two distinct keys with equal hashes, they will have to occupy the same
|
|
15
|
+
cell in the 7th level of the tree -- so we'd put them in a "collision" node.
|
|
16
|
+
Which brings the total possible tree depth to 8. Read more about the actual
|
|
17
|
+
layout of the HAMT tree in `hamt.c`.
|
|
18
|
+
|
|
19
|
+
This constant is used to define a datastucture for storing iteration state.
|
|
20
|
+
*/
|
|
21
|
+
#define _Py_HAMT_MAX_TREE_DEPTH 8
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
extern PyTypeObject _PyHamt_Type;
|
|
25
|
+
extern PyTypeObject _PyHamt_ArrayNode_Type;
|
|
26
|
+
extern PyTypeObject _PyHamt_BitmapNode_Type;
|
|
27
|
+
extern PyTypeObject _PyHamt_CollisionNode_Type;
|
|
28
|
+
extern PyTypeObject _PyHamtKeys_Type;
|
|
29
|
+
extern PyTypeObject _PyHamtValues_Type;
|
|
30
|
+
extern PyTypeObject _PyHamtItems_Type;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/* other API */
|
|
34
|
+
|
|
35
|
+
#define PyHamt_Check(o) Py_IS_TYPE((o), &_PyHamt_Type)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/* A struct to hold the state of depth-first traverse of the tree.
|
|
39
|
+
|
|
40
|
+
HAMT is an immutable collection. Iterators will hold a strong reference
|
|
41
|
+
to it, and every node in the HAMT has strong references to its children.
|
|
42
|
+
|
|
43
|
+
So for iterators, we can implement zero allocations and zero reference
|
|
44
|
+
inc/dec depth-first iteration.
|
|
45
|
+
|
|
46
|
+
- i_nodes: an array of seven pointers to tree nodes
|
|
47
|
+
- i_level: the current node in i_nodes
|
|
48
|
+
- i_pos: an array of positions within nodes in i_nodes.
|
|
49
|
+
*/
|
|
50
|
+
typedef struct {
|
|
51
|
+
PyHamtNode *i_nodes[_Py_HAMT_MAX_TREE_DEPTH];
|
|
52
|
+
Py_ssize_t i_pos[_Py_HAMT_MAX_TREE_DEPTH];
|
|
53
|
+
int8_t i_level;
|
|
54
|
+
} PyHamtIteratorState;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/* Base iterator object.
|
|
58
|
+
|
|
59
|
+
Contains the iteration state, a pointer to the HAMT tree,
|
|
60
|
+
and a pointer to the 'yield function'. The latter is a simple
|
|
61
|
+
function that returns a key/value tuple for the 'Items' iterator,
|
|
62
|
+
just a key for the 'Keys' iterator, and a value for the 'Values'
|
|
63
|
+
iterator.
|
|
64
|
+
*/
|
|
65
|
+
typedef struct {
|
|
66
|
+
PyObject_HEAD
|
|
67
|
+
PyHamtObject *hi_obj;
|
|
68
|
+
PyHamtIteratorState hi_iter;
|
|
69
|
+
binaryfunc hi_yield;
|
|
70
|
+
} PyHamtIterator;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/* Create a new HAMT immutable mapping. */
|
|
74
|
+
PyHamtObject * _PyHamt_New(void);
|
|
75
|
+
|
|
76
|
+
/* Return a new collection based on "o", but with an additional
|
|
77
|
+
key/val pair. */
|
|
78
|
+
PyHamtObject * _PyHamt_Assoc(PyHamtObject *o, PyObject *key, PyObject *val);
|
|
79
|
+
|
|
80
|
+
/* Return a new collection based on "o", but without "key". */
|
|
81
|
+
PyHamtObject * _PyHamt_Without(PyHamtObject *o, PyObject *key);
|
|
82
|
+
|
|
83
|
+
/* Find "key" in the "o" collection.
|
|
84
|
+
|
|
85
|
+
Return:
|
|
86
|
+
- -1: An error occurred.
|
|
87
|
+
- 0: "key" wasn't found in "o".
|
|
88
|
+
- 1: "key" is in "o"; "*val" is set to its value (a borrowed ref).
|
|
89
|
+
*/
|
|
90
|
+
int _PyHamt_Find(PyHamtObject *o, PyObject *key, PyObject **val);
|
|
91
|
+
|
|
92
|
+
/* Check if "v" is equal to "w".
|
|
93
|
+
|
|
94
|
+
Return:
|
|
95
|
+
- 0: v != w
|
|
96
|
+
- 1: v == w
|
|
97
|
+
- -1: An error occurred.
|
|
98
|
+
*/
|
|
99
|
+
int _PyHamt_Eq(PyHamtObject *v, PyHamtObject *w);
|
|
100
|
+
|
|
101
|
+
/* Return the size of "o"; equivalent of "len(o)". */
|
|
102
|
+
Py_ssize_t _PyHamt_Len(PyHamtObject *o);
|
|
103
|
+
|
|
104
|
+
/* Return a Keys iterator over "o". */
|
|
105
|
+
PyObject * _PyHamt_NewIterKeys(PyHamtObject *o);
|
|
106
|
+
|
|
107
|
+
/* Return a Values iterator over "o". */
|
|
108
|
+
PyObject * _PyHamt_NewIterValues(PyHamtObject *o);
|
|
109
|
+
|
|
110
|
+
/* Return a Items iterator over "o". */
|
|
111
|
+
PyObject * _PyHamt_NewIterItems(PyHamtObject *o);
|
|
112
|
+
|
|
113
|
+
#endif /* !Py_INTERNAL_HAMT_H */
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_HASHTABLE_H
|
|
2
|
+
#define Py_INTERNAL_HASHTABLE_H
|
|
3
|
+
#ifdef __cplusplus
|
|
4
|
+
extern "C" {
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
#ifndef Py_BUILD_CORE
|
|
8
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
9
|
+
#endif
|
|
10
|
+
|
|
11
|
+
/* Single linked list */
|
|
12
|
+
|
|
13
|
+
typedef struct _Py_slist_item_s {
|
|
14
|
+
struct _Py_slist_item_s *next;
|
|
15
|
+
} _Py_slist_item_t;
|
|
16
|
+
|
|
17
|
+
typedef struct {
|
|
18
|
+
_Py_slist_item_t *head;
|
|
19
|
+
} _Py_slist_t;
|
|
20
|
+
|
|
21
|
+
#define _Py_SLIST_ITEM_NEXT(ITEM) _Py_RVALUE(((_Py_slist_item_t *)(ITEM))->next)
|
|
22
|
+
|
|
23
|
+
#define _Py_SLIST_HEAD(SLIST) _Py_RVALUE(((_Py_slist_t *)(SLIST))->head)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/* _Py_hashtable: table entry */
|
|
27
|
+
|
|
28
|
+
typedef struct {
|
|
29
|
+
/* used by _Py_hashtable_t.buckets to link entries */
|
|
30
|
+
_Py_slist_item_t _Py_slist_item;
|
|
31
|
+
|
|
32
|
+
Py_uhash_t key_hash;
|
|
33
|
+
void *key;
|
|
34
|
+
void *value;
|
|
35
|
+
} _Py_hashtable_entry_t;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/* _Py_hashtable: prototypes */
|
|
39
|
+
|
|
40
|
+
/* Forward declaration */
|
|
41
|
+
struct _Py_hashtable_t;
|
|
42
|
+
typedef struct _Py_hashtable_t _Py_hashtable_t;
|
|
43
|
+
|
|
44
|
+
typedef Py_uhash_t (*_Py_hashtable_hash_func) (const void *key);
|
|
45
|
+
typedef int (*_Py_hashtable_compare_func) (const void *key1, const void *key2);
|
|
46
|
+
typedef void (*_Py_hashtable_destroy_func) (void *key);
|
|
47
|
+
typedef _Py_hashtable_entry_t* (*_Py_hashtable_get_entry_func)(_Py_hashtable_t *ht,
|
|
48
|
+
const void *key);
|
|
49
|
+
|
|
50
|
+
typedef struct {
|
|
51
|
+
// Allocate a memory block
|
|
52
|
+
void* (*malloc) (size_t size);
|
|
53
|
+
|
|
54
|
+
// Release a memory block
|
|
55
|
+
void (*free) (void *ptr);
|
|
56
|
+
} _Py_hashtable_allocator_t;
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/* _Py_hashtable: table */
|
|
60
|
+
struct _Py_hashtable_t {
|
|
61
|
+
size_t nentries; // Total number of entries in the table
|
|
62
|
+
size_t nbuckets;
|
|
63
|
+
_Py_slist_t *buckets;
|
|
64
|
+
|
|
65
|
+
_Py_hashtable_get_entry_func get_entry_func;
|
|
66
|
+
_Py_hashtable_hash_func hash_func;
|
|
67
|
+
_Py_hashtable_compare_func compare_func;
|
|
68
|
+
_Py_hashtable_destroy_func key_destroy_func;
|
|
69
|
+
_Py_hashtable_destroy_func value_destroy_func;
|
|
70
|
+
_Py_hashtable_allocator_t alloc;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Export _Py_hashtable functions for '_testinternalcapi' shared extension
|
|
74
|
+
PyAPI_FUNC(_Py_hashtable_t *) _Py_hashtable_new(
|
|
75
|
+
_Py_hashtable_hash_func hash_func,
|
|
76
|
+
_Py_hashtable_compare_func compare_func);
|
|
77
|
+
|
|
78
|
+
/* Hash a pointer (void*) */
|
|
79
|
+
PyAPI_FUNC(Py_uhash_t) _Py_hashtable_hash_ptr(const void *key);
|
|
80
|
+
|
|
81
|
+
/* Comparison using memcmp() */
|
|
82
|
+
PyAPI_FUNC(int) _Py_hashtable_compare_direct(
|
|
83
|
+
const void *key1,
|
|
84
|
+
const void *key2);
|
|
85
|
+
|
|
86
|
+
PyAPI_FUNC(_Py_hashtable_t *) _Py_hashtable_new_full(
|
|
87
|
+
_Py_hashtable_hash_func hash_func,
|
|
88
|
+
_Py_hashtable_compare_func compare_func,
|
|
89
|
+
_Py_hashtable_destroy_func key_destroy_func,
|
|
90
|
+
_Py_hashtable_destroy_func value_destroy_func,
|
|
91
|
+
_Py_hashtable_allocator_t *allocator);
|
|
92
|
+
|
|
93
|
+
PyAPI_FUNC(void) _Py_hashtable_destroy(_Py_hashtable_t *ht);
|
|
94
|
+
|
|
95
|
+
PyAPI_FUNC(void) _Py_hashtable_clear(_Py_hashtable_t *ht);
|
|
96
|
+
|
|
97
|
+
typedef int (*_Py_hashtable_foreach_func) (_Py_hashtable_t *ht,
|
|
98
|
+
const void *key, const void *value,
|
|
99
|
+
void *user_data);
|
|
100
|
+
|
|
101
|
+
/* Call func() on each entry of the hashtable.
|
|
102
|
+
Iteration stops if func() result is non-zero, in this case it's the result
|
|
103
|
+
of the call. Otherwise, the function returns 0. */
|
|
104
|
+
PyAPI_FUNC(int) _Py_hashtable_foreach(
|
|
105
|
+
_Py_hashtable_t *ht,
|
|
106
|
+
_Py_hashtable_foreach_func func,
|
|
107
|
+
void *user_data);
|
|
108
|
+
|
|
109
|
+
PyAPI_FUNC(size_t) _Py_hashtable_size(const _Py_hashtable_t *ht);
|
|
110
|
+
PyAPI_FUNC(size_t) _Py_hashtable_len(const _Py_hashtable_t *ht);
|
|
111
|
+
|
|
112
|
+
/* Add a new entry to the hash. The key must not be present in the hash table.
|
|
113
|
+
Return 0 on success, -1 on memory error. */
|
|
114
|
+
PyAPI_FUNC(int) _Py_hashtable_set(
|
|
115
|
+
_Py_hashtable_t *ht,
|
|
116
|
+
const void *key,
|
|
117
|
+
void *value);
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
/* Get an entry.
|
|
121
|
+
Return NULL if the key does not exist. */
|
|
122
|
+
static inline _Py_hashtable_entry_t *
|
|
123
|
+
_Py_hashtable_get_entry(_Py_hashtable_t *ht, const void *key)
|
|
124
|
+
{
|
|
125
|
+
return ht->get_entry_func(ht, key);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
/* Get value from an entry.
|
|
130
|
+
Return NULL if the entry is not found.
|
|
131
|
+
|
|
132
|
+
Use _Py_hashtable_get_entry() to distinguish entry value equal to NULL
|
|
133
|
+
and entry not found. */
|
|
134
|
+
PyAPI_FUNC(void*) _Py_hashtable_get(_Py_hashtable_t *ht, const void *key);
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/* Remove a key and its associated value without calling key and value destroy
|
|
138
|
+
functions.
|
|
139
|
+
|
|
140
|
+
Return the removed value if the key was found.
|
|
141
|
+
Return NULL if the key was not found. */
|
|
142
|
+
PyAPI_FUNC(void*) _Py_hashtable_steal(
|
|
143
|
+
_Py_hashtable_t *ht,
|
|
144
|
+
const void *key);
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
#ifdef __cplusplus
|
|
148
|
+
}
|
|
149
|
+
#endif
|
|
150
|
+
#endif /* !Py_INTERNAL_HASHTABLE_H */
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#ifndef Py_LIMITED_API
|
|
2
|
+
#ifndef Py_INTERNAL_IMPORT_H
|
|
3
|
+
#define Py_INTERNAL_IMPORT_H
|
|
4
|
+
#ifdef __cplusplus
|
|
5
|
+
extern "C" {
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#ifndef Py_BUILD_CORE
|
|
9
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
#include "pycore_hashtable.h" // _Py_hashtable_t
|
|
13
|
+
#include "pycore_interp_structs.h" // _import_state
|
|
14
|
+
|
|
15
|
+
extern int _PyImport_IsInitialized(PyInterpreterState *);
|
|
16
|
+
|
|
17
|
+
// Export for 'pyexpat' shared extension
|
|
18
|
+
PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module);
|
|
19
|
+
|
|
20
|
+
extern int _PyImport_SetModuleString(const char *name, PyObject* module);
|
|
21
|
+
|
|
22
|
+
extern void _PyImport_AcquireLock(PyInterpreterState *interp);
|
|
23
|
+
extern void _PyImport_ReleaseLock(PyInterpreterState *interp);
|
|
24
|
+
extern void _PyImport_ReInitLock(PyInterpreterState *interp);
|
|
25
|
+
|
|
26
|
+
// This is used exclusively for the sys and builtins modules:
|
|
27
|
+
extern int _PyImport_FixupBuiltin(
|
|
28
|
+
PyThreadState *tstate,
|
|
29
|
+
PyObject *mod,
|
|
30
|
+
const char *name, /* UTF-8 encoded string */
|
|
31
|
+
PyObject *modules
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
#ifdef HAVE_DLOPEN
|
|
35
|
+
# include <dlfcn.h> // RTLD_NOW, RTLD_LAZY
|
|
36
|
+
# if HAVE_DECL_RTLD_NOW
|
|
37
|
+
# define _Py_DLOPEN_FLAGS RTLD_NOW
|
|
38
|
+
# else
|
|
39
|
+
# define _Py_DLOPEN_FLAGS RTLD_LAZY
|
|
40
|
+
# endif
|
|
41
|
+
# define DLOPENFLAGS_INIT .dlopenflags = _Py_DLOPEN_FLAGS,
|
|
42
|
+
#else
|
|
43
|
+
# define _Py_DLOPEN_FLAGS 0
|
|
44
|
+
# define DLOPENFLAGS_INIT
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#define IMPORTS_INIT \
|
|
48
|
+
{ \
|
|
49
|
+
DLOPENFLAGS_INIT \
|
|
50
|
+
.find_and_load = { \
|
|
51
|
+
.header = 1, \
|
|
52
|
+
}, \
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
extern void _PyImport_ClearCore(PyInterpreterState *interp);
|
|
56
|
+
|
|
57
|
+
extern Py_ssize_t _PyImport_GetNextModuleIndex(void);
|
|
58
|
+
extern const char * _PyImport_ResolveNameWithPackageContext(const char *name);
|
|
59
|
+
extern const char * _PyImport_SwapPackageContext(const char *newcontext);
|
|
60
|
+
|
|
61
|
+
extern int _PyImport_GetDLOpenFlags(PyInterpreterState *interp);
|
|
62
|
+
extern void _PyImport_SetDLOpenFlags(PyInterpreterState *interp, int new_val);
|
|
63
|
+
|
|
64
|
+
extern PyObject * _PyImport_InitModules(PyInterpreterState *interp);
|
|
65
|
+
extern PyObject * _PyImport_GetModules(PyInterpreterState *interp);
|
|
66
|
+
extern PyObject * _PyImport_GetModulesRef(PyInterpreterState *interp);
|
|
67
|
+
extern void _PyImport_ClearModules(PyInterpreterState *interp);
|
|
68
|
+
|
|
69
|
+
extern void _PyImport_ClearModulesByIndex(PyInterpreterState *interp);
|
|
70
|
+
|
|
71
|
+
extern int _PyImport_InitDefaultImportFunc(PyInterpreterState *interp);
|
|
72
|
+
extern int _PyImport_IsDefaultImportFunc(
|
|
73
|
+
PyInterpreterState *interp,
|
|
74
|
+
PyObject *func);
|
|
75
|
+
|
|
76
|
+
extern PyObject * _PyImport_GetImportlibLoader(
|
|
77
|
+
PyInterpreterState *interp,
|
|
78
|
+
const char *loader_name);
|
|
79
|
+
extern PyObject * _PyImport_GetImportlibExternalLoader(
|
|
80
|
+
PyInterpreterState *interp,
|
|
81
|
+
const char *loader_name);
|
|
82
|
+
extern PyObject * _PyImport_BlessMyLoader(
|
|
83
|
+
PyInterpreterState *interp,
|
|
84
|
+
PyObject *module_globals);
|
|
85
|
+
extern PyObject * _PyImport_ImportlibModuleRepr(
|
|
86
|
+
PyInterpreterState *interp,
|
|
87
|
+
PyObject *module);
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
extern PyStatus _PyImport_Init(void);
|
|
91
|
+
extern void _PyImport_Fini(void);
|
|
92
|
+
extern void _PyImport_Fini2(void);
|
|
93
|
+
|
|
94
|
+
extern PyStatus _PyImport_InitCore(
|
|
95
|
+
PyThreadState *tstate,
|
|
96
|
+
PyObject *sysmod,
|
|
97
|
+
int importlib);
|
|
98
|
+
extern PyStatus _PyImport_InitExternal(PyThreadState *tstate);
|
|
99
|
+
extern void _PyImport_FiniCore(PyInterpreterState *interp);
|
|
100
|
+
extern void _PyImport_FiniExternal(PyInterpreterState *interp);
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
extern PyObject* _PyImport_GetBuiltinModuleNames(void);
|
|
104
|
+
|
|
105
|
+
struct _module_alias {
|
|
106
|
+
const char *name; /* ASCII encoded string */
|
|
107
|
+
const char *orig; /* ASCII encoded string */
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// Export these 3 symbols for test_ctypes
|
|
111
|
+
PyAPI_DATA(const struct _frozen*) _PyImport_FrozenBootstrap;
|
|
112
|
+
PyAPI_DATA(const struct _frozen*) _PyImport_FrozenStdlib;
|
|
113
|
+
PyAPI_DATA(const struct _frozen*) _PyImport_FrozenTest;
|
|
114
|
+
|
|
115
|
+
extern const struct _module_alias * _PyImport_FrozenAliases;
|
|
116
|
+
|
|
117
|
+
extern int _PyImport_CheckSubinterpIncompatibleExtensionAllowed(
|
|
118
|
+
const char *name);
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
// Export for '_testinternalcapi' shared extension
|
|
122
|
+
PyAPI_FUNC(int) _PyImport_ClearExtension(PyObject *name, PyObject *filename);
|
|
123
|
+
|
|
124
|
+
#ifdef Py_GIL_DISABLED
|
|
125
|
+
// Assuming that the GIL is enabled from a call to
|
|
126
|
+
// _PyEval_EnableGILTransient(), resolve the transient request depending on the
|
|
127
|
+
// state of the module argument:
|
|
128
|
+
// - If module is NULL or a PyModuleObject with md_gil == Py_MOD_GIL_NOT_USED,
|
|
129
|
+
// call _PyEval_DisableGIL().
|
|
130
|
+
// - Otherwise, call _PyEval_EnableGILPermanent(). If the GIL was not already
|
|
131
|
+
// enabled permanently, issue a warning referencing the module's name.
|
|
132
|
+
//
|
|
133
|
+
// This function may raise an exception.
|
|
134
|
+
extern int _PyImport_CheckGILForModule(PyObject *module, PyObject *module_name);
|
|
135
|
+
#endif
|
|
136
|
+
|
|
137
|
+
#ifdef __cplusplus
|
|
138
|
+
}
|
|
139
|
+
#endif
|
|
140
|
+
#endif /* !Py_INTERNAL_IMPORT_H */
|
|
141
|
+
#endif /* !Py_LIMITED_API */
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_IMPORTDL_H
|
|
2
|
+
#define Py_INTERNAL_IMPORTDL_H
|
|
3
|
+
|
|
4
|
+
#include "patchlevel.h" // PY_MAJOR_VERSION
|
|
5
|
+
|
|
6
|
+
#ifdef __cplusplus
|
|
7
|
+
extern "C" {
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
#ifndef Py_BUILD_CORE
|
|
11
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
extern const char *_PyImport_DynLoadFiletab[];
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
typedef enum ext_module_kind {
|
|
19
|
+
_Py_ext_module_kind_UNKNOWN = 0,
|
|
20
|
+
_Py_ext_module_kind_SINGLEPHASE = 1,
|
|
21
|
+
_Py_ext_module_kind_MULTIPHASE = 2,
|
|
22
|
+
_Py_ext_module_kind_INVALID = 3,
|
|
23
|
+
} _Py_ext_module_kind;
|
|
24
|
+
|
|
25
|
+
typedef enum ext_module_origin {
|
|
26
|
+
_Py_ext_module_origin_CORE = 1,
|
|
27
|
+
_Py_ext_module_origin_BUILTIN = 2,
|
|
28
|
+
_Py_ext_module_origin_DYNAMIC = 3,
|
|
29
|
+
} _Py_ext_module_origin;
|
|
30
|
+
|
|
31
|
+
/* Input for loading an extension module. */
|
|
32
|
+
struct _Py_ext_module_loader_info {
|
|
33
|
+
PyObject *filename;
|
|
34
|
+
#ifndef MS_WINDOWS
|
|
35
|
+
PyObject *filename_encoded;
|
|
36
|
+
#endif
|
|
37
|
+
PyObject *name;
|
|
38
|
+
PyObject *name_encoded;
|
|
39
|
+
/* path is always a borrowed ref of name or filename,
|
|
40
|
+
* depending on if it's builtin or not. */
|
|
41
|
+
PyObject *path;
|
|
42
|
+
_Py_ext_module_origin origin;
|
|
43
|
+
const char *hook_prefix;
|
|
44
|
+
const char *newcontext;
|
|
45
|
+
};
|
|
46
|
+
extern void _Py_ext_module_loader_info_clear(
|
|
47
|
+
struct _Py_ext_module_loader_info *info);
|
|
48
|
+
extern int _Py_ext_module_loader_info_init(
|
|
49
|
+
struct _Py_ext_module_loader_info *info,
|
|
50
|
+
PyObject *name,
|
|
51
|
+
PyObject *filename,
|
|
52
|
+
_Py_ext_module_origin origin);
|
|
53
|
+
extern int _Py_ext_module_loader_info_init_for_core(
|
|
54
|
+
struct _Py_ext_module_loader_info *p_info,
|
|
55
|
+
PyObject *name);
|
|
56
|
+
extern int _Py_ext_module_loader_info_init_for_builtin(
|
|
57
|
+
struct _Py_ext_module_loader_info *p_info,
|
|
58
|
+
PyObject *name);
|
|
59
|
+
#ifdef HAVE_DYNAMIC_LOADING
|
|
60
|
+
extern int _Py_ext_module_loader_info_init_from_spec(
|
|
61
|
+
struct _Py_ext_module_loader_info *info,
|
|
62
|
+
PyObject *spec);
|
|
63
|
+
#endif
|
|
64
|
+
|
|
65
|
+
/* The result from running an extension module's init function. */
|
|
66
|
+
struct _Py_ext_module_loader_result {
|
|
67
|
+
PyModuleDef *def;
|
|
68
|
+
PyObject *module;
|
|
69
|
+
_Py_ext_module_kind kind;
|
|
70
|
+
struct _Py_ext_module_loader_result_error *err;
|
|
71
|
+
struct _Py_ext_module_loader_result_error {
|
|
72
|
+
enum _Py_ext_module_loader_result_error_kind {
|
|
73
|
+
_Py_ext_module_loader_result_EXCEPTION = 0,
|
|
74
|
+
_Py_ext_module_loader_result_ERR_MISSING = 1,
|
|
75
|
+
_Py_ext_module_loader_result_ERR_UNREPORTED_EXC = 2,
|
|
76
|
+
_Py_ext_module_loader_result_ERR_UNINITIALIZED = 3,
|
|
77
|
+
_Py_ext_module_loader_result_ERR_NONASCII_NOT_MULTIPHASE = 4,
|
|
78
|
+
_Py_ext_module_loader_result_ERR_NOT_MODULE = 5,
|
|
79
|
+
_Py_ext_module_loader_result_ERR_MISSING_DEF = 6,
|
|
80
|
+
} kind;
|
|
81
|
+
PyObject *exc;
|
|
82
|
+
} _err;
|
|
83
|
+
};
|
|
84
|
+
extern void _Py_ext_module_loader_result_clear(
|
|
85
|
+
struct _Py_ext_module_loader_result *res);
|
|
86
|
+
extern void _Py_ext_module_loader_result_apply_error(
|
|
87
|
+
struct _Py_ext_module_loader_result *res,
|
|
88
|
+
const char *name);
|
|
89
|
+
|
|
90
|
+
/* The module init function. */
|
|
91
|
+
typedef PyObject *(*PyModInitFunction)(void);
|
|
92
|
+
#ifdef HAVE_DYNAMIC_LOADING
|
|
93
|
+
extern PyModInitFunction _PyImport_GetModInitFunc(
|
|
94
|
+
struct _Py_ext_module_loader_info *info,
|
|
95
|
+
FILE *fp);
|
|
96
|
+
#endif
|
|
97
|
+
extern int _PyImport_RunModInitFunc(
|
|
98
|
+
PyModInitFunction p0,
|
|
99
|
+
struct _Py_ext_module_loader_info *info,
|
|
100
|
+
struct _Py_ext_module_loader_result *p_res);
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/* Max length of module suffix searched for -- accommodates "module.slb" */
|
|
104
|
+
#define MAXSUFFIXSIZE 12
|
|
105
|
+
|
|
106
|
+
#ifdef MS_WINDOWS
|
|
107
|
+
#include <windows.h>
|
|
108
|
+
typedef FARPROC dl_funcptr;
|
|
109
|
+
|
|
110
|
+
#ifdef _DEBUG
|
|
111
|
+
# define PYD_DEBUG_SUFFIX "_d"
|
|
112
|
+
#else
|
|
113
|
+
# define PYD_DEBUG_SUFFIX ""
|
|
114
|
+
#endif
|
|
115
|
+
|
|
116
|
+
#ifdef Py_GIL_DISABLED
|
|
117
|
+
# define PYD_THREADING_TAG "t"
|
|
118
|
+
#else
|
|
119
|
+
# define PYD_THREADING_TAG ""
|
|
120
|
+
#endif
|
|
121
|
+
|
|
122
|
+
#ifdef PYD_PLATFORM_TAG
|
|
123
|
+
# define PYD_SOABI "cp" Py_STRINGIFY(PY_MAJOR_VERSION) Py_STRINGIFY(PY_MINOR_VERSION) PYD_THREADING_TAG "-" PYD_PLATFORM_TAG
|
|
124
|
+
#else
|
|
125
|
+
# define PYD_SOABI "cp" Py_STRINGIFY(PY_MAJOR_VERSION) Py_STRINGIFY(PY_MINOR_VERSION) PYD_THREADING_TAG
|
|
126
|
+
#endif
|
|
127
|
+
|
|
128
|
+
#define PYD_TAGGED_SUFFIX PYD_DEBUG_SUFFIX "." PYD_SOABI ".pyd"
|
|
129
|
+
#define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd"
|
|
130
|
+
|
|
131
|
+
#else
|
|
132
|
+
typedef void (*dl_funcptr)(void);
|
|
133
|
+
#endif
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
#ifdef __cplusplus
|
|
137
|
+
}
|
|
138
|
+
#endif
|
|
139
|
+
#endif /* !Py_INTERNAL_IMPORTDL_H */
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_INDEX_POOL_H
|
|
2
|
+
#define Py_INTERNAL_INDEX_POOL_H
|
|
3
|
+
|
|
4
|
+
#include "Python.h"
|
|
5
|
+
|
|
6
|
+
#ifdef __cplusplus
|
|
7
|
+
extern "C" {
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
#ifndef Py_BUILD_CORE
|
|
11
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#ifdef Py_GIL_DISABLED
|
|
15
|
+
|
|
16
|
+
#include "pycore_interp_structs.h"
|
|
17
|
+
|
|
18
|
+
// This contains code for allocating unique indices in an array. It is used by
|
|
19
|
+
// the free-threaded build to assign each thread a globally unique index into
|
|
20
|
+
// each code object's thread-local bytecode array.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
// Allocate the smallest available index. Returns -1 on error.
|
|
24
|
+
extern int32_t _PyIndexPool_AllocIndex(_PyIndexPool *indices);
|
|
25
|
+
|
|
26
|
+
// Release `index` back to the pool
|
|
27
|
+
extern void _PyIndexPool_FreeIndex(_PyIndexPool *indices, int32_t index);
|
|
28
|
+
|
|
29
|
+
extern void _PyIndexPool_Fini(_PyIndexPool *indices);
|
|
30
|
+
|
|
31
|
+
#endif // Py_GIL_DISABLED
|
|
32
|
+
|
|
33
|
+
#ifdef __cplusplus
|
|
34
|
+
}
|
|
35
|
+
#endif
|
|
36
|
+
#endif // !Py_INTERNAL_INDEX_POOL_H
|