├── .dockerignore ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── BUG-REPORT.yml │ ├── FEATURE-REQUEST.yml │ ├── THEME-SUBMISSION.yml │ └── config.yml └── workflows │ ├── ci.yml │ └── publish-aur.yml ├── .gitignore ├── .gitmodules ├── .prettierrc ├── .releaserc ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── CMakeLists.txt ├── CMakeUserPresets.json ├── LICENSE ├── README.md ├── assets ├── .gitignore ├── README.md ├── core │ ├── api │ │ ├── config.py │ │ ├── css_analyzer.py │ │ ├── plugins.py │ │ └── themes.py │ ├── config │ │ └── ini.py │ ├── main.py │ ├── plat_spec │ │ └── main.py │ ├── unix │ │ ├── socket_con.py │ │ └── use_system.py │ ├── updater │ │ ├── millennium.py │ │ ├── plugin_updater.py │ │ └── theme_updater.py │ └── util │ │ ├── logger.py │ │ ├── theme_installer.py │ │ └── webkit_handler.py ├── package-lock.json ├── package.json ├── pipx │ ├── config.py │ ├── dev_tools.py │ ├── logger.py │ ├── main.py │ ├── package_manager.py │ └── pip_setup.py ├── plugin.json ├── requirements.txt ├── src │ ├── Logger.ts │ ├── Settings.ts │ ├── classes.ts │ ├── components │ │ └── ISteamComponents.tsx │ ├── custom_components │ │ ├── AboutTheme.tsx │ │ ├── ConnectionFailed.tsx │ │ ├── CustomIcons.tsx │ │ ├── FakeFriend.tsx │ │ ├── GenericDialog.tsx │ │ ├── SettingsModal.tsx │ │ ├── ThemeEditor.tsx │ │ ├── UpdaterModal.tsx │ │ └── modals │ │ │ ├── DisableUpdates.tsx │ │ │ ├── SelectUpdatePrefs.tsx │ │ │ ├── UpdateInfoModal.tsx │ │ │ └── WelcomeModal.tsx │ ├── index.tsx │ ├── locales │ │ ├── index.ts │ │ └── locales │ │ │ ├── brazilian.json │ │ │ ├── bulgarian.json │ │ │ ├── danish.json │ │ │ ├── english.json │ │ │ ├── french.json │ │ │ ├── german.json │ │ │ ├── indonesian.json │ │ │ ├── italian.json │ │ │ ├── polish.json │ │ │ ├── russian.json │ │ │ ├── schinese.json │ │ │ ├── spanish.json │ │ │ ├── swedish.json │ │ │ └── vietnamese.json │ ├── patcher │ │ ├── Dispatch.ts │ │ ├── SystemColors.ts │ │ ├── ThemeParser.ts │ │ ├── index.ts │ │ ├── v1 │ │ │ ├── Conditions.ts │ │ │ └── GlobalColors.ts │ │ └── v2 │ │ │ └── Conditions.ts │ ├── tabs │ │ ├── AccentColorPicker.tsx │ │ ├── BugReport.tsx │ │ ├── Logs.tsx │ │ ├── Plugins.tsx │ │ ├── Settings.tsx │ │ ├── Themes.tsx │ │ └── Updates.tsx │ ├── types.ts │ └── ui │ │ ├── Notifications.ts │ │ └── Settings.tsx └── tsconfig.json ├── cli ├── CMakeLists.txt ├── include │ ├── chown.h │ ├── incbin.h │ └── sock_serv.h └── src │ ├── main.cc │ └── sock_serv.cc ├── docker-build-linux.sh ├── dockerfile ├── docs └── CHANGELOG.md ├── examples ├── README.md ├── plugin │ ├── .gitignore │ ├── README.md │ ├── backend │ │ └── main.py │ ├── frontend │ │ ├── index.tsx │ │ └── tsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── plugin.json │ ├── styles │ │ └── styles.css │ ├── tsconfig.json │ └── webkit │ │ ├── index.tsx │ │ └── tsconfig.json └── theme │ ├── README.md │ ├── bigpicture.custom.css │ ├── bigpicture.custom.js │ ├── friends.custom.css │ ├── friends.custom.js │ ├── libraryroot.custom.css │ ├── libraryroot.custom.js │ ├── skin.json │ └── webkit.css ├── include ├── asio.h ├── await_pipe.h ├── bind_stdout.h ├── cmd.h ├── co_spawn.h ├── co_stub.h ├── csp_bypass.h ├── encoding.h ├── env.h ├── executor.h ├── ffi.h ├── fvisible.h ├── helpers.h ├── http.h ├── loader.h ├── locals.h ├── log.h ├── logger.h ├── pipe.h ├── serv.h ├── terminal_pipe.h ├── url_parser.h └── web_load.h ├── package-lock.json ├── pkgbuild ├── PKGBUILD └── millennium.install ├── preload ├── CMakeLists.txt ├── README.md ├── include │ ├── phttp.h │ ├── shimlogger.h │ ├── steam.h │ └── unzip.h ├── main.cc └── src │ ├── http.cc │ ├── steam.cc │ └── unzip.cc ├── scripts ├── ci │ ├── posix │ │ ├── bump.sh │ │ ├── mk-assets.sh │ │ ├── setup-python.sh │ │ └── version.sh │ └── win32 │ │ ├── build-python.ps1 │ │ ├── mk-assets.ps1 │ │ ├── setup-python.ps1 │ │ └── version.ps1 ├── install.ps1 ├── install.sh ├── posix │ └── start.sh ├── uninstall.ps1 ├── update.ps1 └── version.rc ├── src ├── core │ ├── _c_py_api.cc │ ├── _c_py_gil.cc │ ├── _c_py_interop.cc │ ├── _c_py_logger.cc │ ├── _js_interop.cc │ ├── co_spawn.cc │ ├── co_stub.cc │ ├── events.cc │ ├── ftp_serv.cc │ ├── ipc_pipe.cc │ ├── loader.cc │ └── web_load.cc ├── main.cc └── sys │ ├── env.cc │ ├── log.cc │ ├── plugin-schema.json │ ├── settings.cc │ └── sysfs.cc ├── tests └── FindPython_test.cc ├── vcpkg-configuration.json ├── vcpkg.json ├── vendor └── python │ ├── posix │ ├── Python.h │ ├── README.rst │ ├── abstract.h │ ├── bltinmodule.h │ ├── boolobject.h │ ├── bytearrayobject.h │ ├── bytesobject.h │ ├── ceval.h │ ├── codecs.h │ ├── compile.h │ ├── complexobject.h │ ├── cpython │ │ ├── abstract.h │ │ ├── bytearrayobject.h │ │ ├── bytesobject.h │ │ ├── cellobject.h │ │ ├── ceval.h │ │ ├── classobject.h │ │ ├── code.h │ │ ├── compile.h │ │ ├── complexobject.h │ │ ├── context.h │ │ ├── descrobject.h │ │ ├── dictobject.h │ │ ├── fileobject.h │ │ ├── fileutils.h │ │ ├── floatobject.h │ │ ├── frameobject.h │ │ ├── funcobject.h │ │ ├── genobject.h │ │ ├── import.h │ │ ├── initconfig.h │ │ ├── listobject.h │ │ ├── longintrepr.h │ │ ├── longobject.h │ │ ├── methodobject.h │ │ ├── modsupport.h │ │ ├── object.h │ │ ├── objimpl.h │ │ ├── odictobject.h │ │ ├── picklebufobject.h │ │ ├── pthread_stubs.h │ │ ├── pyctype.h │ │ ├── pydebug.h │ │ ├── pyerrors.h │ │ ├── pyfpe.h │ │ ├── pyframe.h │ │ ├── pylifecycle.h │ │ ├── pymem.h │ │ ├── pystate.h │ │ ├── pythonrun.h │ │ ├── pythread.h │ │ ├── pytime.h │ │ ├── setobject.h │ │ ├── sysmodule.h │ │ ├── traceback.h │ │ ├── tupleobject.h │ │ ├── unicodeobject.h │ │ ├── warnings.h │ │ └── weakrefobject.h │ ├── datetime.h │ ├── descrobject.h │ ├── dictobject.h │ ├── dynamic_annotations.h │ ├── enumobject.h │ ├── errcode.h │ ├── exports.h │ ├── fileobject.h │ ├── fileutils.h │ ├── floatobject.h │ ├── frameobject.h │ ├── genericaliasobject.h │ ├── import.h │ ├── internal │ │ ├── pycore_abstract.h │ │ ├── pycore_accu.h │ │ ├── pycore_asdl.h │ │ ├── pycore_ast.h │ │ ├── pycore_ast_state.h │ │ ├── pycore_atomic.h │ │ ├── pycore_atomic_funcs.h │ │ ├── pycore_bitutils.h │ │ ├── pycore_blocks_output_buffer.h │ │ ├── pycore_bytes_methods.h │ │ ├── pycore_bytesobject.h │ │ ├── pycore_call.h │ │ ├── pycore_ceval.h │ │ ├── pycore_code.h │ │ ├── pycore_compile.h │ │ ├── pycore_condvar.h │ │ ├── pycore_context.h │ │ ├── pycore_dict.h │ │ ├── pycore_dtoa.h │ │ ├── pycore_emscripten_signal.h │ │ ├── pycore_exceptions.h │ │ ├── pycore_fileutils.h │ │ ├── pycore_floatobject.h │ │ ├── pycore_format.h │ │ ├── pycore_frame.h │ │ ├── pycore_function.h │ │ ├── pycore_gc.h │ │ ├── pycore_genobject.h │ │ ├── pycore_getopt.h │ │ ├── pycore_gil.h │ │ ├── pycore_global_objects.h │ │ ├── pycore_global_strings.h │ │ ├── pycore_hamt.h │ │ ├── pycore_hashtable.h │ │ ├── pycore_import.h │ │ ├── pycore_initconfig.h │ │ ├── pycore_interp.h │ │ ├── pycore_interpreteridobject.h │ │ ├── pycore_list.h │ │ ├── pycore_long.h │ │ ├── pycore_moduleobject.h │ │ ├── pycore_namespace.h │ │ ├── pycore_object.h │ │ ├── pycore_opcode.h │ │ ├── pycore_parser.h │ │ ├── pycore_pathconfig.h │ │ ├── pycore_pyarena.h │ │ ├── pycore_pyerrors.h │ │ ├── pycore_pyhash.h │ │ ├── pycore_pylifecycle.h │ │ ├── pycore_pymath.h │ │ ├── pycore_pymem.h │ │ ├── pycore_pystate.h │ │ ├── pycore_runtime.h │ │ ├── pycore_runtime_init.h │ │ ├── pycore_signal.h │ │ ├── pycore_sliceobject.h │ │ ├── pycore_strhex.h │ │ ├── pycore_structseq.h │ │ ├── pycore_symtable.h │ │ ├── pycore_sysmodule.h │ │ ├── pycore_traceback.h │ │ ├── pycore_tuple.h │ │ ├── pycore_typeobject.h │ │ ├── pycore_ucnhash.h │ │ ├── pycore_unicodeobject.h │ │ ├── pycore_unionobject.h │ │ └── pycore_warnings.h │ ├── intrcheck.h │ ├── iterobject.h │ ├── listobject.h │ ├── longobject.h │ ├── marshal.h │ ├── memoryobject.h │ ├── methodobject.h │ ├── modsupport.h │ ├── moduleobject.h │ ├── object.h │ ├── objimpl.h │ ├── opcode.h │ ├── osdefs.h │ ├── osmodule.h │ ├── patchlevel.h │ ├── py_curses.h │ ├── pybuffer.h │ ├── pycapsule.h │ ├── pyconfig.h │ ├── pydtrace.d │ ├── pydtrace.h │ ├── pyerrors.h │ ├── pyexpat.h │ ├── pyframe.h │ ├── pyhash.h │ ├── pylifecycle.h │ ├── pymacconfig.h │ ├── pymacro.h │ ├── pymath.h │ ├── pymem.h │ ├── pyport.h │ ├── pystate.h │ ├── pystrcmp.h │ ├── pystrtod.h │ ├── pythonrun.h │ ├── pythread.h │ ├── pytypedefs.h │ ├── rangeobject.h │ ├── setobject.h │ ├── sliceobject.h │ ├── structmember.h │ ├── structseq.h │ ├── sysmodule.h │ ├── token.h │ ├── traceback.h │ ├── tracemalloc.h │ ├── tupleobject.h │ ├── typeslots.h │ ├── unicodeobject.h │ ├── warnings.h │ └── weakrefobject.h │ └── win32 │ ├── Python.h │ ├── abstract.h │ ├── bltinmodule.h │ ├── boolobject.h │ ├── bytearrayobject.h │ ├── bytesobject.h │ ├── ceval.h │ ├── codecs.h │ ├── compile.h │ ├── complexobject.h │ ├── cpython │ ├── abstract.h │ ├── bytearrayobject.h │ ├── bytesobject.h │ ├── cellobject.h │ ├── ceval.h │ ├── classobject.h │ ├── code.h │ ├── compile.h │ ├── complexobject.h │ ├── context.h │ ├── descrobject.h │ ├── dictobject.h │ ├── fileobject.h │ ├── fileutils.h │ ├── floatobject.h │ ├── frameobject.h │ ├── funcobject.h │ ├── genobject.h │ ├── import.h │ ├── initconfig.h │ ├── listobject.h │ ├── longintrepr.h │ ├── longobject.h │ ├── methodobject.h │ ├── modsupport.h │ ├── object.h │ ├── objimpl.h │ ├── odictobject.h │ ├── picklebufobject.h │ ├── pthread_stubs.h │ ├── pyctype.h │ ├── pydebug.h │ ├── pyerrors.h │ ├── pyfpe.h │ ├── pyframe.h │ ├── pylifecycle.h │ ├── pymem.h │ ├── pystate.h │ ├── pythonrun.h │ ├── pythread.h │ ├── pytime.h │ ├── setobject.h │ ├── sysmodule.h │ ├── traceback.h │ ├── tupleobject.h │ ├── unicodeobject.h │ ├── warnings.h │ └── weakrefobject.h │ ├── datetime.h │ ├── descrobject.h │ ├── dictobject.h │ ├── dynamic_annotations.h │ ├── enumobject.h │ ├── errcode.h │ ├── exports.h │ ├── fileobject.h │ ├── fileutils.h │ ├── floatobject.h │ ├── frameobject.h │ ├── genericaliasobject.h │ ├── import.h │ ├── internal │ ├── pycore_abstract.h │ ├── pycore_accu.h │ ├── pycore_asdl.h │ ├── pycore_ast.h │ ├── pycore_ast_state.h │ ├── pycore_atomic.h │ ├── pycore_atomic_funcs.h │ ├── pycore_bitutils.h │ ├── pycore_blocks_output_buffer.h │ ├── pycore_bytes_methods.h │ ├── pycore_bytesobject.h │ ├── pycore_call.h │ ├── pycore_ceval.h │ ├── pycore_code.h │ ├── pycore_compile.h │ ├── pycore_condvar.h │ ├── pycore_context.h │ ├── pycore_dict.h │ ├── pycore_dtoa.h │ ├── pycore_emscripten_signal.h │ ├── pycore_exceptions.h │ ├── pycore_fileutils.h │ ├── pycore_floatobject.h │ ├── pycore_format.h │ ├── pycore_frame.h │ ├── pycore_function.h │ ├── pycore_gc.h │ ├── pycore_genobject.h │ ├── pycore_getopt.h │ ├── pycore_gil.h │ ├── pycore_global_objects.h │ ├── pycore_global_strings.h │ ├── pycore_hamt.h │ ├── pycore_hashtable.h │ ├── pycore_import.h │ ├── pycore_initconfig.h │ ├── pycore_interp.h │ ├── pycore_interpreteridobject.h │ ├── pycore_list.h │ ├── pycore_long.h │ ├── pycore_moduleobject.h │ ├── pycore_namespace.h │ ├── pycore_object.h │ ├── pycore_opcode.h │ ├── pycore_parser.h │ ├── pycore_pathconfig.h │ ├── pycore_pyarena.h │ ├── pycore_pyerrors.h │ ├── pycore_pyhash.h │ ├── pycore_pylifecycle.h │ ├── pycore_pymath.h │ ├── pycore_pymem.h │ ├── pycore_pystate.h │ ├── pycore_runtime.h │ ├── pycore_runtime_init.h │ ├── pycore_signal.h │ ├── pycore_sliceobject.h │ ├── pycore_strhex.h │ ├── pycore_structseq.h │ ├── pycore_symtable.h │ ├── pycore_sysmodule.h │ ├── pycore_traceback.h │ ├── pycore_tuple.h │ ├── pycore_typeobject.h │ ├── pycore_ucnhash.h │ ├── pycore_unicodeobject.h │ ├── pycore_unionobject.h │ └── pycore_warnings.h │ ├── intrcheck.h │ ├── iterobject.h │ ├── listobject.h │ ├── longobject.h │ ├── marshal.h │ ├── memoryobject.h │ ├── methodobject.h │ ├── modsupport.h │ ├── moduleobject.h │ ├── object.h │ ├── objimpl.h │ ├── opcode.h │ ├── osdefs.h │ ├── osmodule.h │ ├── patchlevel.h │ ├── py_curses.h │ ├── pybuffer.h │ ├── pycapsule.h │ ├── pyconfig.h │ ├── pydtrace.h │ ├── pyerrors.h │ ├── pyexpat.h │ ├── pyframe.h │ ├── pyhash.h │ ├── pylifecycle.h │ ├── pymacconfig.h │ ├── pymacro.h │ ├── pymath.h │ ├── pymem.h │ ├── pyport.h │ ├── pystate.h │ ├── pystrcmp.h │ ├── pystrtod.h │ ├── pythonrun.h │ ├── pythread.h │ ├── pytypedefs.h │ ├── rangeobject.h │ ├── setobject.h │ ├── sliceobject.h │ ├── structmember.h │ ├── structseq.h │ ├── sysmodule.h │ ├── token.h │ ├── traceback.h │ ├── tracemalloc.h │ ├── tupleobject.h │ ├── typeslots.h │ ├── unicodeobject.h │ ├── warnings.h │ └── weakrefobject.h ├── version └── version.h.in /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .github 3 | .idea 4 | .vscode 5 | docerkfile 6 | docs 7 | examples -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: shadowmonster 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Suggest an idea for this project! 3 | title: "[Feature]" 4 | labels: [enhancement] 5 | body: 6 | - type: checkboxes 7 | attributes: 8 | label: Before Requesting 9 | description: "I have double checked and agree with the following:" 10 | options: 11 | - label: I found no existing issue matching my feature request 12 | required: true 13 | - label: This request is related to Millennium, and not a request for a specific theme/addon 14 | required: true 15 | - type: textarea 16 | attributes: 17 | label: Describe the feature you'd like! 18 | description: A clear and concise description of what you want to see in Millennium. 19 | validations: 20 | required: true 21 | - type: textarea 22 | attributes: 23 | label: Anything else? 24 | description: | 25 | Links? References? Anything that will give us more context about the feature you are requesting! 26 | 27 | Tip: You can attach images by clicking this area to highlight it and then dragging files in. 28 | validations: 29 | required: false 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/THEME-SUBMISSION.yml: -------------------------------------------------------------------------------- 1 | name: Submit a Theme 2 | description: Submit a theme to be added to the website 3 | title: "[Submission]" 4 | labels: [enhancement] 5 | body: 6 | - type: checkboxes 7 | attributes: 8 | label: Before Requesting 9 | description: "I have double checked and agree with the following:" 10 | options: 11 | - label: I did not steal code from other theme developers without credit 12 | required: true 13 | - type: textarea 14 | attributes: 15 | label: Repository Info 16 | description: Provide the GitHub URL of the repository to be considered. 17 | validations: 18 | required: true 19 | validations: 20 | required: false 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Millennium Support Server 4 | url: https://millennium.web.app/discord 5 | about: The best place to get immediate support. 6 | -------------------------------------------------------------------------------- /.github/workflows/publish-aur.yml: -------------------------------------------------------------------------------- 1 | name: Publish to AUR 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Build Millennium"] 6 | types: 7 | - completed 8 | workflow_dispatch: 9 | 10 | concurrency: 11 | group: aur-publish 12 | cancel-in-progress: false 13 | 14 | jobs: 15 | aur-push: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - name: Checkout repository 20 | uses: actions/checkout@v4 21 | 22 | - name: Update Package Version 23 | run: | 24 | sed -i "s/pkgver=.*/pkgver=$(sed -n '2p' ./version | tr -d 'v\n')/" ./pkgbuild/PKGBUILD 25 | 26 | - name: Publish AUR package 27 | uses: KSXGitHub/github-actions-deploy-aur@master 28 | with: 29 | pkgname: millennium 30 | pkgbuild: ./pkgbuild/PKGBUILD 31 | assets: ./pkgbuild/millennium.install 32 | commit_username: GitHub Actions 33 | commit_email: github-actions@github.com 34 | ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} 35 | commit_message: Update AUR package 36 | ssh_keyscan_types: rsa,ecdsa,ed25519 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.idea 3 | /.vs 4 | /out 5 | /vendor/python/python311.dll 6 | /vendor/python/python311.lib 7 | /vendor/python/python311_d.lib 8 | /vendor/python/python311_d.dll 9 | 10 | # Ignore plugin example build assets 11 | /examples/plugin/.millennium 12 | 13 | /assets/src/env.ts -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/websocketpp"] 2 | path = vendor/websocketpp 3 | url = https://github.com/zaphoyd/websocketpp.git 4 | [submodule "vendor/asio"] 5 | path = vendor/asio 6 | url = https://github.com/chriskohlhoff/asio.git 7 | [submodule "vendor/nlohmann"] 8 | path = vendor/nlohmann 9 | url = https://github.com/nlohmann/json.git 10 | [submodule "vendor/fmt"] 11 | path = vendor/fmt 12 | url = https://github.com/fmtlib/fmt.git 13 | [submodule "vendor/vcpkg"] 14 | path = vendor/vcpkg 15 | url = https://github.com/microsoft/vcpkg.git 16 | [submodule "vendor/crow"] 17 | path = vendor/crow 18 | url = https://github.com/CrowCpp/Crow.git 19 | [submodule "vendor/ini"] 20 | path = vendor/ini 21 | url = https://github.com/metayeti/mINI.git 22 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "tabWidth": 4, 4 | "semi": true, 5 | "singleQuote": true, 6 | "trailingComma": "all", 7 | "jsxSingleQuote": false, 8 | "printWidth": 150 9 | } 10 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "main", 4 | { 5 | "name": "next", 6 | "prerelease": "beta" 7 | } 8 | ], 9 | "plugins": [ 10 | "@semantic-release/commit-analyzer", 11 | "@semantic-release/release-notes-generator", 12 | [ 13 | "@semantic-release/changelog", 14 | { 15 | "changelogFile": "docs/CHANGELOG.md" 16 | } 17 | ], 18 | [ 19 | "@semantic-release/git", 20 | { 21 | "assets": ["docs/CHANGELOG.md", "version"] 22 | } 23 | ], 24 | { 25 | "path": "@semantic-release/github", 26 | "assets": ["./artifacts/release/millennium*"] 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "cmake", 6 | "label": "CMake: build", 7 | "command": "build", 8 | "targets": [ 9 | "all" 10 | ], 11 | "preset": "${command:cmake.activeBuildPresetName}", 12 | "group": "build", 13 | "problemMatcher": [], 14 | "detail": "CMake template build task", 15 | "presentation": { 16 | "clear": true, 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Project Millennium 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .millennium/Dist/ 3 | .env -------------------------------------------------------------------------------- /assets/README.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | This portion of the repository serves as a way to manage updates, plugins, and themes for Millennium. This plugin is automatically integrated into Millennium. 3 | 4 | ### Adding Languages 5 | 6 | To add your spoken language to Millennium, fork this repository and place your language json (based on the [english locale](./src/locales/locales/english.json)) among the [current locales](./src/locales/locales/). Name the file `{your_language}.json` and append the target file to the `localizationFiles` in [this file](./src/locales/index.ts). 7 | 8 | Millennium is only maintaining the english language, and if any changes are made to the english locales that don't reflect on a target language, contributors are responsible for updating them. 9 | 10 | ### Contributing 11 | Clone this repository place it in your plugins folder and start Steam. You can now make changes to this library. Added changes to the `backend` should also take platform type into consideration as this library will eventually support Linux, OSX, and Windows >= 10 12 | 13 | ### Building 14 | 15 | ``` 16 | git clone https://github.com/SteamClientHomebrew/Millennium.git 17 | cd Millennium/assets 18 | npm install 19 | npm run dev 20 | ``` 21 | -------------------------------------------------------------------------------- /assets/core/config/ini.py: -------------------------------------------------------------------------------- 1 | import configparser 2 | import os 3 | import Millennium # type: ignore 4 | from plat_spec.main import config_path 5 | 6 | class IniConfig: 7 | config_path = config_path 8 | 9 | @staticmethod 10 | def get_config(header: str, key: str, fallback: str) -> str: 11 | config = configparser.ConfigParser() 12 | with open(IniConfig.config_path, 'r') as enabled: 13 | config.read_file(enabled) 14 | return config.get(header, key, fallback=fallback) 15 | 16 | @staticmethod 17 | def set_config(header: str, key: str, value: str) -> None: 18 | config = configparser.ConfigParser() 19 | with open(IniConfig.config_path, 'r') as enabled: 20 | config.read_file(enabled) 21 | config[header][key] = value 22 | with open(IniConfig.config_path, 'w') as enabled: 23 | config.write(enabled) -------------------------------------------------------------------------------- /assets/core/plat_spec/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | config_path = os.path.join(os.getenv("MILLENNIUM__CONFIG_PATH"), "millennium.ini") -------------------------------------------------------------------------------- /assets/core/unix/use_system.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | import os 4 | 5 | def use_system_libs(): 6 | system_lib_path = "/usr/lib" # Replace this if your libcurl location is different 7 | os.environ["LD_LIBRARY_PATH"] = f"{system_lib_path}:" + os.environ.get("LD_LIBRARY_PATH", "") 8 | 9 | def unuse_system_libs(): 10 | os.environ["LD_LIBRARY_PATH"] = os.environ.get("LD_LIBRARY_PATH", "").replace("/usr/lib:", "") -------------------------------------------------------------------------------- /assets/core/util/logger.py: -------------------------------------------------------------------------------- 1 | import PluginUtils # type: ignore 2 | logger = PluginUtils.Logger() -------------------------------------------------------------------------------- /assets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "millennium-ttc --build dev", 4 | "prod": "millennium-ttc --build prod" 5 | }, 6 | "devDependencies": { 7 | "@steambrew/api": "^3.8.12", 8 | "@steambrew/client": "^3.8.12", 9 | "@steambrew/ttc": "^1.2.2", 10 | "@steambrew/webkit": "^3.8.12", 11 | "@types/node": "^22.13.10", 12 | "@types/react": "16.14.0", 13 | "@types/react-dom": "^18.2.25", 14 | "shx": "^0.3.4", 15 | "tslib": "^2.6.2", 16 | "typescript": "^4.9.5" 17 | }, 18 | "type": "module", 19 | "name": "core", 20 | "version": "1.0.0", 21 | "description": "The core functionality plugin for Millennium", 22 | "main": "./frontend/index.jsx", 23 | "author": "Millennium", 24 | "license": "MIT", 25 | "pnpm": { 26 | "peerDependencyRules": { 27 | "ignoreMissing": [ 28 | "react", 29 | "react-dom" 30 | ] 31 | } 32 | }, 33 | "dependencies": { 34 | "ansi-to-react": "^6.1.6", 35 | "markdown-to-jsx": "^7.7.3" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /assets/pipx/dev_tools.py: -------------------------------------------------------------------------------- 1 | import importlib 2 | import json 3 | import subprocess 4 | import urllib.request, urllib.error 5 | from logger import logger 6 | 7 | class mpc: 8 | 9 | def __init__(self, m_python_bin): 10 | self.__python_bin = m_python_bin 11 | 12 | def update_millennium(self): 13 | logger.log("Updating Millennium Dev Tools...") 14 | subprocess.run([self.__python_bin, "-m", "pip", "install", "--upgrade", "millennium"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 15 | 16 | def start(self, config): 17 | if (config.get('PackageManager', 'dev_packages') != 'yes'): 18 | return 19 | 20 | try: 21 | if config.get('PackageManager', 'auto_update_dev_packages') == 'no': 22 | logger.log("Millennium Dev Tools auto-update is disabled.") 23 | return 24 | 25 | self.update_millennium() 26 | 27 | except importlib.metadata.PackageNotFoundError as e: 28 | logger.warn("Installing Millennium Dev Tools...") 29 | self.update_millennium() -------------------------------------------------------------------------------- /assets/pipx/logger.py: -------------------------------------------------------------------------------- 1 | import PluginUtils 2 | 3 | logger = PluginUtils.Logger("pipx") -------------------------------------------------------------------------------- /assets/pipx/main.py: -------------------------------------------------------------------------------- 1 | import os, sys 2 | sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 3 | sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) 4 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'core')) 5 | 6 | import config as config 7 | import time 8 | import importlib.metadata 9 | import dev_tools, pip_setup, package_manager 10 | from logger import logger 11 | 12 | logger.log("Starting Package Manager...") 13 | config = config.Config() 14 | 15 | def get_installed_packages(): 16 | package_names = [dist.metadata["Name"] for dist in importlib.metadata.distributions()] 17 | return package_names 18 | 19 | def main(): 20 | 21 | start_time = time.perf_counter() 22 | pip_setup.verify_pip() 23 | 24 | # keep millennium module up to date 25 | watchdog = dev_tools.mpc(config.get_python_path()) 26 | watchdog.start(config) 27 | 28 | if config.get('PackageManager', 'use_pip') == 'yes': 29 | # install missing packages 30 | package_manager.audit(config) 31 | 32 | elapsed_time_ms = (time.perf_counter() - start_time) * 1000 33 | logger.log(f"Finished in {elapsed_time_ms:.2f} ms") 34 | 35 | main() 36 | -------------------------------------------------------------------------------- /assets/pipx/pip_setup.py: -------------------------------------------------------------------------------- 1 | from logger import logger 2 | 3 | def verify_pip(): 4 | try: 5 | from pip._internal import main 6 | except ImportError: 7 | logger.error("PIP was not found on your Millennium installation. Please reinstall...") -------------------------------------------------------------------------------- /assets/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core", 3 | "common_name": "Millennium", 4 | "description": "An integrated plugin that provides core platform functionality.", 5 | "backend": "core", 6 | "frontend": "src" 7 | } 8 | -------------------------------------------------------------------------------- /assets/requirements.txt: -------------------------------------------------------------------------------- 1 | arrow==1.3.0 2 | psutil==7.0.0 3 | pywin32==308 | Windows 4 | requests==2.32.3 5 | winrt-Windows.UI.ViewManagement==2.3.0 | Windows 6 | winrt-Windows.UI==2.3.0 | Windows 7 | pygit2==1.16.0 | Windows 8 | GitPython==3.1.44 | Linux 9 | cssutils==2.11.1 10 | websockets==15.0.1 11 | watchdog==6.0.0 12 | PySocks==1.7.1 13 | pyperclip==1.9.0 14 | semver==3.0.4 15 | -------------------------------------------------------------------------------- /assets/src/Logger.ts: -------------------------------------------------------------------------------- 1 | const Logger = { 2 | Error: (...message: any) => { 3 | console.error('%c Millennium ', 'background: red; color: white', ...message); 4 | }, 5 | Log: (...message: any) => { 6 | console.log('%c Millennium ', 'background: purple; color: white', ...message); 7 | }, 8 | Warn: (...message: any) => { 9 | console.warn('%c Millennium ', 'background: orange; color: white', ...message); 10 | }, 11 | }; 12 | 13 | export { Logger }; 14 | -------------------------------------------------------------------------------- /assets/src/Settings.ts: -------------------------------------------------------------------------------- 1 | import { Millennium, pluginSelf } from '@steambrew/client'; 2 | import { SettingsProps } from './types'; 3 | 4 | export let SettingsStore: SettingsProps = pluginSelf.SettingsStore; 5 | 6 | export const Settings = { 7 | FetchAllSettings: () => { 8 | return new Promise(async (resolve: any, _reject: any) => { 9 | const settingsStore: SettingsProps = JSON.parse( 10 | await Millennium.callServerMethod('get_load_config') 11 | .then((result: any) => { 12 | pluginSelf.connectionFailed = false; 13 | return result; 14 | }) 15 | .catch((_: any) => { 16 | console.error('Failed to fetch settings'); 17 | pluginSelf.connectionFailed = true; 18 | }), 19 | ); 20 | 21 | SettingsStore = settingsStore; 22 | resolve(settingsStore); 23 | }); 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /assets/src/classes.ts: -------------------------------------------------------------------------------- 1 | import { findClassModule } from '@steambrew/client'; 2 | 3 | export const devClasses = findClassModule((m) => m.richPresenceLabel && m.blocked) as any; 4 | export const fieldClasses: any = findClassModule( 5 | (m) => m.FieldLabel && !m.GyroButtonPickerDialog && !m.ControllerOutline && !m.AwaitingEmailConfIcon, 6 | ); 7 | 8 | export const pagedSettingsClasses = findClassModule((m) => m.PagedSettingsDialog_PageList) as any; 9 | export const settingsClasses = findClassModule((m) => m.SettingsTitleBar && m.SettingsDialogButton) as any; 10 | export const notificationClasses = findClassModule( 11 | (m) => m.GroupMessageTitle && !m.ShortTemplate && !m.TwoLine && !m.FriendIndicator && !m.AchievementIcon, 12 | ) as any; 13 | export const steamSuperNavClass = (findClassModule((m) => m.RootMenuButton && m.RootMenuBar && m.SteamButton) as any)?.SteamButton; 14 | -------------------------------------------------------------------------------- /assets/src/custom_components/ConnectionFailed.tsx: -------------------------------------------------------------------------------- 1 | import { DialogButton, IconsModule, pluginSelf } from '@steambrew/client'; 2 | 3 | export const ConnectionFailed = () => { 4 | const OpenLogsFolder = () => { 5 | const logsPath = [pluginSelf.steamPath, 'ext', 'data', 'logs'].join('/'); 6 | SteamClient.System.OpenLocalDirectoryInSystemExplorer(logsPath); 7 | }; 8 | 9 | return ( 10 |
20 | 21 | 22 |
23 | Failed to connect to Millennium! 24 |
25 |

26 | This issue isn't network related, you're most likely missing a file millennium needs, or are experiencing an unexpected bug. 27 |

28 | 29 | 30 | Open Logs Folder 31 | 32 |
33 | ); 34 | }; 35 | -------------------------------------------------------------------------------- /assets/src/custom_components/FakeFriend.tsx: -------------------------------------------------------------------------------- 1 | import { Classes } from '@steambrew/client'; 2 | import React, { ReactNode } from 'react'; 3 | 4 | interface FakeFriendProps { 5 | eStatus?: string; 6 | strAvatarURL?: string; 7 | strGameName?: ReactNode; 8 | strPlayerName?: ReactNode; 9 | onClick?: () => void; 10 | } 11 | 12 | /** 13 | * @todo Get & use the webpack module for this 14 | */ 15 | export const FakeFriend: React.FC = ({ eStatus, strAvatarURL, strGameName, strPlayerName, onClick }) => ( 16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 |
{strPlayerName}
24 |
25 |
26 |
{strGameName}
27 |
28 |
29 |
30 | ); 31 | -------------------------------------------------------------------------------- /assets/src/custom_components/GenericDialog.tsx: -------------------------------------------------------------------------------- 1 | import { ModalPosition } from '@steambrew/client'; 2 | import { ReactNode } from 'react'; 3 | 4 | interface GenericConfirmDialogProps { 5 | children: ReactNode; 6 | } 7 | 8 | export const GenericConfirmDialog = ({ children }: GenericConfirmDialogProps) => ( 9 | 10 |
11 |
{children}
12 |
13 |
14 | ); 15 | -------------------------------------------------------------------------------- /assets/src/locales/locales/indonesian.json: -------------------------------------------------------------------------------- 1 | { 2 | "settingsPanelPlugins": "Plugins", 3 | "settingsPanelThemes": "Tema", 4 | "settingsPanelUpdates": "Pembaruan", 5 | "itemNoDescription": "Tidak ada deskripsi.", 6 | "themePanelClientTheme": "Tema Klien", 7 | "themePanelThemeTooltip": "Pilih tema yang akan digunakan Steam (diperlukan muat ulang)", 8 | "themePanelGetMoreThemes": "Lebih banyak tema", 9 | "themePanelInjectJavascript": "Gunakan JavaScript", 10 | "themePanelInjectJavascriptToolTip": "Mengizinkan tema untuk memasukkan JavaScript ke Steam. Menonaktifkan JavaScript dapat merusak antarmuka Steam (diperlukan muat ulang)", 11 | "themePanelInjectCSS": "Gunakan StyleSheets", 12 | "themePanelInjectCSSToolTip": "Mengizinkan tema untuk memasukkan stylesheets ke Steam.", 13 | "updatePanelHasUpdates": "Pembaruan tersedia!", 14 | "updatePanelHasUpdatesSub": "Millenium menemukan pembaruan berikut ini untuk tema Anda.", 15 | "updatePanelReleasedTag": "Dirilis:", 16 | "updatePanelReleasePatchNotes": "Catatan Pembaruan:", 17 | "updatePanelIsUpdating": "Melakukan Pembaruan...", 18 | "updatePanelUpdate": "Pembaruan", 19 | "updatePanelNoUpdatesFound": "Tidak ada pembaruan tersedia. Anda sudah siap!", 20 | "ViewMore": "Lihat Lebih Banyak", 21 | "aboutThemeAnonymous": "Anonim", 22 | "aboutThemeTitle": "Tentang", 23 | "aboutThemeVerifiedDev": "Pengembang Terverifikasi", 24 | "viewSourceCode": "Lihat Source Code", 25 | "showInFolder": "Tampilkan di Folder", 26 | "uninstall": "Hapus Instalasi", 27 | "optionReloadNow": "Muat Ulang Sekarang", 28 | "optionReloadLater": "Muat Ulang Nanti" 29 | } 30 | -------------------------------------------------------------------------------- /assets/src/patcher/SystemColors.ts: -------------------------------------------------------------------------------- 1 | import { pluginSelf } from '@steambrew/client'; 2 | import { SystemAccentColor } from '../types'; 3 | 4 | /** 5 | * appends a virtual CSS script into self module 6 | * @param systemColors SystemAccentColors 7 | */ 8 | export const DispatchSystemColors = (systemColors: SystemAccentColor) => { 9 | pluginSelf.systemColor = ` 10 | :root { 11 | --SystemAccentColor: ${systemColors.accent}; 12 | --SystemAccentColor-RGB: ${systemColors.accentRgb}; 13 | --SystemAccentColorLight1: ${systemColors.light1}; 14 | --SystemAccentColorLight1-RGB: ${systemColors.light1Rgb}; 15 | --SystemAccentColorLight2: ${systemColors.light2}; 16 | --SystemAccentColorLight2-RGB: ${systemColors.light2Rgb}; 17 | --SystemAccentColorLight3: ${systemColors.light3}; 18 | --SystemAccentColorLight3-RGB: ${systemColors.light3Rgb}; 19 | --SystemAccentColorDark1: ${systemColors.dark1}; 20 | --SystemAccentColorDark1-RGB: ${systemColors.dark1Rgb}; 21 | --SystemAccentColorDark2: ${systemColors.dark2}; 22 | --SystemAccentColorDark2-RGB: ${systemColors.dark2Rgb}; 23 | --SystemAccentColorDark3: ${systemColors.dark3}; 24 | --SystemAccentColorDark3-RGB: ${systemColors.dark3Rgb}; 25 | }`; 26 | }; 27 | -------------------------------------------------------------------------------- /assets/src/patcher/v1/GlobalColors.ts: -------------------------------------------------------------------------------- 1 | import { pluginSelf } from '@steambrew/client'; 2 | import { ColorProp } from '../../types'; 3 | 4 | /** 5 | * appends a virtual CSS script into self module 6 | * @param globalColors V1 Global Colors struct 7 | */ 8 | export const DispatchGlobalColors = (globalColors: ColorProp[]) => { 9 | pluginSelf.GlobalsColors = ` 10 | :root { 11 | ${globalColors.map((color) => `${color.ColorName}: ${color.HexColorCode};`).join(' ')} 12 | }`; 13 | }; 14 | -------------------------------------------------------------------------------- /assets/src/patcher/v2/Conditions.ts: -------------------------------------------------------------------------------- 1 | import { pluginSelf } from '@steambrew/client'; 2 | import { Conditions, ConditionsStore, ThemeItem, ConditionalControlFlowType as ModuleType } from '../../types'; 3 | import { EvaluatePatch } from '../Dispatch'; 4 | 5 | export const EvaluateConditions = (theme: ThemeItem, title: string, classes: string[], document: Document): void => { 6 | const themeConditions: Conditions = theme.data.Conditions; 7 | const savedConditions: ConditionsStore = pluginSelf.conditionals[theme.native]; 8 | 9 | for (const condition in themeConditions) { 10 | if (!themeConditions.hasOwnProperty(condition)) { 11 | return; 12 | } 13 | 14 | if (condition in savedConditions) { 15 | const patch = themeConditions[condition].values[savedConditions[condition]]; 16 | 17 | EvaluatePatch(ModuleType.TargetCss, patch, title, classes, document); 18 | EvaluatePatch(ModuleType.TargetJs, patch, title, classes, document); 19 | } 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /assets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": ".millennium/Dist", 4 | "module": "ESNext", 5 | "target": "ES2020", 6 | "jsx": "react", 7 | "jsxFactory": "window.SP_REACT.createElement", 8 | "jsxFragmentFactory": "window.SP_REACT.Fragment", 9 | "declaration": false, 10 | "moduleResolution": "node", 11 | "noUnusedLocals": false, 12 | "noUnusedParameters": true, 13 | "esModuleInterop": true, 14 | "noImplicitReturns": true, 15 | "noImplicitThis": true, 16 | "noImplicitAny": true, 17 | "allowSyntheticDefaultImports": true, 18 | "skipLibCheck": true, 19 | "resolveJsonModule": true, 20 | }, 21 | "include": ["src"], 22 | "exclude": ["node_modules"] 23 | } -------------------------------------------------------------------------------- /cli/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | set(CMAKE_CXX_STANDARD_REQUIRED True) 5 | 6 | # Set the project name and language 7 | project(cli) 8 | include_directories(include) 9 | include_directories(../vendor/fmt/include) 10 | 11 | # Optimize the build 12 | if(CMAKE_BUILD_TYPE STREQUAL "Release") 13 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -s -fdata-sections -ffunction-sections") 14 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s -fdata-sections -ffunction-sections") 15 | endif() 16 | 17 | add_compile_definitions( 18 | "FMT_HEADER_ONLY" 19 | ) 20 | 21 | find_package(CLI11 CONFIG REQUIRED) 22 | 23 | # Add the executable 24 | add_executable(cli src/main.cc src/sock_serv.cc) 25 | 26 | target_link_libraries(cli PRIVATE CLI11::CLI11) 27 | add_compile_definitions(MILLENNIUM_VERSION="${MILLENNIUM_VERSION}") 28 | 29 | set_target_properties(cli PROPERTIES OUTPUT_NAME "millennium") 30 | set_target_properties(cli PROPERTIES PREFIX "") 31 | 32 | install(TARGETS cli DESTINATION bin) 33 | -------------------------------------------------------------------------------- /cli/include/chown.h: -------------------------------------------------------------------------------- 1 | #ifndef CHOWN_H 2 | #define CHOWN_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | void change_ownership(const char *path) { 12 | struct stat statbuf; 13 | if (stat(path, &statbuf) == -1) { 14 | perror("stat"); 15 | return; 16 | } 17 | 18 | // Get current user's UID and GID 19 | uid_t uid = getuid(); 20 | gid_t gid = getgid(); 21 | 22 | // Change ownership of the file or directory 23 | if (chown(path, uid, gid) == -1) { 24 | perror("chown"); 25 | return; 26 | } 27 | 28 | // If it's a directory, recursively change ownership of its contents 29 | if (S_ISDIR(statbuf.st_mode)) { 30 | DIR *dir = opendir(path); 31 | if (dir == NULL) { 32 | perror("opendir"); 33 | return; 34 | } 35 | 36 | struct dirent *entry; 37 | while ((entry = readdir(dir)) != NULL) { 38 | // Skip the "." and ".." entries 39 | if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) 40 | continue; 41 | 42 | char newpath[1024]; 43 | snprintf(newpath, sizeof(newpath), "%s/%s", path, entry->d_name); 44 | 45 | // Recursively change ownership of the directory contents 46 | change_ownership(newpath); 47 | } 48 | 49 | closedir(dir); 50 | } 51 | } 52 | 53 | #endif // CHOWN_H -------------------------------------------------------------------------------- /cli/include/sock_serv.h: -------------------------------------------------------------------------------- 1 | enum Millennium { 2 | GET_LOADED_PLUGINS, 3 | GET_ENABLED_PLUGINS, 4 | LIST_PLUGINS, 5 | 6 | GET_PLUGIN_INFO, 7 | GET_PLUGIN_CONFIG, 8 | SET_PLUGIN_CONFIG, 9 | GET_PLUGIN_STATUS, 10 | SET_PLUGIN_STATUS, 11 | GET_PLUGIN_LOGS, 12 | 13 | GET_ACTIVE_THEME 14 | }; 15 | 16 | int send_message(enum Millennium message, char* data); -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | ### Theme Template 2 | 3 | - Located in the `/theme` directory. 4 | - Serves as a base for creating custom themes. 5 | - Designed to modify the visual appearance of the Steam client. 6 | - Provides essential assets and configurations for a cohesive design. 7 | 8 | ### Plugin Template 9 | 10 | - Located in the `/plugin` directory. 11 | - Serves as a framework for developing plugins. 12 | - Designed to change or extend the functionality of the Steam client. 13 | - Offers a structured approach for integrating new features. 14 | 15 | 16 | More documentation can be found here: https://docs.steambrew.app/developers -------------------------------------------------------------------------------- /examples/plugin/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /examples/plugin/README.md: -------------------------------------------------------------------------------- 1 | > [!CAUTION] 2 | > This plugin example and other related documentation is not yet finished. You will not receive support for development until everything is ready. This plugin template may not be fully functional, and critical portions of it may be outdated. Once this example is ready, this message will be removed 3 | 4 | ## Plugin Template 5 | A plugin template for Millennium providing a basic boilerplate to help get started. You'll need a decent understanding in python, and typescript (superset of javascript) 6 |
7 | 8 | ## Prerequisites 9 | - **[Millennium](https://github.com/SteamClientHomebrew/Millennium)** 10 | 11 | ## Setting up 12 | ```ps1 13 | git clone --depth=1 https://github.com/SteamClientHomebrew/Millennium 14 | mv ./Millennium/examples/plugin ./plugin_template 15 | rm -rf Millennium 16 | 17 | cd plugin_template 18 | pnpm install 19 | ``` 20 | 21 | ## Building 22 | ``` 23 | pnpm run dev 24 | ``` 25 | 26 | Then ensure your plugin template is in your plugins folder. 27 | `%MILLENNIUM_PATH%/plugins/plugin_template`, and select it from the "Plugins" tab within steam, or run `millennium plugins enable plugin_template` 28 | 29 | #### Note: 30 | **MILLENNIUM_PATH** = 31 | * Steam Path (ex: `C:\Program Files (x86)\Steam`) (Windows) 32 | * `~/.millennium` (Unix) 33 | 34 | ## Next Steps 35 | 36 | https://docs.steambrew.app/developers/plugins/learn -------------------------------------------------------------------------------- /examples/plugin/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "jsxFactory": "window.SP_REACT.createElement", 5 | "jsxFragmentFactory": "window.SP_REACT.Fragment", 6 | }, 7 | "include": ["."], 8 | "exclude": ["node_modules", "../webkit"], 9 | } -------------------------------------------------------------------------------- /examples/plugin/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "millennium-ttc --build dev", 4 | "build": "millennium-ttc --build prod" 5 | }, 6 | "devDependencies": { 7 | "@babel/preset-env": "^7.26.0", 8 | "@babel/preset-react": "^7.25.9", 9 | "@types/react": "16.14.0", 10 | "@types/react-dom": "^18.3.0", 11 | "@types/webpack": "^5.28.5" 12 | }, 13 | "type": "module", 14 | "name": "millennium-plugin", 15 | "version": "1.0.0", 16 | "description": "A template plugin for millennium", 17 | "main": "./frontend/index.jsx", 18 | "author": "Millennium", 19 | "license": "MIT", 20 | "dependencies": { 21 | "@steambrew/api": "^4.1.1", 22 | "@steambrew/client": "^4.1.1", 23 | "@steambrew/ttc": "^1.0.4", 24 | "@steambrew/webkit": "^4.1.1", 25 | "preact": "^10.25.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /examples/plugin/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/SteamClientHomebrew/Millennium/main/src/sys/plugin-schema.json", 3 | 4 | "name": "__plugin__", 5 | "common_name": "Plugin Example", 6 | "description": "A template plugin for Millennium." 7 | } -------------------------------------------------------------------------------- /examples/plugin/styles/styles.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --example-color: #000; 3 | } -------------------------------------------------------------------------------- /examples/plugin/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": ".millennium/Dist", 4 | "module": "ESNext", 5 | "target": "ES2020", 6 | "jsx": "react", 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "noUnusedLocals": true, 10 | "noUnusedParameters": true, 11 | "esModuleInterop": true, 12 | "noImplicitReturns": true, 13 | "noImplicitThis": true, 14 | "noImplicitAny": true, 15 | "allowSyntheticDefaultImports": true, 16 | "skipLibCheck": true, 17 | "resolveJsonModule": true 18 | } 19 | } -------------------------------------------------------------------------------- /examples/plugin/webkit/index.tsx: -------------------------------------------------------------------------------- 1 | import { callable } from "@steambrew/webkit" 2 | 3 | // preact is a lightweight alternative to react that is compatible with react components 4 | // This allows you to render components on pages without huge react dependencies 5 | import { render } from "preact"; 6 | 7 | const receiveFrontendMethod = callable<[{ message: string, status: boolean, count: number }], boolean>("Backend.receive_frontend_message") 8 | 9 | interface ExampleComponentProps { 10 | success: boolean; 11 | } 12 | 13 | const ExampleComponent: preact.FunctionalComponent = ({ success }): preact.VNode => ( 14 |
15 |

Hello, World!

16 |

We're using preact to render react-like components on non-react pages.

17 |

Message from backend: {success ? "Success!" : "Failure"}

18 |
19 | ); 20 | 21 | export default async function WebkitMain () { 22 | 23 | const success = await receiveFrontendMethod({ 24 | message: "Hello World From Frontend!", 25 | status: true, 26 | count: 69 27 | }) 28 | 29 | console.log("Result from receive_frontend_message:", success) 30 | render(, document.body); 31 | } -------------------------------------------------------------------------------- /examples/plugin/webkit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "jsxImportSource": "preact", 6 | "esModuleInterop": true, 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["."], 10 | "exclude": ["node_modules", "../frontend"], 11 | } -------------------------------------------------------------------------------- /examples/theme/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Theme Template 3 | A theme template for Millennium providing a basic boilerplate to help get started. You'll need a decent understanding in CSS, and potentially some JavaScript depending on the use case. 4 |
5 | 6 | ## Prerequisites 7 | - **[Millennium](https://github.com/SteamClientHomebrew/Millennium)** 8 | 9 | ## Setting up 10 | ```ps1 11 | git clone --depth=1 https://github.com/SteamClientHomebrew/Millennium 12 | mv ./Millennium/examples/theme ./theme_template 13 | rm -rf Millennium 14 | ``` 15 | 16 | ## Using 17 | 18 | Then ensure your theme template is in your themes folder. 19 | `%STEAM_PATH%/steamui/skins/theme_template`, and select it from the "Themes" tab within steam, or run `millennium themes use theme_template` 20 | 21 | ## Next Steps 22 | 23 | https://docs.steambrew.app/developers/themes/getting-started -------------------------------------------------------------------------------- /examples/theme/bigpicture.custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @description This file styles BPM (Big Picture Mode) 3 | */ 4 | -------------------------------------------------------------------------------- /examples/theme/bigpicture.custom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @description This js loads in BPM (Big Picture Mode) 3 | * 4 | * @note only functions if the user has javascript enabled. 5 | */ 6 | 7 | function initialize() { 8 | console.log("Hello World from BPM!") 9 | } 10 | 11 | initialize() -------------------------------------------------------------------------------- /examples/theme/friends.custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @description This file styles friends list, chat, and other related areas. 3 | */ -------------------------------------------------------------------------------- /examples/theme/friends.custom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @description This js loads all main steam windows 3 | * [Steam, Settings, Properties, Popups, Dialogs, ...] 4 | * 5 | * @note only functions if the user has javascript enabled. 6 | */ 7 | 8 | function initialize() { 9 | console.log("Hello World from millennium!") 10 | } 11 | 12 | initialize() -------------------------------------------------------------------------------- /examples/theme/libraryroot.custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @description This file styles all main steam windows 3 | * [Steam, Settings, Properties, Popups, Dialogs, ...] 4 | */ 5 | -------------------------------------------------------------------------------- /examples/theme/libraryroot.custom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @description This js load in the friends list, chat, and other related areas. 3 | * 4 | * @note only functions if the user has javascript enabled. 5 | */ 6 | 7 | function initialize() { 8 | console.log("Hello World from friends list!") 9 | } 10 | 11 | initialize() -------------------------------------------------------------------------------- /examples/theme/skin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Theme-Template", 3 | "author": "Millennium", 4 | "description": "An example template theme.", 5 | 6 | "discord_support": { 7 | "inviteCodeExcludingLink": "NcNMP6r2Cw" 8 | }, 9 | "github": { 10 | "owner": "SteamClientHomebrew", 11 | "repo_name": "ThemeTemplate" 12 | }, 13 | "header_image": "https://i.imgur.com/image_here.png", 14 | "splash_image": "https://i.imgur.com/image_here.png", 15 | "tags": [ 16 | "Example", 17 | "Template" 18 | ], 19 | "version": "1.0.0", 20 | 21 | "Steam-WebKit": "webkit.css", 22 | "UseDefaultPatches": true 23 | } -------------------------------------------------------------------------------- /examples/theme/webkit.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @description This file styles the steam store 3 | */ 4 | -------------------------------------------------------------------------------- /include/fvisible.h: -------------------------------------------------------------------------------- 1 | #ifndef MILLENNIUM_EXPORT_H 2 | #define MILLENNIUM_EXPORT_H 3 | 4 | /** 5 | * This header is used as a way to force functions to RVA map into the export table. 6 | * This exposes function ordinals externally, which can be used to identify function information from non-debug stripped binaries. 7 | * This is useful for debugging purposes on release builds, without having debug overhead. 8 | */ 9 | #if defined(_WIN32) || defined(__CYGWIN__) 10 | #ifdef __GNUC__ 11 | #define MILLENNIUM __attribute__((dllexport)) 12 | #else 13 | #define MILLENNIUM __declspec(dllexport)) 14 | #endif 15 | #define MILLENNIUM_PRIVATE 16 | #else 17 | #if __GNUC__ >= 4 18 | #define MILLENNIUM __attribute__((visibility("default"))) 19 | #define MILLENNIUM_PRIVATE __attribute__((visibility("hidden"))) 20 | #else 21 | #define MILLENNIUM 22 | #define MILLENNIUM_PRIVATE 23 | #endif 24 | #endif 25 | 26 | #endif // MILLENNIUM_EXPORT_H -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Millennium", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": {} 6 | } 7 | -------------------------------------------------------------------------------- /preload/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | set(BUILD_SHARED_LIBS OFF) 4 | 5 | if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Release") 6 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -s") 7 | set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS OFF) 8 | endif() 9 | 10 | # Set the project name 11 | project(preload) 12 | 13 | include_directories( 14 | ${CMAKE_SOURCE_DIR}/preload/include 15 | ${CMAKE_SOURCE_DIR}/include 16 | ) 17 | 18 | # Specify the C++ standard 19 | set(CMAKE_CXX_STANDARD 17) 20 | set(CMAKE_CXX_STANDARD_REQUIRED True) 21 | 22 | if(WIN32 AND NOT GITHUB_ACTION_BUILD) 23 | # debug output paths 24 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "C:/Program Files (x86)/Steam") 25 | set(LIBRARY_OUTPUT_DIRECTORY "C:/Program Files (x86)/Steam") 26 | elseif(UNIX AND NOT GITHUB_ACTION_BUILD) 27 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "$ENV{HOME}/.millennium/") 28 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "$ENV{HOME}/.millennium/") 29 | endif() 30 | 31 | find_package(CURL REQUIRED) # used for web requests. 32 | find_package(unofficial-minizip CONFIG REQUIRED) # used for extracting zip files 33 | 34 | add_compile_definitions( 35 | CURL_STATICLIB 36 | ) 37 | 38 | # Add the executable 39 | add_library(preload SHARED main.cc src/steam.cc src/http.cc src/unzip.cc) 40 | target_link_libraries(preload ${CMAKE_BINARY_DIR}/version.o) 41 | 42 | target_link_libraries(preload CURL::libcurl unofficial::minizip::minizip) 43 | 44 | set_target_properties(preload PROPERTIES OUTPUT_NAME "user32") 45 | set_target_properties(preload PROPERTIES PREFIX "") 46 | set_target_properties(preload PROPERTIES NO_EXPORT TRUE) 47 | -------------------------------------------------------------------------------- /preload/README.md: -------------------------------------------------------------------------------- 1 | ## Preload Module 2 | 3 | Responsible for bootstrapping millennium by 4 | 5 | * Setting up the SharedJSContext (the context window Millennium interacts with) 6 | * Checking for Millennium updates by the `%STEAM_PATH%/ext/update.flag` flag. 7 | * This update flag is set by user by agreeing to update Millennium, and is not automatically filed. 8 | 9 | 10 | This module then loads `millennium.dll`, defined in /src, which is responsible for everything else. -------------------------------------------------------------------------------- /scripts/ci/posix/bump.sh: -------------------------------------------------------------------------------- 1 | VERSION=$(npx semantic-release --dry-run | grep -oP 'The next release version is \K[0-9.]+') 2 | echo "Version: $VERSION" 3 | echo "::set-output name=version::$VERSION" 4 | echo "# current version of millennium" > ./version 5 | echo "v$VERSION" >> ./version 6 | 7 | git config user.email "github-actions@github.com" 8 | git config user.name "GitHub Actions" 9 | git add version 10 | git commit -m "chore(release): bump version to v$VERSION [skip ci]" 11 | git push -------------------------------------------------------------------------------- /scripts/ci/posix/mk-assets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "/home/runner/work/Millennium/Millennium" 4 | destinationBase="/home/runner/env/ext/data/assets" 5 | 6 | declare -A paths=( 7 | ["./assets/.millennium/Dist/index.js"]="$destinationBase/.millennium/Dist/index.js" 8 | ["./assets/core"]="$destinationBase/core" 9 | ["./assets/pipx"]="$destinationBase/pipx" 10 | ["./assets/requirements.txt"]="$destinationBase/requirements.txt" 11 | ["./assets/plugin.json"]="$destinationBase/plugin.json" 12 | ) 13 | 14 | for source in "${!paths[@]}"; do 15 | destination="${paths[$source]}" 16 | destinationDir="$(dirname "$destination")" 17 | if [ ! -d "$destinationDir" ]; then 18 | mkdir -p "$destinationDir" 19 | fi 20 | cp -r "$source" "$destination" 21 | done 22 | -------------------------------------------------------------------------------- /scripts/ci/posix/setup-python.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if the input path is provided 4 | if [ -z "$1" ]; then 5 | echo "Usage: $0 " 6 | exit 1 7 | fi 8 | 9 | TARGET_PATH="$1" 10 | 11 | # Define the source path of the pyenv Python version 12 | SOURCE_PATH="$HOME/.pyenv/versions/3.11.8" 13 | 14 | # Check if the source path exists 15 | if [ ! -d "$SOURCE_PATH" ]; then 16 | echo "Error: Source path $SOURCE_PATH does not exist." 17 | exit 1 18 | fi 19 | 20 | # Create the target path if it does not exist 21 | mkdir -p "$TARGET_PATH" 22 | 23 | # Copy the contents of the pyenv Python version to the target path 24 | cp -r "$SOURCE_PATH/"* "$TARGET_PATH" 25 | 26 | # Verify if the copy was successful 27 | if [ $? -eq 0 ]; then 28 | echo "Successfully copied Python 3.11.8 to $TARGET_PATH" 29 | else 30 | echo "Error: Failed to copy Python 3.11.8." 31 | exit 1 32 | fi -------------------------------------------------------------------------------- /scripts/ci/posix/version.sh: -------------------------------------------------------------------------------- 1 | VERSION=$(npx semantic-release --dry-run | grep -oP 'The next release version is \K[0-9.]+') 2 | echo "Version: $VERSION" 3 | echo "::set-output name=version::$VERSION" 4 | echo "# current version of millennium" > ./version 5 | echo "v$VERSION" >> ./version 6 | -------------------------------------------------------------------------------- /scripts/ci/win32/mk-assets.ps1: -------------------------------------------------------------------------------- 1 | Set-Location -Path "D:/a/Millennium/Millennium" 2 | $destinationBase = "D:/a/env/ext/data/assets" 3 | 4 | $paths = @{ 5 | "./assets/.millennium/Dist/index.js" = "$destinationBase/.millennium/Dist/index.js" 6 | "./assets/core" = "$destinationBase/core" 7 | "./assets/pipx" = "$destinationBase/pipx" 8 | "./assets/requirements.txt" = "$destinationBase/requirements.txt" 9 | "./assets/plugin.json" = "$destinationBase/plugin.json" 10 | } 11 | 12 | foreach ($source in $paths.Keys) { 13 | $destination = $paths[$source] 14 | $destinationDir = Split-Path -Path $destination -Parent 15 | if (-not (Test-Path -Path $destinationDir)) { 16 | New-Item -Path $destinationDir -ItemType Directory -Force 17 | } 18 | Copy-Item -Path $source -Destination $destination -Recurse -Force 19 | } -------------------------------------------------------------------------------- /scripts/ci/win32/version.ps1: -------------------------------------------------------------------------------- 1 | $VERSION = npx semantic-release --dry-run | Select-String -Pattern "The next release version is" | ForEach-Object { $_.ToString() -replace '.*The next release version is ([0-9.]+).*', '$1' } 2 | Write-Host "Version: $VERSION" 3 | Write-Output "::set-output name=version::$version" 4 | Set-Content -Path ./version -Value "# current version of millennium`nv$VERSION" -------------------------------------------------------------------------------- /scripts/update.ps1: -------------------------------------------------------------------------------- 1 | $UpdaterStatus = $true 2 | Invoke-WebRequest -useb "https://steambrew.app/install.ps1" | Invoke-Expression -------------------------------------------------------------------------------- /tests/FindPython_test.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | Py_Initialize(); 5 | Py_Finalize(); 6 | } 7 | -------------------------------------------------------------------------------- /vcpkg-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "default-registry": { 3 | "kind": "git", 4 | "baseline": "33e9c99208736b713cabe4490e15235f62f893d4", 5 | "repository": "https://github.com/microsoft/vcpkg" 6 | }, 7 | "registries": [ 8 | { 9 | "kind": "artifact", 10 | "location": "https://aka.ms/vcpkg-ce-default", 11 | "name": "microsoft" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | "curl", 4 | "minizip", 5 | "cli11" 6 | ] 7 | } -------------------------------------------------------------------------------- /vendor/python/posix/README.rst: -------------------------------------------------------------------------------- 1 | The Python C API 2 | ================ 3 | 4 | The C API is divided into three sections: 5 | 6 | 1. ``Include/``: Limited API 7 | 2. ``Include/cpython/``: CPython implementation details 8 | 3. ``Include/internal/``: The internal API 9 | 10 | Information on changing the C API is available `in the developer guide`_ 11 | 12 | .. _in the developer guide: https://devguide.python.org/c-api/ 13 | -------------------------------------------------------------------------------- /vendor/python/posix/bltinmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_BLTINMODULE_H 2 | #define Py_BLTINMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_DATA(PyTypeObject) PyFilter_Type; 8 | PyAPI_DATA(PyTypeObject) PyMap_Type; 9 | PyAPI_DATA(PyTypeObject) PyZip_Type; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_BLTINMODULE_H */ 15 | -------------------------------------------------------------------------------- /vendor/python/posix/boolobject.h: -------------------------------------------------------------------------------- 1 | /* Boolean object interface */ 2 | 3 | #ifndef Py_BOOLOBJECT_H 4 | #define Py_BOOLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | PyAPI_DATA(PyTypeObject) PyBool_Type; 11 | 12 | #define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type) 13 | 14 | /* Py_False and Py_True are the only two bools in existence. 15 | Don't forget to apply Py_INCREF() when returning either!!! */ 16 | 17 | /* Don't use these directly */ 18 | PyAPI_DATA(PyLongObject) _Py_FalseStruct; 19 | PyAPI_DATA(PyLongObject) _Py_TrueStruct; 20 | 21 | /* Use these macros */ 22 | #define Py_False ((PyObject *) &_Py_FalseStruct) 23 | #define Py_True ((PyObject *) &_Py_TrueStruct) 24 | 25 | // Test if an object is the True singleton, the same as "x is True" in Python. 26 | PyAPI_FUNC(int) Py_IsTrue(PyObject *x); 27 | #define Py_IsTrue(x) Py_Is((x), Py_True) 28 | 29 | // Test if an object is the False singleton, the same as "x is False" in Python. 30 | PyAPI_FUNC(int) Py_IsFalse(PyObject *x); 31 | #define Py_IsFalse(x) Py_Is((x), Py_False) 32 | 33 | /* Macros for returning Py_True or Py_False, respectively */ 34 | #define Py_RETURN_TRUE return Py_NewRef(Py_True) 35 | #define Py_RETURN_FALSE return Py_NewRef(Py_False) 36 | 37 | /* Function to return a bool from a C long */ 38 | PyAPI_FUNC(PyObject *) PyBool_FromLong(long); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* !Py_BOOLOBJECT_H */ 44 | -------------------------------------------------------------------------------- /vendor/python/posix/bytearrayobject.h: -------------------------------------------------------------------------------- 1 | /* ByteArray object interface */ 2 | 3 | #ifndef Py_BYTEARRAYOBJECT_H 4 | #define Py_BYTEARRAYOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* Type PyByteArrayObject represents a mutable array of bytes. 10 | * The Python API is that of a sequence; 11 | * the bytes are mapped to ints in [0, 256). 12 | * Bytes are not characters; they may be used to encode characters. 13 | * The only way to go between bytes and str/unicode is via encoding 14 | * and decoding. 15 | * For the convenience of C programmers, the bytes type is considered 16 | * to contain a char pointer, not an unsigned char pointer. 17 | */ 18 | 19 | /* Type object */ 20 | PyAPI_DATA(PyTypeObject) PyByteArray_Type; 21 | PyAPI_DATA(PyTypeObject) PyByteArrayIter_Type; 22 | 23 | /* Type check macros */ 24 | #define PyByteArray_Check(self) PyObject_TypeCheck(self, &PyByteArray_Type) 25 | #define PyByteArray_CheckExact(self) Py_IS_TYPE(self, &PyByteArray_Type) 26 | 27 | /* Direct API functions */ 28 | PyAPI_FUNC(PyObject *) PyByteArray_FromObject(PyObject *); 29 | PyAPI_FUNC(PyObject *) PyByteArray_Concat(PyObject *, PyObject *); 30 | PyAPI_FUNC(PyObject *) PyByteArray_FromStringAndSize(const char *, Py_ssize_t); 31 | PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject *); 32 | PyAPI_FUNC(char *) PyByteArray_AsString(PyObject *); 33 | PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_BYTEARRAYOBJECT_H 37 | # include "cpython/bytearrayobject.h" 38 | # undef Py_CPYTHON_BYTEARRAYOBJECT_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_BYTEARRAYOBJECT_H */ 45 | -------------------------------------------------------------------------------- /vendor/python/posix/compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_COMPILE_H 2 | #define Py_COMPILE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* These definitions must match corresponding definitions in graminit.h. */ 8 | #define Py_single_input 256 9 | #define Py_file_input 257 10 | #define Py_eval_input 258 11 | #define Py_func_type_input 345 12 | 13 | /* This doesn't need to match anything */ 14 | #define Py_fstring_input 800 15 | 16 | #ifndef Py_LIMITED_API 17 | # define Py_CPYTHON_COMPILE_H 18 | # include "cpython/compile.h" 19 | # undef Py_CPYTHON_COMPILE_H 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_COMPILE_H */ 26 | -------------------------------------------------------------------------------- /vendor/python/posix/complexobject.h: -------------------------------------------------------------------------------- 1 | /* Complex number structure */ 2 | 3 | #ifndef Py_COMPLEXOBJECT_H 4 | #define Py_COMPLEXOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* Complex object interface */ 10 | 11 | PyAPI_DATA(PyTypeObject) PyComplex_Type; 12 | 13 | #define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type) 14 | #define PyComplex_CheckExact(op) Py_IS_TYPE(op, &PyComplex_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag); 17 | 18 | PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op); 19 | PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op); 20 | 21 | #ifndef Py_LIMITED_API 22 | # define Py_CPYTHON_COMPLEXOBJECT_H 23 | # include "cpython/complexobject.h" 24 | # undef Py_CPYTHON_COMPLEXOBJECT_H 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_COMPLEXOBJECT_H */ 31 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/bytearrayobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_BYTEARRAYOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | /* Object layout */ 6 | typedef struct { 7 | PyObject_VAR_HEAD 8 | Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */ 9 | char *ob_bytes; /* Physical backing buffer */ 10 | char *ob_start; /* Logical start inside ob_bytes */ 11 | Py_ssize_t ob_exports; /* How many buffer exports */ 12 | } PyByteArrayObject; 13 | 14 | PyAPI_DATA(char) _PyByteArray_empty_string[]; 15 | 16 | /* Macros and static inline functions, trading safety for speed */ 17 | #define _PyByteArray_CAST(op) \ 18 | (assert(PyByteArray_Check(op)), _Py_CAST(PyByteArrayObject*, op)) 19 | 20 | static inline char* PyByteArray_AS_STRING(PyObject *op) 21 | { 22 | PyByteArrayObject *self = _PyByteArray_CAST(op); 23 | if (Py_SIZE(self)) { 24 | return self->ob_start; 25 | } 26 | return _PyByteArray_empty_string; 27 | } 28 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 29 | # define PyByteArray_AS_STRING(self) PyByteArray_AS_STRING(_PyObject_CAST(self)) 30 | #endif 31 | 32 | static inline Py_ssize_t PyByteArray_GET_SIZE(PyObject *op) { 33 | PyByteArrayObject *self = _PyByteArray_CAST(op); 34 | return Py_SIZE(self); 35 | } 36 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 37 | # define PyByteArray_GET_SIZE(self) PyByteArray_GET_SIZE(_PyObject_CAST(self)) 38 | #endif 39 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/cellobject.h: -------------------------------------------------------------------------------- 1 | /* Cell object interface */ 2 | 3 | #ifndef Py_LIMITED_API 4 | #ifndef Py_CELLOBJECT_H 5 | #define Py_CELLOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct { 11 | PyObject_HEAD 12 | /* Content of the cell or NULL when empty */ 13 | PyObject *ob_ref; 14 | } PyCellObject; 15 | 16 | PyAPI_DATA(PyTypeObject) PyCell_Type; 17 | 18 | #define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type) 19 | 20 | PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); 21 | PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); 22 | PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); 23 | 24 | #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) 25 | #define PyCell_SET(op, v) _Py_RVALUE(((PyCellObject *)(op))->ob_ref = (v)) 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_TUPLEOBJECT_H */ 31 | #endif /* Py_LIMITED_API */ 32 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/ceval.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_CEVAL_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *); 6 | PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg); 7 | PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *); 8 | PyAPI_FUNC(int) _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg); 9 | 10 | /* Helper to look up a builtin object */ 11 | PyAPI_FUNC(PyObject *) _PyEval_GetBuiltin(PyObject *); 12 | PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *); 13 | /* Look at the current frame's (if any) code's co_flags, and turn on 14 | the corresponding compiler flags in cf->cf_flags. Return 1 if any 15 | flag was set, else return 0. */ 16 | PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf); 17 | 18 | PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc); 19 | 20 | PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds); 21 | PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void); 22 | 23 | PyAPI_FUNC(Py_ssize_t) _PyEval_RequestCodeExtraIndex(freefunc); 24 | 25 | PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *); 26 | PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *); 27 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/complexobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_COMPLEXOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | double real; 7 | double imag; 8 | } Py_complex; 9 | 10 | /* Operations on complex numbers from complexmodule.c */ 11 | 12 | PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex); 13 | PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex); 14 | PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex); 15 | PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex); 16 | PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex); 17 | PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex); 18 | PyAPI_FUNC(double) _Py_c_abs(Py_complex); 19 | 20 | /* Complex object interface */ 21 | 22 | /* 23 | PyComplexObject represents a complex number with double-precision 24 | real and imaginary parts. 25 | */ 26 | typedef struct { 27 | PyObject_HEAD 28 | Py_complex cval; 29 | } PyComplexObject; 30 | 31 | PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex); 32 | 33 | PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op); 34 | 35 | #ifdef Py_BUILD_CORE 36 | /* Format the object based on the format_spec, as defined in PEP 3101 37 | (Advanced String Formatting). */ 38 | extern int _PyComplex_FormatAdvancedWriter( 39 | _PyUnicodeWriter *writer, 40 | PyObject *obj, 41 | PyObject *format_spec, 42 | Py_ssize_t start, 43 | Py_ssize_t end); 44 | #endif // Py_BUILD_CORE 45 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/fileobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); 6 | PyAPI_FUNC(char *) _Py_UniversalNewlineFgetsWithSize(char *, int, FILE*, PyObject *, size_t*); 7 | 8 | /* The std printer acts as a preliminary sys.stderr until the new io 9 | infrastructure is in place. */ 10 | PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int); 11 | PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; 12 | 13 | typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *); 14 | 15 | PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path); 16 | PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path); 17 | PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData); 18 | 19 | PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *); 20 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEUTILS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | // Used by _testcapi which must not use the internal C API 6 | PyAPI_FUNC(FILE*) _Py_fopen_obj( 7 | PyObject *path, 8 | const char *mode); 9 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/floatobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FLOATOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | PyObject_HEAD 7 | double ob_fval; 8 | } PyFloatObject; 9 | 10 | // Macro version of PyFloat_AsDouble() trading safety for speed. 11 | // It doesn't check if op is a double object. 12 | #define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval) 13 | 14 | 15 | PyAPI_FUNC(int) PyFloat_Pack2(double x, char *p, int le); 16 | PyAPI_FUNC(int) PyFloat_Pack4(double x, char *p, int le); 17 | PyAPI_FUNC(int) PyFloat_Pack8(double x, char *p, int le); 18 | 19 | PyAPI_FUNC(double) PyFloat_Unpack2(const char *p, int le); 20 | PyAPI_FUNC(double) PyFloat_Unpack4(const char *p, int le); 21 | PyAPI_FUNC(double) PyFloat_Unpack8(const char *p, int le); 22 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_CPYTHON_FRAMEOBJECT_H 4 | # error "this header file must not be included directly" 5 | #endif 6 | 7 | /* Standard object interface */ 8 | 9 | PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, 10 | PyObject *, PyObject *); 11 | 12 | /* The rest of the interface is specific for frame objects */ 13 | 14 | /* Conversions between "fast locals" and locals in dictionary */ 15 | 16 | PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int); 17 | 18 | /* -- Caveat emptor -- 19 | * The concept of entry frames is an implementation detail of the CPython 20 | * interpreter. This API is considered unstable and is provided for the 21 | * convenience of debuggers, profilers and state-inspecting tools. Notice that 22 | * this API can be changed in future minor versions if the underlying frame 23 | * mechanism change or the concept of an 'entry frame' or its semantics becomes 24 | * obsolete or outdated. */ 25 | 26 | PyAPI_FUNC(int) _PyFrame_IsEntryFrame(PyFrameObject *frame); 27 | 28 | PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f); 29 | PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *); 30 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/import.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_IMPORT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyMODINIT_FUNC PyInit__imp(void); 6 | 7 | PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *); 8 | 9 | PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(_Py_Identifier *name); 10 | PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module); 11 | PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module); 12 | 13 | PyAPI_FUNC(void) _PyImport_AcquireLock(void); 14 | PyAPI_FUNC(int) _PyImport_ReleaseLock(void); 15 | 16 | PyAPI_FUNC(int) _PyImport_FixupBuiltin( 17 | PyObject *mod, 18 | const char *name, /* UTF-8 encoded string */ 19 | PyObject *modules 20 | ); 21 | PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, 22 | PyObject *, PyObject *); 23 | 24 | struct _inittab { 25 | const char *name; /* ASCII encoded string */ 26 | PyObject* (*initfunc)(void); 27 | }; 28 | PyAPI_DATA(struct _inittab *) PyImport_Inittab; 29 | PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); 30 | 31 | struct _frozen { 32 | const char *name; /* ASCII encoded string */ 33 | const unsigned char *code; 34 | int size; 35 | int is_package; 36 | PyObject *(*get_code)(void); 37 | }; 38 | 39 | /* Embedding apps may change this pointer to point to their favorite 40 | collection of frozen modules: */ 41 | 42 | PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; 43 | 44 | PyAPI_DATA(PyObject *) _PyImport_GetModuleAttr(PyObject *, PyObject *); 45 | PyAPI_DATA(PyObject *) _PyImport_GetModuleAttrString(const char *, const char *); 46 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/odictobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ODICTOBJECT_H 2 | #define Py_ODICTOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* OrderedDict */ 9 | /* This API is optional and mostly redundant. */ 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | typedef struct _odictobject PyODictObject; 14 | 15 | PyAPI_DATA(PyTypeObject) PyODict_Type; 16 | PyAPI_DATA(PyTypeObject) PyODictIter_Type; 17 | PyAPI_DATA(PyTypeObject) PyODictKeys_Type; 18 | PyAPI_DATA(PyTypeObject) PyODictItems_Type; 19 | PyAPI_DATA(PyTypeObject) PyODictValues_Type; 20 | 21 | #define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type) 22 | #define PyODict_CheckExact(op) Py_IS_TYPE(op, &PyODict_Type) 23 | #define PyODict_SIZE(op) PyDict_GET_SIZE((op)) 24 | 25 | PyAPI_FUNC(PyObject *) PyODict_New(void); 26 | PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item); 27 | PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key); 28 | 29 | /* wrappers around PyDict* functions */ 30 | #define PyODict_GetItem(od, key) PyDict_GetItem(_PyObject_CAST(od), key) 31 | #define PyODict_GetItemWithError(od, key) \ 32 | PyDict_GetItemWithError(_PyObject_CAST(od), key) 33 | #define PyODict_Contains(od, key) PyDict_Contains(_PyObject_CAST(od), key) 34 | #define PyODict_Size(od) PyDict_Size(_PyObject_CAST(od)) 35 | #define PyODict_GetItemString(od, key) \ 36 | PyDict_GetItemString(_PyObject_CAST(od), key) 37 | 38 | #endif 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* !Py_ODICTOBJECT_H */ 44 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/picklebufobject.h: -------------------------------------------------------------------------------- 1 | /* PickleBuffer object. This is built-in for ease of use from third-party 2 | * C extensions. 3 | */ 4 | 5 | #ifndef Py_PICKLEBUFOBJECT_H 6 | #define Py_PICKLEBUFOBJECT_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type; 14 | 15 | #define PyPickleBuffer_Check(op) Py_IS_TYPE(op, &PyPickleBuffer_Type) 16 | 17 | /* Create a PickleBuffer redirecting to the given buffer-enabled object */ 18 | PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *); 19 | /* Get the PickleBuffer's underlying view to the original object 20 | * (NULL if released) 21 | */ 22 | PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *); 23 | /* Release the PickleBuffer. Returns 0 on success, -1 on error. */ 24 | PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *); 25 | 26 | #endif /* !Py_LIMITED_API */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_PICKLEBUFOBJECT_H */ 32 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/pyctype.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef PYCTYPE_H 3 | #define PYCTYPE_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define PY_CTF_LOWER 0x01 9 | #define PY_CTF_UPPER 0x02 10 | #define PY_CTF_ALPHA (PY_CTF_LOWER|PY_CTF_UPPER) 11 | #define PY_CTF_DIGIT 0x04 12 | #define PY_CTF_ALNUM (PY_CTF_ALPHA|PY_CTF_DIGIT) 13 | #define PY_CTF_SPACE 0x08 14 | #define PY_CTF_XDIGIT 0x10 15 | 16 | PyAPI_DATA(const unsigned int) _Py_ctype_table[256]; 17 | 18 | /* Unlike their C counterparts, the following macros are not meant to 19 | * handle an int with any of the values [EOF, 0-UCHAR_MAX]. The argument 20 | * must be a signed/unsigned char. */ 21 | #define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER) 22 | #define Py_ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER) 23 | #define Py_ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA) 24 | #define Py_ISDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_DIGIT) 25 | #define Py_ISXDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_XDIGIT) 26 | #define Py_ISALNUM(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALNUM) 27 | #define Py_ISSPACE(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_SPACE) 28 | 29 | PyAPI_DATA(const unsigned char) _Py_ctype_tolower[256]; 30 | PyAPI_DATA(const unsigned char) _Py_ctype_toupper[256]; 31 | 32 | #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)]) 33 | #define Py_TOUPPER(c) (_Py_ctype_toupper[Py_CHARMASK(c)]) 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* !PYCTYPE_H */ 39 | #endif /* !Py_LIMITED_API */ 40 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/pydebug.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_PYDEBUG_H 3 | #define Py_PYDEBUG_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(int) Py_DebugFlag; 9 | PyAPI_DATA(int) Py_VerboseFlag; 10 | PyAPI_DATA(int) Py_QuietFlag; 11 | PyAPI_DATA(int) Py_InteractiveFlag; 12 | PyAPI_DATA(int) Py_InspectFlag; 13 | PyAPI_DATA(int) Py_OptimizeFlag; 14 | PyAPI_DATA(int) Py_NoSiteFlag; 15 | PyAPI_DATA(int) Py_BytesWarningFlag; 16 | PyAPI_DATA(int) Py_FrozenFlag; 17 | PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; 18 | PyAPI_DATA(int) Py_DontWriteBytecodeFlag; 19 | PyAPI_DATA(int) Py_NoUserSiteDirectory; 20 | PyAPI_DATA(int) Py_UnbufferedStdioFlag; 21 | PyAPI_DATA(int) Py_HashRandomizationFlag; 22 | PyAPI_DATA(int) Py_IsolatedFlag; 23 | 24 | #ifdef MS_WINDOWS 25 | PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag; 26 | PyAPI_DATA(int) Py_LegacyWindowsStdioFlag; 27 | #endif 28 | 29 | /* this is a wrapper around getenv() that pays attention to 30 | Py_IgnoreEnvironmentFlag. It should be used for getting variables like 31 | PYTHONPATH and PYTHONHOME from the environment */ 32 | PyAPI_DATA(char*) Py_GETENV(const char *name); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_PYDEBUG_H */ 38 | #endif /* Py_LIMITED_API */ 39 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/pyfpe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_PYFPE_H 2 | #define Py_PYFPE_H 3 | /* Header excluded from the stable API */ 4 | #ifndef Py_LIMITED_API 5 | 6 | /* These macros used to do something when Python was built with --with-fpectl, 7 | * but support for that was dropped in 3.7. We continue to define them though, 8 | * to avoid breaking API users. 9 | */ 10 | 11 | #define PyFPE_START_PROTECT(err_string, leave_stmt) 12 | #define PyFPE_END_PROTECT(v) 13 | 14 | #endif /* !defined(Py_LIMITED_API) */ 15 | #endif /* !Py_PYFPE_H */ 16 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/pyframe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_PYFRAME_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_DATA(PyTypeObject) PyFrame_Type; 6 | 7 | #define PyFrame_Check(op) Py_IS_TYPE((op), &PyFrame_Type) 8 | 9 | PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame); 10 | PyAPI_FUNC(PyObject *) PyFrame_GetLocals(PyFrameObject *frame); 11 | 12 | PyAPI_FUNC(PyObject *) PyFrame_GetGlobals(PyFrameObject *frame); 13 | PyAPI_FUNC(PyObject *) PyFrame_GetBuiltins(PyFrameObject *frame); 14 | 15 | PyAPI_FUNC(PyObject *) PyFrame_GetGenerator(PyFrameObject *frame); 16 | PyAPI_FUNC(int) PyFrame_GetLasti(PyFrameObject *frame); 17 | 18 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/pythread.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_PYTHREAD_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | #define PYTHREAD_INVALID_THREAD_ID ((unsigned long)-1) 6 | 7 | #ifdef HAVE_FORK 8 | /* Private function to reinitialize a lock at fork in the child process. 9 | Reset the lock to the unlocked state. 10 | Return 0 on success, return -1 on error. */ 11 | PyAPI_FUNC(int) _PyThread_at_fork_reinit(PyThread_type_lock *lock); 12 | #endif /* HAVE_FORK */ 13 | 14 | #ifdef HAVE_PTHREAD_H 15 | /* Darwin needs pthread.h to know type name the pthread_key_t. */ 16 | # include 17 | # define NATIVE_TSS_KEY_T pthread_key_t 18 | #elif defined(NT_THREADS) 19 | /* In Windows, native TSS key type is DWORD, 20 | but hardcode the unsigned long to avoid errors for include directive. 21 | */ 22 | # define NATIVE_TSS_KEY_T unsigned long 23 | #elif defined(HAVE_PTHREAD_STUBS) 24 | # include "cpython/pthread_stubs.h" 25 | # define NATIVE_TSS_KEY_T pthread_key_t 26 | #else 27 | # error "Require native threads. See https://bugs.python.org/issue31370" 28 | #endif 29 | 30 | /* When Py_LIMITED_API is not defined, the type layout of Py_tss_t is 31 | exposed to allow static allocation in the API clients. Even in this case, 32 | you must handle TSS keys through API functions due to compatibility. 33 | */ 34 | struct _Py_tss_t { 35 | int _is_initialized; 36 | NATIVE_TSS_KEY_T _key; 37 | }; 38 | 39 | #undef NATIVE_TSS_KEY_T 40 | 41 | /* When static allocation, you must initialize with Py_tss_NEEDS_INIT. */ 42 | #define Py_tss_NEEDS_INIT {0} 43 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_SYSMODULE_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(PyObject *) _PySys_GetAttr(PyThreadState *tstate, 6 | PyObject *name); 7 | 8 | PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *); 9 | 10 | typedef int(*Py_AuditHookFunction)(const char *, PyObject *, void *); 11 | 12 | PyAPI_FUNC(int) PySys_Audit( 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*); 17 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TRACEBACK_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct _traceback PyTracebackObject; 6 | 7 | struct _traceback { 8 | PyObject_HEAD 9 | PyTracebackObject *tb_next; 10 | PyFrameObject *tb_frame; 11 | int tb_lasti; 12 | int tb_lineno; 13 | }; 14 | 15 | PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, PyObject **); 16 | PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int); 17 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/tupleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TUPLEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | PyObject_VAR_HEAD 7 | /* ob_item contains space for 'ob_size' elements. 8 | Items must normally not be NULL, except during construction when 9 | the tuple is not yet visible outside the function that builds it. */ 10 | PyObject *ob_item[1]; 11 | } PyTupleObject; 12 | 13 | PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, Py_ssize_t); 14 | PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *); 15 | 16 | /* Cast argument to PyTupleObject* type. */ 17 | #define _PyTuple_CAST(op) \ 18 | (assert(PyTuple_Check(op)), _Py_CAST(PyTupleObject*, (op))) 19 | 20 | // Macros and static inline functions, trading safety for speed 21 | 22 | static inline Py_ssize_t PyTuple_GET_SIZE(PyObject *op) { 23 | PyTupleObject *tuple = _PyTuple_CAST(op); 24 | return Py_SIZE(tuple); 25 | } 26 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 27 | # define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyObject_CAST(op)) 28 | #endif 29 | 30 | #define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[index]) 31 | 32 | /* Function *only* to be used to fill in brand new tuples */ 33 | static inline void 34 | PyTuple_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) { 35 | PyTupleObject *tuple = _PyTuple_CAST(op); 36 | tuple->ob_item[index] = value; 37 | } 38 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 39 | #define PyTuple_SET_ITEM(op, index, value) \ 40 | PyTuple_SET_ITEM(_PyObject_CAST(op), index, _PyObject_CAST(value)) 41 | #endif 42 | 43 | PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out); 44 | -------------------------------------------------------------------------------- /vendor/python/posix/cpython/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_WARNINGS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(int) PyErr_WarnExplicitObject( 6 | PyObject *category, 7 | PyObject *message, 8 | PyObject *filename, 9 | int lineno, 10 | PyObject *module, 11 | PyObject *registry); 12 | 13 | PyAPI_FUNC(int) PyErr_WarnExplicitFormat( 14 | PyObject *category, 15 | const char *filename, int lineno, 16 | const char *module, PyObject *registry, 17 | const char *format, ...); 18 | 19 | // DEPRECATED: Use PyErr_WarnEx() instead. 20 | #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) 21 | -------------------------------------------------------------------------------- /vendor/python/posix/descrobject.h: -------------------------------------------------------------------------------- 1 | /* Descriptors */ 2 | #ifndef Py_DESCROBJECT_H 3 | #define Py_DESCROBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef PyObject *(*getter)(PyObject *, void *); 9 | typedef int (*setter)(PyObject *, PyObject *, void *); 10 | 11 | struct PyGetSetDef { 12 | const char *name; 13 | getter get; 14 | setter set; 15 | const char *doc; 16 | void *closure; 17 | }; 18 | 19 | PyAPI_DATA(PyTypeObject) PyClassMethodDescr_Type; 20 | PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type; 21 | PyAPI_DATA(PyTypeObject) PyMemberDescr_Type; 22 | PyAPI_DATA(PyTypeObject) PyMethodDescr_Type; 23 | PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type; 24 | PyAPI_DATA(PyTypeObject) PyDictProxy_Type; 25 | PyAPI_DATA(PyTypeObject) PyProperty_Type; 26 | 27 | PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); 28 | PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); 29 | PyAPI_FUNC(PyObject *) PyDescr_NewMember(PyTypeObject *, PyMemberDef *); 30 | PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, PyGetSetDef *); 31 | 32 | PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *); 33 | PyAPI_FUNC(PyObject *) PyWrapper_New(PyObject *, PyObject *); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_DESCROBJECT_H 37 | # include "cpython/descrobject.h" 38 | # undef Py_CPYTHON_DESCROBJECT_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_DESCROBJECT_H */ 45 | -------------------------------------------------------------------------------- /vendor/python/posix/enumobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ENUMOBJECT_H 2 | #define Py_ENUMOBJECT_H 3 | 4 | /* Enumerate Object */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_DATA(PyTypeObject) PyEnum_Type; 11 | PyAPI_DATA(PyTypeObject) PyReversed_Type; 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* !Py_ENUMOBJECT_H */ 18 | -------------------------------------------------------------------------------- /vendor/python/posix/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EXPORTS_H 2 | #define Py_EXPORTS_H 3 | 4 | #if defined(_WIN32) || defined(__CYGWIN__) 5 | #define Py_IMPORTED_SYMBOL __declspec(dllimport) 6 | #define Py_EXPORTED_SYMBOL __declspec(dllexport) 7 | #define Py_LOCAL_SYMBOL 8 | #else 9 | /* 10 | * If we only ever used gcc >= 5, we could use __has_attribute(visibility) 11 | * as a cross-platform way to determine if visibility is supported. However, 12 | * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions 13 | * have 4 < gcc < 5. 14 | */ 15 | #ifndef __has_attribute 16 | #define __has_attribute(x) 0 // Compatibility with non-clang compilers. 17 | #endif 18 | #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ 19 | (defined(__clang__) && __has_attribute(visibility)) 20 | #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) 21 | #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) 22 | #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) 23 | #else 24 | #define Py_IMPORTED_SYMBOL 25 | #define Py_EXPORTED_SYMBOL 26 | #define Py_LOCAL_SYMBOL 27 | #endif 28 | #endif 29 | 30 | #endif /* Py_EXPORTS_H */ 31 | -------------------------------------------------------------------------------- /vendor/python/posix/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_FILEUTILS_H 2 | #define Py_FILEUTILS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 8 | PyAPI_FUNC(wchar_t *) Py_DecodeLocale( 9 | const char *arg, 10 | size_t *size); 11 | 12 | PyAPI_FUNC(char*) Py_EncodeLocale( 13 | const wchar_t *text, 14 | size_t *error_pos); 15 | #endif 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_FILEUTILS_H 19 | # include "cpython/fileutils.h" 20 | # undef Py_CPYTHON_FILEUTILS_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_FILEUTILS_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/posix/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_FRAMEOBJECT_H 4 | #define Py_FRAMEOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include "pyframe.h" 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_FRAMEOBJECT_H 13 | # include "cpython/frameobject.h" 14 | # undef Py_CPYTHON_FRAMEOBJECT_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_FRAMEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /vendor/python/posix/genericaliasobject.h: -------------------------------------------------------------------------------- 1 | // Implementation of PEP 585: support list[int] etc. 2 | #ifndef Py_GENERICALIASOBJECT_H 3 | #define Py_GENERICALIASOBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(PyObject *) Py_GenericAlias(PyObject *, PyObject *); 9 | PyAPI_DATA(PyTypeObject) Py_GenericAliasType; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_GENERICALIASOBJECT_H */ 15 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_abstract.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_ABSTRACT_H 2 | #define Py_INTERNAL_ABSTRACT_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 | // Fast inlined version of PyIndex_Check() 12 | static inline int 13 | _PyIndex_Check(PyObject *obj) 14 | { 15 | PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; 16 | return (tp_as_number != NULL && tp_as_number->nb_index != NULL); 17 | } 18 | 19 | PyObject *_PyNumber_PowerNoMod(PyObject *lhs, PyObject *rhs); 20 | PyObject *_PyNumber_InPlacePowerNoMod(PyObject *lhs, PyObject *rhs); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_INTERNAL_ABSTRACT_H */ 26 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_accu.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_ACCU_H 3 | #define Py_INTERNAL_ACCU_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /*** This is a private API for use by the interpreter and the stdlib. 9 | *** Its definition may be changed or removed at any moment. 10 | ***/ 11 | 12 | #ifndef Py_BUILD_CORE 13 | # error "this header requires Py_BUILD_CORE define" 14 | #endif 15 | 16 | /* 17 | * A two-level accumulator of unicode objects that avoids both the overhead 18 | * of keeping a huge number of small separate objects, and the quadratic 19 | * behaviour of using a naive repeated concatenation scheme. 20 | */ 21 | 22 | #undef small /* defined by some Windows headers */ 23 | 24 | typedef struct { 25 | PyObject *large; /* A list of previously accumulated large strings */ 26 | PyObject *small; /* Pending small strings */ 27 | } _PyAccu; 28 | 29 | PyAPI_FUNC(int) _PyAccu_Init(_PyAccu *acc); 30 | PyAPI_FUNC(int) _PyAccu_Accumulate(_PyAccu *acc, PyObject *unicode); 31 | PyAPI_FUNC(PyObject *) _PyAccu_FinishAsList(_PyAccu *acc); 32 | PyAPI_FUNC(PyObject *) _PyAccu_Finish(_PyAccu *acc); 33 | PyAPI_FUNC(void) _PyAccu_Destroy(_PyAccu *acc); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* !Py_INTERNAL_ACCU_H */ 39 | #endif /* !Py_LIMITED_API */ 40 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_bytesobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_BYTESOBJECT_H 2 | #define Py_INTERNAL_BYTESOBJECT_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyBytes_InitTypes(PyInterpreterState *); 15 | 16 | 17 | /* Substring Search. 18 | 19 | Returns the index of the first occurrence of 20 | a substring ("needle") in a larger text ("haystack"). 21 | If the needle is not found, return -1. 22 | If the needle is found, add offset to the index. 23 | */ 24 | 25 | PyAPI_FUNC(Py_ssize_t) 26 | _PyBytes_Find(const char *haystack, Py_ssize_t len_haystack, 27 | const char *needle, Py_ssize_t len_needle, 28 | Py_ssize_t offset); 29 | 30 | /* Same as above, but search right-to-left */ 31 | PyAPI_FUNC(Py_ssize_t) 32 | _PyBytes_ReverseFind(const char *haystack, Py_ssize_t len_haystack, 33 | const char *needle, Py_ssize_t len_needle, 34 | Py_ssize_t offset); 35 | 36 | 37 | /** Helper function to implement the repeat and inplace repeat methods on a buffer 38 | * 39 | * len_dest is assumed to be an integer multiple of len_src. 40 | * If src equals dest, then assume the operation is inplace. 41 | * 42 | * This method repeately doubles the number of bytes copied to reduce 43 | * the number of invocations of memcpy. 44 | */ 45 | PyAPI_FUNC(void) 46 | _PyBytes_Repeat(char* dest, Py_ssize_t len_dest, 47 | const char* src, Py_ssize_t len_src); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | #endif /* !Py_INTERNAL_BYTESOBJECT_H */ 53 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_COMPILE_H 2 | #define Py_INTERNAL_COMPILE_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 | struct _arena; // Type defined in pycore_pyarena.h 12 | struct _mod; // Type defined in pycore_ast.h 13 | 14 | // Export the symbol for test_peg_generator (built as a library) 15 | PyAPI_FUNC(PyCodeObject*) _PyAST_Compile( 16 | struct _mod *mod, 17 | PyObject *filename, 18 | PyCompilerFlags *flags, 19 | int optimize, 20 | struct _arena *arena); 21 | extern PyFutureFeatures* _PyFuture_FromAST( 22 | struct _mod * mod, 23 | PyObject *filename 24 | ); 25 | 26 | extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); 27 | 28 | typedef struct { 29 | int optimize; 30 | int ff_features; 31 | 32 | int recursion_depth; /* current recursion depth */ 33 | int recursion_limit; /* recursion limit */ 34 | } _PyASTOptimizeState; 35 | 36 | extern int _PyAST_Optimize( 37 | struct _mod *, 38 | struct _arena *arena, 39 | _PyASTOptimizeState *state); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_INTERNAL_COMPILE_H */ 45 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_context.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CONTEXT_H 2 | #define Py_INTERNAL_CONTEXT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | #include "pycore_hamt.h" /* PyHamtObject */ 9 | 10 | 11 | extern PyTypeObject _PyContextTokenMissing_Type; 12 | 13 | /* runtime lifecycle */ 14 | 15 | PyStatus _PyContext_Init(PyInterpreterState *); 16 | void _PyContext_Fini(PyInterpreterState *); 17 | 18 | 19 | /* other API */ 20 | 21 | #ifndef WITH_FREELISTS 22 | // without freelists 23 | # define PyContext_MAXFREELIST 0 24 | #endif 25 | 26 | #ifndef PyContext_MAXFREELIST 27 | # define PyContext_MAXFREELIST 255 28 | #endif 29 | 30 | struct _Py_context_state { 31 | #if PyContext_MAXFREELIST > 0 32 | // List of free PyContext objects 33 | PyContext *freelist; 34 | int numfree; 35 | #endif 36 | }; 37 | 38 | struct _pycontextobject { 39 | PyObject_HEAD 40 | PyContext *ctx_prev; 41 | PyHamtObject *ctx_vars; 42 | PyObject *ctx_weakreflist; 43 | int ctx_entered; 44 | }; 45 | 46 | 47 | struct _pycontextvarobject { 48 | PyObject_HEAD 49 | PyObject *var_name; 50 | PyObject *var_default; 51 | PyObject *var_cached; 52 | uint64_t var_cached_tsid; 53 | uint64_t var_cached_tsver; 54 | Py_hash_t var_hash; 55 | }; 56 | 57 | 58 | struct _pycontexttokenobject { 59 | PyObject_HEAD 60 | PyContext *tok_ctx; 61 | PyContextVar *tok_var; 62 | PyObject *tok_oldval; 63 | int tok_used; 64 | }; 65 | 66 | 67 | #endif /* !Py_INTERNAL_CONTEXT_H */ 68 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_dtoa.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | #ifndef Py_BUILD_CORE 6 | # error "this header requires Py_BUILD_CORE define" 7 | #endif 8 | 9 | #include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR 10 | 11 | 12 | #if _PY_SHORT_FLOAT_REPR == 1 13 | 14 | /* These functions are used by modules compiled as C extension like math: 15 | they must be exported. */ 16 | 17 | PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr); 18 | PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, 19 | int *decpt, int *sign, char **rve); 20 | PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); 21 | PyAPI_FUNC(double) _Py_dg_stdnan(int sign); 22 | PyAPI_FUNC(double) _Py_dg_infinity(int sign); 23 | 24 | #endif // _PY_SHORT_FLOAT_REPR == 1 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_emscripten_signal.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EMSCRIPTEN_SIGNAL_H 2 | #define Py_EMSCRIPTEN_SIGNAL_H 3 | 4 | #if defined(__EMSCRIPTEN__) 5 | 6 | void 7 | _Py_CheckEmscriptenSignals(void); 8 | 9 | void 10 | _Py_CheckEmscriptenSignalsPeriodically(void); 11 | 12 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() _Py_CheckEmscriptenSignals() 13 | 14 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically() 15 | 16 | extern int Py_EMSCRIPTEN_SIGNAL_HANDLING; 17 | 18 | #else 19 | 20 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() 21 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() 22 | 23 | #endif // defined(__EMSCRIPTEN__) 24 | 25 | #endif // ndef Py_EMSCRIPTEN_SIGNAL_H 26 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_exceptions.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_EXCEPTIONS_H 2 | #define Py_INTERNAL_EXCEPTIONS_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyExc_InitState(PyInterpreterState *); 15 | extern PyStatus _PyExc_InitGlobalObjects(PyInterpreterState *); 16 | extern int _PyExc_InitTypes(PyInterpreterState *); 17 | extern void _PyExc_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | struct _Py_exc_state { 23 | // The dict mapping from errno codes to OSError subclasses 24 | PyObject *errnomap; 25 | PyBaseExceptionObject *memerrors_freelist; 26 | int memerrors_numfree; 27 | // The ExceptionGroup type 28 | PyObject *PyExc_ExceptionGroup; 29 | }; 30 | 31 | extern void _PyExc_ClearExceptionGroupType(PyInterpreterState *); 32 | 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_INTERNAL_EXCEPTIONS_H */ 38 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_floatobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FLOATOBJECT_H 2 | #define Py_INTERNAL_FLOATOBJECT_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern void _PyFloat_InitState(PyInterpreterState *); 15 | extern PyStatus _PyFloat_InitTypes(PyInterpreterState *); 16 | extern void _PyFloat_Fini(PyInterpreterState *); 17 | extern void _PyFloat_FiniType(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | #ifndef WITH_FREELISTS 23 | // without freelists 24 | # define PyFloat_MAXFREELIST 0 25 | #endif 26 | 27 | #ifndef PyFloat_MAXFREELIST 28 | # define PyFloat_MAXFREELIST 100 29 | #endif 30 | 31 | struct _Py_float_state { 32 | #if PyFloat_MAXFREELIST > 0 33 | /* Special free list 34 | free_list is a singly-linked list of available PyFloatObjects, 35 | linked via abuse of their ob_type members. */ 36 | int numfree; 37 | PyFloatObject *free_list; 38 | #endif 39 | }; 40 | 41 | void _PyFloat_ExactDealloc(PyObject *op); 42 | 43 | 44 | PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out); 45 | 46 | 47 | /* Format the object based on the format_spec, as defined in PEP 3101 48 | (Advanced String Formatting). */ 49 | PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter( 50 | _PyUnicodeWriter *writer, 51 | PyObject *obj, 52 | PyObject *format_spec, 53 | Py_ssize_t start, 54 | Py_ssize_t end); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #endif /* !Py_INTERNAL_FLOATOBJECT_H */ 60 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_format.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FORMAT_H 2 | #define Py_INTERNAL_FORMAT_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 | /* Format codes 12 | * F_LJUST '-' 13 | * F_SIGN '+' 14 | * F_BLANK ' ' 15 | * F_ALT '#' 16 | * F_ZERO '0' 17 | */ 18 | #define F_LJUST (1<<0) 19 | #define F_SIGN (1<<1) 20 | #define F_BLANK (1<<2) 21 | #define F_ALT (1<<3) 22 | #define F_ZERO (1<<4) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_INTERNAL_FORMAT_H */ 28 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_function.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FUNCTION_H 2 | #define Py_INTERNAL_FUNCTION_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 | extern PyFunctionObject* _PyFunction_FromConstructor(PyFrameConstructor *constr); 12 | 13 | extern uint32_t _PyFunction_GetVersionForCurrentState(PyFunctionObject *func); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif /* !Py_INTERNAL_FUNCTION_H */ 19 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_genobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_GENOBJECT_H 2 | #define Py_INTERNAL_GENOBJECT_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 | extern PyObject *_PyGen_yf(PyGenObject *); 12 | extern PyObject *_PyCoro_GetAwaitableIter(PyObject *o); 13 | extern PyObject *_PyAsyncGenValueWrapperNew(PyObject *); 14 | 15 | /* runtime lifecycle */ 16 | 17 | extern void _PyAsyncGen_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | #ifndef WITH_FREELISTS 23 | // without freelists 24 | # define _PyAsyncGen_MAXFREELIST 0 25 | #endif 26 | 27 | #ifndef _PyAsyncGen_MAXFREELIST 28 | # define _PyAsyncGen_MAXFREELIST 80 29 | #endif 30 | 31 | struct _Py_async_gen_state { 32 | #if _PyAsyncGen_MAXFREELIST > 0 33 | /* Freelists boost performance 6-10%; they also reduce memory 34 | fragmentation, as _PyAsyncGenWrappedValue and PyAsyncGenASend 35 | are short-living objects that are instantiated for every 36 | __anext__() call. */ 37 | struct _PyAsyncGenWrappedValue* value_freelist[_PyAsyncGen_MAXFREELIST]; 38 | int value_numfree; 39 | 40 | struct PyAsyncGenASend* asend_freelist[_PyAsyncGen_MAXFREELIST]; 41 | int asend_numfree; 42 | #endif 43 | }; 44 | 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | #endif /* !Py_INTERNAL_GENOBJECT_H */ 50 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PYGETOPT_H 2 | #define Py_INTERNAL_PYGETOPT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | extern int _PyOS_opterr; 9 | extern Py_ssize_t _PyOS_optind; 10 | extern const wchar_t *_PyOS_optarg; 11 | 12 | extern void _PyOS_ResetGetOpt(void); 13 | 14 | typedef struct { 15 | const wchar_t *name; 16 | int has_arg; 17 | int val; 18 | } _PyOS_LongOption; 19 | 20 | extern int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex); 21 | 22 | #endif /* !Py_INTERNAL_PYGETOPT_H */ 23 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_global_objects.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_GLOBAL_OBJECTS_H 2 | #define Py_INTERNAL_GLOBAL_OBJECTS_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 | #include "pycore_gc.h" // PyGC_Head 12 | #include "pycore_global_strings.h" // struct _Py_global_strings 13 | 14 | 15 | // These would be in pycore_long.h if it weren't for an include cycle. 16 | #define _PY_NSMALLPOSINTS 257 17 | #define _PY_NSMALLNEGINTS 5 18 | 19 | 20 | // Only immutable objects should be considered runtime-global. 21 | // All others must be per-interpreter. 22 | 23 | #define _Py_GLOBAL_OBJECT(NAME) \ 24 | _PyRuntime.global_objects.NAME 25 | #define _Py_SINGLETON(NAME) \ 26 | _Py_GLOBAL_OBJECT(singletons.NAME) 27 | 28 | struct _Py_global_objects { 29 | struct { 30 | /* Small integers are preallocated in this array so that they 31 | * can be shared. 32 | * The integers that are preallocated are those in the range 33 | * -_PY_NSMALLNEGINTS (inclusive) to _PY_NSMALLPOSINTS (exclusive). 34 | */ 35 | PyLongObject small_ints[_PY_NSMALLNEGINTS + _PY_NSMALLPOSINTS]; 36 | 37 | PyBytesObject bytes_empty; 38 | struct { 39 | PyBytesObject ob; 40 | char eos; 41 | } bytes_characters[256]; 42 | 43 | struct _Py_global_strings strings; 44 | 45 | _PyGC_Head_UNUSED _tuple_empty_gc_not_used; 46 | PyTupleObject tuple_empty; 47 | } singletons; 48 | }; 49 | 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | #endif /* !Py_INTERNAL_GLOBAL_OBJECTS_H */ 55 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_import.h: -------------------------------------------------------------------------------- 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 | #ifdef HAVE_FORK 9 | extern PyStatus _PyImport_ReInitLock(void); 10 | #endif 11 | extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate); 12 | 13 | struct _module_alias { 14 | const char *name; /* ASCII encoded string */ 15 | const char *orig; /* ASCII encoded string */ 16 | }; 17 | 18 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenBootstrap; 19 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenStdlib; 20 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenTest; 21 | extern const struct _module_alias * _PyImport_FrozenAliases; 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_IMPORT_H */ 27 | #endif /* !Py_LIMITED_API */ 28 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_interpreteridobject.h: -------------------------------------------------------------------------------- 1 | /* Interpreter ID Object */ 2 | 3 | #ifndef Py_INTERNAL_INTERPRETERIDOBJECT_H 4 | #define Py_INTERNAL_INTERPRETERIDOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type; 14 | 15 | PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t); 16 | PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *); 17 | PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif // !Py_INTERNAL_INTERPRETERIDOBJECT_H 23 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_list.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_LIST_H 2 | #define Py_INTERNAL_LIST_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 | #include "listobject.h" // _PyList_CAST() 12 | 13 | 14 | /* runtime lifecycle */ 15 | 16 | extern void _PyList_Fini(PyInterpreterState *); 17 | 18 | 19 | /* other API */ 20 | 21 | #ifndef WITH_FREELISTS 22 | // without freelists 23 | # define PyList_MAXFREELIST 0 24 | #endif 25 | 26 | /* Empty list reuse scheme to save calls to malloc and free */ 27 | #ifndef PyList_MAXFREELIST 28 | # define PyList_MAXFREELIST 80 29 | #endif 30 | 31 | struct _Py_list_state { 32 | #if PyList_MAXFREELIST > 0 33 | PyListObject *free_list[PyList_MAXFREELIST]; 34 | int numfree; 35 | #endif 36 | }; 37 | 38 | #define _PyList_ITEMS(op) (_PyList_CAST(op)->ob_item) 39 | 40 | extern int 41 | _PyList_AppendTakeRefListResize(PyListObject *self, PyObject *newitem); 42 | 43 | static inline int 44 | _PyList_AppendTakeRef(PyListObject *self, PyObject *newitem) 45 | { 46 | assert(self != NULL && newitem != NULL); 47 | assert(PyList_Check(self)); 48 | Py_ssize_t len = PyList_GET_SIZE(self); 49 | Py_ssize_t allocated = self->allocated; 50 | assert((size_t)len + 1 < PY_SSIZE_T_MAX); 51 | if (allocated > len) { 52 | PyList_SET_ITEM(self, len, newitem); 53 | Py_SET_SIZE(self, len + 1); 54 | return 0; 55 | } 56 | return _PyList_AppendTakeRefListResize(self, newitem); 57 | } 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | #endif /* !Py_INTERNAL_LIST_H */ 63 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_moduleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_MODULEOBJECT_H 2 | #define Py_INTERNAL_MODULEOBJECT_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 | typedef struct { 12 | PyObject_HEAD 13 | PyObject *md_dict; 14 | PyModuleDef *md_def; 15 | void *md_state; 16 | PyObject *md_weaklist; 17 | // for logging purposes after md_dict is cleared 18 | PyObject *md_name; 19 | } PyModuleObject; 20 | 21 | static inline PyModuleDef* _PyModule_GetDef(PyObject *mod) { 22 | assert(PyModule_Check(mod)); 23 | return ((PyModuleObject *)mod)->md_def; 24 | } 25 | 26 | static inline void* _PyModule_GetState(PyObject* mod) { 27 | assert(PyModule_Check(mod)); 28 | return ((PyModuleObject *)mod)->md_state; 29 | } 30 | 31 | static inline PyObject* _PyModule_GetDict(PyObject *mod) { 32 | assert(PyModule_Check(mod)); 33 | PyObject *dict = ((PyModuleObject *)mod) -> md_dict; 34 | // _PyModule_GetDict(mod) must not be used after calling module_clear(mod) 35 | assert(dict != NULL); 36 | return dict; 37 | } 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_INTERNAL_MODULEOBJECT_H */ 43 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_namespace.h: -------------------------------------------------------------------------------- 1 | // Simple namespace object interface 2 | 3 | #ifndef Py_INTERNAL_NAMESPACE_H 4 | #define Py_INTERNAL_NAMESPACE_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | PyAPI_DATA(PyTypeObject) _PyNamespace_Type; 14 | 15 | PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif // !Py_INTERNAL_NAMESPACE_H 21 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_parser.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PARSER_H 2 | #define Py_INTERNAL_PARSER_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 | extern struct _mod* _PyParser_ASTFromString( 12 | const char *str, 13 | PyObject* filename, 14 | int mode, 15 | PyCompilerFlags *flags, 16 | PyArena *arena); 17 | extern struct _mod* _PyParser_ASTFromFile( 18 | FILE *fp, 19 | PyObject *filename_ob, 20 | const char *enc, 21 | int mode, 22 | const char *ps1, 23 | const char *ps2, 24 | PyCompilerFlags *flags, 25 | int *errcode, 26 | PyArena *arena); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_INTERNAL_PARSER_H */ 32 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_pathconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PATHCONFIG_H 2 | #define Py_INTERNAL_PATHCONFIG_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 | PyAPI_FUNC(void) _PyPathConfig_ClearGlobal(void); 12 | extern PyStatus _PyPathConfig_ReadGlobal(PyConfig *config); 13 | extern PyStatus _PyPathConfig_UpdateGlobal(const PyConfig *config); 14 | extern const wchar_t * _PyPathConfig_GetGlobalModuleSearchPath(void); 15 | 16 | extern int _PyPathConfig_ComputeSysPath0( 17 | const PyWideStringList *argv, 18 | PyObject **path0); 19 | 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif /* !Py_INTERNAL_PATHCONFIG_H */ 25 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_pyhash.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_HASH_H 2 | #define Py_INTERNAL_HASH_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_signal.h: -------------------------------------------------------------------------------- 1 | // Define Py_NSIG constant for signal handling. 2 | 3 | #ifndef Py_INTERNAL_SIGNAL_H 4 | #define Py_INTERNAL_SIGNAL_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | #include // NSIG 14 | 15 | #ifdef _SIG_MAXSIG 16 | // gh-91145: On FreeBSD, defines NSIG as 32: it doesn't include 17 | // realtime signals: [SIGRTMIN,SIGRTMAX]. Use _SIG_MAXSIG instead. For 18 | // example on x86-64 FreeBSD 13, SIGRTMAX is 126 and _SIG_MAXSIG is 128. 19 | # define Py_NSIG _SIG_MAXSIG 20 | #elif defined(NSIG) 21 | # define Py_NSIG NSIG 22 | #elif defined(_NSIG) 23 | # define Py_NSIG _NSIG // BSD/SysV 24 | #elif defined(_SIGMAX) 25 | # define Py_NSIG (_SIGMAX + 1) // QNX 26 | #elif defined(SIGMAX) 27 | # define Py_NSIG (SIGMAX + 1) // djgpp 28 | #else 29 | # define Py_NSIG 64 // Use a reasonable default value 30 | #endif 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif // !Py_INTERNAL_SIGNAL_H 36 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_sliceobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SLICEOBJECT_H 2 | #define Py_INTERNAL_SLICEOBJECT_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern void _PySlice_Fini(PyInterpreterState *); 15 | 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_INTERNAL_SLICEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_strhex.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRHEX_H 2 | #define Py_INTERNAL_STRHEX_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 | // Returns a str() containing the hex representation of argbuf. 12 | PyAPI_FUNC(PyObject*) _Py_strhex(const 13 | char* argbuf, 14 | const Py_ssize_t arglen); 15 | 16 | // Returns a bytes() containing the ASCII hex representation of argbuf. 17 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes( 18 | const char* argbuf, 19 | const Py_ssize_t arglen); 20 | 21 | // These variants include support for a separator between every N bytes: 22 | PyAPI_FUNC(PyObject*) _Py_strhex_with_sep( 23 | const char* argbuf, 24 | const Py_ssize_t arglen, 25 | PyObject* sep, 26 | const int bytes_per_group); 27 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep( 28 | const char* argbuf, 29 | const Py_ssize_t arglen, 30 | PyObject* sep, 31 | const int bytes_per_group); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | #endif /* !Py_INTERNAL_STRHEX_H */ 37 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_structseq.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRUCTSEQ_H 2 | #define Py_INTERNAL_STRUCTSEQ_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 | 12 | /* other API */ 13 | 14 | PyAPI_FUNC(PyTypeObject *) _PyStructSequence_NewType( 15 | PyStructSequence_Desc *desc, 16 | unsigned long tp_flags); 17 | 18 | PyAPI_FUNC(int) _PyStructSequence_InitType( 19 | PyTypeObject *type, 20 | PyStructSequence_Desc *desc, 21 | unsigned long tp_flags); 22 | 23 | extern void _PyStructSequence_FiniType(PyTypeObject *type); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !Py_INTERNAL_STRUCTSEQ_H */ 29 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SYSMODULE_H 2 | #define Py_INTERNAL_SYSMODULE_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 | PyAPI_FUNC(int) _PySys_Audit( 12 | PyThreadState *tstate, 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | 17 | /* We want minimal exposure of this function, so use extern rather than 18 | PyAPI_FUNC() to not export the symbol. */ 19 | extern void _PySys_ClearAuditHooks(PyThreadState *tstate); 20 | 21 | PyAPI_FUNC(int) _PySys_SetAttr(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_SYSMODULE_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_typeobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_TYPEOBJECT_H 2 | #define Py_INTERNAL_TYPEOBJECT_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyTypes_InitState(PyInterpreterState *); 15 | extern PyStatus _PyTypes_InitTypes(PyInterpreterState *); 16 | extern void _PyTypes_FiniTypes(PyInterpreterState *); 17 | extern void _PyTypes_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | // Type attribute lookup cache: speed up attribute and method lookups, 23 | // see _PyType_Lookup(). 24 | struct type_cache_entry { 25 | unsigned int version; // initialized from type->tp_version_tag 26 | PyObject *name; // reference to exactly a str or None 27 | PyObject *value; // borrowed reference or NULL 28 | }; 29 | 30 | #define MCACHE_SIZE_EXP 12 31 | #define MCACHE_STATS 0 32 | 33 | struct type_cache { 34 | struct type_cache_entry hashtable[1 << MCACHE_SIZE_EXP]; 35 | #if MCACHE_STATS 36 | size_t hits; 37 | size_t misses; 38 | size_t collisions; 39 | #endif 40 | }; 41 | 42 | extern PyStatus _PyTypes_InitSlotDefs(void); 43 | 44 | extern void _PyStaticType_Dealloc(PyTypeObject *type); 45 | 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | #endif /* !Py_INTERNAL_TYPEOBJECT_H */ 51 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_ucnhash.h: -------------------------------------------------------------------------------- 1 | /* Unicode name database interface */ 2 | #ifndef Py_INTERNAL_UCNHASH_H 3 | #define Py_INTERNAL_UCNHASH_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 | /* revised ucnhash CAPI interface (exported through a "wrapper") */ 13 | 14 | #define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI" 15 | 16 | typedef struct { 17 | 18 | /* Get name for a given character code. 19 | Returns non-zero if success, zero if not. 20 | Does not set Python exceptions. */ 21 | int (*getname)(Py_UCS4 code, char* buffer, int buflen, 22 | int with_alias_and_seq); 23 | 24 | /* Get character code for a given name. 25 | Same error handling as for getname(). */ 26 | int (*getcode)(const char* name, int namelen, Py_UCS4* code, 27 | int with_named_seq); 28 | 29 | } _PyUnicode_Name_CAPI; 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_INTERNAL_UCNHASH_H */ 35 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_unionobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_UNIONOBJECT_H 2 | #define Py_INTERNAL_UNIONOBJECT_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 | extern PyTypeObject _PyUnion_Type; 12 | #define _PyUnion_Check(op) Py_IS_TYPE(op, &_PyUnion_Type) 13 | extern PyObject *_Py_union_type_or(PyObject *, PyObject *); 14 | 15 | #define _PyGenericAlias_Check(op) PyObject_TypeCheck(op, &Py_GenericAliasType) 16 | extern PyObject *_Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *); 17 | extern PyObject *_Py_make_parameters(PyObject *); 18 | extern PyObject *_Py_union_args(PyObject *self); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !Py_INTERNAL_UNIONOBJECT_H */ 24 | -------------------------------------------------------------------------------- /vendor/python/posix/internal/pycore_warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_WARNINGS_H 2 | #define Py_INTERNAL_WARNINGS_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 | struct _warnings_runtime_state { 12 | /* Both 'filters' and 'onceregistry' can be set in warnings.py; 13 | get_warnings_attr() will reset these variables accordingly. */ 14 | PyObject *filters; /* List */ 15 | PyObject *once_registry; /* Dict */ 16 | PyObject *default_action; /* String */ 17 | long filters_version; 18 | }; 19 | 20 | extern int _PyWarnings_InitState(PyInterpreterState *interp); 21 | 22 | PyAPI_FUNC(PyObject*) _PyWarnings_Init(void); 23 | 24 | extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif /* !Py_INTERNAL_WARNINGS_H */ 30 | -------------------------------------------------------------------------------- /vendor/python/posix/intrcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTRCHECK_H 2 | #define Py_INTRCHECK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyOS_InterruptOccurred(void); 8 | #ifdef HAVE_FORK 9 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 10 | PyAPI_FUNC(void) PyOS_BeforeFork(void); 11 | PyAPI_FUNC(void) PyOS_AfterFork_Parent(void); 12 | PyAPI_FUNC(void) PyOS_AfterFork_Child(void); 13 | #endif 14 | #endif 15 | /* Deprecated, please use PyOS_AfterFork_Child() instead */ 16 | Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void); 17 | 18 | #ifndef Py_LIMITED_API 19 | PyAPI_FUNC(int) _PyOS_IsMainThread(void); 20 | 21 | #ifdef MS_WINDOWS 22 | /* windows.h is not included by Python.h so use void* instead of HANDLE */ 23 | PyAPI_FUNC(void*) _PyOS_SigintEvent(void); 24 | #endif 25 | #endif /* !Py_LIMITED_API */ 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_INTRCHECK_H */ 31 | -------------------------------------------------------------------------------- /vendor/python/posix/iterobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ITEROBJECT_H 2 | #define Py_ITEROBJECT_H 3 | /* Iterators (the basic kind, over a sequence) */ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(PyTypeObject) PySeqIter_Type; 9 | PyAPI_DATA(PyTypeObject) PyCallIter_Type; 10 | #ifdef Py_BUILD_CORE 11 | extern PyTypeObject _PyAnextAwaitable_Type; 12 | #endif 13 | 14 | #define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); 17 | 18 | 19 | #define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type) 20 | 21 | PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_ITEROBJECT_H */ 27 | 28 | -------------------------------------------------------------------------------- /vendor/python/posix/marshal.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface for marshal.c */ 3 | 4 | #ifndef Py_MARSHAL_H 5 | #define Py_MARSHAL_H 6 | #ifndef Py_LIMITED_API 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *, 13 | Py_ssize_t); 14 | PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int); 15 | 16 | #define Py_MARSHAL_VERSION 4 17 | 18 | PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *); 19 | PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *); 20 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); 21 | PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *); 22 | 23 | PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int); 24 | PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* Py_LIMITED_API */ 31 | #endif /* !Py_MARSHAL_H */ 32 | -------------------------------------------------------------------------------- /vendor/python/posix/osdefs.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_OSDEFS_H 2 | #define Py_OSDEFS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* Operating system dependencies */ 9 | 10 | #ifdef MS_WINDOWS 11 | #define SEP L'\\' 12 | #define ALTSEP L'/' 13 | #define MAXPATHLEN 256 14 | #define DELIM L';' 15 | #endif 16 | 17 | #ifdef __VXWORKS__ 18 | #define DELIM L';' 19 | #endif 20 | 21 | /* Filename separator */ 22 | #ifndef SEP 23 | #define SEP L'/' 24 | #endif 25 | 26 | /* Max pathname length */ 27 | #ifdef __hpux 28 | #include 29 | #include 30 | #ifndef PATH_MAX 31 | #define PATH_MAX MAXPATHLEN 32 | #endif 33 | #endif 34 | 35 | #ifndef MAXPATHLEN 36 | #if defined(PATH_MAX) && PATH_MAX > 1024 37 | #define MAXPATHLEN PATH_MAX 38 | #else 39 | #define MAXPATHLEN 1024 40 | #endif 41 | #endif 42 | 43 | /* Search path entry delimiter */ 44 | #ifndef DELIM 45 | #define DELIM L':' 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* !Py_OSDEFS_H */ 52 | -------------------------------------------------------------------------------- /vendor/python/posix/osmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* os module interface */ 3 | 4 | #ifndef Py_OSMODULE_H 5 | #define Py_OSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 11 | PyAPI_FUNC(PyObject *) PyOS_FSPath(PyObject *path); 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_OSMODULE_H */ 18 | -------------------------------------------------------------------------------- /vendor/python/posix/patchlevel.h: -------------------------------------------------------------------------------- 1 | 2 | /* Python version identification scheme. 3 | 4 | When the major or minor version changes, the VERSION variable in 5 | configure.ac must also be changed. 6 | 7 | There is also (independent) API version information in modsupport.h. 8 | */ 9 | 10 | /* Values for PY_RELEASE_LEVEL */ 11 | #define PY_RELEASE_LEVEL_ALPHA 0xA 12 | #define PY_RELEASE_LEVEL_BETA 0xB 13 | #define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ 14 | #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ 15 | /* Higher for patch releases */ 16 | 17 | /* Version parsed out into numeric values */ 18 | /*--start constants--*/ 19 | #define PY_MAJOR_VERSION 3 20 | #define PY_MINOR_VERSION 11 21 | #define PY_MICRO_VERSION 8 22 | #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL 23 | #define PY_RELEASE_SERIAL 0 24 | 25 | /* Version as a string */ 26 | #define PY_VERSION "3.11.8" 27 | /*--end constants--*/ 28 | 29 | /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. 30 | Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ 31 | #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ 32 | (PY_MINOR_VERSION << 16) | \ 33 | (PY_MICRO_VERSION << 8) | \ 34 | (PY_RELEASE_LEVEL << 4) | \ 35 | (PY_RELEASE_SERIAL << 0)) 36 | -------------------------------------------------------------------------------- /vendor/python/posix/pydtrace.d: -------------------------------------------------------------------------------- 1 | /* Python DTrace provider */ 2 | 3 | provider python { 4 | probe function__entry(const char *, const char *, int); 5 | probe function__return(const char *, const char *, int); 6 | probe instance__new__start(const char *, const char *); 7 | probe instance__new__done(const char *, const char *); 8 | probe instance__delete__start(const char *, const char *); 9 | probe instance__delete__done(const char *, const char *); 10 | probe line(const char *, const char *, int); 11 | probe gc__start(int); 12 | probe gc__done(long); 13 | probe import__find__load__start(const char *); 14 | probe import__find__load__done(const char *, int); 15 | probe audit(const char *, void *); 16 | }; 17 | 18 | #pragma D attributes Evolving/Evolving/Common provider python provider 19 | #pragma D attributes Evolving/Evolving/Common provider python module 20 | #pragma D attributes Evolving/Evolving/Common provider python function 21 | #pragma D attributes Evolving/Evolving/Common provider python name 22 | #pragma D attributes Evolving/Evolving/Common provider python args 23 | -------------------------------------------------------------------------------- /vendor/python/posix/pyframe.h: -------------------------------------------------------------------------------- 1 | /* Limited C API of PyFrame API 2 | * 3 | * Include "frameobject.h" to get the PyFrameObject structure. 4 | */ 5 | 6 | #ifndef Py_PYFRAME_H 7 | #define Py_PYFRAME_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* Return the line of code the frame is currently executing. */ 13 | PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); 14 | 15 | PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame); 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_PYFRAME_H 19 | # include "cpython/pyframe.h" 20 | # undef Py_CPYTHON_PYFRAME_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_PYFRAME_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/posix/pystrcmp.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRCMP_H 2 | #define Py_STRCMP_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); 9 | PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *); 10 | 11 | #ifdef MS_WINDOWS 12 | #define PyOS_strnicmp strnicmp 13 | #define PyOS_stricmp stricmp 14 | #else 15 | #define PyOS_strnicmp PyOS_mystrnicmp 16 | #define PyOS_stricmp PyOS_mystricmp 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !Py_STRCMP_H */ 24 | -------------------------------------------------------------------------------- /vendor/python/posix/pythonrun.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interfaces to parse and execute pieces of python code */ 3 | 4 | #ifndef Py_PYTHONRUN_H 5 | #define Py_PYTHONRUN_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int); 11 | 12 | PyAPI_FUNC(void) PyErr_Print(void); 13 | PyAPI_FUNC(void) PyErr_PrintEx(int); 14 | PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); 15 | 16 | 17 | /* Stuff with no proper home (yet) */ 18 | PyAPI_DATA(int) (*PyOS_InputHook)(void); 19 | 20 | /* Stack size, in "pointers" (so we get extra safety margins 21 | on 64-bit platforms). On a 32-bit platform, this translates 22 | to an 8k margin. */ 23 | #define PYOS_STACK_MARGIN 2048 24 | 25 | #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300 26 | /* Enable stack checking under Microsoft C */ 27 | // When changing the platforms, ensure PyOS_CheckStack() docs are still correct 28 | #define USE_STACKCHECK 29 | #endif 30 | 31 | #ifdef USE_STACKCHECK 32 | /* Check that we aren't overflowing our stack */ 33 | PyAPI_FUNC(int) PyOS_CheckStack(void); 34 | #endif 35 | 36 | #ifndef Py_LIMITED_API 37 | # define Py_CPYTHON_PYTHONRUN_H 38 | # include "cpython/pythonrun.h" 39 | # undef Py_CPYTHON_PYTHONRUN_H 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif /* !Py_PYTHONRUN_H */ 46 | -------------------------------------------------------------------------------- /vendor/python/posix/pytypedefs.h: -------------------------------------------------------------------------------- 1 | // Forward declarations of types of the Python C API. 2 | // Declare them at the same place since redefining typedef is a C11 feature. 3 | // Only use a forward declaration if there is an interdependency between two 4 | // header files. 5 | 6 | #ifndef Py_PYTYPEDEFS_H 7 | #define Py_PYTYPEDEFS_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct PyModuleDef PyModuleDef; 13 | typedef struct PyModuleDef_Slot PyModuleDef_Slot; 14 | typedef struct PyMethodDef PyMethodDef; 15 | typedef struct PyGetSetDef PyGetSetDef; 16 | typedef struct PyMemberDef PyMemberDef; 17 | 18 | typedef struct _object PyObject; 19 | typedef struct _longobject PyLongObject; 20 | typedef struct _typeobject PyTypeObject; 21 | typedef struct PyCodeObject PyCodeObject; 22 | typedef struct _frame PyFrameObject; 23 | 24 | typedef struct _ts PyThreadState; 25 | typedef struct _is PyInterpreterState; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif // !Py_PYTYPEDEFS_H 31 | -------------------------------------------------------------------------------- /vendor/python/posix/rangeobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* Range object interface */ 3 | 4 | #ifndef Py_RANGEOBJECT_H 5 | #define Py_RANGEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | A range object represents an integer range. This is an immutable object; 12 | a range cannot change its value after creation. 13 | 14 | Range objects behave like the corresponding tuple objects except that 15 | they are represented by a start, stop, and step datamembers. 16 | */ 17 | 18 | PyAPI_DATA(PyTypeObject) PyRange_Type; 19 | PyAPI_DATA(PyTypeObject) PyRangeIter_Type; 20 | PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type; 21 | 22 | #define PyRange_Check(op) Py_IS_TYPE(op, &PyRange_Type) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_RANGEOBJECT_H */ 28 | -------------------------------------------------------------------------------- /vendor/python/posix/structseq.h: -------------------------------------------------------------------------------- 1 | 2 | /* Named tuple object interface */ 3 | 4 | #ifndef Py_STRUCTSEQ_H 5 | #define Py_STRUCTSEQ_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct PyStructSequence_Field { 11 | const char *name; 12 | const char *doc; 13 | } PyStructSequence_Field; 14 | 15 | typedef struct PyStructSequence_Desc { 16 | const char *name; 17 | const char *doc; 18 | PyStructSequence_Field *fields; 19 | int n_in_sequence; 20 | } PyStructSequence_Desc; 21 | 22 | PyAPI_DATA(const char * const) PyStructSequence_UnnamedField; 23 | 24 | #ifndef Py_LIMITED_API 25 | PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type, 26 | PyStructSequence_Desc *desc); 27 | PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type, 28 | PyStructSequence_Desc *desc); 29 | #endif 30 | PyAPI_FUNC(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc); 31 | 32 | PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type); 33 | 34 | #ifndef Py_LIMITED_API 35 | typedef PyTupleObject PyStructSequence; 36 | 37 | /* Macro, *only* to be used to fill in brand new objects */ 38 | #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v) 39 | 40 | #define PyStructSequence_GET_ITEM(op, i) PyTuple_GET_ITEM(op, i) 41 | #endif 42 | 43 | PyAPI_FUNC(void) PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*); 44 | PyAPI_FUNC(PyObject*) PyStructSequence_GetItem(PyObject*, Py_ssize_t); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | #endif /* !Py_STRUCTSEQ_H */ 50 | -------------------------------------------------------------------------------- /vendor/python/posix/sysmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* System module interface */ 3 | 4 | #ifndef Py_SYSMODULE_H 5 | #define Py_SYSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) PySys_GetObject(const char *); 11 | PyAPI_FUNC(int) PySys_SetObject(const char *, PyObject *); 12 | 13 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **); 14 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int); 15 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); 16 | 17 | PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) 18 | Py_GCC_ATTRIBUTE((format(printf, 1, 2))); 19 | PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) 20 | Py_GCC_ATTRIBUTE((format(printf, 1, 2))); 21 | PyAPI_FUNC(void) PySys_FormatStdout(const char *format, ...); 22 | PyAPI_FUNC(void) PySys_FormatStderr(const char *format, ...); 23 | 24 | PyAPI_FUNC(void) PySys_ResetWarnOptions(void); 25 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *); 26 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddWarnOptionUnicode(PyObject *); 27 | Py_DEPRECATED(3.11) PyAPI_FUNC(int) PySys_HasWarnOptions(void); 28 | 29 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddXOption(const wchar_t *); 30 | PyAPI_FUNC(PyObject *) PySys_GetXOptions(void); 31 | 32 | #ifndef Py_LIMITED_API 33 | # define Py_CPYTHON_SYSMODULE_H 34 | # include "cpython/sysmodule.h" 35 | # undef Py_CPYTHON_SYSMODULE_H 36 | #endif 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | #endif /* !Py_SYSMODULE_H */ 42 | -------------------------------------------------------------------------------- /vendor/python/posix/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEBACK_H 2 | #define Py_TRACEBACK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* Traceback interface */ 8 | 9 | PyAPI_FUNC(int) PyTraceBack_Here(PyFrameObject *); 10 | PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); 11 | 12 | /* Reveal traceback type so we can typecheck traceback objects */ 13 | PyAPI_DATA(PyTypeObject) PyTraceBack_Type; 14 | #define PyTraceBack_Check(v) Py_IS_TYPE(v, &PyTraceBack_Type) 15 | 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_TRACEBACK_H 19 | # include "cpython/traceback.h" 20 | # undef Py_CPYTHON_TRACEBACK_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_TRACEBACK_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/posix/tracemalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEMALLOC_H 2 | #define Py_TRACEMALLOC_H 3 | 4 | #ifndef Py_LIMITED_API 5 | /* Track an allocated memory block in the tracemalloc module. 6 | Return 0 on success, return -1 on error (failed to allocate memory to store 7 | the trace). 8 | 9 | Return -2 if tracemalloc is disabled. 10 | 11 | If memory block is already tracked, update the existing trace. */ 12 | PyAPI_FUNC(int) PyTraceMalloc_Track( 13 | unsigned int domain, 14 | uintptr_t ptr, 15 | size_t size); 16 | 17 | /* Untrack an allocated memory block in the tracemalloc module. 18 | Do nothing if the block was not tracked. 19 | 20 | Return -2 if tracemalloc is disabled, otherwise return 0. */ 21 | PyAPI_FUNC(int) PyTraceMalloc_Untrack( 22 | unsigned int domain, 23 | uintptr_t ptr); 24 | 25 | /* Get the traceback where a memory block was allocated. 26 | 27 | Return a tuple of (filename: str, lineno: int) tuples. 28 | 29 | Return None if the tracemalloc module is disabled or if the memory block 30 | is not tracked by tracemalloc. 31 | 32 | Raise an exception and return NULL on error. */ 33 | PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback( 34 | unsigned int domain, 35 | uintptr_t ptr); 36 | #endif 37 | 38 | #endif /* !Py_TRACEMALLOC_H */ 39 | -------------------------------------------------------------------------------- /vendor/python/posix/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_WARNINGS_H 2 | #define Py_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyErr_WarnEx( 8 | PyObject *category, 9 | const char *message, /* UTF-8 encoded string */ 10 | Py_ssize_t stack_level); 11 | 12 | PyAPI_FUNC(int) PyErr_WarnFormat( 13 | PyObject *category, 14 | Py_ssize_t stack_level, 15 | const char *format, /* ASCII-encoded string */ 16 | ...); 17 | 18 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 19 | /* Emit a ResourceWarning warning */ 20 | PyAPI_FUNC(int) PyErr_ResourceWarning( 21 | PyObject *source, 22 | Py_ssize_t stack_level, 23 | const char *format, /* ASCII-encoded string */ 24 | ...); 25 | #endif 26 | 27 | PyAPI_FUNC(int) PyErr_WarnExplicit( 28 | PyObject *category, 29 | const char *message, /* UTF-8 encoded string */ 30 | const char *filename, /* decoded from the filesystem encoding */ 31 | int lineno, 32 | const char *module, /* UTF-8 encoded string */ 33 | PyObject *registry); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_WARNINGS_H 37 | # include "cpython/warnings.h" 38 | # undef Py_CPYTHON_WARNINGS_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_WARNINGS_H */ 45 | 46 | -------------------------------------------------------------------------------- /vendor/python/posix/weakrefobject.h: -------------------------------------------------------------------------------- 1 | /* Weak references objects for Python. */ 2 | 3 | #ifndef Py_WEAKREFOBJECT_H 4 | #define Py_WEAKREFOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct _PyWeakReference PyWeakReference; 10 | 11 | PyAPI_DATA(PyTypeObject) _PyWeakref_RefType; 12 | PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType; 13 | PyAPI_DATA(PyTypeObject) _PyWeakref_CallableProxyType; 14 | 15 | #define PyWeakref_CheckRef(op) PyObject_TypeCheck(op, &_PyWeakref_RefType) 16 | #define PyWeakref_CheckRefExact(op) \ 17 | Py_IS_TYPE(op, &_PyWeakref_RefType) 18 | #define PyWeakref_CheckProxy(op) \ 19 | (Py_IS_TYPE(op, &_PyWeakref_ProxyType) || \ 20 | Py_IS_TYPE(op, &_PyWeakref_CallableProxyType)) 21 | 22 | #define PyWeakref_Check(op) \ 23 | (PyWeakref_CheckRef(op) || PyWeakref_CheckProxy(op)) 24 | 25 | 26 | PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob, 27 | PyObject *callback); 28 | PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob, 29 | PyObject *callback); 30 | PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref); 31 | 32 | 33 | #ifndef Py_LIMITED_API 34 | # define Py_CPYTHON_WEAKREFOBJECT_H 35 | # include "cpython/weakrefobject.h" 36 | # undef Py_CPYTHON_WEAKREFOBJECT_H 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_WEAKREFOBJECT_H */ 43 | -------------------------------------------------------------------------------- /vendor/python/win32/bltinmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_BLTINMODULE_H 2 | #define Py_BLTINMODULE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_DATA(PyTypeObject) PyFilter_Type; 8 | PyAPI_DATA(PyTypeObject) PyMap_Type; 9 | PyAPI_DATA(PyTypeObject) PyZip_Type; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_BLTINMODULE_H */ 15 | -------------------------------------------------------------------------------- /vendor/python/win32/boolobject.h: -------------------------------------------------------------------------------- 1 | /* Boolean object interface */ 2 | 3 | #ifndef Py_BOOLOBJECT_H 4 | #define Py_BOOLOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | 10 | PyAPI_DATA(PyTypeObject) PyBool_Type; 11 | 12 | #define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type) 13 | 14 | /* Py_False and Py_True are the only two bools in existence. 15 | Don't forget to apply Py_INCREF() when returning either!!! */ 16 | 17 | /* Don't use these directly */ 18 | PyAPI_DATA(PyLongObject) _Py_FalseStruct; 19 | PyAPI_DATA(PyLongObject) _Py_TrueStruct; 20 | 21 | /* Use these macros */ 22 | #define Py_False ((PyObject *) &_Py_FalseStruct) 23 | #define Py_True ((PyObject *) &_Py_TrueStruct) 24 | 25 | // Test if an object is the True singleton, the same as "x is True" in Python. 26 | PyAPI_FUNC(int) Py_IsTrue(PyObject *x); 27 | #define Py_IsTrue(x) Py_Is((x), Py_True) 28 | 29 | // Test if an object is the False singleton, the same as "x is False" in Python. 30 | PyAPI_FUNC(int) Py_IsFalse(PyObject *x); 31 | #define Py_IsFalse(x) Py_Is((x), Py_False) 32 | 33 | /* Macros for returning Py_True or Py_False, respectively */ 34 | #define Py_RETURN_TRUE return Py_NewRef(Py_True) 35 | #define Py_RETURN_FALSE return Py_NewRef(Py_False) 36 | 37 | /* Function to return a bool from a C long */ 38 | PyAPI_FUNC(PyObject *) PyBool_FromLong(long); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* !Py_BOOLOBJECT_H */ 44 | -------------------------------------------------------------------------------- /vendor/python/win32/bytearrayobject.h: -------------------------------------------------------------------------------- 1 | /* ByteArray object interface */ 2 | 3 | #ifndef Py_BYTEARRAYOBJECT_H 4 | #define Py_BYTEARRAYOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* Type PyByteArrayObject represents a mutable array of bytes. 10 | * The Python API is that of a sequence; 11 | * the bytes are mapped to ints in [0, 256). 12 | * Bytes are not characters; they may be used to encode characters. 13 | * The only way to go between bytes and str/unicode is via encoding 14 | * and decoding. 15 | * For the convenience of C programmers, the bytes type is considered 16 | * to contain a char pointer, not an unsigned char pointer. 17 | */ 18 | 19 | /* Type object */ 20 | PyAPI_DATA(PyTypeObject) PyByteArray_Type; 21 | PyAPI_DATA(PyTypeObject) PyByteArrayIter_Type; 22 | 23 | /* Type check macros */ 24 | #define PyByteArray_Check(self) PyObject_TypeCheck(self, &PyByteArray_Type) 25 | #define PyByteArray_CheckExact(self) Py_IS_TYPE(self, &PyByteArray_Type) 26 | 27 | /* Direct API functions */ 28 | PyAPI_FUNC(PyObject *) PyByteArray_FromObject(PyObject *); 29 | PyAPI_FUNC(PyObject *) PyByteArray_Concat(PyObject *, PyObject *); 30 | PyAPI_FUNC(PyObject *) PyByteArray_FromStringAndSize(const char *, Py_ssize_t); 31 | PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject *); 32 | PyAPI_FUNC(char *) PyByteArray_AsString(PyObject *); 33 | PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_BYTEARRAYOBJECT_H 37 | # include "cpython/bytearrayobject.h" 38 | # undef Py_CPYTHON_BYTEARRAYOBJECT_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_BYTEARRAYOBJECT_H */ 45 | -------------------------------------------------------------------------------- /vendor/python/win32/compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_COMPILE_H 2 | #define Py_COMPILE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* These definitions must match corresponding definitions in graminit.h. */ 8 | #define Py_single_input 256 9 | #define Py_file_input 257 10 | #define Py_eval_input 258 11 | #define Py_func_type_input 345 12 | 13 | /* This doesn't need to match anything */ 14 | #define Py_fstring_input 800 15 | 16 | #ifndef Py_LIMITED_API 17 | # define Py_CPYTHON_COMPILE_H 18 | # include "cpython/compile.h" 19 | # undef Py_CPYTHON_COMPILE_H 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_COMPILE_H */ 26 | -------------------------------------------------------------------------------- /vendor/python/win32/complexobject.h: -------------------------------------------------------------------------------- 1 | /* Complex number structure */ 2 | 3 | #ifndef Py_COMPLEXOBJECT_H 4 | #define Py_COMPLEXOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /* Complex object interface */ 10 | 11 | PyAPI_DATA(PyTypeObject) PyComplex_Type; 12 | 13 | #define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type) 14 | #define PyComplex_CheckExact(op) Py_IS_TYPE(op, &PyComplex_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag); 17 | 18 | PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op); 19 | PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op); 20 | 21 | #ifndef Py_LIMITED_API 22 | # define Py_CPYTHON_COMPLEXOBJECT_H 23 | # include "cpython/complexobject.h" 24 | # undef Py_CPYTHON_COMPLEXOBJECT_H 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_COMPLEXOBJECT_H */ 31 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/bytearrayobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_BYTEARRAYOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | /* Object layout */ 6 | typedef struct { 7 | PyObject_VAR_HEAD 8 | Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */ 9 | char *ob_bytes; /* Physical backing buffer */ 10 | char *ob_start; /* Logical start inside ob_bytes */ 11 | Py_ssize_t ob_exports; /* How many buffer exports */ 12 | } PyByteArrayObject; 13 | 14 | PyAPI_DATA(char) _PyByteArray_empty_string[]; 15 | 16 | /* Macros and static inline functions, trading safety for speed */ 17 | #define _PyByteArray_CAST(op) \ 18 | (assert(PyByteArray_Check(op)), _Py_CAST(PyByteArrayObject*, op)) 19 | 20 | static inline char* PyByteArray_AS_STRING(PyObject *op) 21 | { 22 | PyByteArrayObject *self = _PyByteArray_CAST(op); 23 | if (Py_SIZE(self)) { 24 | return self->ob_start; 25 | } 26 | return _PyByteArray_empty_string; 27 | } 28 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 29 | # define PyByteArray_AS_STRING(self) PyByteArray_AS_STRING(_PyObject_CAST(self)) 30 | #endif 31 | 32 | static inline Py_ssize_t PyByteArray_GET_SIZE(PyObject *op) { 33 | PyByteArrayObject *self = _PyByteArray_CAST(op); 34 | return Py_SIZE(self); 35 | } 36 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 37 | # define PyByteArray_GET_SIZE(self) PyByteArray_GET_SIZE(_PyObject_CAST(self)) 38 | #endif 39 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/cellobject.h: -------------------------------------------------------------------------------- 1 | /* Cell object interface */ 2 | 3 | #ifndef Py_LIMITED_API 4 | #ifndef Py_CELLOBJECT_H 5 | #define Py_CELLOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct { 11 | PyObject_HEAD 12 | /* Content of the cell or NULL when empty */ 13 | PyObject *ob_ref; 14 | } PyCellObject; 15 | 16 | PyAPI_DATA(PyTypeObject) PyCell_Type; 17 | 18 | #define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type) 19 | 20 | PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); 21 | PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); 22 | PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); 23 | 24 | #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) 25 | #define PyCell_SET(op, v) _Py_RVALUE(((PyCellObject *)(op))->ob_ref = (v)) 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_TUPLEOBJECT_H */ 31 | #endif /* Py_LIMITED_API */ 32 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/ceval.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_CEVAL_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *); 6 | PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg); 7 | PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *); 8 | PyAPI_FUNC(int) _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg); 9 | 10 | /* Helper to look up a builtin object */ 11 | PyAPI_FUNC(PyObject *) _PyEval_GetBuiltin(PyObject *); 12 | PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *); 13 | /* Look at the current frame's (if any) code's co_flags, and turn on 14 | the corresponding compiler flags in cf->cf_flags. Return 1 if any 15 | flag was set, else return 0. */ 16 | PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf); 17 | 18 | PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc); 19 | 20 | PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds); 21 | PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void); 22 | 23 | PyAPI_FUNC(Py_ssize_t) _PyEval_RequestCodeExtraIndex(freefunc); 24 | 25 | PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *); 26 | PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *); 27 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/complexobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_COMPLEXOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | double real; 7 | double imag; 8 | } Py_complex; 9 | 10 | /* Operations on complex numbers from complexmodule.c */ 11 | 12 | PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex); 13 | PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex); 14 | PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex); 15 | PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex); 16 | PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex); 17 | PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex); 18 | PyAPI_FUNC(double) _Py_c_abs(Py_complex); 19 | 20 | /* Complex object interface */ 21 | 22 | /* 23 | PyComplexObject represents a complex number with double-precision 24 | real and imaginary parts. 25 | */ 26 | typedef struct { 27 | PyObject_HEAD 28 | Py_complex cval; 29 | } PyComplexObject; 30 | 31 | PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex); 32 | 33 | PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op); 34 | 35 | #ifdef Py_BUILD_CORE 36 | /* Format the object based on the format_spec, as defined in PEP 3101 37 | (Advanced String Formatting). */ 38 | extern int _PyComplex_FormatAdvancedWriter( 39 | _PyUnicodeWriter *writer, 40 | PyObject *obj, 41 | PyObject *format_spec, 42 | Py_ssize_t start, 43 | Py_ssize_t end); 44 | #endif // Py_BUILD_CORE 45 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/fileobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); 6 | PyAPI_FUNC(char *) _Py_UniversalNewlineFgetsWithSize(char *, int, FILE*, PyObject *, size_t*); 7 | 8 | /* The std printer acts as a preliminary sys.stderr until the new io 9 | infrastructure is in place. */ 10 | PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int); 11 | PyAPI_DATA(PyTypeObject) PyStdPrinter_Type; 12 | 13 | typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *); 14 | 15 | PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path); 16 | PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path); 17 | PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData); 18 | 19 | PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *); 20 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FILEUTILS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | // Used by _testcapi which must not use the internal C API 6 | PyAPI_FUNC(FILE*) _Py_fopen_obj( 7 | PyObject *path, 8 | const char *mode); 9 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/floatobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_FLOATOBJECT_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct { 6 | PyObject_HEAD 7 | double ob_fval; 8 | } PyFloatObject; 9 | 10 | // Macro version of PyFloat_AsDouble() trading safety for speed. 11 | // It doesn't check if op is a double object. 12 | #define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval) 13 | 14 | 15 | PyAPI_FUNC(int) PyFloat_Pack2(double x, char *p, int le); 16 | PyAPI_FUNC(int) PyFloat_Pack4(double x, char *p, int le); 17 | PyAPI_FUNC(int) PyFloat_Pack8(double x, char *p, int le); 18 | 19 | PyAPI_FUNC(double) PyFloat_Unpack2(const char *p, int le); 20 | PyAPI_FUNC(double) PyFloat_Unpack4(const char *p, int le); 21 | PyAPI_FUNC(double) PyFloat_Unpack8(const char *p, int le); 22 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_CPYTHON_FRAMEOBJECT_H 4 | # error "this header file must not be included directly" 5 | #endif 6 | 7 | /* Standard object interface */ 8 | 9 | PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, 10 | PyObject *, PyObject *); 11 | 12 | /* The rest of the interface is specific for frame objects */ 13 | 14 | /* Conversions between "fast locals" and locals in dictionary */ 15 | 16 | PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int); 17 | 18 | /* -- Caveat emptor -- 19 | * The concept of entry frames is an implementation detail of the CPython 20 | * interpreter. This API is considered unstable and is provided for the 21 | * convenience of debuggers, profilers and state-inspecting tools. Notice that 22 | * this API can be changed in future minor versions if the underlying frame 23 | * mechanism change or the concept of an 'entry frame' or its semantics becomes 24 | * obsolete or outdated. */ 25 | 26 | PyAPI_FUNC(int) _PyFrame_IsEntryFrame(PyFrameObject *frame); 27 | 28 | PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f); 29 | PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *); 30 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/odictobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ODICTOBJECT_H 2 | #define Py_ODICTOBJECT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* OrderedDict */ 9 | /* This API is optional and mostly redundant. */ 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | typedef struct _odictobject PyODictObject; 14 | 15 | PyAPI_DATA(PyTypeObject) PyODict_Type; 16 | PyAPI_DATA(PyTypeObject) PyODictIter_Type; 17 | PyAPI_DATA(PyTypeObject) PyODictKeys_Type; 18 | PyAPI_DATA(PyTypeObject) PyODictItems_Type; 19 | PyAPI_DATA(PyTypeObject) PyODictValues_Type; 20 | 21 | #define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type) 22 | #define PyODict_CheckExact(op) Py_IS_TYPE(op, &PyODict_Type) 23 | #define PyODict_SIZE(op) PyDict_GET_SIZE((op)) 24 | 25 | PyAPI_FUNC(PyObject *) PyODict_New(void); 26 | PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item); 27 | PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key); 28 | 29 | /* wrappers around PyDict* functions */ 30 | #define PyODict_GetItem(od, key) PyDict_GetItem(_PyObject_CAST(od), key) 31 | #define PyODict_GetItemWithError(od, key) \ 32 | PyDict_GetItemWithError(_PyObject_CAST(od), key) 33 | #define PyODict_Contains(od, key) PyDict_Contains(_PyObject_CAST(od), key) 34 | #define PyODict_Size(od) PyDict_Size(_PyObject_CAST(od)) 35 | #define PyODict_GetItemString(od, key) \ 36 | PyDict_GetItemString(_PyObject_CAST(od), key) 37 | 38 | #endif 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* !Py_ODICTOBJECT_H */ 44 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/picklebufobject.h: -------------------------------------------------------------------------------- 1 | /* PickleBuffer object. This is built-in for ease of use from third-party 2 | * C extensions. 3 | */ 4 | 5 | #ifndef Py_PICKLEBUFOBJECT_H 6 | #define Py_PICKLEBUFOBJECT_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifndef Py_LIMITED_API 12 | 13 | PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type; 14 | 15 | #define PyPickleBuffer_Check(op) Py_IS_TYPE(op, &PyPickleBuffer_Type) 16 | 17 | /* Create a PickleBuffer redirecting to the given buffer-enabled object */ 18 | PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *); 19 | /* Get the PickleBuffer's underlying view to the original object 20 | * (NULL if released) 21 | */ 22 | PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *); 23 | /* Release the PickleBuffer. Returns 0 on success, -1 on error. */ 24 | PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *); 25 | 26 | #endif /* !Py_LIMITED_API */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_PICKLEBUFOBJECT_H */ 32 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/pyctype.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef PYCTYPE_H 3 | #define PYCTYPE_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define PY_CTF_LOWER 0x01 9 | #define PY_CTF_UPPER 0x02 10 | #define PY_CTF_ALPHA (PY_CTF_LOWER|PY_CTF_UPPER) 11 | #define PY_CTF_DIGIT 0x04 12 | #define PY_CTF_ALNUM (PY_CTF_ALPHA|PY_CTF_DIGIT) 13 | #define PY_CTF_SPACE 0x08 14 | #define PY_CTF_XDIGIT 0x10 15 | 16 | PyAPI_DATA(const unsigned int) _Py_ctype_table[256]; 17 | 18 | /* Unlike their C counterparts, the following macros are not meant to 19 | * handle an int with any of the values [EOF, 0-UCHAR_MAX]. The argument 20 | * must be a signed/unsigned char. */ 21 | #define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER) 22 | #define Py_ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER) 23 | #define Py_ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA) 24 | #define Py_ISDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_DIGIT) 25 | #define Py_ISXDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_XDIGIT) 26 | #define Py_ISALNUM(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALNUM) 27 | #define Py_ISSPACE(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_SPACE) 28 | 29 | PyAPI_DATA(const unsigned char) _Py_ctype_tolower[256]; 30 | PyAPI_DATA(const unsigned char) _Py_ctype_toupper[256]; 31 | 32 | #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)]) 33 | #define Py_TOUPPER(c) (_Py_ctype_toupper[Py_CHARMASK(c)]) 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* !PYCTYPE_H */ 39 | #endif /* !Py_LIMITED_API */ 40 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/pydebug.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_PYDEBUG_H 3 | #define Py_PYDEBUG_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(int) Py_DebugFlag; 9 | PyAPI_DATA(int) Py_VerboseFlag; 10 | PyAPI_DATA(int) Py_QuietFlag; 11 | PyAPI_DATA(int) Py_InteractiveFlag; 12 | PyAPI_DATA(int) Py_InspectFlag; 13 | PyAPI_DATA(int) Py_OptimizeFlag; 14 | PyAPI_DATA(int) Py_NoSiteFlag; 15 | PyAPI_DATA(int) Py_BytesWarningFlag; 16 | PyAPI_DATA(int) Py_FrozenFlag; 17 | PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; 18 | PyAPI_DATA(int) Py_DontWriteBytecodeFlag; 19 | PyAPI_DATA(int) Py_NoUserSiteDirectory; 20 | PyAPI_DATA(int) Py_UnbufferedStdioFlag; 21 | PyAPI_DATA(int) Py_HashRandomizationFlag; 22 | PyAPI_DATA(int) Py_IsolatedFlag; 23 | 24 | #ifdef MS_WINDOWS 25 | PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag; 26 | PyAPI_DATA(int) Py_LegacyWindowsStdioFlag; 27 | #endif 28 | 29 | /* this is a wrapper around getenv() that pays attention to 30 | Py_IgnoreEnvironmentFlag. It should be used for getting variables like 31 | PYTHONPATH and PYTHONHOME from the environment */ 32 | PyAPI_DATA(char*) Py_GETENV(const char *name); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_PYDEBUG_H */ 38 | #endif /* Py_LIMITED_API */ 39 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/pyfpe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_PYFPE_H 2 | #define Py_PYFPE_H 3 | /* Header excluded from the stable API */ 4 | #ifndef Py_LIMITED_API 5 | 6 | /* These macros used to do something when Python was built with --with-fpectl, 7 | * but support for that was dropped in 3.7. We continue to define them though, 8 | * to avoid breaking API users. 9 | */ 10 | 11 | #define PyFPE_START_PROTECT(err_string, leave_stmt) 12 | #define PyFPE_END_PROTECT(v) 13 | 14 | #endif /* !defined(Py_LIMITED_API) */ 15 | #endif /* !Py_PYFPE_H */ 16 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/pyframe.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_PYFRAME_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_DATA(PyTypeObject) PyFrame_Type; 6 | 7 | #define PyFrame_Check(op) Py_IS_TYPE((op), &PyFrame_Type) 8 | 9 | PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame); 10 | PyAPI_FUNC(PyObject *) PyFrame_GetLocals(PyFrameObject *frame); 11 | 12 | PyAPI_FUNC(PyObject *) PyFrame_GetGlobals(PyFrameObject *frame); 13 | PyAPI_FUNC(PyObject *) PyFrame_GetBuiltins(PyFrameObject *frame); 14 | 15 | PyAPI_FUNC(PyObject *) PyFrame_GetGenerator(PyFrameObject *frame); 16 | PyAPI_FUNC(int) PyFrame_GetLasti(PyFrameObject *frame); 17 | 18 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/pythread.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_PYTHREAD_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | #define PYTHREAD_INVALID_THREAD_ID ((unsigned long)-1) 6 | 7 | #ifdef HAVE_FORK 8 | /* Private function to reinitialize a lock at fork in the child process. 9 | Reset the lock to the unlocked state. 10 | Return 0 on success, return -1 on error. */ 11 | PyAPI_FUNC(int) _PyThread_at_fork_reinit(PyThread_type_lock *lock); 12 | #endif /* HAVE_FORK */ 13 | 14 | #ifdef HAVE_PTHREAD_H 15 | /* Darwin needs pthread.h to know type name the pthread_key_t. */ 16 | # include 17 | # define NATIVE_TSS_KEY_T pthread_key_t 18 | #elif defined(NT_THREADS) 19 | /* In Windows, native TSS key type is DWORD, 20 | but hardcode the unsigned long to avoid errors for include directive. 21 | */ 22 | # define NATIVE_TSS_KEY_T unsigned long 23 | #elif defined(HAVE_PTHREAD_STUBS) 24 | # include "cpython/pthread_stubs.h" 25 | # define NATIVE_TSS_KEY_T pthread_key_t 26 | #else 27 | # error "Require native threads. See https://bugs.python.org/issue31370" 28 | #endif 29 | 30 | /* When Py_LIMITED_API is not defined, the type layout of Py_tss_t is 31 | exposed to allow static allocation in the API clients. Even in this case, 32 | you must handle TSS keys through API functions due to compatibility. 33 | */ 34 | struct _Py_tss_t { 35 | int _is_initialized; 36 | NATIVE_TSS_KEY_T _key; 37 | }; 38 | 39 | #undef NATIVE_TSS_KEY_T 40 | 41 | /* When static allocation, you must initialize with Py_tss_NEEDS_INIT. */ 42 | #define Py_tss_NEEDS_INIT {0} 43 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_SYSMODULE_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(PyObject *) _PySys_GetAttr(PyThreadState *tstate, 6 | PyObject *name); 7 | 8 | PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *); 9 | 10 | typedef int(*Py_AuditHookFunction)(const char *, PyObject *, void *); 11 | 12 | PyAPI_FUNC(int) PySys_Audit( 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*); 17 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_TRACEBACK_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | typedef struct _traceback PyTracebackObject; 6 | 7 | struct _traceback { 8 | PyObject_HEAD 9 | PyTracebackObject *tb_next; 10 | PyFrameObject *tb_frame; 11 | int tb_lasti; 12 | int tb_lineno; 13 | }; 14 | 15 | PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, PyObject **); 16 | PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int); 17 | -------------------------------------------------------------------------------- /vendor/python/win32/cpython/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_CPYTHON_WARNINGS_H 2 | # error "this header file must not be included directly" 3 | #endif 4 | 5 | PyAPI_FUNC(int) PyErr_WarnExplicitObject( 6 | PyObject *category, 7 | PyObject *message, 8 | PyObject *filename, 9 | int lineno, 10 | PyObject *module, 11 | PyObject *registry); 12 | 13 | PyAPI_FUNC(int) PyErr_WarnExplicitFormat( 14 | PyObject *category, 15 | const char *filename, int lineno, 16 | const char *module, PyObject *registry, 17 | const char *format, ...); 18 | 19 | // DEPRECATED: Use PyErr_WarnEx() instead. 20 | #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) 21 | -------------------------------------------------------------------------------- /vendor/python/win32/descrobject.h: -------------------------------------------------------------------------------- 1 | /* Descriptors */ 2 | #ifndef Py_DESCROBJECT_H 3 | #define Py_DESCROBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef PyObject *(*getter)(PyObject *, void *); 9 | typedef int (*setter)(PyObject *, PyObject *, void *); 10 | 11 | struct PyGetSetDef { 12 | const char *name; 13 | getter get; 14 | setter set; 15 | const char *doc; 16 | void *closure; 17 | }; 18 | 19 | PyAPI_DATA(PyTypeObject) PyClassMethodDescr_Type; 20 | PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type; 21 | PyAPI_DATA(PyTypeObject) PyMemberDescr_Type; 22 | PyAPI_DATA(PyTypeObject) PyMethodDescr_Type; 23 | PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type; 24 | PyAPI_DATA(PyTypeObject) PyDictProxy_Type; 25 | PyAPI_DATA(PyTypeObject) PyProperty_Type; 26 | 27 | PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); 28 | PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); 29 | PyAPI_FUNC(PyObject *) PyDescr_NewMember(PyTypeObject *, PyMemberDef *); 30 | PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, PyGetSetDef *); 31 | 32 | PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *); 33 | PyAPI_FUNC(PyObject *) PyWrapper_New(PyObject *, PyObject *); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_DESCROBJECT_H 37 | # include "cpython/descrobject.h" 38 | # undef Py_CPYTHON_DESCROBJECT_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_DESCROBJECT_H */ 45 | -------------------------------------------------------------------------------- /vendor/python/win32/enumobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ENUMOBJECT_H 2 | #define Py_ENUMOBJECT_H 3 | 4 | /* Enumerate Object */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_DATA(PyTypeObject) PyEnum_Type; 11 | PyAPI_DATA(PyTypeObject) PyReversed_Type; 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* !Py_ENUMOBJECT_H */ 18 | -------------------------------------------------------------------------------- /vendor/python/win32/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EXPORTS_H 2 | #define Py_EXPORTS_H 3 | 4 | #if defined(_WIN32) || defined(__CYGWIN__) 5 | #define Py_IMPORTED_SYMBOL __declspec(dllimport) 6 | #define Py_EXPORTED_SYMBOL __declspec(dllexport) 7 | #define Py_LOCAL_SYMBOL 8 | #else 9 | /* 10 | * If we only ever used gcc >= 5, we could use __has_attribute(visibility) 11 | * as a cross-platform way to determine if visibility is supported. However, 12 | * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions 13 | * have 4 < gcc < 5. 14 | */ 15 | #ifndef __has_attribute 16 | #define __has_attribute(x) 0 // Compatibility with non-clang compilers. 17 | #endif 18 | #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ 19 | (defined(__clang__) && __has_attribute(visibility)) 20 | #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) 21 | #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) 22 | #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) 23 | #else 24 | #define Py_IMPORTED_SYMBOL 25 | #define Py_EXPORTED_SYMBOL 26 | #define Py_LOCAL_SYMBOL 27 | #endif 28 | #endif 29 | 30 | #endif /* Py_EXPORTS_H */ 31 | -------------------------------------------------------------------------------- /vendor/python/win32/fileutils.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_FILEUTILS_H 2 | #define Py_FILEUTILS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 8 | PyAPI_FUNC(wchar_t *) Py_DecodeLocale( 9 | const char *arg, 10 | size_t *size); 11 | 12 | PyAPI_FUNC(char*) Py_EncodeLocale( 13 | const wchar_t *text, 14 | size_t *error_pos); 15 | #endif 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_FILEUTILS_H 19 | # include "cpython/fileutils.h" 20 | # undef Py_CPYTHON_FILEUTILS_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_FILEUTILS_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/win32/frameobject.h: -------------------------------------------------------------------------------- 1 | /* Frame object interface */ 2 | 3 | #ifndef Py_FRAMEOBJECT_H 4 | #define Py_FRAMEOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include "pyframe.h" 10 | 11 | #ifndef Py_LIMITED_API 12 | # define Py_CPYTHON_FRAMEOBJECT_H 13 | # include "cpython/frameobject.h" 14 | # undef Py_CPYTHON_FRAMEOBJECT_H 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_FRAMEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /vendor/python/win32/genericaliasobject.h: -------------------------------------------------------------------------------- 1 | // Implementation of PEP 585: support list[int] etc. 2 | #ifndef Py_GENERICALIASOBJECT_H 3 | #define Py_GENERICALIASOBJECT_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(PyObject *) Py_GenericAlias(PyObject *, PyObject *); 9 | PyAPI_DATA(PyTypeObject) Py_GenericAliasType; 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif /* !Py_GENERICALIASOBJECT_H */ 15 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_abstract.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_ABSTRACT_H 2 | #define Py_INTERNAL_ABSTRACT_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 | // Fast inlined version of PyIndex_Check() 12 | static inline int 13 | _PyIndex_Check(PyObject *obj) 14 | { 15 | PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; 16 | return (tp_as_number != NULL && tp_as_number->nb_index != NULL); 17 | } 18 | 19 | PyObject *_PyNumber_PowerNoMod(PyObject *lhs, PyObject *rhs); 20 | PyObject *_PyNumber_InPlacePowerNoMod(PyObject *lhs, PyObject *rhs); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif /* !Py_INTERNAL_ABSTRACT_H */ 26 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_accu.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_LIMITED_API 2 | #ifndef Py_INTERNAL_ACCU_H 3 | #define Py_INTERNAL_ACCU_H 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /*** This is a private API for use by the interpreter and the stdlib. 9 | *** Its definition may be changed or removed at any moment. 10 | ***/ 11 | 12 | #ifndef Py_BUILD_CORE 13 | # error "this header requires Py_BUILD_CORE define" 14 | #endif 15 | 16 | /* 17 | * A two-level accumulator of unicode objects that avoids both the overhead 18 | * of keeping a huge number of small separate objects, and the quadratic 19 | * behaviour of using a naive repeated concatenation scheme. 20 | */ 21 | 22 | #undef small /* defined by some Windows headers */ 23 | 24 | typedef struct { 25 | PyObject *large; /* A list of previously accumulated large strings */ 26 | PyObject *small; /* Pending small strings */ 27 | } _PyAccu; 28 | 29 | PyAPI_FUNC(int) _PyAccu_Init(_PyAccu *acc); 30 | PyAPI_FUNC(int) _PyAccu_Accumulate(_PyAccu *acc, PyObject *unicode); 31 | PyAPI_FUNC(PyObject *) _PyAccu_FinishAsList(_PyAccu *acc); 32 | PyAPI_FUNC(PyObject *) _PyAccu_Finish(_PyAccu *acc); 33 | PyAPI_FUNC(void) _PyAccu_Destroy(_PyAccu *acc); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* !Py_INTERNAL_ACCU_H */ 39 | #endif /* !Py_LIMITED_API */ 40 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_compile.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_COMPILE_H 2 | #define Py_INTERNAL_COMPILE_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 | struct _arena; // Type defined in pycore_pyarena.h 12 | struct _mod; // Type defined in pycore_ast.h 13 | 14 | // Export the symbol for test_peg_generator (built as a library) 15 | PyAPI_FUNC(PyCodeObject*) _PyAST_Compile( 16 | struct _mod *mod, 17 | PyObject *filename, 18 | PyCompilerFlags *flags, 19 | int optimize, 20 | struct _arena *arena); 21 | extern PyFutureFeatures* _PyFuture_FromAST( 22 | struct _mod * mod, 23 | PyObject *filename 24 | ); 25 | 26 | extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); 27 | 28 | typedef struct { 29 | int optimize; 30 | int ff_features; 31 | 32 | int recursion_depth; /* current recursion depth */ 33 | int recursion_limit; /* recursion limit */ 34 | } _PyASTOptimizeState; 35 | 36 | extern int _PyAST_Optimize( 37 | struct _mod *, 38 | struct _arena *arena, 39 | _PyASTOptimizeState *state); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_INTERNAL_COMPILE_H */ 45 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_context.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_CONTEXT_H 2 | #define Py_INTERNAL_CONTEXT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | #include "pycore_hamt.h" /* PyHamtObject */ 9 | 10 | 11 | extern PyTypeObject _PyContextTokenMissing_Type; 12 | 13 | /* runtime lifecycle */ 14 | 15 | PyStatus _PyContext_Init(PyInterpreterState *); 16 | void _PyContext_Fini(PyInterpreterState *); 17 | 18 | 19 | /* other API */ 20 | 21 | #ifndef WITH_FREELISTS 22 | // without freelists 23 | # define PyContext_MAXFREELIST 0 24 | #endif 25 | 26 | #ifndef PyContext_MAXFREELIST 27 | # define PyContext_MAXFREELIST 255 28 | #endif 29 | 30 | struct _Py_context_state { 31 | #if PyContext_MAXFREELIST > 0 32 | // List of free PyContext objects 33 | PyContext *freelist; 34 | int numfree; 35 | #endif 36 | }; 37 | 38 | struct _pycontextobject { 39 | PyObject_HEAD 40 | PyContext *ctx_prev; 41 | PyHamtObject *ctx_vars; 42 | PyObject *ctx_weakreflist; 43 | int ctx_entered; 44 | }; 45 | 46 | 47 | struct _pycontextvarobject { 48 | PyObject_HEAD 49 | PyObject *var_name; 50 | PyObject *var_default; 51 | PyObject *var_cached; 52 | uint64_t var_cached_tsid; 53 | uint64_t var_cached_tsver; 54 | Py_hash_t var_hash; 55 | }; 56 | 57 | 58 | struct _pycontexttokenobject { 59 | PyObject_HEAD 60 | PyContext *tok_ctx; 61 | PyContextVar *tok_var; 62 | PyObject *tok_oldval; 63 | int tok_used; 64 | }; 65 | 66 | 67 | #endif /* !Py_INTERNAL_CONTEXT_H */ 68 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_dtoa.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | #ifndef Py_BUILD_CORE 6 | # error "this header requires Py_BUILD_CORE define" 7 | #endif 8 | 9 | #include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR 10 | 11 | 12 | #if _PY_SHORT_FLOAT_REPR == 1 13 | 14 | /* These functions are used by modules compiled as C extension like math: 15 | they must be exported. */ 16 | 17 | PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr); 18 | PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, 19 | int *decpt, int *sign, char **rve); 20 | PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); 21 | PyAPI_FUNC(double) _Py_dg_stdnan(int sign); 22 | PyAPI_FUNC(double) _Py_dg_infinity(int sign); 23 | 24 | #endif // _PY_SHORT_FLOAT_REPR == 1 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_emscripten_signal.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_EMSCRIPTEN_SIGNAL_H 2 | #define Py_EMSCRIPTEN_SIGNAL_H 3 | 4 | #if defined(__EMSCRIPTEN__) 5 | 6 | void 7 | _Py_CheckEmscriptenSignals(void); 8 | 9 | void 10 | _Py_CheckEmscriptenSignalsPeriodically(void); 11 | 12 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() _Py_CheckEmscriptenSignals() 13 | 14 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically() 15 | 16 | extern int Py_EMSCRIPTEN_SIGNAL_HANDLING; 17 | 18 | #else 19 | 20 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS() 21 | #define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() 22 | 23 | #endif // defined(__EMSCRIPTEN__) 24 | 25 | #endif // ndef Py_EMSCRIPTEN_SIGNAL_H 26 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_exceptions.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_EXCEPTIONS_H 2 | #define Py_INTERNAL_EXCEPTIONS_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyExc_InitState(PyInterpreterState *); 15 | extern PyStatus _PyExc_InitGlobalObjects(PyInterpreterState *); 16 | extern int _PyExc_InitTypes(PyInterpreterState *); 17 | extern void _PyExc_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | struct _Py_exc_state { 23 | // The dict mapping from errno codes to OSError subclasses 24 | PyObject *errnomap; 25 | PyBaseExceptionObject *memerrors_freelist; 26 | int memerrors_numfree; 27 | // The ExceptionGroup type 28 | PyObject *PyExc_ExceptionGroup; 29 | }; 30 | 31 | extern void _PyExc_ClearExceptionGroupType(PyInterpreterState *); 32 | 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* !Py_INTERNAL_EXCEPTIONS_H */ 38 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_floatobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FLOATOBJECT_H 2 | #define Py_INTERNAL_FLOATOBJECT_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern void _PyFloat_InitState(PyInterpreterState *); 15 | extern PyStatus _PyFloat_InitTypes(PyInterpreterState *); 16 | extern void _PyFloat_Fini(PyInterpreterState *); 17 | extern void _PyFloat_FiniType(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | #ifndef WITH_FREELISTS 23 | // without freelists 24 | # define PyFloat_MAXFREELIST 0 25 | #endif 26 | 27 | #ifndef PyFloat_MAXFREELIST 28 | # define PyFloat_MAXFREELIST 100 29 | #endif 30 | 31 | struct _Py_float_state { 32 | #if PyFloat_MAXFREELIST > 0 33 | /* Special free list 34 | free_list is a singly-linked list of available PyFloatObjects, 35 | linked via abuse of their ob_type members. */ 36 | int numfree; 37 | PyFloatObject *free_list; 38 | #endif 39 | }; 40 | 41 | void _PyFloat_ExactDealloc(PyObject *op); 42 | 43 | 44 | PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out); 45 | 46 | 47 | /* Format the object based on the format_spec, as defined in PEP 3101 48 | (Advanced String Formatting). */ 49 | PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter( 50 | _PyUnicodeWriter *writer, 51 | PyObject *obj, 52 | PyObject *format_spec, 53 | Py_ssize_t start, 54 | Py_ssize_t end); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #endif /* !Py_INTERNAL_FLOATOBJECT_H */ 60 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_format.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FORMAT_H 2 | #define Py_INTERNAL_FORMAT_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 | /* Format codes 12 | * F_LJUST '-' 13 | * F_SIGN '+' 14 | * F_BLANK ' ' 15 | * F_ALT '#' 16 | * F_ZERO '0' 17 | */ 18 | #define F_LJUST (1<<0) 19 | #define F_SIGN (1<<1) 20 | #define F_BLANK (1<<2) 21 | #define F_ALT (1<<3) 22 | #define F_ZERO (1<<4) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_INTERNAL_FORMAT_H */ 28 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_function.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_FUNCTION_H 2 | #define Py_INTERNAL_FUNCTION_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 | extern PyFunctionObject* _PyFunction_FromConstructor(PyFrameConstructor *constr); 12 | 13 | extern uint32_t _PyFunction_GetVersionForCurrentState(PyFunctionObject *func); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif /* !Py_INTERNAL_FUNCTION_H */ 19 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_genobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_GENOBJECT_H 2 | #define Py_INTERNAL_GENOBJECT_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 | extern PyObject *_PyGen_yf(PyGenObject *); 12 | extern PyObject *_PyCoro_GetAwaitableIter(PyObject *o); 13 | extern PyObject *_PyAsyncGenValueWrapperNew(PyObject *); 14 | 15 | /* runtime lifecycle */ 16 | 17 | extern void _PyAsyncGen_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | #ifndef WITH_FREELISTS 23 | // without freelists 24 | # define _PyAsyncGen_MAXFREELIST 0 25 | #endif 26 | 27 | #ifndef _PyAsyncGen_MAXFREELIST 28 | # define _PyAsyncGen_MAXFREELIST 80 29 | #endif 30 | 31 | struct _Py_async_gen_state { 32 | #if _PyAsyncGen_MAXFREELIST > 0 33 | /* Freelists boost performance 6-10%; they also reduce memory 34 | fragmentation, as _PyAsyncGenWrappedValue and PyAsyncGenASend 35 | are short-living objects that are instantiated for every 36 | __anext__() call. */ 37 | struct _PyAsyncGenWrappedValue* value_freelist[_PyAsyncGen_MAXFREELIST]; 38 | int value_numfree; 39 | 40 | struct PyAsyncGenASend* asend_freelist[_PyAsyncGen_MAXFREELIST]; 41 | int asend_numfree; 42 | #endif 43 | }; 44 | 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | #endif /* !Py_INTERNAL_GENOBJECT_H */ 50 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PYGETOPT_H 2 | #define Py_INTERNAL_PYGETOPT_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | extern int _PyOS_opterr; 9 | extern Py_ssize_t _PyOS_optind; 10 | extern const wchar_t *_PyOS_optarg; 11 | 12 | extern void _PyOS_ResetGetOpt(void); 13 | 14 | typedef struct { 15 | const wchar_t *name; 16 | int has_arg; 17 | int val; 18 | } _PyOS_LongOption; 19 | 20 | extern int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex); 21 | 22 | #endif /* !Py_INTERNAL_PYGETOPT_H */ 23 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_import.h: -------------------------------------------------------------------------------- 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 | #ifdef HAVE_FORK 9 | extern PyStatus _PyImport_ReInitLock(void); 10 | #endif 11 | extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate); 12 | 13 | struct _module_alias { 14 | const char *name; /* ASCII encoded string */ 15 | const char *orig; /* ASCII encoded string */ 16 | }; 17 | 18 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenBootstrap; 19 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenStdlib; 20 | PyAPI_DATA(const struct _frozen *) _PyImport_FrozenTest; 21 | extern const struct _module_alias * _PyImport_FrozenAliases; 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_IMPORT_H */ 27 | #endif /* !Py_LIMITED_API */ 28 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_interpreteridobject.h: -------------------------------------------------------------------------------- 1 | /* Interpreter ID Object */ 2 | 3 | #ifndef Py_INTERNAL_INTERPRETERIDOBJECT_H 4 | #define Py_INTERNAL_INTERPRETERIDOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type; 14 | 15 | PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t); 16 | PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *); 17 | PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif // !Py_INTERNAL_INTERPRETERIDOBJECT_H 23 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_list.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_LIST_H 2 | #define Py_INTERNAL_LIST_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 | #include "listobject.h" // _PyList_CAST() 12 | 13 | 14 | /* runtime lifecycle */ 15 | 16 | extern void _PyList_Fini(PyInterpreterState *); 17 | 18 | 19 | /* other API */ 20 | 21 | #ifndef WITH_FREELISTS 22 | // without freelists 23 | # define PyList_MAXFREELIST 0 24 | #endif 25 | 26 | /* Empty list reuse scheme to save calls to malloc and free */ 27 | #ifndef PyList_MAXFREELIST 28 | # define PyList_MAXFREELIST 80 29 | #endif 30 | 31 | struct _Py_list_state { 32 | #if PyList_MAXFREELIST > 0 33 | PyListObject *free_list[PyList_MAXFREELIST]; 34 | int numfree; 35 | #endif 36 | }; 37 | 38 | #define _PyList_ITEMS(op) (_PyList_CAST(op)->ob_item) 39 | 40 | extern int 41 | _PyList_AppendTakeRefListResize(PyListObject *self, PyObject *newitem); 42 | 43 | static inline int 44 | _PyList_AppendTakeRef(PyListObject *self, PyObject *newitem) 45 | { 46 | assert(self != NULL && newitem != NULL); 47 | assert(PyList_Check(self)); 48 | Py_ssize_t len = PyList_GET_SIZE(self); 49 | Py_ssize_t allocated = self->allocated; 50 | assert((size_t)len + 1 < PY_SSIZE_T_MAX); 51 | if (allocated > len) { 52 | PyList_SET_ITEM(self, len, newitem); 53 | Py_SET_SIZE(self, len + 1); 54 | return 0; 55 | } 56 | return _PyList_AppendTakeRefListResize(self, newitem); 57 | } 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | #endif /* !Py_INTERNAL_LIST_H */ 63 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_moduleobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_MODULEOBJECT_H 2 | #define Py_INTERNAL_MODULEOBJECT_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 | typedef struct { 12 | PyObject_HEAD 13 | PyObject *md_dict; 14 | PyModuleDef *md_def; 15 | void *md_state; 16 | PyObject *md_weaklist; 17 | // for logging purposes after md_dict is cleared 18 | PyObject *md_name; 19 | } PyModuleObject; 20 | 21 | static inline PyModuleDef* _PyModule_GetDef(PyObject *mod) { 22 | assert(PyModule_Check(mod)); 23 | return ((PyModuleObject *)mod)->md_def; 24 | } 25 | 26 | static inline void* _PyModule_GetState(PyObject* mod) { 27 | assert(PyModule_Check(mod)); 28 | return ((PyModuleObject *)mod)->md_state; 29 | } 30 | 31 | static inline PyObject* _PyModule_GetDict(PyObject *mod) { 32 | assert(PyModule_Check(mod)); 33 | PyObject *dict = ((PyModuleObject *)mod) -> md_dict; 34 | // _PyModule_GetDict(mod) must not be used after calling module_clear(mod) 35 | assert(dict != NULL); 36 | return dict; 37 | } 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_INTERNAL_MODULEOBJECT_H */ 43 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_namespace.h: -------------------------------------------------------------------------------- 1 | // Simple namespace object interface 2 | 3 | #ifndef Py_INTERNAL_NAMESPACE_H 4 | #define Py_INTERNAL_NAMESPACE_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | PyAPI_DATA(PyTypeObject) _PyNamespace_Type; 14 | 15 | PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif // !Py_INTERNAL_NAMESPACE_H 21 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_parser.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PARSER_H 2 | #define Py_INTERNAL_PARSER_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 | extern struct _mod* _PyParser_ASTFromString( 12 | const char *str, 13 | PyObject* filename, 14 | int mode, 15 | PyCompilerFlags *flags, 16 | PyArena *arena); 17 | extern struct _mod* _PyParser_ASTFromFile( 18 | FILE *fp, 19 | PyObject *filename_ob, 20 | const char *enc, 21 | int mode, 22 | const char *ps1, 23 | const char *ps2, 24 | PyCompilerFlags *flags, 25 | int *errcode, 26 | PyArena *arena); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* !Py_INTERNAL_PARSER_H */ 32 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_pathconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_PATHCONFIG_H 2 | #define Py_INTERNAL_PATHCONFIG_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 | PyAPI_FUNC(void) _PyPathConfig_ClearGlobal(void); 12 | extern PyStatus _PyPathConfig_ReadGlobal(PyConfig *config); 13 | extern PyStatus _PyPathConfig_UpdateGlobal(const PyConfig *config); 14 | extern const wchar_t * _PyPathConfig_GetGlobalModuleSearchPath(void); 15 | 16 | extern int _PyPathConfig_ComputeSysPath0( 17 | const PyWideStringList *argv, 18 | PyObject **path0); 19 | 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif /* !Py_INTERNAL_PATHCONFIG_H */ 25 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_pyhash.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_HASH_H 2 | #define Py_INTERNAL_HASH_H 3 | 4 | #ifndef Py_BUILD_CORE 5 | # error "this header requires Py_BUILD_CORE define" 6 | #endif 7 | 8 | uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_signal.h: -------------------------------------------------------------------------------- 1 | // Define Py_NSIG constant for signal handling. 2 | 3 | #ifndef Py_INTERNAL_SIGNAL_H 4 | #define Py_INTERNAL_SIGNAL_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #ifndef Py_BUILD_CORE 10 | # error "this header requires Py_BUILD_CORE define" 11 | #endif 12 | 13 | #include // NSIG 14 | 15 | #ifdef _SIG_MAXSIG 16 | // gh-91145: On FreeBSD, defines NSIG as 32: it doesn't include 17 | // realtime signals: [SIGRTMIN,SIGRTMAX]. Use _SIG_MAXSIG instead. For 18 | // example on x86-64 FreeBSD 13, SIGRTMAX is 126 and _SIG_MAXSIG is 128. 19 | # define Py_NSIG _SIG_MAXSIG 20 | #elif defined(NSIG) 21 | # define Py_NSIG NSIG 22 | #elif defined(_NSIG) 23 | # define Py_NSIG _NSIG // BSD/SysV 24 | #elif defined(_SIGMAX) 25 | # define Py_NSIG (_SIGMAX + 1) // QNX 26 | #elif defined(SIGMAX) 27 | # define Py_NSIG (SIGMAX + 1) // djgpp 28 | #else 29 | # define Py_NSIG 64 // Use a reasonable default value 30 | #endif 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif // !Py_INTERNAL_SIGNAL_H 36 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_sliceobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SLICEOBJECT_H 2 | #define Py_INTERNAL_SLICEOBJECT_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern void _PySlice_Fini(PyInterpreterState *); 15 | 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif /* !Py_INTERNAL_SLICEOBJECT_H */ 21 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_strhex.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRHEX_H 2 | #define Py_INTERNAL_STRHEX_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 | // Returns a str() containing the hex representation of argbuf. 12 | PyAPI_FUNC(PyObject*) _Py_strhex(const 13 | char* argbuf, 14 | const Py_ssize_t arglen); 15 | 16 | // Returns a bytes() containing the ASCII hex representation of argbuf. 17 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes( 18 | const char* argbuf, 19 | const Py_ssize_t arglen); 20 | 21 | // These variants include support for a separator between every N bytes: 22 | PyAPI_FUNC(PyObject*) _Py_strhex_with_sep( 23 | const char* argbuf, 24 | const Py_ssize_t arglen, 25 | PyObject* sep, 26 | const int bytes_per_group); 27 | PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep( 28 | const char* argbuf, 29 | const Py_ssize_t arglen, 30 | PyObject* sep, 31 | const int bytes_per_group); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | #endif /* !Py_INTERNAL_STRHEX_H */ 37 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_structseq.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_STRUCTSEQ_H 2 | #define Py_INTERNAL_STRUCTSEQ_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 | 12 | /* other API */ 13 | 14 | PyAPI_FUNC(PyTypeObject *) _PyStructSequence_NewType( 15 | PyStructSequence_Desc *desc, 16 | unsigned long tp_flags); 17 | 18 | PyAPI_FUNC(int) _PyStructSequence_InitType( 19 | PyTypeObject *type, 20 | PyStructSequence_Desc *desc, 21 | unsigned long tp_flags); 22 | 23 | extern void _PyStructSequence_FiniType(PyTypeObject *type); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !Py_INTERNAL_STRUCTSEQ_H */ 29 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_sysmodule.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_SYSMODULE_H 2 | #define Py_INTERNAL_SYSMODULE_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 | PyAPI_FUNC(int) _PySys_Audit( 12 | PyThreadState *tstate, 13 | const char *event, 14 | const char *argFormat, 15 | ...); 16 | 17 | /* We want minimal exposure of this function, so use extern rather than 18 | PyAPI_FUNC() to not export the symbol. */ 19 | extern void _PySys_ClearAuditHooks(PyThreadState *tstate); 20 | 21 | PyAPI_FUNC(int) _PySys_SetAttr(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_INTERNAL_SYSMODULE_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_typeobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_TYPEOBJECT_H 2 | #define Py_INTERNAL_TYPEOBJECT_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 | 12 | /* runtime lifecycle */ 13 | 14 | extern PyStatus _PyTypes_InitState(PyInterpreterState *); 15 | extern PyStatus _PyTypes_InitTypes(PyInterpreterState *); 16 | extern void _PyTypes_FiniTypes(PyInterpreterState *); 17 | extern void _PyTypes_Fini(PyInterpreterState *); 18 | 19 | 20 | /* other API */ 21 | 22 | // Type attribute lookup cache: speed up attribute and method lookups, 23 | // see _PyType_Lookup(). 24 | struct type_cache_entry { 25 | unsigned int version; // initialized from type->tp_version_tag 26 | PyObject *name; // reference to exactly a str or None 27 | PyObject *value; // borrowed reference or NULL 28 | }; 29 | 30 | #define MCACHE_SIZE_EXP 12 31 | #define MCACHE_STATS 0 32 | 33 | struct type_cache { 34 | struct type_cache_entry hashtable[1 << MCACHE_SIZE_EXP]; 35 | #if MCACHE_STATS 36 | size_t hits; 37 | size_t misses; 38 | size_t collisions; 39 | #endif 40 | }; 41 | 42 | extern PyStatus _PyTypes_InitSlotDefs(void); 43 | 44 | extern void _PyStaticType_Dealloc(PyTypeObject *type); 45 | 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | #endif /* !Py_INTERNAL_TYPEOBJECT_H */ 51 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_ucnhash.h: -------------------------------------------------------------------------------- 1 | /* Unicode name database interface */ 2 | #ifndef Py_INTERNAL_UCNHASH_H 3 | #define Py_INTERNAL_UCNHASH_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 | /* revised ucnhash CAPI interface (exported through a "wrapper") */ 13 | 14 | #define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI" 15 | 16 | typedef struct { 17 | 18 | /* Get name for a given character code. 19 | Returns non-zero if success, zero if not. 20 | Does not set Python exceptions. */ 21 | int (*getname)(Py_UCS4 code, char* buffer, int buflen, 22 | int with_alias_and_seq); 23 | 24 | /* Get character code for a given name. 25 | Same error handling as for getname(). */ 26 | int (*getcode)(const char* name, int namelen, Py_UCS4* code, 27 | int with_named_seq); 28 | 29 | } _PyUnicode_Name_CAPI; 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* !Py_INTERNAL_UCNHASH_H */ 35 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_unionobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_UNIONOBJECT_H 2 | #define Py_INTERNAL_UNIONOBJECT_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 | extern PyTypeObject _PyUnion_Type; 12 | #define _PyUnion_Check(op) Py_IS_TYPE(op, &_PyUnion_Type) 13 | extern PyObject *_Py_union_type_or(PyObject *, PyObject *); 14 | 15 | #define _PyGenericAlias_Check(op) PyObject_TypeCheck(op, &Py_GenericAliasType) 16 | extern PyObject *_Py_subs_parameters(PyObject *, PyObject *, PyObject *, PyObject *); 17 | extern PyObject *_Py_make_parameters(PyObject *); 18 | extern PyObject *_Py_union_args(PyObject *self); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* !Py_INTERNAL_UNIONOBJECT_H */ 24 | -------------------------------------------------------------------------------- /vendor/python/win32/internal/pycore_warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTERNAL_WARNINGS_H 2 | #define Py_INTERNAL_WARNINGS_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 | struct _warnings_runtime_state { 12 | /* Both 'filters' and 'onceregistry' can be set in warnings.py; 13 | get_warnings_attr() will reset these variables accordingly. */ 14 | PyObject *filters; /* List */ 15 | PyObject *once_registry; /* Dict */ 16 | PyObject *default_action; /* String */ 17 | long filters_version; 18 | }; 19 | 20 | extern int _PyWarnings_InitState(PyInterpreterState *interp); 21 | 22 | PyAPI_FUNC(PyObject*) _PyWarnings_Init(void); 23 | 24 | extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif /* !Py_INTERNAL_WARNINGS_H */ 30 | -------------------------------------------------------------------------------- /vendor/python/win32/intrcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_INTRCHECK_H 2 | #define Py_INTRCHECK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyOS_InterruptOccurred(void); 8 | #ifdef HAVE_FORK 9 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 10 | PyAPI_FUNC(void) PyOS_BeforeFork(void); 11 | PyAPI_FUNC(void) PyOS_AfterFork_Parent(void); 12 | PyAPI_FUNC(void) PyOS_AfterFork_Child(void); 13 | #endif 14 | #endif 15 | /* Deprecated, please use PyOS_AfterFork_Child() instead */ 16 | Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void); 17 | 18 | #ifndef Py_LIMITED_API 19 | PyAPI_FUNC(int) _PyOS_IsMainThread(void); 20 | 21 | #ifdef MS_WINDOWS 22 | /* windows.h is not included by Python.h so use void* instead of HANDLE */ 23 | PyAPI_FUNC(void*) _PyOS_SigintEvent(void); 24 | #endif 25 | #endif /* !Py_LIMITED_API */ 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif /* !Py_INTRCHECK_H */ 31 | -------------------------------------------------------------------------------- /vendor/python/win32/iterobject.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_ITEROBJECT_H 2 | #define Py_ITEROBJECT_H 3 | /* Iterators (the basic kind, over a sequence) */ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_DATA(PyTypeObject) PySeqIter_Type; 9 | PyAPI_DATA(PyTypeObject) PyCallIter_Type; 10 | #ifdef Py_BUILD_CORE 11 | extern PyTypeObject _PyAnextAwaitable_Type; 12 | #endif 13 | 14 | #define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type) 15 | 16 | PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); 17 | 18 | 19 | #define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type) 20 | 21 | PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_ITEROBJECT_H */ 27 | 28 | -------------------------------------------------------------------------------- /vendor/python/win32/marshal.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interface for marshal.c */ 3 | 4 | #ifndef Py_MARSHAL_H 5 | #define Py_MARSHAL_H 6 | #ifndef Py_LIMITED_API 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *, 13 | Py_ssize_t); 14 | PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int); 15 | 16 | #define Py_MARSHAL_VERSION 4 17 | 18 | PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *); 19 | PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *); 20 | PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); 21 | PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *); 22 | 23 | PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int); 24 | PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* Py_LIMITED_API */ 31 | #endif /* !Py_MARSHAL_H */ 32 | -------------------------------------------------------------------------------- /vendor/python/win32/osdefs.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_OSDEFS_H 2 | #define Py_OSDEFS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | 8 | /* Operating system dependencies */ 9 | 10 | #ifdef MS_WINDOWS 11 | #define SEP L'\\' 12 | #define ALTSEP L'/' 13 | #define MAXPATHLEN 256 14 | #define DELIM L';' 15 | #endif 16 | 17 | #ifdef __VXWORKS__ 18 | #define DELIM L';' 19 | #endif 20 | 21 | /* Filename separator */ 22 | #ifndef SEP 23 | #define SEP L'/' 24 | #endif 25 | 26 | /* Max pathname length */ 27 | #ifdef __hpux 28 | #include 29 | #include 30 | #ifndef PATH_MAX 31 | #define PATH_MAX MAXPATHLEN 32 | #endif 33 | #endif 34 | 35 | #ifndef MAXPATHLEN 36 | #if defined(PATH_MAX) && PATH_MAX > 1024 37 | #define MAXPATHLEN PATH_MAX 38 | #else 39 | #define MAXPATHLEN 1024 40 | #endif 41 | #endif 42 | 43 | /* Search path entry delimiter */ 44 | #ifndef DELIM 45 | #define DELIM L':' 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* !Py_OSDEFS_H */ 52 | -------------------------------------------------------------------------------- /vendor/python/win32/osmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* os module interface */ 3 | 4 | #ifndef Py_OSMODULE_H 5 | #define Py_OSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 11 | PyAPI_FUNC(PyObject *) PyOS_FSPath(PyObject *path); 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif /* !Py_OSMODULE_H */ 18 | -------------------------------------------------------------------------------- /vendor/python/win32/patchlevel.h: -------------------------------------------------------------------------------- 1 | 2 | /* Python version identification scheme. 3 | 4 | When the major or minor version changes, the VERSION variable in 5 | configure.ac must also be changed. 6 | 7 | There is also (independent) API version information in modsupport.h. 8 | */ 9 | 10 | /* Values for PY_RELEASE_LEVEL */ 11 | #define PY_RELEASE_LEVEL_ALPHA 0xA 12 | #define PY_RELEASE_LEVEL_BETA 0xB 13 | #define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ 14 | #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ 15 | /* Higher for patch releases */ 16 | 17 | /* Version parsed out into numeric values */ 18 | /*--start constants--*/ 19 | #define PY_MAJOR_VERSION 3 20 | #define PY_MINOR_VERSION 11 21 | #define PY_MICRO_VERSION 8 22 | #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL 23 | #define PY_RELEASE_SERIAL 0 24 | 25 | /* Version as a string */ 26 | #define PY_VERSION "3.11.8" 27 | /*--end constants--*/ 28 | 29 | /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. 30 | Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ 31 | #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ 32 | (PY_MINOR_VERSION << 16) | \ 33 | (PY_MICRO_VERSION << 8) | \ 34 | (PY_RELEASE_LEVEL << 4) | \ 35 | (PY_RELEASE_SERIAL << 0)) 36 | -------------------------------------------------------------------------------- /vendor/python/win32/pyframe.h: -------------------------------------------------------------------------------- 1 | /* Limited C API of PyFrame API 2 | * 3 | * Include "frameobject.h" to get the PyFrameObject structure. 4 | */ 5 | 6 | #ifndef Py_PYFRAME_H 7 | #define Py_PYFRAME_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* Return the line of code the frame is currently executing. */ 13 | PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); 14 | 15 | PyAPI_FUNC(PyCodeObject *) PyFrame_GetCode(PyFrameObject *frame); 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_PYFRAME_H 19 | # include "cpython/pyframe.h" 20 | # undef Py_CPYTHON_PYFRAME_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_PYFRAME_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/win32/pystrcmp.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_STRCMP_H 2 | #define Py_STRCMP_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); 9 | PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *); 10 | 11 | #ifdef MS_WINDOWS 12 | #define PyOS_strnicmp strnicmp 13 | #define PyOS_stricmp stricmp 14 | #else 15 | #define PyOS_strnicmp PyOS_mystrnicmp 16 | #define PyOS_stricmp PyOS_mystricmp 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !Py_STRCMP_H */ 24 | -------------------------------------------------------------------------------- /vendor/python/win32/pythonrun.h: -------------------------------------------------------------------------------- 1 | 2 | /* Interfaces to parse and execute pieces of python code */ 3 | 4 | #ifndef Py_PYTHONRUN_H 5 | #define Py_PYTHONRUN_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int); 11 | 12 | PyAPI_FUNC(void) PyErr_Print(void); 13 | PyAPI_FUNC(void) PyErr_PrintEx(int); 14 | PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); 15 | 16 | 17 | /* Stuff with no proper home (yet) */ 18 | PyAPI_DATA(int) (*PyOS_InputHook)(void); 19 | 20 | /* Stack size, in "pointers" (so we get extra safety margins 21 | on 64-bit platforms). On a 32-bit platform, this translates 22 | to an 8k margin. */ 23 | #define PYOS_STACK_MARGIN 2048 24 | 25 | #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300 26 | /* Enable stack checking under Microsoft C */ 27 | // When changing the platforms, ensure PyOS_CheckStack() docs are still correct 28 | #define USE_STACKCHECK 29 | #endif 30 | 31 | #ifdef USE_STACKCHECK 32 | /* Check that we aren't overflowing our stack */ 33 | PyAPI_FUNC(int) PyOS_CheckStack(void); 34 | #endif 35 | 36 | #ifndef Py_LIMITED_API 37 | # define Py_CPYTHON_PYTHONRUN_H 38 | # include "cpython/pythonrun.h" 39 | # undef Py_CPYTHON_PYTHONRUN_H 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif /* !Py_PYTHONRUN_H */ 46 | -------------------------------------------------------------------------------- /vendor/python/win32/pytypedefs.h: -------------------------------------------------------------------------------- 1 | // Forward declarations of types of the Python C API. 2 | // Declare them at the same place since redefining typedef is a C11 feature. 3 | // Only use a forward declaration if there is an interdependency between two 4 | // header files. 5 | 6 | #ifndef Py_PYTYPEDEFS_H 7 | #define Py_PYTYPEDEFS_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct PyModuleDef PyModuleDef; 13 | typedef struct PyModuleDef_Slot PyModuleDef_Slot; 14 | typedef struct PyMethodDef PyMethodDef; 15 | typedef struct PyGetSetDef PyGetSetDef; 16 | typedef struct PyMemberDef PyMemberDef; 17 | 18 | typedef struct _object PyObject; 19 | typedef struct _longobject PyLongObject; 20 | typedef struct _typeobject PyTypeObject; 21 | typedef struct PyCodeObject PyCodeObject; 22 | typedef struct _frame PyFrameObject; 23 | 24 | typedef struct _ts PyThreadState; 25 | typedef struct _is PyInterpreterState; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif // !Py_PYTYPEDEFS_H 31 | -------------------------------------------------------------------------------- /vendor/python/win32/rangeobject.h: -------------------------------------------------------------------------------- 1 | 2 | /* Range object interface */ 3 | 4 | #ifndef Py_RANGEOBJECT_H 5 | #define Py_RANGEOBJECT_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | A range object represents an integer range. This is an immutable object; 12 | a range cannot change its value after creation. 13 | 14 | Range objects behave like the corresponding tuple objects except that 15 | they are represented by a start, stop, and step datamembers. 16 | */ 17 | 18 | PyAPI_DATA(PyTypeObject) PyRange_Type; 19 | PyAPI_DATA(PyTypeObject) PyRangeIter_Type; 20 | PyAPI_DATA(PyTypeObject) PyLongRangeIter_Type; 21 | 22 | #define PyRange_Check(op) Py_IS_TYPE(op, &PyRange_Type) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* !Py_RANGEOBJECT_H */ 28 | -------------------------------------------------------------------------------- /vendor/python/win32/structseq.h: -------------------------------------------------------------------------------- 1 | 2 | /* Named tuple object interface */ 3 | 4 | #ifndef Py_STRUCTSEQ_H 5 | #define Py_STRUCTSEQ_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct PyStructSequence_Field { 11 | const char *name; 12 | const char *doc; 13 | } PyStructSequence_Field; 14 | 15 | typedef struct PyStructSequence_Desc { 16 | const char *name; 17 | const char *doc; 18 | PyStructSequence_Field *fields; 19 | int n_in_sequence; 20 | } PyStructSequence_Desc; 21 | 22 | PyAPI_DATA(const char * const) PyStructSequence_UnnamedField; 23 | 24 | #ifndef Py_LIMITED_API 25 | PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type, 26 | PyStructSequence_Desc *desc); 27 | PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type, 28 | PyStructSequence_Desc *desc); 29 | #endif 30 | PyAPI_FUNC(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc); 31 | 32 | PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type); 33 | 34 | #ifndef Py_LIMITED_API 35 | typedef PyTupleObject PyStructSequence; 36 | 37 | /* Macro, *only* to be used to fill in brand new objects */ 38 | #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v) 39 | 40 | #define PyStructSequence_GET_ITEM(op, i) PyTuple_GET_ITEM(op, i) 41 | #endif 42 | 43 | PyAPI_FUNC(void) PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*); 44 | PyAPI_FUNC(PyObject*) PyStructSequence_GetItem(PyObject*, Py_ssize_t); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | #endif /* !Py_STRUCTSEQ_H */ 50 | -------------------------------------------------------------------------------- /vendor/python/win32/sysmodule.h: -------------------------------------------------------------------------------- 1 | 2 | /* System module interface */ 3 | 4 | #ifndef Py_SYSMODULE_H 5 | #define Py_SYSMODULE_H 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | PyAPI_FUNC(PyObject *) PySys_GetObject(const char *); 11 | PyAPI_FUNC(int) PySys_SetObject(const char *, PyObject *); 12 | 13 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **); 14 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int); 15 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); 16 | 17 | PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) 18 | Py_GCC_ATTRIBUTE((format(printf, 1, 2))); 19 | PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) 20 | Py_GCC_ATTRIBUTE((format(printf, 1, 2))); 21 | PyAPI_FUNC(void) PySys_FormatStdout(const char *format, ...); 22 | PyAPI_FUNC(void) PySys_FormatStderr(const char *format, ...); 23 | 24 | PyAPI_FUNC(void) PySys_ResetWarnOptions(void); 25 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *); 26 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddWarnOptionUnicode(PyObject *); 27 | Py_DEPRECATED(3.11) PyAPI_FUNC(int) PySys_HasWarnOptions(void); 28 | 29 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddXOption(const wchar_t *); 30 | PyAPI_FUNC(PyObject *) PySys_GetXOptions(void); 31 | 32 | #ifndef Py_LIMITED_API 33 | # define Py_CPYTHON_SYSMODULE_H 34 | # include "cpython/sysmodule.h" 35 | # undef Py_CPYTHON_SYSMODULE_H 36 | #endif 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | #endif /* !Py_SYSMODULE_H */ 42 | -------------------------------------------------------------------------------- /vendor/python/win32/traceback.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEBACK_H 2 | #define Py_TRACEBACK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | /* Traceback interface */ 8 | 9 | PyAPI_FUNC(int) PyTraceBack_Here(PyFrameObject *); 10 | PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); 11 | 12 | /* Reveal traceback type so we can typecheck traceback objects */ 13 | PyAPI_DATA(PyTypeObject) PyTraceBack_Type; 14 | #define PyTraceBack_Check(v) Py_IS_TYPE(v, &PyTraceBack_Type) 15 | 16 | 17 | #ifndef Py_LIMITED_API 18 | # define Py_CPYTHON_TRACEBACK_H 19 | # include "cpython/traceback.h" 20 | # undef Py_CPYTHON_TRACEBACK_H 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif /* !Py_TRACEBACK_H */ 27 | -------------------------------------------------------------------------------- /vendor/python/win32/tracemalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_TRACEMALLOC_H 2 | #define Py_TRACEMALLOC_H 3 | 4 | #ifndef Py_LIMITED_API 5 | /* Track an allocated memory block in the tracemalloc module. 6 | Return 0 on success, return -1 on error (failed to allocate memory to store 7 | the trace). 8 | 9 | Return -2 if tracemalloc is disabled. 10 | 11 | If memory block is already tracked, update the existing trace. */ 12 | PyAPI_FUNC(int) PyTraceMalloc_Track( 13 | unsigned int domain, 14 | uintptr_t ptr, 15 | size_t size); 16 | 17 | /* Untrack an allocated memory block in the tracemalloc module. 18 | Do nothing if the block was not tracked. 19 | 20 | Return -2 if tracemalloc is disabled, otherwise return 0. */ 21 | PyAPI_FUNC(int) PyTraceMalloc_Untrack( 22 | unsigned int domain, 23 | uintptr_t ptr); 24 | 25 | /* Get the traceback where a memory block was allocated. 26 | 27 | Return a tuple of (filename: str, lineno: int) tuples. 28 | 29 | Return None if the tracemalloc module is disabled or if the memory block 30 | is not tracked by tracemalloc. 31 | 32 | Raise an exception and return NULL on error. */ 33 | PyAPI_FUNC(PyObject*) _PyTraceMalloc_GetTraceback( 34 | unsigned int domain, 35 | uintptr_t ptr); 36 | #endif 37 | 38 | #endif /* !Py_TRACEMALLOC_H */ 39 | -------------------------------------------------------------------------------- /vendor/python/win32/warnings.h: -------------------------------------------------------------------------------- 1 | #ifndef Py_WARNINGS_H 2 | #define Py_WARNINGS_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | PyAPI_FUNC(int) PyErr_WarnEx( 8 | PyObject *category, 9 | const char *message, /* UTF-8 encoded string */ 10 | Py_ssize_t stack_level); 11 | 12 | PyAPI_FUNC(int) PyErr_WarnFormat( 13 | PyObject *category, 14 | Py_ssize_t stack_level, 15 | const char *format, /* ASCII-encoded string */ 16 | ...); 17 | 18 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 19 | /* Emit a ResourceWarning warning */ 20 | PyAPI_FUNC(int) PyErr_ResourceWarning( 21 | PyObject *source, 22 | Py_ssize_t stack_level, 23 | const char *format, /* ASCII-encoded string */ 24 | ...); 25 | #endif 26 | 27 | PyAPI_FUNC(int) PyErr_WarnExplicit( 28 | PyObject *category, 29 | const char *message, /* UTF-8 encoded string */ 30 | const char *filename, /* decoded from the filesystem encoding */ 31 | int lineno, 32 | const char *module, /* UTF-8 encoded string */ 33 | PyObject *registry); 34 | 35 | #ifndef Py_LIMITED_API 36 | # define Py_CPYTHON_WARNINGS_H 37 | # include "cpython/warnings.h" 38 | # undef Py_CPYTHON_WARNINGS_H 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | #endif /* !Py_WARNINGS_H */ 45 | 46 | -------------------------------------------------------------------------------- /vendor/python/win32/weakrefobject.h: -------------------------------------------------------------------------------- 1 | /* Weak references objects for Python. */ 2 | 3 | #ifndef Py_WEAKREFOBJECT_H 4 | #define Py_WEAKREFOBJECT_H 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef struct _PyWeakReference PyWeakReference; 10 | 11 | PyAPI_DATA(PyTypeObject) _PyWeakref_RefType; 12 | PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType; 13 | PyAPI_DATA(PyTypeObject) _PyWeakref_CallableProxyType; 14 | 15 | #define PyWeakref_CheckRef(op) PyObject_TypeCheck(op, &_PyWeakref_RefType) 16 | #define PyWeakref_CheckRefExact(op) \ 17 | Py_IS_TYPE(op, &_PyWeakref_RefType) 18 | #define PyWeakref_CheckProxy(op) \ 19 | (Py_IS_TYPE(op, &_PyWeakref_ProxyType) || \ 20 | Py_IS_TYPE(op, &_PyWeakref_CallableProxyType)) 21 | 22 | #define PyWeakref_Check(op) \ 23 | (PyWeakref_CheckRef(op) || PyWeakref_CheckProxy(op)) 24 | 25 | 26 | PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob, 27 | PyObject *callback); 28 | PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob, 29 | PyObject *callback); 30 | PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref); 31 | 32 | 33 | #ifndef Py_LIMITED_API 34 | # define Py_CPYTHON_WEAKREFOBJECT_H 35 | # include "cpython/weakrefobject.h" 36 | # undef Py_CPYTHON_WEAKREFOBJECT_H 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | #endif /* !Py_WEAKREFOBJECT_H */ 43 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | # current version of millennium 2 | v2.25.1 3 | -------------------------------------------------------------------------------- /version.h.in: -------------------------------------------------------------------------------- 1 | #ifndef VERSION_H 2 | #define VERSION_H 3 | 4 | /** template header which exposes the Millennium version to windres */ 5 | #define MILLENNIUM_VERSION "${MILLENNIUM_VERSION}" 6 | 7 | #endif // VERSION_H --------------------------------------------------------------------------------