mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-24 07:53:30 +08:00
Python 3.10 upgrade
This commit is contained in:
parent
95c6a82637
commit
ca4133bcd9
1275
.efrocachemap
1275
.efrocachemap
File diff suppressed because it is too large
Load Diff
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: 3.10
|
||||
- name: Install dependencies
|
||||
run: tools/pcommand install_pip_reqs
|
||||
- name: Run checks and tests
|
||||
@ -35,7 +35,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: 3.10
|
||||
- name: Compile binary
|
||||
run: make _cmake-simple-ci-server-build
|
||||
|
||||
@ -51,7 +51,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: 3.10
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
2
.idea/ballisticacore.iml
generated
2
.idea/ballisticacore.iml
generated
@ -65,7 +65,7 @@
|
||||
<excludePattern pattern=".pytest_cache" />
|
||||
<excludePattern pattern=".editorconfig" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.9" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PackageRequirementsSettings">
|
||||
|
||||
1
.idea/dictionaries/ericf.xml
generated
1
.idea/dictionaries/ericf.xml
generated
@ -2739,6 +2739,7 @@
|
||||
<w>wintdir</w>
|
||||
<w>wintype</w>
|
||||
<w>wmsbe</w>
|
||||
<w>woohoo</w>
|
||||
<w>woooo</w>
|
||||
<w>workdir</w>
|
||||
<w>workflows</w>
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
|
||||
<component name="PythonCompatibilityInspectionAdvertiser">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
- `_ba.get_account_ticket_count()` is now `_ba.get_v1_account_ticket_count()`
|
||||
- Exposing more sources in the public repo; namely networking stuff. I realize this probably opens up some attack vectors for hackers but also opens up options for server-owners to add their own defenses without having to wait on me. Hopefully this won't prove to be a bad idea.
|
||||
- V2 master server addr is now simply https://ballistica.net. If you had saved links to the previous address, https://tools.ballistica.net, please update them, as the old address may stop working at some point.
|
||||
- Upgraded everything to Python 3.10. The upgrade process is pretty smooth at this point so we should be able to upgrade yearly now once each new Python version has had some time to mature.
|
||||
|
||||
|
||||
### 1.6.12 (20567, 2022-05-04)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,70 +1,70 @@
|
||||
[
|
||||
"ba_data/python/ba/__init__.py",
|
||||
"ba_data/python/ba/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_accountv1.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_accountv2.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_achievement.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_activity.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_activitytypes.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_actor.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_ads.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_analytics.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_app.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_appconfig.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_appdelegate.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_appmode.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_apputils.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_assetmanager.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_asyncio.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_benchmark.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_campaign.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_collision.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_coopgame.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_coopsession.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_dependency.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_dualteamsession.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_error.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_freeforallsession.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_gameactivity.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_gameresults.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_gameutils.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_general.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_hooks.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_input.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_keyboard.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_language.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_level.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_lobby.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_map.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_math.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_messages.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_meta.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_multiteamsession.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_music.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_net.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_nodeactor.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_player.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_playlist.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_plugin.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_powerup.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_profile.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_score.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_servermode.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_session.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_settings.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_stats.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_store.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_team.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_teamgame.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_tips.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_tournament.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_ui.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/cloud.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/deprecated.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/internal.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/macmusicapp.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/modutils.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/osmusic.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_accountv1.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_accountv2.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_achievement.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_activity.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_activitytypes.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_actor.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_ads.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_analytics.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_app.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_appconfig.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_appdelegate.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_appmode.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_apputils.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_assetmanager.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_asyncio.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_benchmark.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_campaign.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_collision.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_coopgame.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_coopsession.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_dependency.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_dualteamsession.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_error.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_freeforallsession.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_gameactivity.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_gameresults.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_gameutils.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_general.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_hooks.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_input.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_keyboard.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_language.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_level.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_lobby.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_map.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_math.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_messages.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_meta.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_multiteamsession.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_music.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_net.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_nodeactor.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_player.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_playlist.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_plugin.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_powerup.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_profile.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_score.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_servermode.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_session.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_settings.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_stats.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_store.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_team.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_teamgame.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_tips.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_tournament.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/_ui.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/cloud.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/deprecated.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/internal.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/macmusicapp.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/modutils.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/__pycache__/osmusic.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/_accountv1.py",
|
||||
"ba_data/python/ba/_accountv2.py",
|
||||
"ba_data/python/ba/_achievement.py",
|
||||
@ -94,8 +94,8 @@
|
||||
"ba_data/python/ba/_gameutils.py",
|
||||
"ba_data/python/ba/_general.py",
|
||||
"ba_data/python/ba/_generated/__init__.py",
|
||||
"ba_data/python/ba/_generated/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/_generated/__pycache__/enums.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/_generated/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/_generated/__pycache__/enums.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/ba/_generated/enums.py",
|
||||
"ba_data/python/ba/_hooks.py",
|
||||
"ba_data/python/ba/_input.py",
|
||||
@ -134,15 +134,15 @@
|
||||
"ba_data/python/ba/modutils.py",
|
||||
"ba_data/python/ba/osmusic.py",
|
||||
"ba_data/python/ba/ui/__init__.py",
|
||||
"ba_data/python/ba/ui/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/ba/ui/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__init__.py",
|
||||
"ba_data/python/bacommon/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/assets.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/bacloud.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/build.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/cloud.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/net.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/servermanager.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/assets.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/bacloud.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/build.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/cloud.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/net.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/__pycache__/servermanager.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bacommon/assets.py",
|
||||
"ba_data/python/bacommon/bacloud.py",
|
||||
"ba_data/python/bacommon/build.py",
|
||||
@ -150,23 +150,23 @@
|
||||
"ba_data/python/bacommon/net.py",
|
||||
"ba_data/python/bacommon/servermanager.py",
|
||||
"ba_data/python/bastd/__init__.py",
|
||||
"ba_data/python/bastd/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/appdelegate.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/gameutils.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/mainmenu.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/maps.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/stdmap.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/tutorial.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/appdelegate.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/gameutils.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/mainmenu.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/maps.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/stdmap.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/__pycache__/tutorial.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__init__.py",
|
||||
"ba_data/python/bastd/activity/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/coopjoin.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/coopscore.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/drawscore.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/dualteamscore.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/freeforallvictory.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/multiteamjoin.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/multiteamscore.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/multiteamvictory.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/coopjoin.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/coopscore.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/drawscore.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/dualteamscore.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/freeforallvictory.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/multiteamjoin.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/multiteamscore.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/__pycache__/multiteamvictory.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/activity/coopjoin.py",
|
||||
"ba_data/python/bastd/activity/coopscore.py",
|
||||
"ba_data/python/bastd/activity/drawscore.py",
|
||||
@ -176,27 +176,27 @@
|
||||
"ba_data/python/bastd/activity/multiteamscore.py",
|
||||
"ba_data/python/bastd/activity/multiteamvictory.py",
|
||||
"ba_data/python/bastd/actor/__init__.py",
|
||||
"ba_data/python/bastd/actor/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/background.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/bomb.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/controlsguide.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/flag.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/image.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/onscreencountdown.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/onscreentimer.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/popuptext.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/powerupbox.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/respawnicon.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/scoreboard.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spawner.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spaz.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spazappearance.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spazbot.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spazfactory.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/text.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/tipstext.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/zoomtext.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/background.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/bomb.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/controlsguide.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/flag.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/image.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/onscreencountdown.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/onscreentimer.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/popuptext.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/powerupbox.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/respawnicon.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/scoreboard.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spawner.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spaz.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spazappearance.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spazbot.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/spazfactory.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/text.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/tipstext.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/__pycache__/zoomtext.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/actor/background.py",
|
||||
"ba_data/python/bastd/actor/bomb.py",
|
||||
"ba_data/python/bastd/actor/controlsguide.py",
|
||||
@ -219,25 +219,25 @@
|
||||
"ba_data/python/bastd/actor/zoomtext.py",
|
||||
"ba_data/python/bastd/appdelegate.py",
|
||||
"ba_data/python/bastd/game/__init__.py",
|
||||
"ba_data/python/bastd/game/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/assault.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/capturetheflag.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/chosenone.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/conquest.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/deathmatch.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/easteregghunt.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/elimination.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/football.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/hockey.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/keepaway.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/kingofthehill.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/meteorshower.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/ninjafight.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/onslaught.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/race.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/runaround.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/targetpractice.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/thelaststand.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/assault.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/capturetheflag.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/chosenone.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/conquest.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/deathmatch.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/easteregghunt.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/elimination.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/football.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/hockey.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/keepaway.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/kingofthehill.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/meteorshower.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/ninjafight.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/onslaught.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/race.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/runaround.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/targetpractice.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/__pycache__/thelaststand.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/game/assault.py",
|
||||
"ba_data/python/bastd/game/capturetheflag.py",
|
||||
"ba_data/python/bastd/game/chosenone.py",
|
||||
@ -258,29 +258,29 @@
|
||||
"ba_data/python/bastd/game/thelaststand.py",
|
||||
"ba_data/python/bastd/gameutils.py",
|
||||
"ba_data/python/bastd/keyboard/__init__.py",
|
||||
"ba_data/python/bastd/keyboard/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/keyboard/__pycache__/englishkeyboard.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/keyboard/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/keyboard/__pycache__/englishkeyboard.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/keyboard/englishkeyboard.py",
|
||||
"ba_data/python/bastd/mainmenu.py",
|
||||
"ba_data/python/bastd/mapdata/__init__.py",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/big_g.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/bridgit.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/courtyard.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/crag_castle.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/doom_shroom.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/football_stadium.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/happy_thoughts.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/hockey_stadium.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/lake_frigid.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/monkey_face.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/rampage.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/roundabout.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/step_right_up.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/the_pad.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/tip_top.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/tower_d.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/zig_zag.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/big_g.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/bridgit.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/courtyard.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/crag_castle.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/doom_shroom.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/football_stadium.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/happy_thoughts.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/hockey_stadium.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/lake_frigid.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/monkey_face.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/rampage.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/roundabout.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/step_right_up.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/the_pad.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/tip_top.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/tower_d.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/__pycache__/zig_zag.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/mapdata/big_g.py",
|
||||
"ba_data/python/bastd/mapdata/bridgit.py",
|
||||
"ba_data/python/bastd/mapdata/courtyard.py",
|
||||
@ -300,58 +300,58 @@
|
||||
"ba_data/python/bastd/mapdata/zig_zag.py",
|
||||
"ba_data/python/bastd/maps.py",
|
||||
"ba_data/python/bastd/session/__init__.py",
|
||||
"ba_data/python/bastd/session/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/session/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/stdmap.py",
|
||||
"ba_data/python/bastd/tutorial.py",
|
||||
"ba_data/python/bastd/ui/__init__.py",
|
||||
"ba_data/python/bastd/ui/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/achievements.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/appinvite.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/characterpicker.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/colorpicker.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/config.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/configerror.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/confirm.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/continues.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/creditslist.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/debug.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/feedback.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/fileselector.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/getcurrency.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/getremote.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/helpui.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/iconpicker.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/kiosk.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/mainmenu.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/onscreenkeyboard.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/party.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/partyqueue.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/play.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/playoptions.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/popup.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/promocode.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/purchase.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/qrcode.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/radiogroup.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/report.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/resourcetypeinfo.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/serverdialog.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/specialoffer.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/tabs.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/teamnamescolors.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/telnet.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/tournamententry.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/tournamentscores.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/trophies.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/url.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/watch.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/achievements.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/appinvite.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/characterpicker.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/colorpicker.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/config.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/configerror.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/confirm.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/continues.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/creditslist.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/debug.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/feedback.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/fileselector.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/getcurrency.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/getremote.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/helpui.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/iconpicker.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/kiosk.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/mainmenu.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/onscreenkeyboard.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/party.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/partyqueue.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/play.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/playoptions.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/popup.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/promocode.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/purchase.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/qrcode.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/radiogroup.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/report.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/resourcetypeinfo.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/serverdialog.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/specialoffer.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/tabs.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/teamnamescolors.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/telnet.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/tournamententry.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/tournamentscores.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/trophies.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/url.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/__pycache__/watch.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__init__.py",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/link.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/settings.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/unlink.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/v2.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/viewer.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/link.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/settings.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/unlink.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/v2.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/__pycache__/viewer.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/account/link.py",
|
||||
"ba_data/python/bastd/ui/account/settings.py",
|
||||
"ba_data/python/bastd/ui/account/unlink.py",
|
||||
@ -366,10 +366,10 @@
|
||||
"ba_data/python/bastd/ui/confirm.py",
|
||||
"ba_data/python/bastd/ui/continues.py",
|
||||
"ba_data/python/bastd/ui/coop/__init__.py",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/browser.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/gamebutton.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/level.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/browser.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/gamebutton.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/__pycache__/level.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/coop/browser.py",
|
||||
"ba_data/python/bastd/ui/coop/gamebutton.py",
|
||||
"ba_data/python/bastd/ui/coop/level.py",
|
||||
@ -378,12 +378,12 @@
|
||||
"ba_data/python/bastd/ui/feedback.py",
|
||||
"ba_data/python/bastd/ui/fileselector.py",
|
||||
"ba_data/python/bastd/ui/gather/__init__.py",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/abouttab.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/manualtab.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/nearbytab.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/privatetab.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/publictab.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/abouttab.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/manualtab.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/nearbytab.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/privatetab.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/__pycache__/publictab.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/gather/abouttab.py",
|
||||
"ba_data/python/bastd/ui/gather/manualtab.py",
|
||||
"ba_data/python/bastd/ui/gather/nearbytab.py",
|
||||
@ -395,9 +395,9 @@
|
||||
"ba_data/python/bastd/ui/iconpicker.py",
|
||||
"ba_data/python/bastd/ui/kiosk.py",
|
||||
"ba_data/python/bastd/ui/league/__init__.py",
|
||||
"ba_data/python/bastd/ui/league/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/league/__pycache__/rankbutton.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/league/__pycache__/rankwindow.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/league/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/league/__pycache__/rankbutton.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/league/__pycache__/rankwindow.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/league/rankbutton.py",
|
||||
"ba_data/python/bastd/ui/league/rankwindow.py",
|
||||
"ba_data/python/bastd/ui/mainmenu.py",
|
||||
@ -406,15 +406,15 @@
|
||||
"ba_data/python/bastd/ui/partyqueue.py",
|
||||
"ba_data/python/bastd/ui/play.py",
|
||||
"ba_data/python/bastd/ui/playlist/__init__.py",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/addgame.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/browser.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/customizebrowser.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/edit.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/editcontroller.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/editgame.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/mapselect.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/share.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/addgame.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/browser.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/customizebrowser.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/edit.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/editcontroller.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/editgame.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/mapselect.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/__pycache__/share.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/playlist/addgame.py",
|
||||
"ba_data/python/bastd/ui/playlist/browser.py",
|
||||
"ba_data/python/bastd/ui/playlist/customizebrowser.py",
|
||||
@ -426,10 +426,10 @@
|
||||
"ba_data/python/bastd/ui/playoptions.py",
|
||||
"ba_data/python/bastd/ui/popup.py",
|
||||
"ba_data/python/bastd/ui/profile/__init__.py",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/browser.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/edit.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/upgrade.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/browser.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/edit.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/__pycache__/upgrade.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/profile/browser.py",
|
||||
"ba_data/python/bastd/ui/profile/edit.py",
|
||||
"ba_data/python/bastd/ui/profile/upgrade.py",
|
||||
@ -441,23 +441,23 @@
|
||||
"ba_data/python/bastd/ui/resourcetypeinfo.py",
|
||||
"ba_data/python/bastd/ui/serverdialog.py",
|
||||
"ba_data/python/bastd/ui/settings/__init__.py",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/advanced.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/allsettings.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/audio.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/controls.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/gamepad.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/gamepadadvanced.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/gamepadselect.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/graphics.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/keyboard.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/nettesting.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/plugins.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/remoteapp.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/testing.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/touchscreen.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/vrtesting.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/xbox360controller.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/advanced.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/allsettings.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/audio.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/controls.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/gamepad.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/gamepadadvanced.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/gamepadselect.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/graphics.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/keyboard.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/nettesting.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/plugins.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/remoteapp.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/testing.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/touchscreen.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/vrtesting.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/__pycache__/xbox360controller.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/settings/advanced.py",
|
||||
"ba_data/python/bastd/ui/settings/allsettings.py",
|
||||
"ba_data/python/bastd/ui/settings/audio.py",
|
||||
@ -475,21 +475,21 @@
|
||||
"ba_data/python/bastd/ui/settings/vrtesting.py",
|
||||
"ba_data/python/bastd/ui/settings/xbox360controller.py",
|
||||
"ba_data/python/bastd/ui/soundtrack/__init__.py",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/browser.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/edit.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/entrytypeselect.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/macmusicapp.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/browser.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/edit.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/entrytypeselect.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/__pycache__/macmusicapp.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/soundtrack/browser.py",
|
||||
"ba_data/python/bastd/ui/soundtrack/edit.py",
|
||||
"ba_data/python/bastd/ui/soundtrack/entrytypeselect.py",
|
||||
"ba_data/python/bastd/ui/soundtrack/macmusicapp.py",
|
||||
"ba_data/python/bastd/ui/specialoffer.py",
|
||||
"ba_data/python/bastd/ui/store/__init__.py",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/browser.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/button.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/item.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/browser.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/button.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/__pycache__/item.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/bastd/ui/store/browser.py",
|
||||
"ba_data/python/bastd/ui/store/button.py",
|
||||
"ba_data/python/bastd/ui/store/item.py",
|
||||
@ -502,22 +502,22 @@
|
||||
"ba_data/python/bastd/ui/url.py",
|
||||
"ba_data/python/bastd/ui/watch.py",
|
||||
"ba_data/python/efro/__init__.py",
|
||||
"ba_data/python/efro/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/call.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/error.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/rpc.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/terminal.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/util.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/call.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/error.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/rpc.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/terminal.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/__pycache__/util.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/call.py",
|
||||
"ba_data/python/efro/dataclassio/__init__.py",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_api.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_base.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_inputter.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_outputter.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_pathcapture.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_prep.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/extras.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_api.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_base.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_inputter.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_outputter.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_pathcapture.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/_prep.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/__pycache__/extras.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/dataclassio/_api.py",
|
||||
"ba_data/python/efro/dataclassio/_base.py",
|
||||
"ba_data/python/efro/dataclassio/_inputter.py",
|
||||
@ -527,12 +527,12 @@
|
||||
"ba_data/python/efro/dataclassio/extras.py",
|
||||
"ba_data/python/efro/error.py",
|
||||
"ba_data/python/efro/message/__init__.py",
|
||||
"ba_data/python/efro/message/__pycache__/__init__.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_message.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_module.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_protocol.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_receiver.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_sender.cpython-39.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/__init__.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_message.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_module.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_protocol.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_receiver.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/message/__pycache__/_sender.cpython-310.opt-1.pyc",
|
||||
"ba_data/python/efro/message/_message.py",
|
||||
"ba_data/python/efro/message/_module.py",
|
||||
"ba_data/python/efro/message/_protocol.py",
|
||||
@ -541,6 +541,6 @@
|
||||
"ba_data/python/efro/rpc.py",
|
||||
"ba_data/python/efro/terminal.py",
|
||||
"ba_data/python/efro/util.py",
|
||||
"server/__pycache__/ballisticacore_server.cpython-39.opt-1.pyc",
|
||||
"server/__pycache__/ballisticacore_server.cpython-310.opt-1.pyc",
|
||||
"server/ballisticacore_server.py"
|
||||
]
|
||||
4191
assets/Makefile
4191
assets/Makefile
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
25124287646962522356366356681900113695
|
||||
320920970228380339335842674313265345034
|
||||
@ -27,7 +27,6 @@ NOTE: This file was autogenerated by batools.dummymodule; do not edit by hand.
|
||||
# pylint: disable=too-many-lines
|
||||
# pylint: disable=redefined-outer-name
|
||||
# pylint: disable=invalid-name
|
||||
# pylint: disable=no-self-use
|
||||
# pylint: disable=no-value-for-parameter
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@ -146,7 +146,7 @@ class DependencyEntry:
|
||||
# This allows us to inject its data properly before __init__().
|
||||
print('creating', self.cls)
|
||||
instance = self.cls.__new__(self.cls)
|
||||
# pylint: disable=protected-access
|
||||
# pylint: disable=protected-access, unnecessary-dunder-call
|
||||
instance._dep_entry = weakref.ref(self)
|
||||
instance.__init__() # type: ignore
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ def get_player_profile_colors(
|
||||
color = PLAYER_COLORS[random.randrange(6)]
|
||||
else:
|
||||
# First 6 are bright-ish.
|
||||
color = PLAYER_COLORS[sum([ord(c) for c in profilename]) % 6]
|
||||
color = PLAYER_COLORS[sum(ord(c) for c in profilename) % 6]
|
||||
|
||||
try:
|
||||
assert profilename is not None
|
||||
@ -86,8 +86,8 @@ def get_player_profile_colors(
|
||||
highlight = PLAYER_COLORS[random.randrange(
|
||||
len(PLAYER_COLORS) - 2)]
|
||||
else:
|
||||
highlight = PLAYER_COLORS[sum(
|
||||
[ord(c) + 1
|
||||
for c in profilename]) % (len(PLAYER_COLORS) - 2)]
|
||||
highlight = PLAYER_COLORS[sum(ord(c) + 1
|
||||
for c in profilename) %
|
||||
(len(PLAYER_COLORS) - 2)]
|
||||
|
||||
return color, highlight
|
||||
|
||||
@ -263,9 +263,9 @@ class RaceGame(ba.TeamGameActivity[Player, Team]):
|
||||
# Otherwise its the max.
|
||||
if isinstance(self.session, ba.DualTeamSession
|
||||
) and self._entire_team_must_finish:
|
||||
team.lap = min([p.lap for p in team.players])
|
||||
team.lap = min(p.lap for p in team.players)
|
||||
else:
|
||||
team.lap = max([p.lap for p in team.players])
|
||||
team.lap = max(p.lap for p in team.players)
|
||||
|
||||
# A player is finishing.
|
||||
if player.lap == self._laps:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3.9
|
||||
#!/usr/bin/env python3.10
|
||||
# Released under the MIT License. See LICENSE for details.
|
||||
#
|
||||
"""BallisticaCore server manager."""
|
||||
|
||||
@ -1374,6 +1374,7 @@
|
||||
<w>wintdir</w>
|
||||
<w>wofocj</w>
|
||||
<w>wonkiness</w>
|
||||
<w>woohoo</w>
|
||||
<w>worldspace</w>
|
||||
<w>woutdir</w>
|
||||
<w>wprjp</w>
|
||||
|
||||
@ -27,12 +27,12 @@ if (APPLE)
|
||||
# to load a 3.X library from within it which doesn't exist. So we need
|
||||
# to be a bit more explicit telling it where to look. Note: this was last
|
||||
# tested with 3.7; should revisit sometime to make sure still applies.
|
||||
execute_process(COMMAND "python3.9-config" "--prefix"
|
||||
execute_process(COMMAND "python3.10-config" "--prefix"
|
||||
OUTPUT_VARIABLE Python_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
endif ()
|
||||
find_package (Python 3.9 REQUIRED EXACT COMPONENTS Development)
|
||||
find_package (Python 3.10 REQUIRED EXACT COMPONENTS Development)
|
||||
|
||||
|
||||
if (HEADLESS)
|
||||
|
||||
@ -25,7 +25,8 @@ init-import=yes
|
||||
max-line-length=79
|
||||
|
||||
# We're using yapf to handle formatting and pylint doesn't always agree with it.
|
||||
disable=bad-continuation
|
||||
#
|
||||
# disable=bad-continuation
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
# broad-except:
|
||||
@ -37,9 +38,6 @@ disable=bad-continuation
|
||||
# or as simple messages to send to each other.
|
||||
# Can look into Data Classes perhaps once 3.7 is well distributed,
|
||||
# but for now I'm gonna say this is ok.
|
||||
# no-self-use
|
||||
# I find a lot of things still make sense organizationally as methods
|
||||
# even if they do not technically use self at the current time
|
||||
# too-many-instance-attributes
|
||||
# Honestly just don't feel this is bad. If anything, the limit encourages
|
||||
# me to stuff things in dicts or whatnot which loses the bit of
|
||||
@ -54,7 +52,6 @@ disable=bad-continuation
|
||||
# this case well.
|
||||
disable=broad-except,
|
||||
too-few-public-methods,
|
||||
no-self-use,
|
||||
too-many-instance-attributes,
|
||||
too-many-arguments,
|
||||
similarities,
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
#pragma comment(lib, "iphlpapi.lib")
|
||||
#if BA_DEBUG_BUILD
|
||||
#pragma comment(lib, "python39_d.lib")
|
||||
#pragma comment(lib, "python310_d.lib")
|
||||
#else
|
||||
#pragma comment(lib, "python39.lib")
|
||||
#pragma comment(lib, "python310.lib")
|
||||
#endif
|
||||
|
||||
#if !BA_HEADLESS_BUILD
|
||||
|
||||
@ -866,7 +866,7 @@ void Python::Reset(bool do_init) {
|
||||
|
||||
if (!was_inited && do_init) {
|
||||
// Flip on some extra runtime debugging options in debug builds.
|
||||
// https://docs.python.org/3.9/library/devmode.html#devmode
|
||||
// https://docs.python.org/3.10/library/devmode.html#devmode
|
||||
int dev_mode{g_buildconfig.debug_build()};
|
||||
|
||||
// Pre-config as isolated if we include our own Python and as standard
|
||||
@ -946,8 +946,8 @@ void Python::Reset(bool do_init) {
|
||||
BA_PRECONDITION(main_dict_ = PyModule_GetDict(m));
|
||||
|
||||
const char* ver = Py_GetVersion();
|
||||
if (strncmp(ver, "3.9", 3) != 0) {
|
||||
throw Exception("We require Python 3.9.x; instead found "
|
||||
if (strncmp(ver, "3.10", 4) != 0) {
|
||||
throw Exception("We require Python 3.10.x; instead found "
|
||||
+ std::string(ver));
|
||||
}
|
||||
|
||||
|
||||
697
src/external/windows/include/python/Python-ast.h
vendored
697
src/external/windows/include/python/Python-ast.h
vendored
@ -1,697 +0,0 @@
|
||||
/* File automatically generated by Parser/asdl_c.py. */
|
||||
|
||||
#ifndef Py_PYTHON_AST_H
|
||||
#define Py_PYTHON_AST_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
#include "asdl.h"
|
||||
|
||||
#undef Yield /* undefine macro conflicting with <winbase.h> */
|
||||
|
||||
typedef struct _mod *mod_ty;
|
||||
|
||||
typedef struct _stmt *stmt_ty;
|
||||
|
||||
typedef struct _expr *expr_ty;
|
||||
|
||||
typedef enum _expr_context { Load=1, Store=2, Del=3 } expr_context_ty;
|
||||
|
||||
typedef enum _boolop { And=1, Or=2 } boolop_ty;
|
||||
|
||||
typedef enum _operator { Add=1, Sub=2, Mult=3, MatMult=4, Div=5, Mod=6, Pow=7,
|
||||
LShift=8, RShift=9, BitOr=10, BitXor=11, BitAnd=12,
|
||||
FloorDiv=13 } operator_ty;
|
||||
|
||||
typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty;
|
||||
|
||||
typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8,
|
||||
In=9, NotIn=10 } cmpop_ty;
|
||||
|
||||
typedef struct _comprehension *comprehension_ty;
|
||||
|
||||
typedef struct _excepthandler *excepthandler_ty;
|
||||
|
||||
typedef struct _arguments *arguments_ty;
|
||||
|
||||
typedef struct _arg *arg_ty;
|
||||
|
||||
typedef struct _keyword *keyword_ty;
|
||||
|
||||
typedef struct _alias *alias_ty;
|
||||
|
||||
typedef struct _withitem *withitem_ty;
|
||||
|
||||
typedef struct _type_ignore *type_ignore_ty;
|
||||
|
||||
|
||||
enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3,
|
||||
FunctionType_kind=4};
|
||||
struct _mod {
|
||||
enum _mod_kind kind;
|
||||
union {
|
||||
struct {
|
||||
asdl_seq *body;
|
||||
asdl_seq *type_ignores;
|
||||
} Module;
|
||||
|
||||
struct {
|
||||
asdl_seq *body;
|
||||
} Interactive;
|
||||
|
||||
struct {
|
||||
expr_ty body;
|
||||
} Expression;
|
||||
|
||||
struct {
|
||||
asdl_seq *argtypes;
|
||||
expr_ty returns;
|
||||
} FunctionType;
|
||||
|
||||
} v;
|
||||
};
|
||||
|
||||
enum _stmt_kind {FunctionDef_kind=1, AsyncFunctionDef_kind=2, ClassDef_kind=3,
|
||||
Return_kind=4, Delete_kind=5, Assign_kind=6,
|
||||
AugAssign_kind=7, AnnAssign_kind=8, For_kind=9,
|
||||
AsyncFor_kind=10, While_kind=11, If_kind=12, With_kind=13,
|
||||
AsyncWith_kind=14, Raise_kind=15, Try_kind=16,
|
||||
Assert_kind=17, Import_kind=18, ImportFrom_kind=19,
|
||||
Global_kind=20, Nonlocal_kind=21, Expr_kind=22, Pass_kind=23,
|
||||
Break_kind=24, Continue_kind=25};
|
||||
struct _stmt {
|
||||
enum _stmt_kind kind;
|
||||
union {
|
||||
struct {
|
||||
identifier name;
|
||||
arguments_ty args;
|
||||
asdl_seq *body;
|
||||
asdl_seq *decorator_list;
|
||||
expr_ty returns;
|
||||
string type_comment;
|
||||
} FunctionDef;
|
||||
|
||||
struct {
|
||||
identifier name;
|
||||
arguments_ty args;
|
||||
asdl_seq *body;
|
||||
asdl_seq *decorator_list;
|
||||
expr_ty returns;
|
||||
string type_comment;
|
||||
} AsyncFunctionDef;
|
||||
|
||||
struct {
|
||||
identifier name;
|
||||
asdl_seq *bases;
|
||||
asdl_seq *keywords;
|
||||
asdl_seq *body;
|
||||
asdl_seq *decorator_list;
|
||||
} ClassDef;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Return;
|
||||
|
||||
struct {
|
||||
asdl_seq *targets;
|
||||
} Delete;
|
||||
|
||||
struct {
|
||||
asdl_seq *targets;
|
||||
expr_ty value;
|
||||
string type_comment;
|
||||
} Assign;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
operator_ty op;
|
||||
expr_ty value;
|
||||
} AugAssign;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty annotation;
|
||||
expr_ty value;
|
||||
int simple;
|
||||
} AnnAssign;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty iter;
|
||||
asdl_seq *body;
|
||||
asdl_seq *orelse;
|
||||
string type_comment;
|
||||
} For;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty iter;
|
||||
asdl_seq *body;
|
||||
asdl_seq *orelse;
|
||||
string type_comment;
|
||||
} AsyncFor;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
asdl_seq *body;
|
||||
asdl_seq *orelse;
|
||||
} While;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
asdl_seq *body;
|
||||
asdl_seq *orelse;
|
||||
} If;
|
||||
|
||||
struct {
|
||||
asdl_seq *items;
|
||||
asdl_seq *body;
|
||||
string type_comment;
|
||||
} With;
|
||||
|
||||
struct {
|
||||
asdl_seq *items;
|
||||
asdl_seq *body;
|
||||
string type_comment;
|
||||
} AsyncWith;
|
||||
|
||||
struct {
|
||||
expr_ty exc;
|
||||
expr_ty cause;
|
||||
} Raise;
|
||||
|
||||
struct {
|
||||
asdl_seq *body;
|
||||
asdl_seq *handlers;
|
||||
asdl_seq *orelse;
|
||||
asdl_seq *finalbody;
|
||||
} Try;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
expr_ty msg;
|
||||
} Assert;
|
||||
|
||||
struct {
|
||||
asdl_seq *names;
|
||||
} Import;
|
||||
|
||||
struct {
|
||||
identifier module;
|
||||
asdl_seq *names;
|
||||
int level;
|
||||
} ImportFrom;
|
||||
|
||||
struct {
|
||||
asdl_seq *names;
|
||||
} Global;
|
||||
|
||||
struct {
|
||||
asdl_seq *names;
|
||||
} Nonlocal;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Expr;
|
||||
|
||||
} v;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
enum _expr_kind {BoolOp_kind=1, NamedExpr_kind=2, BinOp_kind=3, UnaryOp_kind=4,
|
||||
Lambda_kind=5, IfExp_kind=6, Dict_kind=7, Set_kind=8,
|
||||
ListComp_kind=9, SetComp_kind=10, DictComp_kind=11,
|
||||
GeneratorExp_kind=12, Await_kind=13, Yield_kind=14,
|
||||
YieldFrom_kind=15, Compare_kind=16, Call_kind=17,
|
||||
FormattedValue_kind=18, JoinedStr_kind=19, Constant_kind=20,
|
||||
Attribute_kind=21, Subscript_kind=22, Starred_kind=23,
|
||||
Name_kind=24, List_kind=25, Tuple_kind=26, Slice_kind=27};
|
||||
struct _expr {
|
||||
enum _expr_kind kind;
|
||||
union {
|
||||
struct {
|
||||
boolop_ty op;
|
||||
asdl_seq *values;
|
||||
} BoolOp;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty value;
|
||||
} NamedExpr;
|
||||
|
||||
struct {
|
||||
expr_ty left;
|
||||
operator_ty op;
|
||||
expr_ty right;
|
||||
} BinOp;
|
||||
|
||||
struct {
|
||||
unaryop_ty op;
|
||||
expr_ty operand;
|
||||
} UnaryOp;
|
||||
|
||||
struct {
|
||||
arguments_ty args;
|
||||
expr_ty body;
|
||||
} Lambda;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
expr_ty body;
|
||||
expr_ty orelse;
|
||||
} IfExp;
|
||||
|
||||
struct {
|
||||
asdl_seq *keys;
|
||||
asdl_seq *values;
|
||||
} Dict;
|
||||
|
||||
struct {
|
||||
asdl_seq *elts;
|
||||
} Set;
|
||||
|
||||
struct {
|
||||
expr_ty elt;
|
||||
asdl_seq *generators;
|
||||
} ListComp;
|
||||
|
||||
struct {
|
||||
expr_ty elt;
|
||||
asdl_seq *generators;
|
||||
} SetComp;
|
||||
|
||||
struct {
|
||||
expr_ty key;
|
||||
expr_ty value;
|
||||
asdl_seq *generators;
|
||||
} DictComp;
|
||||
|
||||
struct {
|
||||
expr_ty elt;
|
||||
asdl_seq *generators;
|
||||
} GeneratorExp;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Await;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Yield;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} YieldFrom;
|
||||
|
||||
struct {
|
||||
expr_ty left;
|
||||
asdl_int_seq *ops;
|
||||
asdl_seq *comparators;
|
||||
} Compare;
|
||||
|
||||
struct {
|
||||
expr_ty func;
|
||||
asdl_seq *args;
|
||||
asdl_seq *keywords;
|
||||
} Call;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
int conversion;
|
||||
expr_ty format_spec;
|
||||
} FormattedValue;
|
||||
|
||||
struct {
|
||||
asdl_seq *values;
|
||||
} JoinedStr;
|
||||
|
||||
struct {
|
||||
constant value;
|
||||
string kind;
|
||||
} Constant;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
identifier attr;
|
||||
expr_context_ty ctx;
|
||||
} Attribute;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
expr_ty slice;
|
||||
expr_context_ty ctx;
|
||||
} Subscript;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
expr_context_ty ctx;
|
||||
} Starred;
|
||||
|
||||
struct {
|
||||
identifier id;
|
||||
expr_context_ty ctx;
|
||||
} Name;
|
||||
|
||||
struct {
|
||||
asdl_seq *elts;
|
||||
expr_context_ty ctx;
|
||||
} List;
|
||||
|
||||
struct {
|
||||
asdl_seq *elts;
|
||||
expr_context_ty ctx;
|
||||
} Tuple;
|
||||
|
||||
struct {
|
||||
expr_ty lower;
|
||||
expr_ty upper;
|
||||
expr_ty step;
|
||||
} Slice;
|
||||
|
||||
} v;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _comprehension {
|
||||
expr_ty target;
|
||||
expr_ty iter;
|
||||
asdl_seq *ifs;
|
||||
int is_async;
|
||||
};
|
||||
|
||||
enum _excepthandler_kind {ExceptHandler_kind=1};
|
||||
struct _excepthandler {
|
||||
enum _excepthandler_kind kind;
|
||||
union {
|
||||
struct {
|
||||
expr_ty type;
|
||||
identifier name;
|
||||
asdl_seq *body;
|
||||
} ExceptHandler;
|
||||
|
||||
} v;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _arguments {
|
||||
asdl_seq *posonlyargs;
|
||||
asdl_seq *args;
|
||||
arg_ty vararg;
|
||||
asdl_seq *kwonlyargs;
|
||||
asdl_seq *kw_defaults;
|
||||
arg_ty kwarg;
|
||||
asdl_seq *defaults;
|
||||
};
|
||||
|
||||
struct _arg {
|
||||
identifier arg;
|
||||
expr_ty annotation;
|
||||
string type_comment;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _keyword {
|
||||
identifier arg;
|
||||
expr_ty value;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _alias {
|
||||
identifier name;
|
||||
identifier asname;
|
||||
};
|
||||
|
||||
struct _withitem {
|
||||
expr_ty context_expr;
|
||||
expr_ty optional_vars;
|
||||
};
|
||||
|
||||
enum _type_ignore_kind {TypeIgnore_kind=1};
|
||||
struct _type_ignore {
|
||||
enum _type_ignore_kind kind;
|
||||
union {
|
||||
struct {
|
||||
int lineno;
|
||||
string tag;
|
||||
} TypeIgnore;
|
||||
|
||||
} v;
|
||||
};
|
||||
|
||||
|
||||
// Note: these macros affect function definitions, not only call sites.
|
||||
#define Module(a0, a1, a2) _Py_Module(a0, a1, a2)
|
||||
mod_ty _Py_Module(asdl_seq * body, asdl_seq * type_ignores, PyArena *arena);
|
||||
#define Interactive(a0, a1) _Py_Interactive(a0, a1)
|
||||
mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena);
|
||||
#define Expression(a0, a1) _Py_Expression(a0, a1)
|
||||
mod_ty _Py_Expression(expr_ty body, PyArena *arena);
|
||||
#define FunctionType(a0, a1, a2) _Py_FunctionType(a0, a1, a2)
|
||||
mod_ty _Py_FunctionType(asdl_seq * argtypes, expr_ty returns, PyArena *arena);
|
||||
#define FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body,
|
||||
asdl_seq * decorator_list, expr_ty returns, string
|
||||
type_comment, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) _Py_AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
stmt_ty _Py_AsyncFunctionDef(identifier name, arguments_ty args, asdl_seq *
|
||||
body, asdl_seq * decorator_list, expr_ty returns,
|
||||
string type_comment, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
|
||||
stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords,
|
||||
asdl_seq * body, asdl_seq * decorator_list, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
#define Return(a0, a1, a2, a3, a4, a5) _Py_Return(a0, a1, a2, a3, a4, a5)
|
||||
stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
#define Delete(a0, a1, a2, a3, a4, a5) _Py_Delete(a0, a1, a2, a3, a4, a5)
|
||||
stmt_ty _Py_Delete(asdl_seq * targets, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Assign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Assign(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
stmt_ty _Py_Assign(asdl_seq * targets, expr_ty value, string type_comment, int
|
||||
lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
#define AugAssign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AugAssign(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8)
|
||||
stmt_ty _Py_AnnAssign(expr_ty target, expr_ty annotation, expr_ty value, int
|
||||
simple, int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define For(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_For(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
|
||||
stmt_ty _Py_For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
|
||||
orelse, string type_comment, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define AsyncFor(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_AsyncFor(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
|
||||
stmt_ty _Py_AsyncFor(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
|
||||
orelse, string type_comment, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define While(a0, a1, a2, a3, a4, a5, a6, a7) _Py_While(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define If(a0, a1, a2, a3, a4, a5, a6, a7) _Py_If(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define With(a0, a1, a2, a3, a4, a5, a6, a7) _Py_With(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
stmt_ty _Py_With(asdl_seq * items, asdl_seq * body, string type_comment, int
|
||||
lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
#define AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
stmt_ty _Py_AsyncWith(asdl_seq * items, asdl_seq * body, string type_comment,
|
||||
int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Raise(a0, a1, a2, a3, a4, a5, a6) _Py_Raise(a0, a1, a2, a3, a4, a5, a6)
|
||||
stmt_ty _Py_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Try(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_Try(a0, a1, a2, a3, a4, a5, a6, a7, a8)
|
||||
stmt_ty _Py_Try(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse,
|
||||
asdl_seq * finalbody, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Assert(a0, a1, a2, a3, a4, a5, a6) _Py_Assert(a0, a1, a2, a3, a4, a5, a6)
|
||||
stmt_ty _Py_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Import(a0, a1, a2, a3, a4, a5) _Py_Import(a0, a1, a2, a3, a4, a5)
|
||||
stmt_ty _Py_Import(asdl_seq * names, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
stmt_ty _Py_ImportFrom(identifier module, asdl_seq * names, int level, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Global(a0, a1, a2, a3, a4, a5) _Py_Global(a0, a1, a2, a3, a4, a5)
|
||||
stmt_ty _Py_Global(asdl_seq * names, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Nonlocal(a0, a1, a2, a3, a4, a5) _Py_Nonlocal(a0, a1, a2, a3, a4, a5)
|
||||
stmt_ty _Py_Nonlocal(asdl_seq * names, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Expr(a0, a1, a2, a3, a4, a5) _Py_Expr(a0, a1, a2, a3, a4, a5)
|
||||
stmt_ty _Py_Expr(expr_ty value, int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Pass(a0, a1, a2, a3, a4) _Py_Pass(a0, a1, a2, a3, a4)
|
||||
stmt_ty _Py_Pass(int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Break(a0, a1, a2, a3, a4) _Py_Break(a0, a1, a2, a3, a4)
|
||||
stmt_ty _Py_Break(int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Continue(a0, a1, a2, a3, a4) _Py_Continue(a0, a1, a2, a3, a4)
|
||||
stmt_ty _Py_Continue(int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define BoolOp(a0, a1, a2, a3, a4, a5, a6) _Py_BoolOp(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define NamedExpr(a0, a1, a2, a3, a4, a5, a6) _Py_NamedExpr(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_NamedExpr(expr_ty target, expr_ty value, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define BinOp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_BinOp(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define UnaryOp(a0, a1, a2, a3, a4, a5, a6) _Py_UnaryOp(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Lambda(a0, a1, a2, a3, a4, a5, a6) _Py_Lambda(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define IfExp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_IfExp(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define Dict(a0, a1, a2, a3, a4, a5, a6) _Py_Dict(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_Dict(asdl_seq * keys, asdl_seq * values, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define Set(a0, a1, a2, a3, a4, a5) _Py_Set(a0, a1, a2, a3, a4, a5)
|
||||
expr_ty _Py_Set(asdl_seq * elts, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
#define ListComp(a0, a1, a2, a3, a4, a5, a6) _Py_ListComp(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_ListComp(expr_ty elt, asdl_seq * generators, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define SetComp(a0, a1, a2, a3, a4, a5, a6) _Py_SetComp(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_SetComp(expr_ty elt, asdl_seq * generators, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define DictComp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_DictComp(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define GeneratorExp(a0, a1, a2, a3, a4, a5, a6) _Py_GeneratorExp(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
#define Await(a0, a1, a2, a3, a4, a5) _Py_Await(a0, a1, a2, a3, a4, a5)
|
||||
expr_ty _Py_Await(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
#define Yield(a0, a1, a2, a3, a4, a5) _Py_Yield(a0, a1, a2, a3, a4, a5)
|
||||
expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
#define YieldFrom(a0, a1, a2, a3, a4, a5) _Py_YieldFrom(a0, a1, a2, a3, a4, a5)
|
||||
expr_ty _Py_YieldFrom(expr_ty value, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Compare(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Compare(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators,
|
||||
int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Call(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Call(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int
|
||||
lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
#define FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7) _Py_FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_FormattedValue(expr_ty value, int conversion, expr_ty format_spec,
|
||||
int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define JoinedStr(a0, a1, a2, a3, a4, a5) _Py_JoinedStr(a0, a1, a2, a3, a4, a5)
|
||||
expr_ty _Py_JoinedStr(asdl_seq * values, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Constant(a0, a1, a2, a3, a4, a5, a6) _Py_Constant(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_Constant(constant value, string kind, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
#define Attribute(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Attribute(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Subscript(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Subscript(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_Subscript(expr_ty value, expr_ty slice, expr_context_ty ctx, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
#define Starred(a0, a1, a2, a3, a4, a5, a6) _Py_Starred(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_Starred(expr_ty value, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define Name(a0, a1, a2, a3, a4, a5, a6) _Py_Name(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_Name(identifier id, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define List(a0, a1, a2, a3, a4, a5, a6) _Py_List(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_List(asdl_seq * elts, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define Tuple(a0, a1, a2, a3, a4, a5, a6) _Py_Tuple(a0, a1, a2, a3, a4, a5, a6)
|
||||
expr_ty _Py_Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define Slice(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Slice(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
expr_ty _Py_Slice(expr_ty lower, expr_ty upper, expr_ty step, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define comprehension(a0, a1, a2, a3, a4) _Py_comprehension(a0, a1, a2, a3, a4)
|
||||
comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq *
|
||||
ifs, int is_async, PyArena *arena);
|
||||
#define ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
excepthandler_ty _Py_ExceptHandler(expr_ty type, identifier name, asdl_seq *
|
||||
body, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define arguments(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arguments(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
arguments_ty _Py_arguments(asdl_seq * posonlyargs, asdl_seq * args, arg_ty
|
||||
vararg, asdl_seq * kwonlyargs, asdl_seq *
|
||||
kw_defaults, arg_ty kwarg, asdl_seq * defaults,
|
||||
PyArena *arena);
|
||||
#define arg(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arg(a0, a1, a2, a3, a4, a5, a6, a7)
|
||||
arg_ty _Py_arg(identifier arg, expr_ty annotation, string type_comment, int
|
||||
lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
#define keyword(a0, a1, a2, a3, a4, a5, a6) _Py_keyword(a0, a1, a2, a3, a4, a5, a6)
|
||||
keyword_ty _Py_keyword(identifier arg, expr_ty value, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
#define alias(a0, a1, a2) _Py_alias(a0, a1, a2)
|
||||
alias_ty _Py_alias(identifier name, identifier asname, PyArena *arena);
|
||||
#define withitem(a0, a1, a2) _Py_withitem(a0, a1, a2)
|
||||
withitem_ty _Py_withitem(expr_ty context_expr, expr_ty optional_vars, PyArena
|
||||
*arena);
|
||||
#define TypeIgnore(a0, a1, a2) _Py_TypeIgnore(a0, a1, a2)
|
||||
type_ignore_ty _Py_TypeIgnore(int lineno, string tag, PyArena *arena);
|
||||
|
||||
PyObject* PyAST_mod2obj(mod_ty t);
|
||||
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
|
||||
int PyAST_Check(PyObject* obj);
|
||||
#endif /* !Py_LIMITED_API */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_PYTHON_AST_H */
|
||||
38
src/external/windows/include/python/Python.h
vendored
38
src/external/windows/include/python/Python.h
vendored
@ -35,19 +35,6 @@
|
||||
#ifndef MS_WINDOWS
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_CRYPT_H
|
||||
#if defined(HAVE_CRYPT_R) && !defined(_GNU_SOURCE)
|
||||
/* Required for glibc to expose the crypt_r() function prototype. */
|
||||
# define _GNU_SOURCE
|
||||
# define _Py_GNU_SOURCE_FOR_CRYPT
|
||||
#endif
|
||||
#include <crypt.h>
|
||||
#ifdef _Py_GNU_SOURCE_FOR_CRYPT
|
||||
/* Don't leak the _GNU_SOURCE define to other headers. */
|
||||
# undef _GNU_SOURCE
|
||||
# undef _Py_GNU_SOURCE_FOR_CRYPT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* For size_t? */
|
||||
#ifdef HAVE_STDDEF_H
|
||||
@ -81,17 +68,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
|
||||
* PYMALLOC_DEBUG is in error if pymalloc is not in use.
|
||||
*/
|
||||
#if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
|
||||
#define PYMALLOC_DEBUG
|
||||
#endif
|
||||
#if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
|
||||
#error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
|
||||
#endif
|
||||
#include "pymath.h"
|
||||
#include "pytime.h"
|
||||
#include "pymem.h"
|
||||
|
||||
#include "object.h"
|
||||
@ -99,7 +76,7 @@
|
||||
#include "typeslots.h"
|
||||
#include "pyhash.h"
|
||||
|
||||
#include "pydebug.h"
|
||||
#include "cpython/pydebug.h"
|
||||
|
||||
#include "bytearrayobject.h"
|
||||
#include "bytesobject.h"
|
||||
@ -114,7 +91,7 @@
|
||||
#include "tupleobject.h"
|
||||
#include "listobject.h"
|
||||
#include "dictobject.h"
|
||||
#include "odictobject.h"
|
||||
#include "cpython/odictobject.h"
|
||||
#include "enumobject.h"
|
||||
#include "setobject.h"
|
||||
#include "methodobject.h"
|
||||
@ -129,6 +106,7 @@
|
||||
#include "sliceobject.h"
|
||||
#include "cellobject.h"
|
||||
#include "iterobject.h"
|
||||
#include "cpython/initconfig.h"
|
||||
#include "genobject.h"
|
||||
#include "descrobject.h"
|
||||
#include "genericaliasobject.h"
|
||||
@ -136,17 +114,15 @@
|
||||
#include "weakrefobject.h"
|
||||
#include "structseq.h"
|
||||
#include "namespaceobject.h"
|
||||
#include "picklebufobject.h"
|
||||
#include "cpython/picklebufobject.h"
|
||||
#include "cpython/pytime.h"
|
||||
|
||||
#include "codecs.h"
|
||||
#include "pyerrors.h"
|
||||
|
||||
#include "cpython/initconfig.h"
|
||||
#include "pythread.h"
|
||||
#include "pystate.h"
|
||||
#include "context.h"
|
||||
|
||||
#include "pyarena.h"
|
||||
#include "modsupport.h"
|
||||
#include "compile.h"
|
||||
#include "pythonrun.h"
|
||||
@ -162,11 +138,11 @@
|
||||
|
||||
#include "eval.h"
|
||||
|
||||
#include "pyctype.h"
|
||||
#include "cpython/pyctype.h"
|
||||
#include "pystrtod.h"
|
||||
#include "pystrcmp.h"
|
||||
#include "fileutils.h"
|
||||
#include "pyfpe.h"
|
||||
#include "cpython/pyfpe.h"
|
||||
#include "tracemalloc.h"
|
||||
|
||||
#endif /* !Py_PYTHON_H */
|
||||
|
||||
27
src/external/windows/include/python/abstract.h
vendored
27
src/external/windows/include/python/abstract.h
vendored
@ -318,7 +318,7 @@ PyAPI_FUNC(int) PyObject_DelItem(PyObject *o, PyObject *key);
|
||||
|
||||
/* Takes an arbitrary object which must support the (character, single segment)
|
||||
buffer interface and returns a pointer to a read-only memory location
|
||||
useable as character based input for subsequent processing.
|
||||
usable as character based input for subsequent processing.
|
||||
|
||||
Return 0 on success. buffer and buffer_len are only set in case no error
|
||||
occurs. Otherwise, -1 is returned and an exception set. */
|
||||
@ -371,11 +371,21 @@ PyAPI_FUNC(PyObject *) PyObject_Format(PyObject *obj,
|
||||
returns itself. */
|
||||
PyAPI_FUNC(PyObject *) PyObject_GetIter(PyObject *);
|
||||
|
||||
/* Returns 1 if the object 'obj' provides iterator protocols, and 0 otherwise.
|
||||
/* Takes an AsyncIterable object and returns an AsyncIterator for it.
|
||||
This is typically a new iterator but if the argument is an AsyncIterator,
|
||||
this returns itself. */
|
||||
PyAPI_FUNC(PyObject *) PyObject_GetAIter(PyObject *);
|
||||
|
||||
/* Returns non-zero if the object 'obj' provides iterator protocols, and 0 otherwise.
|
||||
|
||||
This function always succeeds. */
|
||||
PyAPI_FUNC(int) PyIter_Check(PyObject *);
|
||||
|
||||
/* Returns non-zero if the object 'obj' provides AsyncIterator protocols, and 0 otherwise.
|
||||
|
||||
This function always succeeds. */
|
||||
PyAPI_FUNC(int) PyAIter_Check(PyObject *);
|
||||
|
||||
/* Takes an iterator object and calls its tp_iternext slot,
|
||||
returning the next value.
|
||||
|
||||
@ -385,6 +395,19 @@ PyAPI_FUNC(int) PyIter_Check(PyObject *);
|
||||
NULL with an exception means an error occurred. */
|
||||
PyAPI_FUNC(PyObject *) PyIter_Next(PyObject *);
|
||||
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
|
||||
|
||||
/* Takes generator, coroutine or iterator object and sends the value into it.
|
||||
Returns:
|
||||
- PYGEN_RETURN (0) if generator has returned.
|
||||
'result' parameter is filled with return value
|
||||
- PYGEN_ERROR (-1) if exception was raised.
|
||||
'result' parameter is NULL
|
||||
- PYGEN_NEXT (1) if generator has yielded.
|
||||
'result' parameter is filled with yielded value. */
|
||||
PyAPI_FUNC(PySendResult) PyIter_Send(PyObject *, PyObject *, PyObject **);
|
||||
#endif
|
||||
|
||||
|
||||
/* === Number Protocol ================================================== */
|
||||
|
||||
|
||||
46
src/external/windows/include/python/asdl.h
vendored
46
src/external/windows/include/python/asdl.h
vendored
@ -1,46 +0,0 @@
|
||||
#ifndef Py_LIMITED_API
|
||||
#ifndef Py_ASDL_H
|
||||
#define Py_ASDL_H
|
||||
|
||||
typedef PyObject * identifier;
|
||||
typedef PyObject * string;
|
||||
typedef PyObject * object;
|
||||
typedef PyObject * constant;
|
||||
|
||||
/* It would be nice if the code generated by asdl_c.py was completely
|
||||
independent of Python, but it is a goal the requires too much work
|
||||
at this stage. So, for example, I'll represent identifiers as
|
||||
interned Python strings.
|
||||
*/
|
||||
|
||||
/* XXX A sequence should be typed so that its use can be typechecked. */
|
||||
|
||||
typedef struct {
|
||||
Py_ssize_t size;
|
||||
void *elements[1];
|
||||
} asdl_seq;
|
||||
|
||||
typedef struct {
|
||||
Py_ssize_t size;
|
||||
int elements[1];
|
||||
} asdl_int_seq;
|
||||
|
||||
asdl_seq *_Py_asdl_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
asdl_int_seq *_Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
#define asdl_seq_GET(S, I) (S)->elements[(I)]
|
||||
#define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size)
|
||||
#ifdef Py_DEBUG
|
||||
#define asdl_seq_SET(S, I, V) \
|
||||
do { \
|
||||
Py_ssize_t _asdl_i = (I); \
|
||||
assert((S) != NULL); \
|
||||
assert(0 <= _asdl_i && _asdl_i < (S)->size); \
|
||||
(S)->elements[_asdl_i] = (V); \
|
||||
} while (0)
|
||||
#else
|
||||
#define asdl_seq_SET(S, I, V) (S)->elements[I] = (V)
|
||||
#endif
|
||||
|
||||
#endif /* !Py_ASDL_H */
|
||||
#endif /* Py_LIMITED_API */
|
||||
35
src/external/windows/include/python/ast.h
vendored
35
src/external/windows/include/python/ast.h
vendored
@ -1,35 +0,0 @@
|
||||
#ifndef Py_LIMITED_API
|
||||
#ifndef Py_AST_H
|
||||
#define Py_AST_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "Python-ast.h" /* mod_ty */
|
||||
#include "node.h" /* node */
|
||||
|
||||
PyAPI_FUNC(int) PyAST_Validate(mod_ty);
|
||||
PyAPI_FUNC(mod_ty) PyAST_FromNode(
|
||||
const node *n,
|
||||
PyCompilerFlags *flags,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(mod_ty) PyAST_FromNodeObject(
|
||||
const node *n,
|
||||
PyCompilerFlags *flags,
|
||||
PyObject *filename,
|
||||
PyArena *arena);
|
||||
|
||||
/* _PyAST_ExprAsUnicode is defined in ast_unparse.c */
|
||||
PyAPI_FUNC(PyObject *) _PyAST_ExprAsUnicode(expr_ty);
|
||||
|
||||
/* Return the borrowed reference to the first literal string in the
|
||||
sequence of statements or NULL if it doesn't start from a literal string.
|
||||
Doesn't set exception. */
|
||||
PyAPI_FUNC(PyObject *) _PyAST_GetDocString(asdl_seq *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_AST_H */
|
||||
#endif /* !Py_LIMITED_API */
|
||||
23
src/external/windows/include/python/bitset.h
vendored
23
src/external/windows/include/python/bitset.h
vendored
@ -1,23 +0,0 @@
|
||||
|
||||
#ifndef Py_BITSET_H
|
||||
#define Py_BITSET_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Bitset interface */
|
||||
|
||||
#define BYTE char
|
||||
typedef BYTE *bitset;
|
||||
|
||||
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
|
||||
|
||||
#define BITSPERBYTE (8*sizeof(BYTE))
|
||||
#define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE)
|
||||
#define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE)
|
||||
#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_BITSET_H */
|
||||
15
src/external/windows/include/python/boolobject.h
vendored
15
src/external/windows/include/python/boolobject.h
vendored
@ -15,15 +15,24 @@ PyAPI_DATA(PyTypeObject) PyBool_Type;
|
||||
Don't forget to apply Py_INCREF() when returning either!!! */
|
||||
|
||||
/* Don't use these directly */
|
||||
PyAPI_DATA(struct _longobject) _Py_FalseStruct, _Py_TrueStruct;
|
||||
PyAPI_DATA(struct _longobject) _Py_FalseStruct;
|
||||
PyAPI_DATA(struct _longobject) _Py_TrueStruct;
|
||||
|
||||
/* Use these macros */
|
||||
#define Py_False ((PyObject *) &_Py_FalseStruct)
|
||||
#define Py_True ((PyObject *) &_Py_TrueStruct)
|
||||
|
||||
// Test if an object is the True singleton, the same as "x is True" in Python.
|
||||
PyAPI_FUNC(int) Py_IsTrue(PyObject *x);
|
||||
#define Py_IsTrue(x) Py_Is((x), Py_True)
|
||||
|
||||
// Test if an object is the False singleton, the same as "x is False" in Python.
|
||||
PyAPI_FUNC(int) Py_IsFalse(PyObject *x);
|
||||
#define Py_IsFalse(x) Py_Is((x), Py_False)
|
||||
|
||||
/* Macros for returning Py_True or Py_False, respectively */
|
||||
#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
|
||||
#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
|
||||
#define Py_RETURN_TRUE return Py_NewRef(Py_True)
|
||||
#define Py_RETURN_FALSE return Py_NewRef(Py_False)
|
||||
|
||||
/* Function to return a bool from a C long */
|
||||
PyAPI_FUNC(PyObject *) PyBool_FromLong(long);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
/* Bytes (String) object interface */
|
||||
/* Bytes object interface */
|
||||
|
||||
#ifndef Py_BYTESOBJECT_H
|
||||
#define Py_BYTESOBJECT_H
|
||||
@ -10,23 +10,20 @@ extern "C" {
|
||||
#include <stdarg.h>
|
||||
|
||||
/*
|
||||
Type PyBytesObject represents a character string. An extra zero byte is
|
||||
Type PyBytesObject represents a byte string. An extra zero byte is
|
||||
reserved at the end to ensure it is zero-terminated, but a size is
|
||||
present so strings with null bytes in them can be represented. This
|
||||
is an immutable object type.
|
||||
|
||||
There are functions to create new string objects, to test
|
||||
an object for string-ness, and to get the
|
||||
string value. The latter function returns a null pointer
|
||||
There are functions to create new bytes objects, to test
|
||||
an object for bytes-ness, and to get the
|
||||
byte string value. The latter function returns a null pointer
|
||||
if the object is not of the proper type.
|
||||
There is a variant that takes an explicit size as well as a
|
||||
variant that assumes a zero-terminated string. Note that none of the
|
||||
functions should be applied to nil objects.
|
||||
functions should be applied to NULL pointer.
|
||||
*/
|
||||
|
||||
/* Caching the hash (ob_shash) saves recalculation of a string's hash value.
|
||||
This significantly speeds up dict lookups. */
|
||||
|
||||
PyAPI_DATA(PyTypeObject) PyBytes_Type;
|
||||
PyAPI_DATA(PyTypeObject) PyBytesIter_Type;
|
||||
|
||||
@ -50,26 +47,16 @@ PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t,
|
||||
const char *, Py_ssize_t,
|
||||
const char *);
|
||||
|
||||
/* Provides access to the internal data buffer and size of a string
|
||||
object or the default encoded version of a Unicode object. Passing
|
||||
NULL as *len parameter will force the string buffer to be
|
||||
0-terminated (passing a string with embedded NULL characters will
|
||||
/* Provides access to the internal data buffer and size of a bytes object.
|
||||
Passing NULL as len parameter will force the string buffer to be
|
||||
0-terminated (passing a string with embedded NUL characters will
|
||||
cause an exception). */
|
||||
PyAPI_FUNC(int) PyBytes_AsStringAndSize(
|
||||
PyObject *obj, /* string or Unicode object */
|
||||
PyObject *obj, /* bytes object */
|
||||
char **s, /* pointer to buffer variable */
|
||||
Py_ssize_t *len /* pointer to length variable or NULL
|
||||
(only possible for 0-terminated
|
||||
strings) */
|
||||
Py_ssize_t *len /* pointer to length variable or NULL */
|
||||
);
|
||||
|
||||
/* Flags used by string formatting */
|
||||
#define F_LJUST (1<<0)
|
||||
#define F_SIGN (1<<1)
|
||||
#define F_BLANK (1<<2)
|
||||
#define F_ALT (1<<3)
|
||||
#define F_ZERO (1<<4)
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
# define Py_CPYTHON_BYTESOBJECT_H
|
||||
# include "cpython/bytesobject.h"
|
||||
|
||||
@ -20,7 +20,7 @@ PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *);
|
||||
PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *);
|
||||
|
||||
#define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref)
|
||||
#define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v)
|
||||
#define PyCell_SET(op, v) ((void)(((PyCellObject *)(op))->ob_ref = v))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
8
src/external/windows/include/python/ceval.h
vendored
8
src/external/windows/include/python/ceval.h
vendored
@ -67,14 +67,6 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
|
||||
PyAPI_FUNC(int) Py_EnterRecursiveCall(const char *where);
|
||||
PyAPI_FUNC(void) Py_LeaveRecursiveCall(void);
|
||||
|
||||
#define Py_ALLOW_RECURSION \
|
||||
do { unsigned char _old = PyThreadState_GET()->recursion_critical;\
|
||||
PyThreadState_GET()->recursion_critical = 1;
|
||||
|
||||
#define Py_END_ALLOW_RECURSION \
|
||||
PyThreadState_GET()->recursion_critical = _old; \
|
||||
} while(0);
|
||||
|
||||
PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *);
|
||||
PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *);
|
||||
|
||||
|
||||
8
src/external/windows/include/python/codecs.h
vendored
8
src/external/windows/include/python/codecs.h
vendored
@ -27,6 +27,14 @@ PyAPI_FUNC(int) PyCodec_Register(
|
||||
PyObject *search_function
|
||||
);
|
||||
|
||||
/* Unregister a codec search function and clear the registry's cache.
|
||||
If the search function is not registered, do nothing.
|
||||
Return 0 on success. Raise an exception and return -1 on error. */
|
||||
|
||||
PyAPI_FUNC(int) PyCodec_Unregister(
|
||||
PyObject *search_function
|
||||
);
|
||||
|
||||
/* Codec registry lookup API.
|
||||
|
||||
Looks up the given encoding and returns a CodecInfo object with
|
||||
|
||||
109
src/external/windows/include/python/compile.h
vendored
109
src/external/windows/include/python/compile.h
vendored
@ -1,109 +1,9 @@
|
||||
#ifndef Py_COMPILE_H
|
||||
#define Py_COMPILE_H
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Public interface */
|
||||
struct _node; /* Declare the existence of this type */
|
||||
#ifndef Py_BUILD_CORE
|
||||
Py_DEPRECATED(3.9)
|
||||
#endif
|
||||
PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
|
||||
/* XXX (ncoghlan): Unprefixed type name in a public API! */
|
||||
|
||||
#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
|
||||
CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
|
||||
CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL | \
|
||||
CO_FUTURE_GENERATOR_STOP | CO_FUTURE_ANNOTATIONS)
|
||||
#define PyCF_MASK_OBSOLETE (CO_NESTED)
|
||||
|
||||
/* bpo-39562: CO_FUTURE_ and PyCF_ constants must be kept unique.
|
||||
PyCF_ constants can use bits from 0x0100 to 0x10000.
|
||||
CO_FUTURE_ constants use bits starting at 0x20000. */
|
||||
#define PyCF_SOURCE_IS_UTF8 0x0100
|
||||
#define PyCF_DONT_IMPLY_DEDENT 0x0200
|
||||
#define PyCF_ONLY_AST 0x0400
|
||||
#define PyCF_IGNORE_COOKIE 0x0800
|
||||
#define PyCF_TYPE_COMMENTS 0x1000
|
||||
#define PyCF_ALLOW_TOP_LEVEL_AWAIT 0x2000
|
||||
#define PyCF_COMPILE_MASK (PyCF_ONLY_AST | PyCF_ALLOW_TOP_LEVEL_AWAIT | \
|
||||
PyCF_TYPE_COMMENTS | PyCF_DONT_IMPLY_DEDENT)
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
typedef struct {
|
||||
int cf_flags; /* bitmask of CO_xxx flags relevant to future */
|
||||
int cf_feature_version; /* minor Python version (PyCF_ONLY_AST) */
|
||||
} PyCompilerFlags;
|
||||
|
||||
#define _PyCompilerFlags_INIT \
|
||||
(PyCompilerFlags){.cf_flags = 0, .cf_feature_version = PY_MINOR_VERSION}
|
||||
#endif
|
||||
|
||||
/* Future feature support */
|
||||
|
||||
typedef struct {
|
||||
int ff_features; /* flags set by future statements */
|
||||
int ff_lineno; /* line number of last future statement */
|
||||
} PyFutureFeatures;
|
||||
|
||||
#define FUTURE_NESTED_SCOPES "nested_scopes"
|
||||
#define FUTURE_GENERATORS "generators"
|
||||
#define FUTURE_DIVISION "division"
|
||||
#define FUTURE_ABSOLUTE_IMPORT "absolute_import"
|
||||
#define FUTURE_WITH_STATEMENT "with_statement"
|
||||
#define FUTURE_PRINT_FUNCTION "print_function"
|
||||
#define FUTURE_UNICODE_LITERALS "unicode_literals"
|
||||
#define FUTURE_BARRY_AS_BDFL "barry_as_FLUFL"
|
||||
#define FUTURE_GENERATOR_STOP "generator_stop"
|
||||
#define FUTURE_ANNOTATIONS "annotations"
|
||||
|
||||
struct _mod; /* Declare the existence of this type */
|
||||
#define PyAST_Compile(mod, s, f, ar) PyAST_CompileEx(mod, s, f, -1, ar)
|
||||
PyAPI_FUNC(PyCodeObject *) PyAST_CompileEx(
|
||||
struct _mod *mod,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
PyCompilerFlags *flags,
|
||||
int optimize,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(PyCodeObject *) PyAST_CompileObject(
|
||||
struct _mod *mod,
|
||||
PyObject *filename,
|
||||
PyCompilerFlags *flags,
|
||||
int optimize,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(
|
||||
struct _mod * mod,
|
||||
const char *filename /* decoded from the filesystem encoding */
|
||||
);
|
||||
PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromASTObject(
|
||||
struct _mod * mod,
|
||||
PyObject *filename
|
||||
);
|
||||
|
||||
/* _Py_Mangle is defined in compile.c */
|
||||
PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
|
||||
|
||||
#define PY_INVALID_STACK_EFFECT INT_MAX
|
||||
PyAPI_FUNC(int) PyCompile_OpcodeStackEffect(int opcode, int oparg);
|
||||
PyAPI_FUNC(int) PyCompile_OpcodeStackEffectWithJump(int opcode, int oparg, int jump);
|
||||
|
||||
typedef struct {
|
||||
int optimize;
|
||||
int ff_features;
|
||||
} _PyASTOptimizeState;
|
||||
|
||||
PyAPI_FUNC(int) _PyAST_Optimize(struct _mod *, PyArena *arena, _PyASTOptimizeState *state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !Py_LIMITED_API */
|
||||
|
||||
/* These definitions must match corresponding definitions in graminit.h. */
|
||||
#define Py_single_input 256
|
||||
#define Py_file_input 257
|
||||
@ -113,4 +13,13 @@ PyAPI_FUNC(int) _PyAST_Optimize(struct _mod *, PyArena *arena, _PyASTOptimizeSta
|
||||
/* This doesn't need to match anything */
|
||||
#define Py_fstring_input 800
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
# define Py_CPYTHON_COMPILE_H
|
||||
# include "cpython/compile.h"
|
||||
# undef Py_CPYTHON_COMPILE_H
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_COMPILE_H */
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* === Object Protocol ================================================== */
|
||||
|
||||
#ifdef PY_SSIZE_T_CLEAN
|
||||
@ -123,7 +119,7 @@ static inline PyObject *
|
||||
PyObject_Vectorcall(PyObject *callable, PyObject *const *args,
|
||||
size_t nargsf, PyObject *kwnames)
|
||||
{
|
||||
PyThreadState *tstate = PyThreadState_GET();
|
||||
PyThreadState *tstate = PyThreadState_Get();
|
||||
return _PyObject_VectorcallTstate(tstate, callable,
|
||||
args, nargsf, kwnames);
|
||||
}
|
||||
@ -159,7 +155,7 @@ _PyObject_FastCallTstate(PyThreadState *tstate, PyObject *func, PyObject *const
|
||||
static inline PyObject *
|
||||
_PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyThreadState *tstate = PyThreadState_GET();
|
||||
PyThreadState *tstate = PyThreadState_Get();
|
||||
return _PyObject_FastCallTstate(tstate, func, args, nargs);
|
||||
}
|
||||
|
||||
@ -168,7 +164,7 @@ _PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs)
|
||||
PyObject_CallNoArgs(). */
|
||||
static inline PyObject *
|
||||
_PyObject_CallNoArg(PyObject *func) {
|
||||
PyThreadState *tstate = PyThreadState_GET();
|
||||
PyThreadState *tstate = PyThreadState_Get();
|
||||
return _PyObject_VectorcallTstate(tstate, func, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
@ -183,7 +179,7 @@ PyObject_CallOneArg(PyObject *func, PyObject *arg)
|
||||
assert(arg != NULL);
|
||||
args = _args + 1; // For PY_VECTORCALL_ARGUMENTS_OFFSET
|
||||
args[0] = arg;
|
||||
tstate = PyThreadState_GET();
|
||||
tstate = PyThreadState_Get();
|
||||
nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET;
|
||||
return _PyObject_VectorcallTstate(tstate, func, args, nargsf, NULL);
|
||||
}
|
||||
@ -329,12 +325,6 @@ PyAPI_FUNC(int) PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf,
|
||||
/* Releases a Py_buffer obtained from getbuffer ParseTuple's "s*". */
|
||||
PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view);
|
||||
|
||||
/* ==== Iterators ================================================ */
|
||||
|
||||
#define PyIter_Check(obj) \
|
||||
(Py_TYPE(obj)->tp_iternext != NULL && \
|
||||
Py_TYPE(obj)->tp_iternext != &_PyObject_NextNotImplemented)
|
||||
|
||||
/* === Sequence protocol ================================================ */
|
||||
|
||||
/* Assume tp_as_sequence and sq_item exist and that 'i' does not
|
||||
@ -379,6 +369,5 @@ PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index,
|
||||
/* Convert Python int to Py_ssize_t. Do nothing if the argument is None. */
|
||||
PyAPI_FUNC(int) _Py_convert_optional_to_ssize_t(PyObject *, void *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/* Same as PyNumber_Index but can return an instance of a subclass of int. */
|
||||
PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o);
|
||||
|
||||
@ -10,7 +10,7 @@ typedef struct {
|
||||
/* Invariants:
|
||||
* ob_sval contains space for 'ob_size+1' elements.
|
||||
* ob_sval[ob_size] == 0.
|
||||
* ob_shash is the hash of the string or -1 if not computed yet.
|
||||
* ob_shash is the hash of the byte string or -1 if not computed yet.
|
||||
*/
|
||||
} PyBytesObject;
|
||||
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
|
||||
PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg);
|
||||
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
|
||||
@ -32,7 +28,3 @@ PyAPI_FUNC(Py_ssize_t) _PyEval_RequestCodeExtraIndex(freefunc);
|
||||
|
||||
PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
|
||||
PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -38,7 +38,7 @@ struct PyCodeObject {
|
||||
Py_ssize_t *co_cell2arg; /* Maps cell vars which are arguments. */
|
||||
PyObject *co_filename; /* unicode (where it was loaded from) */
|
||||
PyObject *co_name; /* unicode (name, for reference) */
|
||||
PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See
|
||||
PyObject *co_linetable; /* string (encoding addr<->lineno mapping) See
|
||||
Objects/lnotab_notes.txt for details. */
|
||||
void *co_zombieframe; /* for optimization only (see frameobject.c) */
|
||||
PyObject *co_weakreflist; /* to support weakrefs to code objects */
|
||||
@ -135,16 +135,23 @@ PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno);
|
||||
PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int);
|
||||
|
||||
/* for internal use only */
|
||||
typedef struct _addr_pair {
|
||||
int ap_lower;
|
||||
int ap_upper;
|
||||
} PyAddrPair;
|
||||
struct _opaque {
|
||||
int computed_line;
|
||||
const char *lo_next;
|
||||
const char *limit;
|
||||
};
|
||||
|
||||
typedef struct _line_offsets {
|
||||
int ar_start;
|
||||
int ar_end;
|
||||
int ar_line;
|
||||
struct _opaque opaque;
|
||||
} PyCodeAddressRange;
|
||||
|
||||
/* Update *bounds to describe the first and one-past-the-last instructions in the
|
||||
same line as lasti. Return the number of that line.
|
||||
*/
|
||||
PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co,
|
||||
int lasti, PyAddrPair *bounds);
|
||||
PyAPI_FUNC(int) _PyCode_CheckLineNumber(int lasti, PyCodeAddressRange *bounds);
|
||||
|
||||
/* Create a comparable key used to compare constants taking in account the
|
||||
* object type. It is used to make sure types are not coerced (e.g., float and
|
||||
@ -163,3 +170,15 @@ PyAPI_FUNC(int) _PyCode_GetExtra(PyObject *code, Py_ssize_t index,
|
||||
void **extra);
|
||||
PyAPI_FUNC(int) _PyCode_SetExtra(PyObject *code, Py_ssize_t index,
|
||||
void *extra);
|
||||
|
||||
/** API for initializing the line number table. */
|
||||
int _PyCode_InitAddressRange(PyCodeObject* co, PyCodeAddressRange *bounds);
|
||||
|
||||
/** Out of process API for initializing the line number table. */
|
||||
void PyLineTable_InitAddressRange(const char *linetable, Py_ssize_t length, int firstlineno, PyCodeAddressRange *range);
|
||||
|
||||
/** API for traversing the line number table. */
|
||||
int PyLineTable_NextAddressRange(PyCodeAddressRange *range);
|
||||
int PyLineTable_PreviousAddressRange(PyCodeAddressRange *range);
|
||||
|
||||
|
||||
|
||||
54
src/external/windows/include/python/cpython/compile.h
vendored
Executable file
54
src/external/windows/include/python/cpython/compile.h
vendored
Executable file
@ -0,0 +1,54 @@
|
||||
#ifndef Py_CPYTHON_COMPILE_H
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
/* Public interface */
|
||||
#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
|
||||
CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
|
||||
CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL | \
|
||||
CO_FUTURE_GENERATOR_STOP | CO_FUTURE_ANNOTATIONS)
|
||||
#define PyCF_MASK_OBSOLETE (CO_NESTED)
|
||||
|
||||
/* bpo-39562: CO_FUTURE_ and PyCF_ constants must be kept unique.
|
||||
PyCF_ constants can use bits from 0x0100 to 0x10000.
|
||||
CO_FUTURE_ constants use bits starting at 0x20000. */
|
||||
#define PyCF_SOURCE_IS_UTF8 0x0100
|
||||
#define PyCF_DONT_IMPLY_DEDENT 0x0200
|
||||
#define PyCF_ONLY_AST 0x0400
|
||||
#define PyCF_IGNORE_COOKIE 0x0800
|
||||
#define PyCF_TYPE_COMMENTS 0x1000
|
||||
#define PyCF_ALLOW_TOP_LEVEL_AWAIT 0x2000
|
||||
#define PyCF_ALLOW_INCOMPLETE_INPUT 0x4000
|
||||
#define PyCF_COMPILE_MASK (PyCF_ONLY_AST | PyCF_ALLOW_TOP_LEVEL_AWAIT | \
|
||||
PyCF_TYPE_COMMENTS | PyCF_DONT_IMPLY_DEDENT | \
|
||||
PyCF_ALLOW_INCOMPLETE_INPUT)
|
||||
|
||||
typedef struct {
|
||||
int cf_flags; /* bitmask of CO_xxx flags relevant to future */
|
||||
int cf_feature_version; /* minor Python version (PyCF_ONLY_AST) */
|
||||
} PyCompilerFlags;
|
||||
|
||||
#define _PyCompilerFlags_INIT \
|
||||
(PyCompilerFlags){.cf_flags = 0, .cf_feature_version = PY_MINOR_VERSION}
|
||||
|
||||
/* Future feature support */
|
||||
|
||||
typedef struct {
|
||||
int ff_features; /* flags set by future statements */
|
||||
int ff_lineno; /* line number of last future statement */
|
||||
} PyFutureFeatures;
|
||||
|
||||
#define FUTURE_NESTED_SCOPES "nested_scopes"
|
||||
#define FUTURE_GENERATORS "generators"
|
||||
#define FUTURE_DIVISION "division"
|
||||
#define FUTURE_ABSOLUTE_IMPORT "absolute_import"
|
||||
#define FUTURE_WITH_STATEMENT "with_statement"
|
||||
#define FUTURE_PRINT_FUNCTION "print_function"
|
||||
#define FUTURE_UNICODE_LITERALS "unicode_literals"
|
||||
#define FUTURE_BARRY_AS_BDFL "barry_as_FLUFL"
|
||||
#define FUTURE_GENERATOR_STOP "generator_stop"
|
||||
#define FUTURE_ANNOTATIONS "annotations"
|
||||
|
||||
#define PY_INVALID_STACK_EFFECT INT_MAX
|
||||
PyAPI_FUNC(int) PyCompile_OpcodeStackEffect(int opcode, int oparg);
|
||||
PyAPI_FUNC(int) PyCompile_OpcodeStackEffectWithJump(int opcode, int oparg, int jump);
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _dictkeysobject PyDictKeysObject;
|
||||
|
||||
/* The ma_values pointer is NULL for a combined table
|
||||
@ -26,7 +22,7 @@ typedef struct {
|
||||
/* If ma_values is NULL, the table is "combined": keys and values
|
||||
are stored in ma_keys.
|
||||
|
||||
If ma_values is not NULL, the table is splitted:
|
||||
If ma_values is not NULL, the table is split:
|
||||
keys are stored in ma_keys and values are stored in ma_values */
|
||||
PyObject **ma_values;
|
||||
} PyDictObject;
|
||||
@ -45,13 +41,13 @@ PyAPI_FUNC(int) _PyDict_DelItem_KnownHash(PyObject *mp, PyObject *key,
|
||||
PyAPI_FUNC(int) _PyDict_DelItemIf(PyObject *mp, PyObject *key,
|
||||
int (*predicate)(PyObject *value));
|
||||
PyDictKeysObject *_PyDict_NewKeysForClass(void);
|
||||
PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
|
||||
PyAPI_FUNC(int) _PyDict_Next(
|
||||
PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, Py_hash_t *hash);
|
||||
|
||||
/* Get the number of items of a dictionary. */
|
||||
#define PyDict_GET_SIZE(mp) (assert(PyDict_Check(mp)),((PyDictObject *)mp)->ma_used)
|
||||
PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, Py_hash_t hash);
|
||||
PyAPI_FUNC(int) _PyDict_Contains_KnownHash(PyObject *, PyObject *, Py_hash_t);
|
||||
PyAPI_FUNC(int) _PyDict_ContainsId(PyObject *, struct _Py_Identifier *);
|
||||
PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
|
||||
PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp);
|
||||
PyAPI_FUNC(int) _PyDict_HasOnlyStringKeys(PyObject *mp);
|
||||
@ -68,7 +64,6 @@ PyObject *_PyDict_FromKeys(PyObject *, PyObject *, PyObject *);
|
||||
argument is raised.
|
||||
*/
|
||||
PyAPI_FUNC(int) _PyDict_MergeEx(PyObject *mp, PyObject *other, int override);
|
||||
PyAPI_FUNC(PyObject *) _PyDict_GetItemId(PyObject *dp, struct _Py_Identifier *key);
|
||||
PyAPI_FUNC(int) _PyDict_SetItemId(PyObject *dp, struct _Py_Identifier *key, PyObject *item);
|
||||
|
||||
PyAPI_FUNC(int) _PyDict_DelItemId(PyObject *mp, struct _Py_Identifier *key);
|
||||
@ -76,6 +71,7 @@ PyAPI_FUNC(void) _PyDict_DebugMallocStats(FILE *out);
|
||||
|
||||
int _PyObjectDict_SetItem(PyTypeObject *tp, PyObject **dictptr, PyObject *name, PyObject *value);
|
||||
PyObject *_PyDict_LoadGlobal(PyDictObject *, PyDictObject *, PyObject *);
|
||||
Py_ssize_t _PyDict_GetItemHint(PyDictObject *, PyObject *, Py_ssize_t, PyObject **);
|
||||
|
||||
/* _PyDictView */
|
||||
|
||||
@ -86,7 +82,3 @@ typedef struct {
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PyDictView_New(PyObject *, PyTypeObject *);
|
||||
PyAPI_FUNC(PyObject *) _PyDictView_Intersect(PyObject* self, PyObject *other);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
|
||||
|
||||
/* The std printer acts as a preliminary sys.stderr until the new io
|
||||
@ -19,6 +15,4 @@ PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path);
|
||||
PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path);
|
||||
PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *);
|
||||
|
||||
@ -32,6 +32,9 @@ PyAPI_FUNC(int) _Py_EncodeLocaleEx(
|
||||
int current_locale,
|
||||
_Py_error_handler errors);
|
||||
|
||||
PyAPI_FUNC(char*) _Py_EncodeLocaleRaw(
|
||||
const wchar_t *text,
|
||||
size_t *error_pos);
|
||||
|
||||
PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
|
||||
|
||||
@ -95,10 +98,6 @@ PyAPI_FUNC(FILE *) _Py_wfopen(
|
||||
const wchar_t *path,
|
||||
const wchar_t *mode);
|
||||
|
||||
PyAPI_FUNC(FILE*) _Py_fopen(
|
||||
const char *pathname,
|
||||
const char *mode);
|
||||
|
||||
PyAPI_FUNC(FILE*) _Py_fopen_obj(
|
||||
PyObject *path,
|
||||
const char *mode);
|
||||
@ -162,4 +161,12 @@ PyAPI_FUNC(int) _Py_dup(int fd);
|
||||
PyAPI_FUNC(int) _Py_get_blocking(int fd);
|
||||
|
||||
PyAPI_FUNC(int) _Py_set_blocking(int fd, int blocking);
|
||||
#endif /* !MS_WINDOWS */
|
||||
#else /* MS_WINDOWS */
|
||||
PyAPI_FUNC(void*) _Py_get_osfhandle_noraise(int fd);
|
||||
|
||||
PyAPI_FUNC(void*) _Py_get_osfhandle(int fd);
|
||||
|
||||
PyAPI_FUNC(int) _Py_open_osfhandle_noraise(void *handle, int flags);
|
||||
|
||||
PyAPI_FUNC(int) _Py_open_osfhandle(void *handle, int flags);
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
@ -4,9 +4,20 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* These values are chosen so that the inline functions below all
|
||||
* compare f_state to zero.
|
||||
*/
|
||||
enum _framestate {
|
||||
FRAME_CREATED = -2,
|
||||
FRAME_SUSPENDED = -1,
|
||||
FRAME_EXECUTING = 0,
|
||||
FRAME_RETURNED = 1,
|
||||
FRAME_UNWINDING = 2,
|
||||
FRAME_RAISED = 3,
|
||||
FRAME_CLEARED = 4
|
||||
};
|
||||
|
||||
typedef signed char PyFrameState;
|
||||
|
||||
typedef struct {
|
||||
int b_type; /* what kind of block this is */
|
||||
@ -22,11 +33,8 @@ struct _frame {
|
||||
PyObject *f_globals; /* global symbol table (PyDictObject) */
|
||||
PyObject *f_locals; /* local symbol table (any mapping) */
|
||||
PyObject **f_valuestack; /* points after the last local */
|
||||
/* Next free slot in f_valuestack. Frame creation sets to f_valuestack.
|
||||
Frame evaluation usually NULLs it, but a frame that yields sets it
|
||||
to the current stack top. */
|
||||
PyObject **f_stacktop;
|
||||
PyObject *f_trace; /* Trace function */
|
||||
int f_stackdepth; /* Depth of value stack */
|
||||
char f_trace_lines; /* Emit per-line trace events? */
|
||||
char f_trace_opcodes; /* Emit per-opcode trace events? */
|
||||
|
||||
@ -34,18 +42,24 @@ struct _frame {
|
||||
PyObject *f_gen;
|
||||
|
||||
int f_lasti; /* Last instruction if called */
|
||||
/* Call PyFrame_GetLineNumber() instead of reading this field
|
||||
directly. As of 2.3 f_lineno is only valid when tracing is
|
||||
active (i.e. when f_trace is set). At other times we use
|
||||
PyCode_Addr2Line to calculate the line from the current
|
||||
bytecode index. */
|
||||
int f_lineno; /* Current line number */
|
||||
int f_lineno; /* Current line number. Only valid if non-zero */
|
||||
int f_iblock; /* index in f_blockstack */
|
||||
char f_executing; /* whether the frame is still executing */
|
||||
PyFrameState f_state; /* What state the frame is in */
|
||||
PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */
|
||||
PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */
|
||||
};
|
||||
|
||||
static inline int _PyFrame_IsRunnable(struct _frame *f) {
|
||||
return f->f_state < FRAME_EXECUTING;
|
||||
}
|
||||
|
||||
static inline int _PyFrame_IsExecuting(struct _frame *f) {
|
||||
return f->f_state == FRAME_EXECUTING;
|
||||
}
|
||||
|
||||
static inline int _PyFrameHasCompleted(struct _frame *f) {
|
||||
return f->f_state > FRAME_EXECUTING;
|
||||
}
|
||||
|
||||
/* Standard object interface */
|
||||
|
||||
@ -57,8 +71,8 @@ PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,
|
||||
PyObject *, PyObject *);
|
||||
|
||||
/* only internal use */
|
||||
PyFrameObject* _PyFrame_New_NoTrack(PyThreadState *, PyCodeObject *,
|
||||
PyObject *, PyObject *);
|
||||
PyFrameObject*
|
||||
_PyFrame_New_NoTrack(PyThreadState *, PyFrameConstructor *, PyObject *);
|
||||
|
||||
|
||||
/* The rest of the interface is specific for frame objects */
|
||||
@ -78,7 +92,3 @@ PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
|
||||
PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out);
|
||||
|
||||
PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyMODINIT_FUNC PyInit__imp(void);
|
||||
|
||||
PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *);
|
||||
@ -17,7 +13,8 @@ PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module);
|
||||
PyAPI_FUNC(void) _PyImport_AcquireLock(void);
|
||||
PyAPI_FUNC(int) _PyImport_ReleaseLock(void);
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *);
|
||||
/* Obsolete since 3.5, will be removed in 3.11. */
|
||||
Py_DEPRECATED(3.10) PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *);
|
||||
|
||||
PyAPI_FUNC(int) _PyImport_FixupBuiltin(
|
||||
PyObject *mod,
|
||||
@ -44,7 +41,3 @@ struct _frozen {
|
||||
collection of frozen modules: */
|
||||
|
||||
PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -44,7 +44,7 @@ PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list,
|
||||
|
||||
/* --- PyPreConfig ----------------------------------------------- */
|
||||
|
||||
typedef struct {
|
||||
typedef struct PyPreConfig {
|
||||
int _config_init; /* _PyConfigInitEnum value */
|
||||
|
||||
/* Parse Py_PreInitializeFromBytesArgs() arguments?
|
||||
@ -130,298 +130,85 @@ PyAPI_FUNC(void) PyPreConfig_InitIsolatedConfig(PyPreConfig *config);
|
||||
|
||||
/* --- PyConfig ---------------------------------------------- */
|
||||
|
||||
typedef struct {
|
||||
/* This structure is best documented in the Doc/c-api/init_config.rst file. */
|
||||
typedef struct PyConfig {
|
||||
int _config_init; /* _PyConfigInitEnum value */
|
||||
|
||||
int isolated; /* Isolated mode? see PyPreConfig.isolated */
|
||||
int use_environment; /* Use environment variables? see PyPreConfig.use_environment */
|
||||
int dev_mode; /* Python Development Mode? See PyPreConfig.dev_mode */
|
||||
|
||||
/* Install signal handlers? Yes by default. */
|
||||
int isolated;
|
||||
int use_environment;
|
||||
int dev_mode;
|
||||
int install_signal_handlers;
|
||||
|
||||
int use_hash_seed; /* PYTHONHASHSEED=x */
|
||||
int use_hash_seed;
|
||||
unsigned long hash_seed;
|
||||
|
||||
/* Enable faulthandler?
|
||||
Set to 1 by -X faulthandler and PYTHONFAULTHANDLER. -1 means unset. */
|
||||
int faulthandler;
|
||||
|
||||
/* Enable PEG parser?
|
||||
1 by default, set to 0 by -X oldparser and PYTHONOLDPARSER */
|
||||
int _use_peg_parser;
|
||||
|
||||
/* Enable tracemalloc?
|
||||
Set by -X tracemalloc=N and PYTHONTRACEMALLOC. -1 means unset */
|
||||
int tracemalloc;
|
||||
|
||||
int import_time; /* PYTHONPROFILEIMPORTTIME, -X importtime */
|
||||
int show_ref_count; /* -X showrefcount */
|
||||
int dump_refs; /* PYTHONDUMPREFS */
|
||||
int malloc_stats; /* PYTHONMALLOCSTATS */
|
||||
|
||||
/* Python filesystem encoding and error handler:
|
||||
sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
|
||||
|
||||
Default encoding and error handler:
|
||||
|
||||
* if Py_SetStandardStreamEncoding() has been called: they have the
|
||||
highest priority;
|
||||
* PYTHONIOENCODING environment variable;
|
||||
* The UTF-8 Mode uses UTF-8/surrogateescape;
|
||||
* If Python forces the usage of the ASCII encoding (ex: C locale
|
||||
or POSIX locale on FreeBSD or HP-UX), use ASCII/surrogateescape;
|
||||
* locale encoding: ANSI code page on Windows, UTF-8 on Android and
|
||||
VxWorks, LC_CTYPE locale encoding on other platforms;
|
||||
* On Windows, "surrogateescape" error handler;
|
||||
* "surrogateescape" error handler if the LC_CTYPE locale is "C" or "POSIX";
|
||||
* "surrogateescape" error handler if the LC_CTYPE locale has been coerced
|
||||
(PEP 538);
|
||||
* "strict" error handler.
|
||||
|
||||
Supported error handlers: "strict", "surrogateescape" and
|
||||
"surrogatepass". The surrogatepass error handler is only supported
|
||||
if Py_DecodeLocale() and Py_EncodeLocale() use directly the UTF-8 codec;
|
||||
it's only used on Windows.
|
||||
|
||||
initfsencoding() updates the encoding to the Python codec name.
|
||||
For example, "ANSI_X3.4-1968" is replaced with "ascii".
|
||||
|
||||
On Windows, sys._enablelegacywindowsfsencoding() sets the
|
||||
encoding/errors to mbcs/replace at runtime.
|
||||
|
||||
|
||||
See Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors.
|
||||
*/
|
||||
int import_time;
|
||||
int show_ref_count;
|
||||
int dump_refs;
|
||||
int malloc_stats;
|
||||
wchar_t *filesystem_encoding;
|
||||
wchar_t *filesystem_errors;
|
||||
|
||||
wchar_t *pycache_prefix; /* PYTHONPYCACHEPREFIX, -X pycache_prefix=PATH */
|
||||
int parse_argv; /* Parse argv command line arguments? */
|
||||
|
||||
/* Command line arguments (sys.argv).
|
||||
|
||||
Set parse_argv to 1 to parse argv as Python command line arguments
|
||||
and then strip Python arguments from argv.
|
||||
|
||||
If argv is empty, an empty string is added to ensure that sys.argv
|
||||
always exists and is never empty. */
|
||||
wchar_t *pycache_prefix;
|
||||
int parse_argv;
|
||||
PyWideStringList orig_argv;
|
||||
PyWideStringList argv;
|
||||
|
||||
/* Program name:
|
||||
|
||||
- If Py_SetProgramName() was called, use its value.
|
||||
- On macOS, use PYTHONEXECUTABLE environment variable if set.
|
||||
- If WITH_NEXT_FRAMEWORK macro is defined, use __PYVENV_LAUNCHER__
|
||||
environment variable is set.
|
||||
- Use argv[0] if available and non-empty.
|
||||
- Use "python" on Windows, or "python3 on other platforms. */
|
||||
wchar_t *program_name;
|
||||
|
||||
PyWideStringList xoptions; /* Command line -X options */
|
||||
|
||||
/* Warnings options: lowest to highest priority. warnings.filters
|
||||
is built in the reverse order (highest to lowest priority). */
|
||||
PyWideStringList xoptions;
|
||||
PyWideStringList warnoptions;
|
||||
|
||||
/* If equal to zero, disable the import of the module site and the
|
||||
site-dependent manipulations of sys.path that it entails. Also disable
|
||||
these manipulations if site is explicitly imported later (call
|
||||
site.main() if you want them to be triggered).
|
||||
|
||||
Set to 0 by the -S command line option. If set to -1 (default), it is
|
||||
set to !Py_NoSiteFlag. */
|
||||
int site_import;
|
||||
|
||||
/* Bytes warnings:
|
||||
|
||||
* If equal to 1, issue a warning when comparing bytes or bytearray with
|
||||
str or bytes with int.
|
||||
* If equal or greater to 2, issue an error.
|
||||
|
||||
Incremented by the -b command line option. If set to -1 (default), inherit
|
||||
Py_BytesWarningFlag value. */
|
||||
int bytes_warning;
|
||||
|
||||
/* If greater than 0, enable inspect: when a script is passed as first
|
||||
argument or the -c option is used, enter interactive mode after
|
||||
executing the script or the command, even when sys.stdin does not appear
|
||||
to be a terminal.
|
||||
|
||||
Incremented by the -i command line option. Set to 1 if the PYTHONINSPECT
|
||||
environment variable is non-empty. If set to -1 (default), inherit
|
||||
Py_InspectFlag value. */
|
||||
int warn_default_encoding;
|
||||
int inspect;
|
||||
|
||||
/* If greater than 0: enable the interactive mode (REPL).
|
||||
|
||||
Incremented by the -i command line option. If set to -1 (default),
|
||||
inherit Py_InteractiveFlag value. */
|
||||
int interactive;
|
||||
|
||||
/* Optimization level.
|
||||
|
||||
Incremented by the -O command line option. Set by the PYTHONOPTIMIZE
|
||||
environment variable. If set to -1 (default), inherit Py_OptimizeFlag
|
||||
value. */
|
||||
int optimization_level;
|
||||
|
||||
/* If greater than 0, enable the debug mode: turn on parser debugging
|
||||
output (for expert only, depending on compilation options).
|
||||
|
||||
Incremented by the -d command line option. Set by the PYTHONDEBUG
|
||||
environment variable. If set to -1 (default), inherit Py_DebugFlag
|
||||
value. */
|
||||
int parser_debug;
|
||||
|
||||
/* If equal to 0, Python won't try to write ``.pyc`` files on the
|
||||
import of source modules.
|
||||
|
||||
Set to 0 by the -B command line option and the PYTHONDONTWRITEBYTECODE
|
||||
environment variable. If set to -1 (default), it is set to
|
||||
!Py_DontWriteBytecodeFlag. */
|
||||
int write_bytecode;
|
||||
|
||||
/* If greater than 0, enable the verbose mode: print a message each time a
|
||||
module is initialized, showing the place (filename or built-in module)
|
||||
from which it is loaded.
|
||||
|
||||
If greater or equal to 2, print a message for each file that is checked
|
||||
for when searching for a module. Also provides information on module
|
||||
cleanup at exit.
|
||||
|
||||
Incremented by the -v option. Set by the PYTHONVERBOSE environment
|
||||
variable. If set to -1 (default), inherit Py_VerboseFlag value. */
|
||||
int verbose;
|
||||
|
||||
/* If greater than 0, enable the quiet mode: Don't display the copyright
|
||||
and version messages even in interactive mode.
|
||||
|
||||
Incremented by the -q option. If set to -1 (default), inherit
|
||||
Py_QuietFlag value. */
|
||||
int quiet;
|
||||
|
||||
/* If greater than 0, don't add the user site-packages directory to
|
||||
sys.path.
|
||||
|
||||
Set to 0 by the -s and -I command line options , and the PYTHONNOUSERSITE
|
||||
environment variable. If set to -1 (default), it is set to
|
||||
!Py_NoUserSiteDirectory. */
|
||||
int user_site_directory;
|
||||
|
||||
/* If non-zero, configure C standard steams (stdio, stdout,
|
||||
stderr):
|
||||
|
||||
- Set O_BINARY mode on Windows.
|
||||
- If buffered_stdio is equal to zero, make streams unbuffered.
|
||||
Otherwise, enable streams buffering if interactive is non-zero. */
|
||||
int configure_c_stdio;
|
||||
|
||||
/* If equal to 0, enable unbuffered mode: force the stdout and stderr
|
||||
streams to be unbuffered.
|
||||
|
||||
Set to 0 by the -u option. Set by the PYTHONUNBUFFERED environment
|
||||
variable.
|
||||
If set to -1 (default), it is set to !Py_UnbufferedStdioFlag. */
|
||||
int buffered_stdio;
|
||||
|
||||
/* Encoding of sys.stdin, sys.stdout and sys.stderr.
|
||||
Value set from PYTHONIOENCODING environment variable and
|
||||
Py_SetStandardStreamEncoding() function.
|
||||
See also 'stdio_errors' attribute. */
|
||||
wchar_t *stdio_encoding;
|
||||
|
||||
/* Error handler of sys.stdin and sys.stdout.
|
||||
Value set from PYTHONIOENCODING environment variable and
|
||||
Py_SetStandardStreamEncoding() function.
|
||||
See also 'stdio_encoding' attribute. */
|
||||
wchar_t *stdio_errors;
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
/* If greater than zero, use io.FileIO instead of WindowsConsoleIO for sys
|
||||
standard streams.
|
||||
|
||||
Set to 1 if the PYTHONLEGACYWINDOWSSTDIO environment variable is set to
|
||||
a non-empty string. If set to -1 (default), inherit
|
||||
Py_LegacyWindowsStdioFlag value.
|
||||
|
||||
See PEP 528 for more details. */
|
||||
int legacy_windows_stdio;
|
||||
#endif
|
||||
|
||||
/* Value of the --check-hash-based-pycs command line option:
|
||||
|
||||
- "default" means the 'check_source' flag in hash-based pycs
|
||||
determines invalidation
|
||||
- "always" causes the interpreter to hash the source file for
|
||||
invalidation regardless of value of 'check_source' bit
|
||||
- "never" causes the interpreter to always assume hash-based pycs are
|
||||
valid
|
||||
|
||||
The default value is "default".
|
||||
|
||||
See PEP 552 "Deterministic pycs" for more details. */
|
||||
wchar_t *check_hash_pycs_mode;
|
||||
|
||||
/* --- Path configuration inputs ------------ */
|
||||
|
||||
/* If greater than 0, suppress _PyPathConfig_Calculate() warnings on Unix.
|
||||
The parameter has no effect on Windows.
|
||||
|
||||
If set to -1 (default), inherit !Py_FrozenFlag value. */
|
||||
int pathconfig_warnings;
|
||||
|
||||
wchar_t *pythonpath_env; /* PYTHONPATH environment variable */
|
||||
wchar_t *home; /* PYTHONHOME environment variable,
|
||||
see also Py_SetPythonHome(). */
|
||||
wchar_t *program_name;
|
||||
wchar_t *pythonpath_env;
|
||||
wchar_t *home;
|
||||
wchar_t *platlibdir;
|
||||
|
||||
/* --- Path configuration outputs ----------- */
|
||||
|
||||
int module_search_paths_set; /* If non-zero, use module_search_paths */
|
||||
PyWideStringList module_search_paths; /* sys.path paths. Computed if
|
||||
module_search_paths_set is equal
|
||||
to zero. */
|
||||
|
||||
wchar_t *executable; /* sys.executable */
|
||||
wchar_t *base_executable; /* sys._base_executable */
|
||||
wchar_t *prefix; /* sys.prefix */
|
||||
wchar_t *base_prefix; /* sys.base_prefix */
|
||||
wchar_t *exec_prefix; /* sys.exec_prefix */
|
||||
wchar_t *base_exec_prefix; /* sys.base_exec_prefix */
|
||||
wchar_t *platlibdir; /* sys.platlibdir */
|
||||
int module_search_paths_set;
|
||||
PyWideStringList module_search_paths;
|
||||
wchar_t *executable;
|
||||
wchar_t *base_executable;
|
||||
wchar_t *prefix;
|
||||
wchar_t *base_prefix;
|
||||
wchar_t *exec_prefix;
|
||||
wchar_t *base_exec_prefix;
|
||||
|
||||
/* --- Parameter only used by Py_Main() ---------- */
|
||||
|
||||
/* Skip the first line of the source ('run_filename' parameter), allowing use of non-Unix forms of
|
||||
"#!cmd". This is intended for a DOS specific hack only.
|
||||
|
||||
Set by the -x command line option. */
|
||||
int skip_source_first_line;
|
||||
|
||||
wchar_t *run_command; /* -c command line argument */
|
||||
wchar_t *run_module; /* -m command line argument */
|
||||
wchar_t *run_filename; /* Trailing command line argument without -c or -m */
|
||||
wchar_t *run_command;
|
||||
wchar_t *run_module;
|
||||
wchar_t *run_filename;
|
||||
|
||||
/* --- Private fields ---------------------------- */
|
||||
|
||||
/* Install importlib? If set to 0, importlib is not initialized at all.
|
||||
Needed by freeze_importlib. */
|
||||
// Install importlib? If equals to 0, importlib is not initialized at all.
|
||||
// Needed by freeze_importlib.
|
||||
int _install_importlib;
|
||||
|
||||
/* If equal to 0, stop Python initialization before the "main" phase */
|
||||
// If equal to 0, stop Python initialization before the "main" phase.
|
||||
int _init_main;
|
||||
|
||||
/* If non-zero, disallow threads, subprocesses, and fork.
|
||||
Default: 0. */
|
||||
// If non-zero, disallow threads, subprocesses, and fork.
|
||||
// Default: 0.
|
||||
int _isolated_interpreter;
|
||||
|
||||
/* Original command line arguments. If _orig_argv is empty and _argv is
|
||||
not equal to [''], PyConfig_Read() copies the configuration 'argv' list
|
||||
into '_orig_argv' list before modifying 'argv' list (if parse_argv
|
||||
is non-zero).
|
||||
|
||||
_PyConfig_Write() initializes Py_GetArgcArgv() to this list. */
|
||||
PyWideStringList _orig_argv;
|
||||
} PyConfig;
|
||||
|
||||
PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config);
|
||||
@ -452,7 +239,7 @@ PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
|
||||
|
||||
/* Get the original command line arguments, before Python modified them.
|
||||
|
||||
See also PyConfig._orig_argv. */
|
||||
See also PyConfig.orig_argv. */
|
||||
PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Interpreter ID Object */
|
||||
|
||||
PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type;
|
||||
@ -13,7 +9,3 @@ PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type;
|
||||
PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t);
|
||||
PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *);
|
||||
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
PyObject_VAR_HEAD
|
||||
/* Vector of pointers to list elements. list[0] is ob_item[0], etc. */
|
||||
@ -30,14 +26,9 @@ PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);
|
||||
|
||||
/* Macro, trading safety for speed */
|
||||
|
||||
/* Cast argument to PyTupleObject* type. */
|
||||
/* Cast argument to PyListObject* type. */
|
||||
#define _PyList_CAST(op) (assert(PyList_Check(op)), (PyListObject *)(op))
|
||||
|
||||
#define PyList_GET_ITEM(op, i) (_PyList_CAST(op)->ob_item[i])
|
||||
#define PyList_SET_ITEM(op, i, v) (_PyList_CAST(op)->ob_item[i] = (v))
|
||||
#define PyList_SET_ITEM(op, i, v) ((void)(_PyList_CAST(op)->ob_item[i] = (v)))
|
||||
#define PyList_GET_SIZE(op) Py_SIZE(_PyList_CAST(op))
|
||||
#define _PyList_ITEMS(op) (_PyList_CAST(op)->ob_item)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(void) _Py_NewReference(PyObject *op);
|
||||
|
||||
#ifdef Py_TRACE_REFS
|
||||
@ -13,10 +9,6 @@ PyAPI_FUNC(void) _Py_NewReference(PyObject *op);
|
||||
PyAPI_FUNC(void) _Py_ForgetReference(PyObject *);
|
||||
#endif
|
||||
|
||||
/* Update the Python traceback of an object. This function must be called
|
||||
when a memory block is reused from a free list. */
|
||||
PyAPI_FUNC(int) _PyTraceMalloc_NewReference(PyObject *op);
|
||||
|
||||
#ifdef Py_REF_DEBUG
|
||||
PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void);
|
||||
#endif
|
||||
@ -43,14 +35,15 @@ PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void);
|
||||
_PyObject_{Get,Set,Has}AttrId are __getattr__ versions using _Py_Identifier*.
|
||||
*/
|
||||
typedef struct _Py_Identifier {
|
||||
struct _Py_Identifier *next;
|
||||
const char* string;
|
||||
PyObject *object;
|
||||
// Index in PyInterpreterState.unicode.ids.array. It is process-wide
|
||||
// unique and must be initialized to -1.
|
||||
Py_ssize_t index;
|
||||
} _Py_Identifier;
|
||||
|
||||
// ericf tweak: (visual studio 2019 chokes on this)
|
||||
#define _Py_static_string_init(value) {NULL, value, NULL }
|
||||
// #define _Py_static_string_init(value) { .next = NULL, .string = value, .object = NULL }
|
||||
#define _Py_static_string_init(value) {value, -1 }
|
||||
// #define _Py_static_string_init(value) { .string = value, .index = -1 }
|
||||
#define _Py_static_string(varname, value) static _Py_Identifier varname = _Py_static_string_init(value)
|
||||
#define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)
|
||||
|
||||
@ -177,10 +170,13 @@ typedef struct {
|
||||
objobjargproc mp_ass_subscript;
|
||||
} PyMappingMethods;
|
||||
|
||||
typedef PySendResult (*sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
|
||||
|
||||
typedef struct {
|
||||
unaryfunc am_await;
|
||||
unaryfunc am_aiter;
|
||||
unaryfunc am_anext;
|
||||
sendfunc am_send;
|
||||
} PyAsyncMethods;
|
||||
|
||||
typedef struct {
|
||||
@ -192,6 +188,8 @@ typedef struct {
|
||||
* backwards-compatibility */
|
||||
typedef Py_ssize_t printfunc;
|
||||
|
||||
// If this structure is modified, Doc/includes/typestruct.h should be updated
|
||||
// as well.
|
||||
struct _typeobject {
|
||||
PyObject_VAR_HEAD
|
||||
const char *tp_name; /* For printing, in format "<module>.<name>" */
|
||||
@ -251,6 +249,7 @@ struct _typeobject {
|
||||
struct PyMethodDef *tp_methods;
|
||||
struct PyMemberDef *tp_members;
|
||||
struct PyGetSetDef *tp_getset;
|
||||
// Strong reference on a heap type, borrowed reference on a static type
|
||||
struct _typeobject *tp_base;
|
||||
PyObject *tp_dict;
|
||||
descrgetfunc tp_descr_get;
|
||||
@ -306,6 +305,8 @@ PyAPI_FUNC(PyObject *) _PyObject_LookupSpecial(PyObject *, _Py_Identifier *);
|
||||
PyAPI_FUNC(PyTypeObject *) _PyType_CalculateMetaclass(PyTypeObject *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) _PyType_GetDocFromInternalDoc(const char *, const char *);
|
||||
PyAPI_FUNC(PyObject *) _PyType_GetTextSignatureFromInternalDoc(const char *, const char *);
|
||||
struct PyModuleDef;
|
||||
PyAPI_FUNC(PyObject *) _PyType_GetModuleByDef(PyTypeObject *, struct PyModuleDef *);
|
||||
|
||||
struct _Py_Identifier;
|
||||
PyAPI_FUNC(int) PyObject_Print(PyObject *, FILE *, int);
|
||||
@ -316,7 +317,6 @@ PyAPI_FUNC(int) _PyObject_IsFreed(PyObject *);
|
||||
PyAPI_FUNC(int) _PyObject_IsAbstract(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) _PyObject_GetAttrId(PyObject *, struct _Py_Identifier *);
|
||||
PyAPI_FUNC(int) _PyObject_SetAttrId(PyObject *, struct _Py_Identifier *, PyObject *);
|
||||
PyAPI_FUNC(int) _PyObject_HasAttrId(PyObject *, struct _Py_Identifier *);
|
||||
/* Replacements of PyObject_GetAttr() and _PyObject_GetAttrId() which
|
||||
don't raise AttributeError.
|
||||
|
||||
@ -521,6 +521,8 @@ struct _ts;
|
||||
/* Python 3.9 private API, invoked by the macros below. */
|
||||
PyAPI_FUNC(int) _PyTrash_begin(struct _ts *tstate, PyObject *op);
|
||||
PyAPI_FUNC(void) _PyTrash_end(struct _ts *tstate);
|
||||
/* Python 3.10 private API, invoked by the Py_TRASHCAN_BEGIN(). */
|
||||
PyAPI_FUNC(int) _PyTrash_cond(PyObject *op, destructor dealloc);
|
||||
|
||||
#define PyTrash_UNWIND_LEVEL 50
|
||||
|
||||
@ -530,7 +532,7 @@ PyAPI_FUNC(void) _PyTrash_end(struct _ts *tstate);
|
||||
/* If "cond" is false, then _tstate remains NULL and the deallocator \
|
||||
* is run normally without involving the trashcan */ \
|
||||
if (cond) { \
|
||||
_tstate = PyThreadState_GET(); \
|
||||
_tstate = PyThreadState_Get(); \
|
||||
if (_PyTrash_begin(_tstate, _PyObject_CAST(op))) { \
|
||||
break; \
|
||||
} \
|
||||
@ -544,13 +546,9 @@ PyAPI_FUNC(void) _PyTrash_end(struct _ts *tstate);
|
||||
|
||||
#define Py_TRASHCAN_BEGIN(op, dealloc) \
|
||||
Py_TRASHCAN_BEGIN_CONDITION(op, \
|
||||
Py_TYPE(op)->tp_dealloc == (destructor)(dealloc))
|
||||
_PyTrash_cond(_PyObject_CAST(op), (destructor)dealloc))
|
||||
|
||||
/* For backwards compatibility, these macros enable the trashcan
|
||||
* unconditionally */
|
||||
#define Py_TRASHCAN_SAFE_BEGIN(op) Py_TRASHCAN_BEGIN_CONDITION(op, 1)
|
||||
#define Py_TRASHCAN_SAFE_END(op) Py_TRASHCAN_END
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize )
|
||||
|
||||
/* _PyObject_VAR_SIZE returns the number of bytes (as size_t) allocated for a
|
||||
@ -41,8 +37,9 @@ extern "C" {
|
||||
PyObject *op;
|
||||
|
||||
op = (PyObject *) Your_Allocator(_PyObject_SIZE(YourTypeStruct));
|
||||
if (op == NULL)
|
||||
return PyErr_NoMemory();
|
||||
if (op == NULL) {
|
||||
return PyErr_NoMemory();
|
||||
}
|
||||
|
||||
PyObject_Init(op, &YourTypeStruct);
|
||||
|
||||
@ -55,40 +52,6 @@ extern "C" {
|
||||
the 1st step is performed automatically for you, so in a C++ class
|
||||
constructor you would start directly with PyObject_Init/InitVar. */
|
||||
|
||||
|
||||
/* Inline functions trading binary compatibility for speed:
|
||||
PyObject_INIT() is the fast version of PyObject_Init(), and
|
||||
PyObject_INIT_VAR() is the fast version of PyObject_InitVar().
|
||||
|
||||
These inline functions must not be called with op=NULL. */
|
||||
static inline PyObject*
|
||||
_PyObject_INIT(PyObject *op, PyTypeObject *typeobj)
|
||||
{
|
||||
assert(op != NULL);
|
||||
Py_SET_TYPE(op, typeobj);
|
||||
if (PyType_GetFlags(typeobj) & Py_TPFLAGS_HEAPTYPE) {
|
||||
Py_INCREF(typeobj);
|
||||
}
|
||||
_Py_NewReference(op);
|
||||
return op;
|
||||
}
|
||||
|
||||
#define PyObject_INIT(op, typeobj) \
|
||||
_PyObject_INIT(_PyObject_CAST(op), (typeobj))
|
||||
|
||||
static inline PyVarObject*
|
||||
_PyObject_INIT_VAR(PyVarObject *op, PyTypeObject *typeobj, Py_ssize_t size)
|
||||
{
|
||||
assert(op != NULL);
|
||||
Py_SET_SIZE(op, size);
|
||||
PyObject_INIT((PyObject *)op, typeobj);
|
||||
return op;
|
||||
}
|
||||
|
||||
#define PyObject_INIT_VAR(op, typeobj, size) \
|
||||
_PyObject_INIT_VAR(_PyVarObject_CAST(op), (typeobj), (size))
|
||||
|
||||
|
||||
/* This function returns the number of allocated memory blocks, regardless of size */
|
||||
PyAPI_FUNC(Py_ssize_t) _Py_GetAllocatedBlocks(void);
|
||||
|
||||
@ -116,10 +79,6 @@ PyAPI_FUNC(void) PyObject_GetArenaAllocator(PyObjectArenaAllocator *allocator);
|
||||
PyAPI_FUNC(void) PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator);
|
||||
|
||||
|
||||
PyAPI_FUNC(Py_ssize_t) _PyGC_CollectNoFail(void);
|
||||
PyAPI_FUNC(Py_ssize_t) _PyGC_CollectIfEnabled(void);
|
||||
|
||||
|
||||
/* Test if an object implements the garbage collector protocol */
|
||||
PyAPI_FUNC(int) PyObject_IS_GC(PyObject *obj);
|
||||
|
||||
@ -139,7 +98,3 @@ PyAPI_FUNC(PyObject *) _PyObject_GC_Calloc(size_t size);
|
||||
#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
|
||||
|
||||
PyAPI_FUNC(PyObject **) PyObject_GET_WEAKREFS_LISTPTR(PyObject *op);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Error objects */
|
||||
|
||||
/* PyException_HEAD defines the initial segment of every exception class. */
|
||||
@ -24,6 +20,8 @@ typedef struct {
|
||||
PyObject *filename;
|
||||
PyObject *lineno;
|
||||
PyObject *offset;
|
||||
PyObject *end_lineno;
|
||||
PyObject *end_offset;
|
||||
PyObject *text;
|
||||
PyObject *print_file_and_line;
|
||||
} PySyntaxErrorObject;
|
||||
@ -66,6 +64,17 @@ typedef struct {
|
||||
PyObject *value;
|
||||
} PyStopIterationObject;
|
||||
|
||||
typedef struct {
|
||||
PyException_HEAD
|
||||
PyObject *name;
|
||||
} PyNameErrorObject;
|
||||
|
||||
typedef struct {
|
||||
PyException_HEAD
|
||||
PyObject *obj;
|
||||
PyObject *name;
|
||||
} PyAttributeErrorObject;
|
||||
|
||||
/* Compatibility typedefs */
|
||||
typedef PyOSErrorObject PyEnvironmentErrorObject;
|
||||
#ifdef MS_WINDOWS
|
||||
@ -82,10 +91,6 @@ PyAPI_FUNC(void) _PyErr_GetExcInfo(PyThreadState *, PyObject **, PyObject **, Py
|
||||
|
||||
PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);
|
||||
|
||||
/* */
|
||||
|
||||
#define PyExceptionClass_Name(x) (((PyTypeObject*)(x))->tp_name)
|
||||
|
||||
/* Convenience functions */
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
@ -145,6 +150,13 @@ PyAPI_FUNC(void) PyErr_SyntaxLocationObject(
|
||||
int lineno,
|
||||
int col_offset);
|
||||
|
||||
PyAPI_FUNC(void) PyErr_RangedSyntaxLocationObject(
|
||||
PyObject *filename,
|
||||
int lineno,
|
||||
int col_offset,
|
||||
int end_lineno,
|
||||
int end_col_offset);
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyErr_ProgramTextObject(
|
||||
PyObject *filename,
|
||||
int lineno);
|
||||
@ -173,6 +185,12 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_Create(
|
||||
Py_ssize_t end,
|
||||
const char *reason /* UTF-8 encoded string */
|
||||
);
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PyErr_ProgramDecodedTextObject(
|
||||
PyObject *filename,
|
||||
int lineno,
|
||||
const char* encoding);
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PyUnicodeTranslateError_Create(
|
||||
PyObject *object,
|
||||
Py_ssize_t start,
|
||||
@ -194,7 +212,3 @@ PyAPI_FUNC(void) _Py_NO_RETURN _Py_FatalErrorFormat(
|
||||
...);
|
||||
|
||||
#define Py_FatalError(message) _Py_FatalErrorFunc(__func__, message)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* Py_FrozenMain is kept out of the Limited API until documented and present
|
||||
in all builds of Python */
|
||||
PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);
|
||||
|
||||
/* Only used by applications that embed the interpreter and need to
|
||||
* override the standard encoding determination mechanism
|
||||
@ -39,15 +39,11 @@ PyAPI_FUNC(int) Py_RunMain(void);
|
||||
|
||||
PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err);
|
||||
|
||||
/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
|
||||
* exit functions.
|
||||
*/
|
||||
PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(PyObject *), PyObject *);
|
||||
|
||||
/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
|
||||
PyAPI_FUNC(void) _Py_RestoreSignals(void);
|
||||
|
||||
PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
|
||||
PyAPI_FUNC(int) _Py_FdIsInteractive(FILE *fp, PyObject *filename);
|
||||
|
||||
PyAPI_FUNC(void) _Py_SetProgramFullPath(const wchar_t *);
|
||||
|
||||
@ -66,7 +62,3 @@ PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn);
|
||||
PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
|
||||
|
||||
PyAPI_FUNC(PyThreadState *) _Py_NewInterpreter(int isolated_subinterpreter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(void *) PyMem_RawMalloc(size_t size);
|
||||
PyAPI_FUNC(void *) PyMem_RawCalloc(size_t nelem, size_t elsize);
|
||||
PyAPI_FUNC(void *) PyMem_RawRealloc(void *ptr, size_t new_size);
|
||||
@ -14,8 +10,6 @@ PyAPI_FUNC(void) PyMem_RawFree(void *ptr);
|
||||
/* Try to get the allocators name set by _PyMem_SetupAllocators(). */
|
||||
PyAPI_FUNC(const char*) _PyMem_GetCurrentAllocatorName(void);
|
||||
|
||||
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
|
||||
|
||||
/* strdup() using PyMem_RawMalloc() */
|
||||
PyAPI_FUNC(char *) _PyMem_RawStrdup(const char *str);
|
||||
|
||||
@ -102,7 +96,3 @@ PyAPI_FUNC(void) PyMem_SetAllocator(PyMemAllocatorDomain domain,
|
||||
|
||||
The function does nothing if Python is not compiled is debug mode. */
|
||||
PyAPI_FUNC(void) PyMem_SetupDebugHooks(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,12 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cpython/initconfig.h"
|
||||
|
||||
PyAPI_FUNC(int) _PyInterpreterState_RequiresIDRef(PyInterpreterState *);
|
||||
PyAPI_FUNC(void) _PyInterpreterState_RequireIDRef(PyInterpreterState *, int);
|
||||
|
||||
@ -33,6 +27,21 @@ typedef int (*Py_tracefunc)(PyObject *, PyFrameObject *, int, PyObject *);
|
||||
#define PyTrace_OPCODE 7
|
||||
|
||||
|
||||
typedef struct _cframe {
|
||||
/* This struct will be threaded through the C stack
|
||||
* allowing fast access to per-thread state that needs
|
||||
* to be accessed quickly by the interpreter, but can
|
||||
* be modified outside of the interpreter.
|
||||
*
|
||||
* WARNING: This makes data on the C stack accessible from
|
||||
* heap objects. Care must be taken to maintain stack
|
||||
* discipline and make sure that instances of this struct cannot
|
||||
* accessed outside of their lifetime.
|
||||
*/
|
||||
int use_tracing;
|
||||
struct _cframe *previous;
|
||||
} CFrame;
|
||||
|
||||
typedef struct _err_stackitem {
|
||||
/* This struct represents an entry on the exception stack, which is a
|
||||
* per-coroutine state. (Coroutine in the computer science sense,
|
||||
@ -58,17 +67,17 @@ struct _ts {
|
||||
/* Borrowed reference to the current frame (it can be NULL) */
|
||||
PyFrameObject *frame;
|
||||
int recursion_depth;
|
||||
char overflowed; /* The stack has overflowed. Allow 50 more calls
|
||||
to handle the runtime error. */
|
||||
char recursion_critical; /* The current calls must not cause
|
||||
a stack overflow. */
|
||||
int recursion_headroom; /* Allow 50 more calls to handle any errors. */
|
||||
int stackcheck_counter;
|
||||
|
||||
/* 'tracing' keeps track of the execution depth when tracing/profiling.
|
||||
This is to prevent the actual trace/profile code from being recorded in
|
||||
the trace/profile. */
|
||||
int tracing;
|
||||
int use_tracing;
|
||||
|
||||
/* Pointer to current CFrame in the C stack frame of the currently,
|
||||
* or most recently, executing _PyEval_EvalFrameDefault. */
|
||||
CFrame *cframe;
|
||||
|
||||
Py_tracefunc c_profilefunc;
|
||||
Py_tracefunc c_tracefunc;
|
||||
@ -136,6 +145,8 @@ struct _ts {
|
||||
/* Unique thread state id. */
|
||||
uint64_t id;
|
||||
|
||||
CFrame root_cframe;
|
||||
|
||||
/* XXX signal handlers should also be here */
|
||||
|
||||
};
|
||||
@ -173,6 +184,11 @@ PyAPI_FUNC(PyInterpreterState *) _PyGILState_GetInterpreterStateUnsafe(void);
|
||||
*/
|
||||
PyAPI_FUNC(PyObject *) _PyThread_CurrentFrames(void);
|
||||
|
||||
/* The implementation of sys._current_exceptions() Returns a dict mapping
|
||||
thread id to that thread's current exception.
|
||||
*/
|
||||
PyAPI_FUNC(PyObject *) _PyThread_CurrentExceptions(void);
|
||||
|
||||
/* Routines for advanced debuggers, requested by David Beazley.
|
||||
Don't use unless you know what you are doing! */
|
||||
PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_Main(void);
|
||||
@ -194,7 +210,37 @@ PyAPI_FUNC(void) _PyInterpreterState_SetEvalFrameFunc(
|
||||
|
||||
PyAPI_FUNC(const PyConfig*) _PyInterpreterState_GetConfig(PyInterpreterState *interp);
|
||||
|
||||
// Get the configuration of the currrent interpreter.
|
||||
/* Get a copy of the current interpreter configuration.
|
||||
|
||||
Return 0 on success. Raise an exception and return -1 on error.
|
||||
|
||||
The caller must initialize 'config', using PyConfig_InitPythonConfig()
|
||||
for example.
|
||||
|
||||
Python must be preinitialized to call this method.
|
||||
The caller must hold the GIL. */
|
||||
PyAPI_FUNC(int) _PyInterpreterState_GetConfigCopy(
|
||||
struct PyConfig *config);
|
||||
|
||||
/* Set the configuration of the current interpreter.
|
||||
|
||||
This function should be called during or just after the Python
|
||||
initialization.
|
||||
|
||||
Update the sys module with the new configuration. If the sys module was
|
||||
modified directly after the Python initialization, these changes are lost.
|
||||
|
||||
Some configuration like faulthandler or warnoptions can be updated in the
|
||||
configuration, but don't reconfigure Python (don't enable/disable
|
||||
faulthandler and don't reconfigure warnings filters).
|
||||
|
||||
Return 0 on success. Raise an exception and return -1 on error.
|
||||
|
||||
The configuration should come from _PyInterpreterState_GetConfigCopy(). */
|
||||
PyAPI_FUNC(int) _PyInterpreterState_SetConfig(
|
||||
const struct PyConfig *config);
|
||||
|
||||
// Get the configuration of the current interpreter.
|
||||
// The caller must hold the GIL.
|
||||
PyAPI_FUNC(const PyConfig*) _Py_GetConfig(void);
|
||||
|
||||
@ -257,7 +303,3 @@ typedef int (*crossinterpdatafunc)(PyObject *, struct _xid *);
|
||||
|
||||
PyAPI_FUNC(int) _PyCrossInterpreterData_RegisterClass(PyTypeObject *, crossinterpdatafunc);
|
||||
PyAPI_FUNC(crossinterpdatafunc) _PyCrossInterpreterData_Lookup(PyObject *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
121
src/external/windows/include/python/cpython/pythonrun.h
vendored
Executable file
121
src/external/windows/include/python/cpython/pythonrun.h
vendored
Executable file
@ -0,0 +1,121 @@
|
||||
#ifndef Py_CPYTHON_PYTHONRUN_H
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
|
||||
PyAPI_FUNC(int) _PyRun_SimpleFileObject(
|
||||
FILE *fp,
|
||||
PyObject *filename,
|
||||
int closeit,
|
||||
PyCompilerFlags *flags);
|
||||
PyAPI_FUNC(int) PyRun_AnyFileExFlags(
|
||||
FILE *fp,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
int closeit,
|
||||
PyCompilerFlags *flags);
|
||||
PyAPI_FUNC(int) _PyRun_AnyFileObject(
|
||||
FILE *fp,
|
||||
PyObject *filename,
|
||||
int closeit,
|
||||
PyCompilerFlags *flags);
|
||||
PyAPI_FUNC(int) PyRun_SimpleFileExFlags(
|
||||
FILE *fp,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
int closeit,
|
||||
PyCompilerFlags *flags);
|
||||
PyAPI_FUNC(int) PyRun_InteractiveOneFlags(
|
||||
FILE *fp,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
PyCompilerFlags *flags);
|
||||
PyAPI_FUNC(int) PyRun_InteractiveOneObject(
|
||||
FILE *fp,
|
||||
PyObject *filename,
|
||||
PyCompilerFlags *flags);
|
||||
PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(
|
||||
FILE *fp,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
PyCompilerFlags *flags);
|
||||
PyAPI_FUNC(int) _PyRun_InteractiveLoopObject(
|
||||
FILE *fp,
|
||||
PyObject *filename,
|
||||
PyCompilerFlags *flags);
|
||||
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
|
||||
PyObject *, PyCompilerFlags *);
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyRun_FileExFlags(
|
||||
FILE *fp,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
int start,
|
||||
PyObject *globals,
|
||||
PyObject *locals,
|
||||
int closeit,
|
||||
PyCompilerFlags *flags);
|
||||
|
||||
|
||||
PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
|
||||
const char *str,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
int start,
|
||||
PyCompilerFlags *flags,
|
||||
int optimize);
|
||||
PyAPI_FUNC(PyObject *) Py_CompileStringObject(
|
||||
const char *str,
|
||||
PyObject *filename, int start,
|
||||
PyCompilerFlags *flags,
|
||||
int optimize);
|
||||
|
||||
#define Py_CompileString(str, p, s) Py_CompileStringExFlags(str, p, s, NULL, -1)
|
||||
#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags(str, p, s, f, -1)
|
||||
|
||||
|
||||
PyAPI_FUNC(const char *) _Py_SourceAsString(
|
||||
PyObject *cmd,
|
||||
const char *funcname,
|
||||
const char *what,
|
||||
PyCompilerFlags *cf,
|
||||
PyObject **cmd_copy);
|
||||
|
||||
|
||||
/* A function flavor is also exported by libpython. It is required when
|
||||
libpython is accessed directly rather than using header files which defines
|
||||
macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to
|
||||
export functions in pythonXX.dll. */
|
||||
PyAPI_FUNC(PyObject *) PyRun_String(const char *str, int s, PyObject *g, PyObject *l);
|
||||
PyAPI_FUNC(int) PyRun_AnyFile(FILE *fp, const char *name);
|
||||
PyAPI_FUNC(int) PyRun_AnyFileEx(FILE *fp, const char *name, int closeit);
|
||||
PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
|
||||
PyAPI_FUNC(int) PyRun_SimpleString(const char *s);
|
||||
PyAPI_FUNC(int) PyRun_SimpleFile(FILE *f, const char *p);
|
||||
PyAPI_FUNC(int) PyRun_SimpleFileEx(FILE *f, const char *p, int c);
|
||||
PyAPI_FUNC(int) PyRun_InteractiveOne(FILE *f, const char *p);
|
||||
PyAPI_FUNC(int) PyRun_InteractiveLoop(FILE *f, const char *p);
|
||||
PyAPI_FUNC(PyObject *) PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l);
|
||||
PyAPI_FUNC(PyObject *) PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c);
|
||||
PyAPI_FUNC(PyObject *) PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, PyCompilerFlags *flags);
|
||||
|
||||
/* Use macros for a bunch of old variants */
|
||||
#define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL)
|
||||
#define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags(fp, name, 0, NULL)
|
||||
#define PyRun_AnyFileEx(fp, name, closeit) \
|
||||
PyRun_AnyFileExFlags(fp, name, closeit, NULL)
|
||||
#define PyRun_AnyFileFlags(fp, name, flags) \
|
||||
PyRun_AnyFileExFlags(fp, name, 0, flags)
|
||||
#define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL)
|
||||
#define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags(f, p, 0, NULL)
|
||||
#define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags(f, p, c, NULL)
|
||||
#define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags(f, p, NULL)
|
||||
#define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags(f, p, NULL)
|
||||
#define PyRun_File(fp, p, s, g, l) \
|
||||
PyRun_FileExFlags(fp, p, s, g, l, 0, NULL)
|
||||
#define PyRun_FileEx(fp, p, s, g, l, c) \
|
||||
PyRun_FileExFlags(fp, p, s, g, l, c, NULL)
|
||||
#define PyRun_FileFlags(fp, p, s, g, l, flags) \
|
||||
PyRun_FileExFlags(fp, p, s, g, l, 0, flags)
|
||||
|
||||
|
||||
/* Stuff with no proper home (yet) */
|
||||
PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *);
|
||||
PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
|
||||
PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *);
|
||||
@ -2,9 +2,6 @@
|
||||
#ifndef Py_PYTIME_H
|
||||
#define Py_PYTIME_H
|
||||
|
||||
#include "pyconfig.h" /* include for defines */
|
||||
#include "object.h"
|
||||
|
||||
/**************************************************************************
|
||||
Symbols and macros to supply platform-independent interfaces to time related
|
||||
functions and constants
|
||||
@ -91,13 +88,13 @@ PyAPI_FUNC(_PyTime_t) _PyTime_FromNanoseconds(_PyTime_t ns);
|
||||
PyAPI_FUNC(int) _PyTime_FromNanosecondsObject(_PyTime_t *t,
|
||||
PyObject *obj);
|
||||
|
||||
/* Convert a number of seconds (Python float or int) to a timetamp.
|
||||
/* Convert a number of seconds (Python float or int) to a timestamp.
|
||||
Raise an exception and return -1 on error, return 0 on success. */
|
||||
PyAPI_FUNC(int) _PyTime_FromSecondsObject(_PyTime_t *t,
|
||||
PyObject *obj,
|
||||
_PyTime_round_t round);
|
||||
|
||||
/* Convert a number of milliseconds (Python float or int, 10^-3) to a timetamp.
|
||||
/* Convert a number of milliseconds (Python float or int, 10^-3) to a timestamp.
|
||||
Raise an exception and return -1 on error, return 0 on success. */
|
||||
PyAPI_FUNC(int) _PyTime_FromMillisecondsObject(_PyTime_t *t,
|
||||
PyObject *obj,
|
||||
@ -164,22 +161,6 @@ PyAPI_FUNC(_PyTime_t) _PyTime_MulDiv(_PyTime_t ticks,
|
||||
_PyTime_t mul,
|
||||
_PyTime_t div);
|
||||
|
||||
/* Get the current time from the system clock.
|
||||
|
||||
The function cannot fail. _PyTime_Init() ensures that the system clock
|
||||
works. */
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_GetSystemClock(void);
|
||||
|
||||
/* Get the time of a monotonic clock, i.e. a clock that cannot go backwards.
|
||||
The clock is not affected by system clock updates. The reference point of
|
||||
the returned value is undefined, so that only the difference between the
|
||||
results of consecutive calls is valid.
|
||||
|
||||
The function cannot fail. _PyTime_Init() ensures that a monotonic clock
|
||||
is available and works. */
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_GetMonotonicClock(void);
|
||||
|
||||
|
||||
/* Structure used by time.get_clock_info() */
|
||||
typedef struct {
|
||||
const char *implementation;
|
||||
@ -189,13 +170,34 @@ typedef struct {
|
||||
} _Py_clock_info_t;
|
||||
|
||||
/* Get the current time from the system clock.
|
||||
* Fill clock information if info is not NULL.
|
||||
* Raise an exception and return -1 on error, return 0 on success.
|
||||
|
||||
If the internal clock fails, silently ignore the error and return 0.
|
||||
On integer overflow, silently ignore the overflow and truncated the clock to
|
||||
_PyTime_MIN or _PyTime_MAX.
|
||||
|
||||
Use _PyTime_GetSystemClockWithInfo() to check for failure. */
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_GetSystemClock(void);
|
||||
|
||||
/* Get the current time from the system clock.
|
||||
* On success, set *t and *info (if not NULL), and return 0.
|
||||
* On error, raise an exception and return -1.
|
||||
*/
|
||||
PyAPI_FUNC(int) _PyTime_GetSystemClockWithInfo(
|
||||
_PyTime_t *t,
|
||||
_Py_clock_info_t *info);
|
||||
|
||||
/* Get the time of a monotonic clock, i.e. a clock that cannot go backwards.
|
||||
The clock is not affected by system clock updates. The reference point of
|
||||
the returned value is undefined, so that only the difference between the
|
||||
results of consecutive calls is valid.
|
||||
|
||||
If the internal clock fails, silently ignore the error and return 0.
|
||||
On integer overflow, silently ignore the overflow and truncated the clock to
|
||||
_PyTime_MIN or _PyTime_MAX.
|
||||
|
||||
Use _PyTime_GetMonotonicClockWithInfo() to check for failure. */
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_GetMonotonicClock(void);
|
||||
|
||||
/* Get the time of a monotonic clock, i.e. a clock that cannot go backwards.
|
||||
The clock is not affected by system clock updates. The reference point of
|
||||
the returned value is undefined, so that only the difference between the
|
||||
@ -209,10 +211,6 @@ PyAPI_FUNC(int) _PyTime_GetMonotonicClockWithInfo(
|
||||
_Py_clock_info_t *info);
|
||||
|
||||
|
||||
/* Initialize time.
|
||||
Return 0 on success, raise an exception and return -1 on error. */
|
||||
PyAPI_FUNC(int) _PyTime_Init(void);
|
||||
|
||||
/* Converts a timestamp to the Gregorian time, using the local time zone.
|
||||
Return 0 on success, raise an exception and return -1 on error. */
|
||||
PyAPI_FUNC(int) _PyTime_localtime(time_t t, struct tm *tm);
|
||||
@ -224,8 +222,11 @@ PyAPI_FUNC(int) _PyTime_gmtime(time_t t, struct tm *tm);
|
||||
/* Get the performance counter: clock with the highest available resolution to
|
||||
measure a short duration.
|
||||
|
||||
The function cannot fail. _PyTime_Init() ensures that the system clock
|
||||
works. */
|
||||
If the internal clock fails, silently ignore the error and return 0.
|
||||
On integer overflow, silently ignore the overflow and truncated the clock to
|
||||
_PyTime_MIN or _PyTime_MAX.
|
||||
|
||||
Use _PyTime_GetPerfCounterWithInfo() to check for failure. */
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_GetPerfCounter(void);
|
||||
|
||||
/* Get the performance counter: clock with the highest available resolution to
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PySys_GetObjectId(_Py_Identifier *key);
|
||||
PyAPI_FUNC(int) _PySys_SetObjectId(_Py_Identifier *key, PyObject *);
|
||||
|
||||
@ -18,7 +14,3 @@ PyAPI_FUNC(int) PySys_Audit(
|
||||
const char *argFormat,
|
||||
...);
|
||||
PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _traceback {
|
||||
PyObject_HEAD
|
||||
struct _traceback *tb_next;
|
||||
@ -16,7 +12,3 @@ typedef struct _traceback {
|
||||
|
||||
PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int);
|
||||
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
PyObject_VAR_HEAD
|
||||
/* ob_item contains space for 'ob_size' elements.
|
||||
@ -27,10 +23,6 @@ PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *);
|
||||
#define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i])
|
||||
|
||||
/* Macro, *only* to be used to fill in brand new tuples */
|
||||
#define PyTuple_SET_ITEM(op, i, v) (_PyTuple_CAST(op)->ob_item[i] = v)
|
||||
#define PyTuple_SET_ITEM(op, i, v) ((void)(_PyTuple_CAST(op)->ob_item[i] = v))
|
||||
|
||||
PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
# error "this header file must not be included directly"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Py_UNICODE was the native Unicode storage format (code unit) used by
|
||||
Python and represents a single Unicode element in the Unicode type.
|
||||
With PEP 393, Py_UNICODE is deprecated and replaced with a
|
||||
@ -15,6 +11,10 @@ extern "C" {
|
||||
|
||||
/* --- Internal Unicode Operations ---------------------------------------- */
|
||||
|
||||
#ifndef USE_UNICODE_WCHAR_CACHE
|
||||
# define USE_UNICODE_WCHAR_CACHE 1
|
||||
#endif /* USE_UNICODE_WCHAR_CACHE */
|
||||
|
||||
/* Since splitting on whitespace is an important use case, and
|
||||
whitespace in most situations is solely ASCII whitespace, we
|
||||
optimize for the common case by using a quick look-up table
|
||||
@ -416,7 +416,7 @@ enum PyUnicode_Kind {
|
||||
|
||||
|
||||
/* Fast check to determine whether an object is ready. Equivalent to
|
||||
PyUnicode_IS_COMPACT(op) || ((PyUnicodeObject*)(op))->data.any) */
|
||||
PyUnicode_IS_COMPACT(op) || ((PyUnicodeObject*)(op))->data.any */
|
||||
|
||||
#define PyUnicode_IS_READY(op) (((PyASCIIObject*)op)->state.ready)
|
||||
|
||||
@ -583,7 +583,7 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
|
||||
|
||||
/* Similar to PyUnicode_AsUnicode(), but raises a ValueError if the string
|
||||
contains null characters. */
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(const Py_UNICODE *) _PyUnicode_AsUnicode(
|
||||
PyAPI_FUNC(const Py_UNICODE *) _PyUnicode_AsUnicode(
|
||||
PyObject *unicode /* Unicode object */
|
||||
);
|
||||
|
||||
@ -597,9 +597,6 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicodeAndSize(
|
||||
Py_ssize_t *size /* location where to save the length */
|
||||
);
|
||||
|
||||
/* Get the maximum ordinal for a Unicode character. */
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE) PyUnicode_GetMax(void);
|
||||
|
||||
|
||||
/* --- _PyUnicodeWriter API ----------------------------------------------- */
|
||||
|
||||
@ -729,26 +726,6 @@ PyAPI_FUNC(int) _PyUnicode_FormatAdvancedWriter(
|
||||
|
||||
/* --- Manage the default encoding ---------------------------------------- */
|
||||
|
||||
/* Returns a pointer to the default encoding (UTF-8) of the
|
||||
Unicode object unicode and the size of the encoded representation
|
||||
in bytes stored in *size.
|
||||
|
||||
In case of an error, no *size is set.
|
||||
|
||||
This function caches the UTF-8 encoded string in the unicodeobject
|
||||
and subsequent calls will return the same string. The memory is released
|
||||
when the unicodeobject is deallocated.
|
||||
|
||||
_PyUnicode_AsStringAndSize is a #define for PyUnicode_AsUTF8AndSize to
|
||||
support the previous internal function with the same behaviour.
|
||||
*/
|
||||
|
||||
PyAPI_FUNC(const char *) PyUnicode_AsUTF8AndSize(
|
||||
PyObject *unicode,
|
||||
Py_ssize_t *size);
|
||||
|
||||
#define _PyUnicode_AsStringAndSize PyUnicode_AsUTF8AndSize
|
||||
|
||||
/* Returns a pointer to the default encoding (UTF-8) of the
|
||||
Unicode object unicode.
|
||||
|
||||
@ -857,12 +834,21 @@ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF16(
|
||||
|
||||
/* --- Unicode-Escape Codecs ---------------------------------------------- */
|
||||
|
||||
/* Helper for PyUnicode_DecodeUnicodeEscape that detects invalid escape
|
||||
chars. */
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscape(
|
||||
/* Variant of PyUnicode_DecodeUnicodeEscape that supports partial decoding. */
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeStateful(
|
||||
const char *string, /* Unicode-Escape encoded string */
|
||||
Py_ssize_t length, /* size of string */
|
||||
const char *errors, /* error handling */
|
||||
Py_ssize_t *consumed /* bytes consumed */
|
||||
);
|
||||
|
||||
/* Helper for PyUnicode_DecodeUnicodeEscape that detects invalid escape
|
||||
chars. */
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeInternal(
|
||||
const char *string, /* Unicode-Escape encoded string */
|
||||
Py_ssize_t length, /* size of string */
|
||||
const char *errors, /* error handling */
|
||||
Py_ssize_t *consumed, /* bytes consumed */
|
||||
const char **first_invalid_escape /* on return, points to first
|
||||
invalid escaped char in
|
||||
string. */
|
||||
@ -880,6 +866,14 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeRawUnicodeEscape(
|
||||
Py_ssize_t length /* Number of Py_UNICODE chars to encode */
|
||||
);
|
||||
|
||||
/* Variant of PyUnicode_DecodeRawUnicodeEscape that supports partial decoding. */
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_DecodeRawUnicodeEscapeStateful(
|
||||
const char *string, /* Unicode-Escape encoded string */
|
||||
Py_ssize_t length, /* size of string */
|
||||
const char *errors, /* error handling */
|
||||
Py_ssize_t *consumed /* bytes consumed */
|
||||
);
|
||||
|
||||
/* --- Latin-1 Codecs ----------------------------------------------------- */
|
||||
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_AsLatin1String(
|
||||
@ -1160,53 +1154,8 @@ PyAPI_FUNC(int) _PyUnicode_IsAlpha(
|
||||
Py_UCS4 ch /* Unicode character */
|
||||
);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(size_t) Py_UNICODE_strlen(
|
||||
const Py_UNICODE *u
|
||||
);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strcpy(
|
||||
Py_UNICODE *s1,
|
||||
const Py_UNICODE *s2);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strcat(
|
||||
Py_UNICODE *s1, const Py_UNICODE *s2);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strncpy(
|
||||
Py_UNICODE *s1,
|
||||
const Py_UNICODE *s2,
|
||||
size_t n);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(int) Py_UNICODE_strcmp(
|
||||
const Py_UNICODE *s1,
|
||||
const Py_UNICODE *s2
|
||||
);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(int) Py_UNICODE_strncmp(
|
||||
const Py_UNICODE *s1,
|
||||
const Py_UNICODE *s2,
|
||||
size_t n
|
||||
);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strchr(
|
||||
const Py_UNICODE *s,
|
||||
Py_UNICODE c
|
||||
);
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strrchr(
|
||||
const Py_UNICODE *s,
|
||||
Py_UNICODE c
|
||||
);
|
||||
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_FormatLong(PyObject *, int, int, int);
|
||||
|
||||
/* Create a copy of a unicode string ending with a nul character. Return NULL
|
||||
and raise a MemoryError exception on memory allocation failure, otherwise
|
||||
return a new allocated buffer (use PyMem_Free() to free the buffer). */
|
||||
|
||||
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) PyUnicode_AsUnicodeCopy(
|
||||
PyObject *unicode
|
||||
);
|
||||
|
||||
/* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
|
||||
PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*);
|
||||
|
||||
@ -1214,8 +1163,7 @@ PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*);
|
||||
and where the hash values are equal (i.e. a very probable match) */
|
||||
PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *);
|
||||
|
||||
PyAPI_FUNC(Py_ssize_t) _PyUnicode_ScanIdentifier(PyObject *);
|
||||
PyAPI_FUNC(int) _PyUnicode_WideCharString_Converter(PyObject *, void *);
|
||||
PyAPI_FUNC(int) _PyUnicode_WideCharString_Opt_Converter(PyObject *, void *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
PyAPI_FUNC(Py_ssize_t) _PyUnicode_ScanIdentifier(PyObject *);
|
||||
|
||||
@ -115,6 +115,10 @@ typedef struct
|
||||
|
||||
|
||||
/* Apply for date and datetime instances. */
|
||||
|
||||
// o is a pointer to a time or a datetime object.
|
||||
#define _PyDateTime_HAS_TZINFO(o) (((_PyDateTime_BaseTZInfo *)(o))->hastzinfo)
|
||||
|
||||
#define PyDateTime_GET_YEAR(o) ((((PyDateTime_Date*)o)->data[0] << 8) | \
|
||||
((PyDateTime_Date*)o)->data[1])
|
||||
#define PyDateTime_GET_MONTH(o) (((PyDateTime_Date*)o)->data[2])
|
||||
@ -128,6 +132,8 @@ typedef struct
|
||||
(((PyDateTime_DateTime*)o)->data[8] << 8) | \
|
||||
((PyDateTime_DateTime*)o)->data[9])
|
||||
#define PyDateTime_DATE_GET_FOLD(o) (((PyDateTime_DateTime*)o)->fold)
|
||||
#define PyDateTime_DATE_GET_TZINFO(o) (_PyDateTime_HAS_TZINFO(o) ? \
|
||||
((PyDateTime_DateTime *)(o))->tzinfo : Py_None)
|
||||
|
||||
/* Apply for time instances. */
|
||||
#define PyDateTime_TIME_GET_HOUR(o) (((PyDateTime_Time*)o)->data[0])
|
||||
@ -138,6 +144,8 @@ typedef struct
|
||||
(((PyDateTime_Time*)o)->data[4] << 8) | \
|
||||
((PyDateTime_Time*)o)->data[5])
|
||||
#define PyDateTime_TIME_GET_FOLD(o) (((PyDateTime_Time*)o)->fold)
|
||||
#define PyDateTime_TIME_GET_TZINFO(o) (_PyDateTime_HAS_TZINFO(o) ? \
|
||||
((PyDateTime_Time *)(o))->tzinfo : Py_None)
|
||||
|
||||
/* Apply for time delta instances */
|
||||
#define PyDateTime_DELTA_GET_DAYS(o) (((PyDateTime_Delta*)o)->days)
|
||||
|
||||
@ -93,7 +93,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *,
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
|
||||
struct wrapperbase *, void *);
|
||||
#define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL)
|
||||
PyAPI_FUNC(int) PyDescr_IsData(PyObject *);
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *);
|
||||
|
||||
@ -57,6 +57,9 @@ PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d,
|
||||
PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key);
|
||||
PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
|
||||
PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key);
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
|
||||
PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
|
||||
#endif
|
||||
|
||||
/* Dictionary (keys, values, items) views */
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ extern "C" {
|
||||
#define E_EOLS 24 /* EOL in single-quoted string */
|
||||
#define E_LINECONT 25 /* Unexpected characters after a line continuation */
|
||||
#define E_BADSINGLE 27 /* Ill-formed single statement input */
|
||||
#define E_INTERACT_STOP 28 /* Interactive mode stopped tokenization */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
10
src/external/windows/include/python/eval.h
vendored
10
src/external/windows/include/python/eval.h
vendored
@ -18,16 +18,6 @@ PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
|
||||
PyObject *kwdefs, PyObject *closure);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(PyObject *) _PyEval_EvalCodeWithName(
|
||||
PyObject *co,
|
||||
PyObject *globals, PyObject *locals,
|
||||
PyObject *const *args, Py_ssize_t argcount,
|
||||
PyObject *const *kwnames, PyObject *const *kwargs,
|
||||
Py_ssize_t kwcount, int kwstep,
|
||||
PyObject *const *defs, Py_ssize_t defcount,
|
||||
PyObject *kwdefs, PyObject *closure,
|
||||
PyObject *name, PyObject *qualname);
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args);
|
||||
#endif
|
||||
|
||||
|
||||
@ -12,10 +12,6 @@ PyAPI_FUNC(wchar_t *) Py_DecodeLocale(
|
||||
PyAPI_FUNC(char*) Py_EncodeLocale(
|
||||
const wchar_t *text,
|
||||
size_t *error_pos);
|
||||
|
||||
PyAPI_FUNC(char*) _Py_EncodeLocaleRaw(
|
||||
const wchar_t *text,
|
||||
size_t *error_pos);
|
||||
#endif
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
|
||||
26
src/external/windows/include/python/funcobject.h
vendored
26
src/external/windows/include/python/funcobject.h
vendored
@ -7,6 +7,21 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define COMMON_FIELDS(PREFIX) \
|
||||
PyObject *PREFIX ## globals; \
|
||||
PyObject *PREFIX ## builtins; \
|
||||
PyObject *PREFIX ## name; \
|
||||
PyObject *PREFIX ## qualname; \
|
||||
PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ \
|
||||
PyObject *PREFIX ## defaults; /* NULL or a tuple */ \
|
||||
PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ \
|
||||
PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */
|
||||
|
||||
typedef struct {
|
||||
COMMON_FIELDS(fc_)
|
||||
} PyFrameConstructor;
|
||||
|
||||
/* Function objects and code objects should not be confused with each other:
|
||||
*
|
||||
* Function objects are created by the execution of the 'def' statement.
|
||||
@ -20,18 +35,12 @@ extern "C" {
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
PyObject *func_code; /* A code object, the __code__ attribute */
|
||||
PyObject *func_globals; /* A dictionary (other mappings won't do) */
|
||||
PyObject *func_defaults; /* NULL or a tuple */
|
||||
PyObject *func_kwdefaults; /* NULL or a dict */
|
||||
PyObject *func_closure; /* NULL or a tuple of cell objects */
|
||||
COMMON_FIELDS(func_)
|
||||
PyObject *func_doc; /* The __doc__ attribute, can be anything */
|
||||
PyObject *func_name; /* The __name__ attribute, a string object */
|
||||
PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */
|
||||
PyObject *func_weakreflist; /* List of weak references */
|
||||
PyObject *func_module; /* The __module__ attribute, can be anything */
|
||||
PyObject *func_annotations; /* Annotations, a dict or NULL */
|
||||
PyObject *func_qualname; /* The qualified name */
|
||||
vectorcallfunc vectorcall;
|
||||
|
||||
/* Invariant:
|
||||
@ -84,6 +93,9 @@ PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall(
|
||||
#define PyFunction_GET_ANNOTATIONS(func) \
|
||||
(((PyFunctionObject *)func) -> func_annotations)
|
||||
|
||||
#define PyFunction_AS_FRAME_CONSTRUCTOR(func) \
|
||||
((PyFrameConstructor *)&((PyFunctionObject *)(func))->func_globals)
|
||||
|
||||
/* The classmethod and staticmethod types lives here, too */
|
||||
PyAPI_DATA(PyTypeObject) PyClassMethod_Type;
|
||||
PyAPI_DATA(PyTypeObject) PyStaticMethod_Type;
|
||||
|
||||
@ -9,6 +9,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "pystate.h" /* _PyErr_StackItem */
|
||||
#include "abstract.h" /* PySendResult */
|
||||
|
||||
/* _PyGenObject_HEAD defines the initial segment of generator
|
||||
and coroutine objects. */
|
||||
@ -16,8 +17,6 @@ extern "C" {
|
||||
PyObject_HEAD \
|
||||
/* Note: gi_frame can be NULL if the generator is "finished" */ \
|
||||
PyFrameObject *prefix##_frame; \
|
||||
/* True if generator is being executed. */ \
|
||||
char prefix##_running; \
|
||||
/* The code object backing the generator */ \
|
||||
PyObject *prefix##_code; \
|
||||
/* List of weak reference. */ \
|
||||
@ -43,7 +42,6 @@ PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(PyFrameObject *,
|
||||
PyObject *name, PyObject *qualname);
|
||||
PyAPI_FUNC(int) _PyGen_SetStopIterationValue(PyObject *);
|
||||
PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **);
|
||||
PyAPI_FUNC(PyObject *) _PyGen_Send(PyGenObject *, PyObject *);
|
||||
PyObject *_PyGen_yf(PyGenObject *);
|
||||
PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self);
|
||||
|
||||
|
||||
94
src/external/windows/include/python/graminit.h
vendored
94
src/external/windows/include/python/graminit.h
vendored
@ -1,94 +0,0 @@
|
||||
/* Generated by Parser/pgen */
|
||||
|
||||
#define single_input 256
|
||||
#define file_input 257
|
||||
#define eval_input 258
|
||||
#define decorator 259
|
||||
#define decorators 260
|
||||
#define decorated 261
|
||||
#define async_funcdef 262
|
||||
#define funcdef 263
|
||||
#define parameters 264
|
||||
#define typedargslist 265
|
||||
#define tfpdef 266
|
||||
#define varargslist 267
|
||||
#define vfpdef 268
|
||||
#define stmt 269
|
||||
#define simple_stmt 270
|
||||
#define small_stmt 271
|
||||
#define expr_stmt 272
|
||||
#define annassign 273
|
||||
#define testlist_star_expr 274
|
||||
#define augassign 275
|
||||
#define del_stmt 276
|
||||
#define pass_stmt 277
|
||||
#define flow_stmt 278
|
||||
#define break_stmt 279
|
||||
#define continue_stmt 280
|
||||
#define return_stmt 281
|
||||
#define yield_stmt 282
|
||||
#define raise_stmt 283
|
||||
#define import_stmt 284
|
||||
#define import_name 285
|
||||
#define import_from 286
|
||||
#define import_as_name 287
|
||||
#define dotted_as_name 288
|
||||
#define import_as_names 289
|
||||
#define dotted_as_names 290
|
||||
#define dotted_name 291
|
||||
#define global_stmt 292
|
||||
#define nonlocal_stmt 293
|
||||
#define assert_stmt 294
|
||||
#define compound_stmt 295
|
||||
#define async_stmt 296
|
||||
#define if_stmt 297
|
||||
#define while_stmt 298
|
||||
#define for_stmt 299
|
||||
#define try_stmt 300
|
||||
#define with_stmt 301
|
||||
#define with_item 302
|
||||
#define except_clause 303
|
||||
#define suite 304
|
||||
#define namedexpr_test 305
|
||||
#define test 306
|
||||
#define test_nocond 307
|
||||
#define lambdef 308
|
||||
#define lambdef_nocond 309
|
||||
#define or_test 310
|
||||
#define and_test 311
|
||||
#define not_test 312
|
||||
#define comparison 313
|
||||
#define comp_op 314
|
||||
#define star_expr 315
|
||||
#define expr 316
|
||||
#define xor_expr 317
|
||||
#define and_expr 318
|
||||
#define shift_expr 319
|
||||
#define arith_expr 320
|
||||
#define term 321
|
||||
#define factor 322
|
||||
#define power 323
|
||||
#define atom_expr 324
|
||||
#define atom 325
|
||||
#define testlist_comp 326
|
||||
#define trailer 327
|
||||
#define subscriptlist 328
|
||||
#define subscript 329
|
||||
#define sliceop 330
|
||||
#define exprlist 331
|
||||
#define testlist 332
|
||||
#define dictorsetmaker 333
|
||||
#define classdef 334
|
||||
#define arglist 335
|
||||
#define argument 336
|
||||
#define comp_iter 337
|
||||
#define sync_comp_for 338
|
||||
#define comp_for 339
|
||||
#define comp_if 340
|
||||
#define encoding_decl 341
|
||||
#define yield_expr 342
|
||||
#define yield_arg 343
|
||||
#define func_body_suite 344
|
||||
#define func_type_input 345
|
||||
#define func_type 346
|
||||
#define typelist 347
|
||||
77
src/external/windows/include/python/grammar.h
vendored
77
src/external/windows/include/python/grammar.h
vendored
@ -1,77 +0,0 @@
|
||||
|
||||
/* Grammar interface */
|
||||
|
||||
#ifndef Py_GRAMMAR_H
|
||||
#define Py_GRAMMAR_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "bitset.h" /* Sigh... */
|
||||
|
||||
/* A label of an arc */
|
||||
|
||||
typedef struct {
|
||||
int lb_type;
|
||||
const char *lb_str;
|
||||
} label;
|
||||
|
||||
#define EMPTY 0 /* Label number 0 is by definition the empty label */
|
||||
|
||||
/* A list of labels */
|
||||
|
||||
typedef struct {
|
||||
int ll_nlabels;
|
||||
const label *ll_label;
|
||||
} labellist;
|
||||
|
||||
/* An arc from one state to another */
|
||||
|
||||
typedef struct {
|
||||
short a_lbl; /* Label of this arc */
|
||||
short a_arrow; /* State where this arc goes to */
|
||||
} arc;
|
||||
|
||||
/* A state in a DFA */
|
||||
|
||||
typedef struct {
|
||||
int s_narcs;
|
||||
const arc *s_arc; /* Array of arcs */
|
||||
|
||||
/* Optional accelerators */
|
||||
int s_lower; /* Lowest label index */
|
||||
int s_upper; /* Highest label index */
|
||||
int *s_accel; /* Accelerator */
|
||||
int s_accept; /* Nonzero for accepting state */
|
||||
} state;
|
||||
|
||||
/* A DFA */
|
||||
|
||||
typedef struct {
|
||||
int d_type; /* Non-terminal this represents */
|
||||
char *d_name; /* For printing */
|
||||
int d_nstates;
|
||||
state *d_state; /* Array of states */
|
||||
bitset d_first;
|
||||
} dfa;
|
||||
|
||||
/* A grammar */
|
||||
|
||||
typedef struct {
|
||||
int g_ndfas;
|
||||
const dfa *g_dfa; /* Array of DFAs */
|
||||
const labellist g_ll;
|
||||
int g_start; /* Start symbol of the grammar */
|
||||
int g_accel; /* Set if accelerators present */
|
||||
} grammar;
|
||||
|
||||
/* FUNCTIONS */
|
||||
const dfa *PyGrammar_FindDFA(grammar *g, int type);
|
||||
const char *PyGrammar_LabelRepr(label *lb);
|
||||
void PyGrammar_AddAccelerators(grammar *g);
|
||||
void PyGrammar_RemoveAccelerators(grammar *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_GRAMMAR_H */
|
||||
@ -1,46 +0,0 @@
|
||||
#ifndef Py_PEGENINTERFACE
|
||||
#define Py_PEGENINTERFACE
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include "Python-ast.h"
|
||||
|
||||
PyAPI_FUNC(mod_ty) PyPegen_ASTFromString(
|
||||
const char *str,
|
||||
const char *filename,
|
||||
int mode,
|
||||
PyCompilerFlags *flags,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(mod_ty) PyPegen_ASTFromStringObject(
|
||||
const char *str,
|
||||
PyObject* filename,
|
||||
int mode,
|
||||
PyCompilerFlags *flags,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(mod_ty) PyPegen_ASTFromFileObject(
|
||||
FILE *fp,
|
||||
PyObject *filename_ob,
|
||||
int mode,
|
||||
const char *enc,
|
||||
const char *ps1,
|
||||
const char *ps2,
|
||||
PyCompilerFlags *flags,
|
||||
int *errcode,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(mod_ty) PyPegen_ASTFromFilename(
|
||||
const char *filename,
|
||||
int mode,
|
||||
PyCompilerFlags *flags,
|
||||
PyArena *arena);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_PEGENINTERFACE*/
|
||||
112
src/external/windows/include/python/internal/pycore_asdl.h
vendored
Executable file
112
src/external/windows/include/python/internal/pycore_asdl.h
vendored
Executable file
@ -0,0 +1,112 @@
|
||||
#ifndef Py_INTERNAL_ASDL_H
|
||||
#define Py_INTERNAL_ASDL_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "pycore_pyarena.h" // _PyArena_Malloc()
|
||||
|
||||
typedef PyObject * identifier;
|
||||
typedef PyObject * string;
|
||||
typedef PyObject * object;
|
||||
typedef PyObject * constant;
|
||||
|
||||
/* It would be nice if the code generated by asdl_c.py was completely
|
||||
independent of Python, but it is a goal the requires too much work
|
||||
at this stage. So, for example, I'll represent identifiers as
|
||||
interned Python strings.
|
||||
*/
|
||||
|
||||
#define _ASDL_SEQ_HEAD \
|
||||
Py_ssize_t size; \
|
||||
void **elements;
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
} asdl_seq;
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
void *typed_elements[1];
|
||||
} asdl_generic_seq;
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
PyObject *typed_elements[1];
|
||||
} asdl_identifier_seq;
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
int typed_elements[1];
|
||||
} asdl_int_seq;
|
||||
|
||||
asdl_generic_seq *_Py_asdl_generic_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
asdl_identifier_seq *_Py_asdl_identifier_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
asdl_int_seq *_Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
|
||||
#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE) \
|
||||
asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) \
|
||||
{ \
|
||||
asdl_ ## NAME ## _seq *seq = NULL; \
|
||||
size_t n; \
|
||||
/* check size is sane */ \
|
||||
if (size < 0 || \
|
||||
(size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { \
|
||||
PyErr_NoMemory(); \
|
||||
return NULL; \
|
||||
} \
|
||||
n = (size ? (sizeof(TYPE *) * (size - 1)) : 0); \
|
||||
/* check if size can be added safely */ \
|
||||
if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { \
|
||||
PyErr_NoMemory(); \
|
||||
return NULL; \
|
||||
} \
|
||||
n += sizeof(asdl_ ## NAME ## _seq); \
|
||||
seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); \
|
||||
if (!seq) { \
|
||||
PyErr_NoMemory(); \
|
||||
return NULL; \
|
||||
} \
|
||||
memset(seq, 0, n); \
|
||||
seq->size = size; \
|
||||
seq->elements = (void**)seq->typed_elements; \
|
||||
return seq; \
|
||||
}
|
||||
|
||||
#define asdl_seq_GET_UNTYPED(S, I) (S)->elements[(I)]
|
||||
#define asdl_seq_GET(S, I) (S)->typed_elements[(I)]
|
||||
#define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size)
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
# define asdl_seq_SET(S, I, V) \
|
||||
do { \
|
||||
Py_ssize_t _asdl_i = (I); \
|
||||
assert((S) != NULL); \
|
||||
assert(0 <= _asdl_i && _asdl_i < (S)->size); \
|
||||
(S)->typed_elements[_asdl_i] = (V); \
|
||||
} while (0)
|
||||
#else
|
||||
# define asdl_seq_SET(S, I, V) (S)->typed_elements[I] = (V)
|
||||
#endif
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
# define asdl_seq_SET_UNTYPED(S, I, V) \
|
||||
do { \
|
||||
Py_ssize_t _asdl_i = (I); \
|
||||
assert((S) != NULL); \
|
||||
assert(0 <= _asdl_i && _asdl_i < (S)->size); \
|
||||
(S)->elements[_asdl_i] = (V); \
|
||||
} while (0)
|
||||
#else
|
||||
# define asdl_seq_SET_UNTYPED(S, I, V) (S)->elements[I] = (V)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_ASDL_H */
|
||||
855
src/external/windows/include/python/internal/pycore_ast.h
vendored
Executable file
855
src/external/windows/include/python/internal/pycore_ast.h
vendored
Executable file
@ -0,0 +1,855 @@
|
||||
// File automatically generated by Parser/asdl_c.py.
|
||||
|
||||
#ifndef Py_INTERNAL_AST_H
|
||||
#define Py_INTERNAL_AST_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "pycore_asdl.h"
|
||||
|
||||
typedef struct _mod *mod_ty;
|
||||
|
||||
typedef struct _stmt *stmt_ty;
|
||||
|
||||
typedef struct _expr *expr_ty;
|
||||
|
||||
typedef enum _expr_context { Load=1, Store=2, Del=3 } expr_context_ty;
|
||||
|
||||
typedef enum _boolop { And=1, Or=2 } boolop_ty;
|
||||
|
||||
typedef enum _operator { Add=1, Sub=2, Mult=3, MatMult=4, Div=5, Mod=6, Pow=7,
|
||||
LShift=8, RShift=9, BitOr=10, BitXor=11, BitAnd=12,
|
||||
FloorDiv=13 } operator_ty;
|
||||
|
||||
typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty;
|
||||
|
||||
typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8,
|
||||
In=9, NotIn=10 } cmpop_ty;
|
||||
|
||||
typedef struct _comprehension *comprehension_ty;
|
||||
|
||||
typedef struct _excepthandler *excepthandler_ty;
|
||||
|
||||
typedef struct _arguments *arguments_ty;
|
||||
|
||||
typedef struct _arg *arg_ty;
|
||||
|
||||
typedef struct _keyword *keyword_ty;
|
||||
|
||||
typedef struct _alias *alias_ty;
|
||||
|
||||
typedef struct _withitem *withitem_ty;
|
||||
|
||||
typedef struct _match_case *match_case_ty;
|
||||
|
||||
typedef struct _pattern *pattern_ty;
|
||||
|
||||
typedef struct _type_ignore *type_ignore_ty;
|
||||
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
mod_ty typed_elements[1];
|
||||
} asdl_mod_seq;
|
||||
|
||||
asdl_mod_seq *_Py_asdl_mod_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
stmt_ty typed_elements[1];
|
||||
} asdl_stmt_seq;
|
||||
|
||||
asdl_stmt_seq *_Py_asdl_stmt_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
expr_ty typed_elements[1];
|
||||
} asdl_expr_seq;
|
||||
|
||||
asdl_expr_seq *_Py_asdl_expr_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
comprehension_ty typed_elements[1];
|
||||
} asdl_comprehension_seq;
|
||||
|
||||
asdl_comprehension_seq *_Py_asdl_comprehension_seq_new(Py_ssize_t size, PyArena
|
||||
*arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
excepthandler_ty typed_elements[1];
|
||||
} asdl_excepthandler_seq;
|
||||
|
||||
asdl_excepthandler_seq *_Py_asdl_excepthandler_seq_new(Py_ssize_t size, PyArena
|
||||
*arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
arguments_ty typed_elements[1];
|
||||
} asdl_arguments_seq;
|
||||
|
||||
asdl_arguments_seq *_Py_asdl_arguments_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
arg_ty typed_elements[1];
|
||||
} asdl_arg_seq;
|
||||
|
||||
asdl_arg_seq *_Py_asdl_arg_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
keyword_ty typed_elements[1];
|
||||
} asdl_keyword_seq;
|
||||
|
||||
asdl_keyword_seq *_Py_asdl_keyword_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
alias_ty typed_elements[1];
|
||||
} asdl_alias_seq;
|
||||
|
||||
asdl_alias_seq *_Py_asdl_alias_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
withitem_ty typed_elements[1];
|
||||
} asdl_withitem_seq;
|
||||
|
||||
asdl_withitem_seq *_Py_asdl_withitem_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
match_case_ty typed_elements[1];
|
||||
} asdl_match_case_seq;
|
||||
|
||||
asdl_match_case_seq *_Py_asdl_match_case_seq_new(Py_ssize_t size, PyArena
|
||||
*arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
pattern_ty typed_elements[1];
|
||||
} asdl_pattern_seq;
|
||||
|
||||
asdl_pattern_seq *_Py_asdl_pattern_seq_new(Py_ssize_t size, PyArena *arena);
|
||||
|
||||
typedef struct {
|
||||
_ASDL_SEQ_HEAD
|
||||
type_ignore_ty typed_elements[1];
|
||||
} asdl_type_ignore_seq;
|
||||
|
||||
asdl_type_ignore_seq *_Py_asdl_type_ignore_seq_new(Py_ssize_t size, PyArena
|
||||
*arena);
|
||||
|
||||
|
||||
enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3,
|
||||
FunctionType_kind=4};
|
||||
struct _mod {
|
||||
enum _mod_kind kind;
|
||||
union {
|
||||
struct {
|
||||
asdl_stmt_seq *body;
|
||||
asdl_type_ignore_seq *type_ignores;
|
||||
} Module;
|
||||
|
||||
struct {
|
||||
asdl_stmt_seq *body;
|
||||
} Interactive;
|
||||
|
||||
struct {
|
||||
expr_ty body;
|
||||
} Expression;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *argtypes;
|
||||
expr_ty returns;
|
||||
} FunctionType;
|
||||
|
||||
} v;
|
||||
};
|
||||
|
||||
enum _stmt_kind {FunctionDef_kind=1, AsyncFunctionDef_kind=2, ClassDef_kind=3,
|
||||
Return_kind=4, Delete_kind=5, Assign_kind=6,
|
||||
AugAssign_kind=7, AnnAssign_kind=8, For_kind=9,
|
||||
AsyncFor_kind=10, While_kind=11, If_kind=12, With_kind=13,
|
||||
AsyncWith_kind=14, Match_kind=15, Raise_kind=16, Try_kind=17,
|
||||
Assert_kind=18, Import_kind=19, ImportFrom_kind=20,
|
||||
Global_kind=21, Nonlocal_kind=22, Expr_kind=23, Pass_kind=24,
|
||||
Break_kind=25, Continue_kind=26};
|
||||
struct _stmt {
|
||||
enum _stmt_kind kind;
|
||||
union {
|
||||
struct {
|
||||
identifier name;
|
||||
arguments_ty args;
|
||||
asdl_stmt_seq *body;
|
||||
asdl_expr_seq *decorator_list;
|
||||
expr_ty returns;
|
||||
string type_comment;
|
||||
} FunctionDef;
|
||||
|
||||
struct {
|
||||
identifier name;
|
||||
arguments_ty args;
|
||||
asdl_stmt_seq *body;
|
||||
asdl_expr_seq *decorator_list;
|
||||
expr_ty returns;
|
||||
string type_comment;
|
||||
} AsyncFunctionDef;
|
||||
|
||||
struct {
|
||||
identifier name;
|
||||
asdl_expr_seq *bases;
|
||||
asdl_keyword_seq *keywords;
|
||||
asdl_stmt_seq *body;
|
||||
asdl_expr_seq *decorator_list;
|
||||
} ClassDef;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Return;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *targets;
|
||||
} Delete;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *targets;
|
||||
expr_ty value;
|
||||
string type_comment;
|
||||
} Assign;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
operator_ty op;
|
||||
expr_ty value;
|
||||
} AugAssign;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty annotation;
|
||||
expr_ty value;
|
||||
int simple;
|
||||
} AnnAssign;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty iter;
|
||||
asdl_stmt_seq *body;
|
||||
asdl_stmt_seq *orelse;
|
||||
string type_comment;
|
||||
} For;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty iter;
|
||||
asdl_stmt_seq *body;
|
||||
asdl_stmt_seq *orelse;
|
||||
string type_comment;
|
||||
} AsyncFor;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
asdl_stmt_seq *body;
|
||||
asdl_stmt_seq *orelse;
|
||||
} While;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
asdl_stmt_seq *body;
|
||||
asdl_stmt_seq *orelse;
|
||||
} If;
|
||||
|
||||
struct {
|
||||
asdl_withitem_seq *items;
|
||||
asdl_stmt_seq *body;
|
||||
string type_comment;
|
||||
} With;
|
||||
|
||||
struct {
|
||||
asdl_withitem_seq *items;
|
||||
asdl_stmt_seq *body;
|
||||
string type_comment;
|
||||
} AsyncWith;
|
||||
|
||||
struct {
|
||||
expr_ty subject;
|
||||
asdl_match_case_seq *cases;
|
||||
} Match;
|
||||
|
||||
struct {
|
||||
expr_ty exc;
|
||||
expr_ty cause;
|
||||
} Raise;
|
||||
|
||||
struct {
|
||||
asdl_stmt_seq *body;
|
||||
asdl_excepthandler_seq *handlers;
|
||||
asdl_stmt_seq *orelse;
|
||||
asdl_stmt_seq *finalbody;
|
||||
} Try;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
expr_ty msg;
|
||||
} Assert;
|
||||
|
||||
struct {
|
||||
asdl_alias_seq *names;
|
||||
} Import;
|
||||
|
||||
struct {
|
||||
identifier module;
|
||||
asdl_alias_seq *names;
|
||||
int level;
|
||||
} ImportFrom;
|
||||
|
||||
struct {
|
||||
asdl_identifier_seq *names;
|
||||
} Global;
|
||||
|
||||
struct {
|
||||
asdl_identifier_seq *names;
|
||||
} Nonlocal;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Expr;
|
||||
|
||||
} v;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
enum _expr_kind {BoolOp_kind=1, NamedExpr_kind=2, BinOp_kind=3, UnaryOp_kind=4,
|
||||
Lambda_kind=5, IfExp_kind=6, Dict_kind=7, Set_kind=8,
|
||||
ListComp_kind=9, SetComp_kind=10, DictComp_kind=11,
|
||||
GeneratorExp_kind=12, Await_kind=13, Yield_kind=14,
|
||||
YieldFrom_kind=15, Compare_kind=16, Call_kind=17,
|
||||
FormattedValue_kind=18, JoinedStr_kind=19, Constant_kind=20,
|
||||
Attribute_kind=21, Subscript_kind=22, Starred_kind=23,
|
||||
Name_kind=24, List_kind=25, Tuple_kind=26, Slice_kind=27};
|
||||
struct _expr {
|
||||
enum _expr_kind kind;
|
||||
union {
|
||||
struct {
|
||||
boolop_ty op;
|
||||
asdl_expr_seq *values;
|
||||
} BoolOp;
|
||||
|
||||
struct {
|
||||
expr_ty target;
|
||||
expr_ty value;
|
||||
} NamedExpr;
|
||||
|
||||
struct {
|
||||
expr_ty left;
|
||||
operator_ty op;
|
||||
expr_ty right;
|
||||
} BinOp;
|
||||
|
||||
struct {
|
||||
unaryop_ty op;
|
||||
expr_ty operand;
|
||||
} UnaryOp;
|
||||
|
||||
struct {
|
||||
arguments_ty args;
|
||||
expr_ty body;
|
||||
} Lambda;
|
||||
|
||||
struct {
|
||||
expr_ty test;
|
||||
expr_ty body;
|
||||
expr_ty orelse;
|
||||
} IfExp;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *keys;
|
||||
asdl_expr_seq *values;
|
||||
} Dict;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *elts;
|
||||
} Set;
|
||||
|
||||
struct {
|
||||
expr_ty elt;
|
||||
asdl_comprehension_seq *generators;
|
||||
} ListComp;
|
||||
|
||||
struct {
|
||||
expr_ty elt;
|
||||
asdl_comprehension_seq *generators;
|
||||
} SetComp;
|
||||
|
||||
struct {
|
||||
expr_ty key;
|
||||
expr_ty value;
|
||||
asdl_comprehension_seq *generators;
|
||||
} DictComp;
|
||||
|
||||
struct {
|
||||
expr_ty elt;
|
||||
asdl_comprehension_seq *generators;
|
||||
} GeneratorExp;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Await;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} Yield;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
} YieldFrom;
|
||||
|
||||
struct {
|
||||
expr_ty left;
|
||||
asdl_int_seq *ops;
|
||||
asdl_expr_seq *comparators;
|
||||
} Compare;
|
||||
|
||||
struct {
|
||||
expr_ty func;
|
||||
asdl_expr_seq *args;
|
||||
asdl_keyword_seq *keywords;
|
||||
} Call;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
int conversion;
|
||||
expr_ty format_spec;
|
||||
} FormattedValue;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *values;
|
||||
} JoinedStr;
|
||||
|
||||
struct {
|
||||
constant value;
|
||||
string kind;
|
||||
} Constant;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
identifier attr;
|
||||
expr_context_ty ctx;
|
||||
} Attribute;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
expr_ty slice;
|
||||
expr_context_ty ctx;
|
||||
} Subscript;
|
||||
|
||||
struct {
|
||||
expr_ty value;
|
||||
expr_context_ty ctx;
|
||||
} Starred;
|
||||
|
||||
struct {
|
||||
identifier id;
|
||||
expr_context_ty ctx;
|
||||
} Name;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *elts;
|
||||
expr_context_ty ctx;
|
||||
} List;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *elts;
|
||||
expr_context_ty ctx;
|
||||
} Tuple;
|
||||
|
||||
struct {
|
||||
expr_ty lower;
|
||||
expr_ty upper;
|
||||
expr_ty step;
|
||||
} Slice;
|
||||
|
||||
} v;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _comprehension {
|
||||
expr_ty target;
|
||||
expr_ty iter;
|
||||
asdl_expr_seq *ifs;
|
||||
int is_async;
|
||||
};
|
||||
|
||||
enum _excepthandler_kind {ExceptHandler_kind=1};
|
||||
struct _excepthandler {
|
||||
enum _excepthandler_kind kind;
|
||||
union {
|
||||
struct {
|
||||
expr_ty type;
|
||||
identifier name;
|
||||
asdl_stmt_seq *body;
|
||||
} ExceptHandler;
|
||||
|
||||
} v;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _arguments {
|
||||
asdl_arg_seq *posonlyargs;
|
||||
asdl_arg_seq *args;
|
||||
arg_ty vararg;
|
||||
asdl_arg_seq *kwonlyargs;
|
||||
asdl_expr_seq *kw_defaults;
|
||||
arg_ty kwarg;
|
||||
asdl_expr_seq *defaults;
|
||||
};
|
||||
|
||||
struct _arg {
|
||||
identifier arg;
|
||||
expr_ty annotation;
|
||||
string type_comment;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _keyword {
|
||||
identifier arg;
|
||||
expr_ty value;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _alias {
|
||||
identifier name;
|
||||
identifier asname;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
struct _withitem {
|
||||
expr_ty context_expr;
|
||||
expr_ty optional_vars;
|
||||
};
|
||||
|
||||
struct _match_case {
|
||||
pattern_ty pattern;
|
||||
expr_ty guard;
|
||||
asdl_stmt_seq *body;
|
||||
};
|
||||
|
||||
enum _pattern_kind {MatchValue_kind=1, MatchSingleton_kind=2,
|
||||
MatchSequence_kind=3, MatchMapping_kind=4,
|
||||
MatchClass_kind=5, MatchStar_kind=6, MatchAs_kind=7,
|
||||
MatchOr_kind=8};
|
||||
struct _pattern {
|
||||
enum _pattern_kind kind;
|
||||
union {
|
||||
struct {
|
||||
expr_ty value;
|
||||
} MatchValue;
|
||||
|
||||
struct {
|
||||
constant value;
|
||||
} MatchSingleton;
|
||||
|
||||
struct {
|
||||
asdl_pattern_seq *patterns;
|
||||
} MatchSequence;
|
||||
|
||||
struct {
|
||||
asdl_expr_seq *keys;
|
||||
asdl_pattern_seq *patterns;
|
||||
identifier rest;
|
||||
} MatchMapping;
|
||||
|
||||
struct {
|
||||
expr_ty cls;
|
||||
asdl_pattern_seq *patterns;
|
||||
asdl_identifier_seq *kwd_attrs;
|
||||
asdl_pattern_seq *kwd_patterns;
|
||||
} MatchClass;
|
||||
|
||||
struct {
|
||||
identifier name;
|
||||
} MatchStar;
|
||||
|
||||
struct {
|
||||
pattern_ty pattern;
|
||||
identifier name;
|
||||
} MatchAs;
|
||||
|
||||
struct {
|
||||
asdl_pattern_seq *patterns;
|
||||
} MatchOr;
|
||||
|
||||
} v;
|
||||
int lineno;
|
||||
int col_offset;
|
||||
int end_lineno;
|
||||
int end_col_offset;
|
||||
};
|
||||
|
||||
enum _type_ignore_kind {TypeIgnore_kind=1};
|
||||
struct _type_ignore {
|
||||
enum _type_ignore_kind kind;
|
||||
union {
|
||||
struct {
|
||||
int lineno;
|
||||
string tag;
|
||||
} TypeIgnore;
|
||||
|
||||
} v;
|
||||
};
|
||||
|
||||
|
||||
// Note: these macros affect function definitions, not only call sites.
|
||||
mod_ty _PyAST_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores,
|
||||
PyArena *arena);
|
||||
mod_ty _PyAST_Interactive(asdl_stmt_seq * body, PyArena *arena);
|
||||
mod_ty _PyAST_Expression(expr_ty body, PyArena *arena);
|
||||
mod_ty _PyAST_FunctionType(asdl_expr_seq * argtypes, expr_ty returns, PyArena
|
||||
*arena);
|
||||
stmt_ty _PyAST_FunctionDef(identifier name, arguments_ty args, asdl_stmt_seq *
|
||||
body, asdl_expr_seq * decorator_list, expr_ty
|
||||
returns, string type_comment, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
stmt_ty _PyAST_AsyncFunctionDef(identifier name, arguments_ty args,
|
||||
asdl_stmt_seq * body, asdl_expr_seq *
|
||||
decorator_list, expr_ty returns, string
|
||||
type_comment, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_ClassDef(identifier name, asdl_expr_seq * bases,
|
||||
asdl_keyword_seq * keywords, asdl_stmt_seq * body,
|
||||
asdl_expr_seq * decorator_list, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
stmt_ty _PyAST_Return(expr_ty value, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Delete(asdl_expr_seq * targets, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Assign(asdl_expr_seq * targets, expr_ty value, string
|
||||
type_comment, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_AugAssign(expr_ty target, operator_ty op, expr_ty value, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_AnnAssign(expr_ty target, expr_ty annotation, expr_ty value, int
|
||||
simple, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_For(expr_ty target, expr_ty iter, asdl_stmt_seq * body,
|
||||
asdl_stmt_seq * orelse, string type_comment, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
stmt_ty _PyAST_AsyncFor(expr_ty target, expr_ty iter, asdl_stmt_seq * body,
|
||||
asdl_stmt_seq * orelse, string type_comment, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_While(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq *
|
||||
orelse, int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_If(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse,
|
||||
int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_With(asdl_withitem_seq * items, asdl_stmt_seq * body, string
|
||||
type_comment, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_AsyncWith(asdl_withitem_seq * items, asdl_stmt_seq * body,
|
||||
string type_comment, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Match(expr_ty subject, asdl_match_case_seq * cases, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
stmt_ty _PyAST_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Try(asdl_stmt_seq * body, asdl_excepthandler_seq * handlers,
|
||||
asdl_stmt_seq * orelse, asdl_stmt_seq * finalbody, int
|
||||
lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
stmt_ty _PyAST_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Import(asdl_alias_seq * names, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_ImportFrom(identifier module, asdl_alias_seq * names, int level,
|
||||
int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Global(asdl_identifier_seq * names, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Nonlocal(asdl_identifier_seq * names, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
stmt_ty _PyAST_Expr(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Pass(int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Break(int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
stmt_ty _PyAST_Continue(int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_BoolOp(boolop_ty op, asdl_expr_seq * values, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_NamedExpr(expr_ty target, expr_ty value, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
expr_ty _PyAST_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
expr_ty _PyAST_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_Lambda(arguments_ty args, expr_ty body, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
expr_ty _PyAST_Dict(asdl_expr_seq * keys, asdl_expr_seq * values, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_Set(asdl_expr_seq * elts, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_ListComp(expr_ty elt, asdl_comprehension_seq * generators, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_SetComp(expr_ty elt, asdl_comprehension_seq * generators, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_DictComp(expr_ty key, expr_ty value, asdl_comprehension_seq *
|
||||
generators, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_GeneratorExp(expr_ty elt, asdl_comprehension_seq * generators,
|
||||
int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_Await(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_Yield(expr_ty value, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_YieldFrom(expr_ty value, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_Compare(expr_ty left, asdl_int_seq * ops, asdl_expr_seq *
|
||||
comparators, int lineno, int col_offset, int end_lineno,
|
||||
int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_Call(expr_ty func, asdl_expr_seq * args, asdl_keyword_seq *
|
||||
keywords, int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_FormattedValue(expr_ty value, int conversion, expr_ty
|
||||
format_spec, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_JoinedStr(asdl_expr_seq * values, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_Constant(constant value, string kind, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_Attribute(expr_ty value, identifier attr, expr_context_ty ctx,
|
||||
int lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_Subscript(expr_ty value, expr_ty slice, expr_context_ty ctx, int
|
||||
lineno, int col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
expr_ty _PyAST_Starred(expr_ty value, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_Name(identifier id, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_List(asdl_expr_seq * elts, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_Tuple(asdl_expr_seq * elts, expr_context_ty ctx, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
expr_ty _PyAST_Slice(expr_ty lower, expr_ty upper, expr_ty step, int lineno,
|
||||
int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
comprehension_ty _PyAST_comprehension(expr_ty target, expr_ty iter,
|
||||
asdl_expr_seq * ifs, int is_async,
|
||||
PyArena *arena);
|
||||
excepthandler_ty _PyAST_ExceptHandler(expr_ty type, identifier name,
|
||||
asdl_stmt_seq * body, int lineno, int
|
||||
col_offset, int end_lineno, int
|
||||
end_col_offset, PyArena *arena);
|
||||
arguments_ty _PyAST_arguments(asdl_arg_seq * posonlyargs, asdl_arg_seq * args,
|
||||
arg_ty vararg, asdl_arg_seq * kwonlyargs,
|
||||
asdl_expr_seq * kw_defaults, arg_ty kwarg,
|
||||
asdl_expr_seq * defaults, PyArena *arena);
|
||||
arg_ty _PyAST_arg(identifier arg, expr_ty annotation, string type_comment, int
|
||||
lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
keyword_ty _PyAST_keyword(identifier arg, expr_ty value, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
alias_ty _PyAST_alias(identifier name, identifier asname, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
withitem_ty _PyAST_withitem(expr_ty context_expr, expr_ty optional_vars,
|
||||
PyArena *arena);
|
||||
match_case_ty _PyAST_match_case(pattern_ty pattern, expr_ty guard,
|
||||
asdl_stmt_seq * body, PyArena *arena);
|
||||
pattern_ty _PyAST_MatchValue(expr_ty value, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
pattern_ty _PyAST_MatchSingleton(constant value, int lineno, int col_offset,
|
||||
int end_lineno, int end_col_offset, PyArena
|
||||
*arena);
|
||||
pattern_ty _PyAST_MatchSequence(asdl_pattern_seq * patterns, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
pattern_ty _PyAST_MatchMapping(asdl_expr_seq * keys, asdl_pattern_seq *
|
||||
patterns, identifier rest, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
pattern_ty _PyAST_MatchClass(expr_ty cls, asdl_pattern_seq * patterns,
|
||||
asdl_identifier_seq * kwd_attrs, asdl_pattern_seq
|
||||
* kwd_patterns, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
pattern_ty _PyAST_MatchStar(identifier name, int lineno, int col_offset, int
|
||||
end_lineno, int end_col_offset, PyArena *arena);
|
||||
pattern_ty _PyAST_MatchAs(pattern_ty pattern, identifier name, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
pattern_ty _PyAST_MatchOr(asdl_pattern_seq * patterns, int lineno, int
|
||||
col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena);
|
||||
type_ignore_ty _PyAST_TypeIgnore(int lineno, string tag, PyArena *arena);
|
||||
|
||||
|
||||
PyObject* PyAST_mod2obj(mod_ty t);
|
||||
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
|
||||
int PyAST_Check(PyObject* obj);
|
||||
|
||||
extern int _PyAST_Validate(mod_ty);
|
||||
|
||||
/* _PyAST_ExprAsUnicode is defined in ast_unparse.c */
|
||||
extern PyObject* _PyAST_ExprAsUnicode(expr_ty);
|
||||
|
||||
/* Return the borrowed reference to the first literal string in the
|
||||
sequence of statements or NULL if it doesn't start from a literal string.
|
||||
Doesn't set exception. */
|
||||
extern PyObject* _PyAST_GetDocString(asdl_stmt_seq *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_AST_H */
|
||||
255
src/external/windows/include/python/internal/pycore_ast_state.h
vendored
Executable file
255
src/external/windows/include/python/internal/pycore_ast_state.h
vendored
Executable file
@ -0,0 +1,255 @@
|
||||
// File automatically generated by Parser/asdl_c.py.
|
||||
|
||||
#ifndef Py_INTERNAL_AST_STATE_H
|
||||
#define Py_INTERNAL_AST_STATE_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
struct ast_state {
|
||||
int initialized;
|
||||
PyObject *AST_type;
|
||||
PyObject *Add_singleton;
|
||||
PyObject *Add_type;
|
||||
PyObject *And_singleton;
|
||||
PyObject *And_type;
|
||||
PyObject *AnnAssign_type;
|
||||
PyObject *Assert_type;
|
||||
PyObject *Assign_type;
|
||||
PyObject *AsyncFor_type;
|
||||
PyObject *AsyncFunctionDef_type;
|
||||
PyObject *AsyncWith_type;
|
||||
PyObject *Attribute_type;
|
||||
PyObject *AugAssign_type;
|
||||
PyObject *Await_type;
|
||||
PyObject *BinOp_type;
|
||||
PyObject *BitAnd_singleton;
|
||||
PyObject *BitAnd_type;
|
||||
PyObject *BitOr_singleton;
|
||||
PyObject *BitOr_type;
|
||||
PyObject *BitXor_singleton;
|
||||
PyObject *BitXor_type;
|
||||
PyObject *BoolOp_type;
|
||||
PyObject *Break_type;
|
||||
PyObject *Call_type;
|
||||
PyObject *ClassDef_type;
|
||||
PyObject *Compare_type;
|
||||
PyObject *Constant_type;
|
||||
PyObject *Continue_type;
|
||||
PyObject *Del_singleton;
|
||||
PyObject *Del_type;
|
||||
PyObject *Delete_type;
|
||||
PyObject *DictComp_type;
|
||||
PyObject *Dict_type;
|
||||
PyObject *Div_singleton;
|
||||
PyObject *Div_type;
|
||||
PyObject *Eq_singleton;
|
||||
PyObject *Eq_type;
|
||||
PyObject *ExceptHandler_type;
|
||||
PyObject *Expr_type;
|
||||
PyObject *Expression_type;
|
||||
PyObject *FloorDiv_singleton;
|
||||
PyObject *FloorDiv_type;
|
||||
PyObject *For_type;
|
||||
PyObject *FormattedValue_type;
|
||||
PyObject *FunctionDef_type;
|
||||
PyObject *FunctionType_type;
|
||||
PyObject *GeneratorExp_type;
|
||||
PyObject *Global_type;
|
||||
PyObject *GtE_singleton;
|
||||
PyObject *GtE_type;
|
||||
PyObject *Gt_singleton;
|
||||
PyObject *Gt_type;
|
||||
PyObject *IfExp_type;
|
||||
PyObject *If_type;
|
||||
PyObject *ImportFrom_type;
|
||||
PyObject *Import_type;
|
||||
PyObject *In_singleton;
|
||||
PyObject *In_type;
|
||||
PyObject *Interactive_type;
|
||||
PyObject *Invert_singleton;
|
||||
PyObject *Invert_type;
|
||||
PyObject *IsNot_singleton;
|
||||
PyObject *IsNot_type;
|
||||
PyObject *Is_singleton;
|
||||
PyObject *Is_type;
|
||||
PyObject *JoinedStr_type;
|
||||
PyObject *LShift_singleton;
|
||||
PyObject *LShift_type;
|
||||
PyObject *Lambda_type;
|
||||
PyObject *ListComp_type;
|
||||
PyObject *List_type;
|
||||
PyObject *Load_singleton;
|
||||
PyObject *Load_type;
|
||||
PyObject *LtE_singleton;
|
||||
PyObject *LtE_type;
|
||||
PyObject *Lt_singleton;
|
||||
PyObject *Lt_type;
|
||||
PyObject *MatMult_singleton;
|
||||
PyObject *MatMult_type;
|
||||
PyObject *MatchAs_type;
|
||||
PyObject *MatchClass_type;
|
||||
PyObject *MatchMapping_type;
|
||||
PyObject *MatchOr_type;
|
||||
PyObject *MatchSequence_type;
|
||||
PyObject *MatchSingleton_type;
|
||||
PyObject *MatchStar_type;
|
||||
PyObject *MatchValue_type;
|
||||
PyObject *Match_type;
|
||||
PyObject *Mod_singleton;
|
||||
PyObject *Mod_type;
|
||||
PyObject *Module_type;
|
||||
PyObject *Mult_singleton;
|
||||
PyObject *Mult_type;
|
||||
PyObject *Name_type;
|
||||
PyObject *NamedExpr_type;
|
||||
PyObject *Nonlocal_type;
|
||||
PyObject *NotEq_singleton;
|
||||
PyObject *NotEq_type;
|
||||
PyObject *NotIn_singleton;
|
||||
PyObject *NotIn_type;
|
||||
PyObject *Not_singleton;
|
||||
PyObject *Not_type;
|
||||
PyObject *Or_singleton;
|
||||
PyObject *Or_type;
|
||||
PyObject *Pass_type;
|
||||
PyObject *Pow_singleton;
|
||||
PyObject *Pow_type;
|
||||
PyObject *RShift_singleton;
|
||||
PyObject *RShift_type;
|
||||
PyObject *Raise_type;
|
||||
PyObject *Return_type;
|
||||
PyObject *SetComp_type;
|
||||
PyObject *Set_type;
|
||||
PyObject *Slice_type;
|
||||
PyObject *Starred_type;
|
||||
PyObject *Store_singleton;
|
||||
PyObject *Store_type;
|
||||
PyObject *Sub_singleton;
|
||||
PyObject *Sub_type;
|
||||
PyObject *Subscript_type;
|
||||
PyObject *Try_type;
|
||||
PyObject *Tuple_type;
|
||||
PyObject *TypeIgnore_type;
|
||||
PyObject *UAdd_singleton;
|
||||
PyObject *UAdd_type;
|
||||
PyObject *USub_singleton;
|
||||
PyObject *USub_type;
|
||||
PyObject *UnaryOp_type;
|
||||
PyObject *While_type;
|
||||
PyObject *With_type;
|
||||
PyObject *YieldFrom_type;
|
||||
PyObject *Yield_type;
|
||||
PyObject *__dict__;
|
||||
PyObject *__doc__;
|
||||
PyObject *__match_args__;
|
||||
PyObject *__module__;
|
||||
PyObject *_attributes;
|
||||
PyObject *_fields;
|
||||
PyObject *alias_type;
|
||||
PyObject *annotation;
|
||||
PyObject *arg;
|
||||
PyObject *arg_type;
|
||||
PyObject *args;
|
||||
PyObject *argtypes;
|
||||
PyObject *arguments_type;
|
||||
PyObject *asname;
|
||||
PyObject *ast;
|
||||
PyObject *attr;
|
||||
PyObject *bases;
|
||||
PyObject *body;
|
||||
PyObject *boolop_type;
|
||||
PyObject *cases;
|
||||
PyObject *cause;
|
||||
PyObject *cls;
|
||||
PyObject *cmpop_type;
|
||||
PyObject *col_offset;
|
||||
PyObject *comparators;
|
||||
PyObject *comprehension_type;
|
||||
PyObject *context_expr;
|
||||
PyObject *conversion;
|
||||
PyObject *ctx;
|
||||
PyObject *decorator_list;
|
||||
PyObject *defaults;
|
||||
PyObject *elt;
|
||||
PyObject *elts;
|
||||
PyObject *end_col_offset;
|
||||
PyObject *end_lineno;
|
||||
PyObject *exc;
|
||||
PyObject *excepthandler_type;
|
||||
PyObject *expr_context_type;
|
||||
PyObject *expr_type;
|
||||
PyObject *finalbody;
|
||||
PyObject *format_spec;
|
||||
PyObject *func;
|
||||
PyObject *generators;
|
||||
PyObject *guard;
|
||||
PyObject *handlers;
|
||||
PyObject *id;
|
||||
PyObject *ifs;
|
||||
PyObject *is_async;
|
||||
PyObject *items;
|
||||
PyObject *iter;
|
||||
PyObject *key;
|
||||
PyObject *keys;
|
||||
PyObject *keyword_type;
|
||||
PyObject *keywords;
|
||||
PyObject *kind;
|
||||
PyObject *kw_defaults;
|
||||
PyObject *kwarg;
|
||||
PyObject *kwd_attrs;
|
||||
PyObject *kwd_patterns;
|
||||
PyObject *kwonlyargs;
|
||||
PyObject *left;
|
||||
PyObject *level;
|
||||
PyObject *lineno;
|
||||
PyObject *lower;
|
||||
PyObject *match_case_type;
|
||||
PyObject *mod_type;
|
||||
PyObject *module;
|
||||
PyObject *msg;
|
||||
PyObject *name;
|
||||
PyObject *names;
|
||||
PyObject *op;
|
||||
PyObject *operand;
|
||||
PyObject *operator_type;
|
||||
PyObject *ops;
|
||||
PyObject *optional_vars;
|
||||
PyObject *orelse;
|
||||
PyObject *pattern;
|
||||
PyObject *pattern_type;
|
||||
PyObject *patterns;
|
||||
PyObject *posonlyargs;
|
||||
PyObject *rest;
|
||||
PyObject *returns;
|
||||
PyObject *right;
|
||||
PyObject *simple;
|
||||
PyObject *slice;
|
||||
PyObject *step;
|
||||
PyObject *stmt_type;
|
||||
PyObject *subject;
|
||||
PyObject *tag;
|
||||
PyObject *target;
|
||||
PyObject *targets;
|
||||
PyObject *test;
|
||||
PyObject *type;
|
||||
PyObject *type_comment;
|
||||
PyObject *type_ignore_type;
|
||||
PyObject *type_ignores;
|
||||
PyObject *unaryop_type;
|
||||
PyObject *upper;
|
||||
PyObject *value;
|
||||
PyObject *values;
|
||||
PyObject *vararg;
|
||||
PyObject *withitem_type;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_AST_STATE_H */
|
||||
|
||||
@ -11,8 +11,8 @@ extern "C" {
|
||||
#include "dynamic_annotations.h" /* _Py_ANNOTATE_MEMORY_ORDER */
|
||||
#include "pyconfig.h"
|
||||
|
||||
#if defined(HAVE_STD_ATOMIC)
|
||||
#include <stdatomic.h>
|
||||
#ifdef HAVE_STD_ATOMIC
|
||||
# include <stdatomic.h>
|
||||
#endif
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ typedef struct _Py_atomic_int {
|
||||
#define _Py_atomic_load_explicit(ATOMIC_VAL, ORDER) \
|
||||
atomic_load_explicit(&((ATOMIC_VAL)->_value), ORDER)
|
||||
|
||||
/* Use builtin atomic operations in GCC >= 4.7 */
|
||||
// Use builtin atomic operations in GCC >= 4.7 and clang
|
||||
#elif defined(HAVE_BUILTIN_ATOMIC)
|
||||
|
||||
typedef enum _Py_memory_order {
|
||||
|
||||
94
src/external/windows/include/python/internal/pycore_atomic_funcs.h
vendored
Executable file
94
src/external/windows/include/python/internal/pycore_atomic_funcs.h
vendored
Executable file
@ -0,0 +1,94 @@
|
||||
/* Atomic functions: similar to pycore_atomic.h, but don't need
|
||||
to declare variables as atomic.
|
||||
|
||||
Py_ssize_t type:
|
||||
|
||||
* value = _Py_atomic_size_get(&var)
|
||||
* _Py_atomic_size_set(&var, value)
|
||||
|
||||
Use sequentially-consistent ordering (__ATOMIC_SEQ_CST memory order):
|
||||
enforce total ordering with all other atomic functions.
|
||||
*/
|
||||
#ifndef Py_ATOMIC_FUNC_H
|
||||
#define Py_ATOMIC_FUNC_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# include <intrin.h> // _InterlockedExchange()
|
||||
#endif
|
||||
|
||||
|
||||
// Use builtin atomic operations in GCC >= 4.7 and clang
|
||||
#ifdef HAVE_BUILTIN_ATOMIC
|
||||
|
||||
static inline Py_ssize_t _Py_atomic_size_get(Py_ssize_t *var)
|
||||
{
|
||||
return __atomic_load_n(var, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
static inline void _Py_atomic_size_set(Py_ssize_t *var, Py_ssize_t value)
|
||||
{
|
||||
__atomic_store_n(var, value, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
static inline Py_ssize_t _Py_atomic_size_get(Py_ssize_t *var)
|
||||
{
|
||||
#if SIZEOF_VOID_P == 8
|
||||
Py_BUILD_ASSERT(sizeof(__int64) == sizeof(*var));
|
||||
volatile __int64 *volatile_var = (volatile __int64 *)var;
|
||||
__int64 old;
|
||||
do {
|
||||
old = *volatile_var;
|
||||
} while(_InterlockedCompareExchange64(volatile_var, old, old) != old);
|
||||
#else
|
||||
Py_BUILD_ASSERT(sizeof(long) == sizeof(*var));
|
||||
volatile long *volatile_var = (volatile long *)var;
|
||||
long old;
|
||||
do {
|
||||
old = *volatile_var;
|
||||
} while(_InterlockedCompareExchange(volatile_var, old, old) != old);
|
||||
#endif
|
||||
return old;
|
||||
}
|
||||
|
||||
static inline void _Py_atomic_size_set(Py_ssize_t *var, Py_ssize_t value)
|
||||
{
|
||||
#if SIZEOF_VOID_P == 8
|
||||
Py_BUILD_ASSERT(sizeof(__int64) == sizeof(*var));
|
||||
volatile __int64 *volatile_var = (volatile __int64 *)var;
|
||||
_InterlockedExchange64(volatile_var, value);
|
||||
#else
|
||||
Py_BUILD_ASSERT(sizeof(long) == sizeof(*var));
|
||||
volatile long *volatile_var = (volatile long *)var;
|
||||
_InterlockedExchange(volatile_var, value);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
// Fallback implementation using volatile
|
||||
|
||||
static inline Py_ssize_t _Py_atomic_size_get(Py_ssize_t *var)
|
||||
{
|
||||
volatile Py_ssize_t *volatile_var = (volatile Py_ssize_t *)var;
|
||||
return *volatile_var;
|
||||
}
|
||||
|
||||
static inline void _Py_atomic_size_set(Py_ssize_t *var, Py_ssize_t value)
|
||||
{
|
||||
volatile Py_ssize_t *volatile_var = (volatile Py_ssize_t *)var;
|
||||
*volatile_var = value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Py_ATOMIC_FUNC_H */
|
||||
176
src/external/windows/include/python/internal/pycore_bitutils.h
vendored
Executable file
176
src/external/windows/include/python/internal/pycore_bitutils.h
vendored
Executable file
@ -0,0 +1,176 @@
|
||||
/* Bit and bytes utilities.
|
||||
|
||||
Bytes swap functions, reverse order of bytes:
|
||||
|
||||
- _Py_bswap16(uint16_t)
|
||||
- _Py_bswap32(uint32_t)
|
||||
- _Py_bswap64(uint64_t)
|
||||
*/
|
||||
|
||||
#ifndef Py_INTERNAL_BITUTILS_H
|
||||
#define Py_INTERNAL_BITUTILS_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) \
|
||||
&& ((__GNUC__ >= 5) || (__GNUC__ == 4) && (__GNUC_MINOR__ >= 8))
|
||||
/* __builtin_bswap16() is available since GCC 4.8,
|
||||
__builtin_bswap32() is available since GCC 4.3,
|
||||
__builtin_bswap64() is available since GCC 4.3. */
|
||||
# define _PY_HAVE_BUILTIN_BSWAP
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Get _byteswap_ushort(), _byteswap_ulong(), _byteswap_uint64() */
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
static inline uint16_t
|
||||
_Py_bswap16(uint16_t word)
|
||||
{
|
||||
#if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap16)
|
||||
return __builtin_bswap16(word);
|
||||
#elif defined(_MSC_VER)
|
||||
Py_BUILD_ASSERT(sizeof(word) == sizeof(unsigned short));
|
||||
return _byteswap_ushort(word);
|
||||
#else
|
||||
// Portable implementation which doesn't rely on circular bit shift
|
||||
return ( ((word & UINT16_C(0x00FF)) << 8)
|
||||
| ((word & UINT16_C(0xFF00)) >> 8));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
_Py_bswap32(uint32_t word)
|
||||
{
|
||||
#if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap32)
|
||||
return __builtin_bswap32(word);
|
||||
#elif defined(_MSC_VER)
|
||||
Py_BUILD_ASSERT(sizeof(word) == sizeof(unsigned long));
|
||||
return _byteswap_ulong(word);
|
||||
#else
|
||||
// Portable implementation which doesn't rely on circular bit shift
|
||||
return ( ((word & UINT32_C(0x000000FF)) << 24)
|
||||
| ((word & UINT32_C(0x0000FF00)) << 8)
|
||||
| ((word & UINT32_C(0x00FF0000)) >> 8)
|
||||
| ((word & UINT32_C(0xFF000000)) >> 24));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
_Py_bswap64(uint64_t word)
|
||||
{
|
||||
#if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap64)
|
||||
return __builtin_bswap64(word);
|
||||
#elif defined(_MSC_VER)
|
||||
return _byteswap_uint64(word);
|
||||
#else
|
||||
// Portable implementation which doesn't rely on circular bit shift
|
||||
return ( ((word & UINT64_C(0x00000000000000FF)) << 56)
|
||||
| ((word & UINT64_C(0x000000000000FF00)) << 40)
|
||||
| ((word & UINT64_C(0x0000000000FF0000)) << 24)
|
||||
| ((word & UINT64_C(0x00000000FF000000)) << 8)
|
||||
| ((word & UINT64_C(0x000000FF00000000)) >> 8)
|
||||
| ((word & UINT64_C(0x0000FF0000000000)) >> 24)
|
||||
| ((word & UINT64_C(0x00FF000000000000)) >> 40)
|
||||
| ((word & UINT64_C(0xFF00000000000000)) >> 56));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Population count: count the number of 1's in 'x'
|
||||
// (number of bits set to 1), also known as the hamming weight.
|
||||
//
|
||||
// Implementation note. CPUID is not used, to test if x86 POPCNT instruction
|
||||
// can be used, to keep the implementation simple. For example, Visual Studio
|
||||
// __popcnt() is not used this reason. The clang and GCC builtin function can
|
||||
// use the x86 POPCNT instruction if the target architecture has SSE4a or
|
||||
// newer.
|
||||
static inline int
|
||||
_Py_popcount32(uint32_t x)
|
||||
{
|
||||
#if (defined(__clang__) || defined(__GNUC__))
|
||||
|
||||
#if SIZEOF_INT >= 4
|
||||
Py_BUILD_ASSERT(sizeof(x) <= sizeof(unsigned int));
|
||||
return __builtin_popcount(x);
|
||||
#else
|
||||
// The C standard guarantees that unsigned long will always be big enough
|
||||
// to hold a uint32_t value without losing information.
|
||||
Py_BUILD_ASSERT(sizeof(x) <= sizeof(unsigned long));
|
||||
return __builtin_popcountl(x);
|
||||
#endif
|
||||
|
||||
#else
|
||||
// 32-bit SWAR (SIMD Within A Register) popcount
|
||||
|
||||
// Binary: 0 1 0 1 ...
|
||||
const uint32_t M1 = 0x55555555;
|
||||
// Binary: 00 11 00 11. ..
|
||||
const uint32_t M2 = 0x33333333;
|
||||
// Binary: 0000 1111 0000 1111 ...
|
||||
const uint32_t M4 = 0x0F0F0F0F;
|
||||
// 256**4 + 256**3 + 256**2 + 256**1
|
||||
const uint32_t SUM = 0x01010101;
|
||||
|
||||
// Put count of each 2 bits into those 2 bits
|
||||
x = x - ((x >> 1) & M1);
|
||||
// Put count of each 4 bits into those 4 bits
|
||||
x = (x & M2) + ((x >> 2) & M2);
|
||||
// Put count of each 8 bits into those 8 bits
|
||||
x = (x + (x >> 4)) & M4;
|
||||
// Sum of the 4 byte counts
|
||||
return (uint32_t)((uint64_t)x * (uint64_t)SUM) >> 24;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Return the index of the most significant 1 bit in 'x'. This is the smallest
|
||||
// integer k such that x < 2**k. Equivalent to floor(log2(x)) + 1 for x != 0.
|
||||
static inline int
|
||||
_Py_bit_length(unsigned long x)
|
||||
{
|
||||
#if (defined(__clang__) || defined(__GNUC__))
|
||||
if (x != 0) {
|
||||
// __builtin_clzl() is available since GCC 3.4.
|
||||
// Undefined behavior for x == 0.
|
||||
return (int)sizeof(unsigned long) * 8 - __builtin_clzl(x);
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
#elif defined(_MSC_VER)
|
||||
// _BitScanReverse() is documented to search 32 bits.
|
||||
Py_BUILD_ASSERT(sizeof(unsigned long) <= 4);
|
||||
unsigned long msb;
|
||||
if (_BitScanReverse(&msb, x)) {
|
||||
return (int)msb + 1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
const int BIT_LENGTH_TABLE[32] = {
|
||||
0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
|
||||
};
|
||||
int msb = 0;
|
||||
while (x >= 32) {
|
||||
msb += 6;
|
||||
x >>= 6;
|
||||
}
|
||||
msb += BIT_LENGTH_TABLE[x];
|
||||
return msb;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_BITUTILS_H */
|
||||
317
src/external/windows/include/python/internal/pycore_blocks_output_buffer.h
vendored
Executable file
317
src/external/windows/include/python/internal/pycore_blocks_output_buffer.h
vendored
Executable file
@ -0,0 +1,317 @@
|
||||
/*
|
||||
_BlocksOutputBuffer is used to maintain an output buffer
|
||||
that has unpredictable size. Suitable for compression/decompression
|
||||
API (bz2/lzma/zlib) that has stream->next_out and stream->avail_out:
|
||||
|
||||
stream->next_out: point to the next output position.
|
||||
stream->avail_out: the number of available bytes left in the buffer.
|
||||
|
||||
It maintains a list of bytes object, so there is no overhead of resizing
|
||||
the buffer.
|
||||
|
||||
Usage:
|
||||
|
||||
1, Initialize the struct instance like this:
|
||||
_BlocksOutputBuffer buffer = {.list = NULL};
|
||||
Set .list to NULL for _BlocksOutputBuffer_OnError()
|
||||
|
||||
2, Initialize the buffer use one of these functions:
|
||||
_BlocksOutputBuffer_InitAndGrow()
|
||||
_BlocksOutputBuffer_InitWithSize()
|
||||
|
||||
3, If (avail_out == 0), grow the buffer:
|
||||
_BlocksOutputBuffer_Grow()
|
||||
|
||||
4, Get the current outputted data size:
|
||||
_BlocksOutputBuffer_GetDataSize()
|
||||
|
||||
5, Finish the buffer, and return a bytes object:
|
||||
_BlocksOutputBuffer_Finish()
|
||||
|
||||
6, Clean up the buffer when an error occurred:
|
||||
_BlocksOutputBuffer_OnError()
|
||||
*/
|
||||
|
||||
#ifndef Py_INTERNAL_BLOCKS_OUTPUT_BUFFER_H
|
||||
#define Py_INTERNAL_BLOCKS_OUTPUT_BUFFER_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
typedef struct {
|
||||
// List of bytes objects
|
||||
PyObject *list;
|
||||
// Number of whole allocated size
|
||||
Py_ssize_t allocated;
|
||||
// Max length of the buffer, negative number means unlimited length.
|
||||
Py_ssize_t max_length;
|
||||
} _BlocksOutputBuffer;
|
||||
|
||||
static const char unable_allocate_msg[] = "Unable to allocate output buffer.";
|
||||
|
||||
/* In 32-bit build, the max block size should <= INT32_MAX. */
|
||||
#define OUTPUT_BUFFER_MAX_BLOCK_SIZE (256*1024*1024)
|
||||
|
||||
/* Block size sequence */
|
||||
#define KB (1024)
|
||||
#define MB (1024*1024)
|
||||
static const Py_ssize_t BUFFER_BLOCK_SIZE[] =
|
||||
{ 32*KB, 64*KB, 256*KB, 1*MB, 4*MB, 8*MB, 16*MB, 16*MB,
|
||||
32*MB, 32*MB, 32*MB, 32*MB, 64*MB, 64*MB, 128*MB, 128*MB,
|
||||
OUTPUT_BUFFER_MAX_BLOCK_SIZE };
|
||||
#undef KB
|
||||
#undef MB
|
||||
|
||||
/* According to the block sizes defined by BUFFER_BLOCK_SIZE, the whole
|
||||
allocated size growth step is:
|
||||
1 32 KB +32 KB
|
||||
2 96 KB +64 KB
|
||||
3 352 KB +256 KB
|
||||
4 1.34 MB +1 MB
|
||||
5 5.34 MB +4 MB
|
||||
6 13.34 MB +8 MB
|
||||
7 29.34 MB +16 MB
|
||||
8 45.34 MB +16 MB
|
||||
9 77.34 MB +32 MB
|
||||
10 109.34 MB +32 MB
|
||||
11 141.34 MB +32 MB
|
||||
12 173.34 MB +32 MB
|
||||
13 237.34 MB +64 MB
|
||||
14 301.34 MB +64 MB
|
||||
15 429.34 MB +128 MB
|
||||
16 557.34 MB +128 MB
|
||||
17 813.34 MB +256 MB
|
||||
18 1069.34 MB +256 MB
|
||||
19 1325.34 MB +256 MB
|
||||
20 1581.34 MB +256 MB
|
||||
21 1837.34 MB +256 MB
|
||||
22 2093.34 MB +256 MB
|
||||
...
|
||||
*/
|
||||
|
||||
/* Initialize the buffer, and grow the buffer.
|
||||
|
||||
max_length: Max length of the buffer, -1 for unlimited length.
|
||||
|
||||
On success, return allocated size (>=0)
|
||||
On failure, return -1
|
||||
*/
|
||||
static inline Py_ssize_t
|
||||
_BlocksOutputBuffer_InitAndGrow(_BlocksOutputBuffer *buffer,
|
||||
const Py_ssize_t max_length,
|
||||
void **next_out)
|
||||
{
|
||||
PyObject *b;
|
||||
Py_ssize_t block_size;
|
||||
|
||||
// ensure .list was set to NULL
|
||||
assert(buffer->list == NULL);
|
||||
|
||||
// get block size
|
||||
if (0 <= max_length && max_length < BUFFER_BLOCK_SIZE[0]) {
|
||||
block_size = max_length;
|
||||
} else {
|
||||
block_size = BUFFER_BLOCK_SIZE[0];
|
||||
}
|
||||
|
||||
// the first block
|
||||
b = PyBytes_FromStringAndSize(NULL, block_size);
|
||||
if (b == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// create the list
|
||||
buffer->list = PyList_New(1);
|
||||
if (buffer->list == NULL) {
|
||||
Py_DECREF(b);
|
||||
return -1;
|
||||
}
|
||||
PyList_SET_ITEM(buffer->list, 0, b);
|
||||
|
||||
// set variables
|
||||
buffer->allocated = block_size;
|
||||
buffer->max_length = max_length;
|
||||
|
||||
*next_out = PyBytes_AS_STRING(b);
|
||||
return block_size;
|
||||
}
|
||||
|
||||
/* Initialize the buffer, with an initial size.
|
||||
|
||||
Check block size limit in the outer wrapper function. For example, some libs
|
||||
accept UINT32_MAX as the maximum block size, then init_size should <= it.
|
||||
|
||||
On success, return allocated size (>=0)
|
||||
On failure, return -1
|
||||
*/
|
||||
static inline Py_ssize_t
|
||||
_BlocksOutputBuffer_InitWithSize(_BlocksOutputBuffer *buffer,
|
||||
const Py_ssize_t init_size,
|
||||
void **next_out)
|
||||
{
|
||||
PyObject *b;
|
||||
|
||||
// ensure .list was set to NULL
|
||||
assert(buffer->list == NULL);
|
||||
|
||||
// the first block
|
||||
b = PyBytes_FromStringAndSize(NULL, init_size);
|
||||
if (b == NULL) {
|
||||
PyErr_SetString(PyExc_MemoryError, unable_allocate_msg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// create the list
|
||||
buffer->list = PyList_New(1);
|
||||
if (buffer->list == NULL) {
|
||||
Py_DECREF(b);
|
||||
return -1;
|
||||
}
|
||||
PyList_SET_ITEM(buffer->list, 0, b);
|
||||
|
||||
// set variables
|
||||
buffer->allocated = init_size;
|
||||
buffer->max_length = -1;
|
||||
|
||||
*next_out = PyBytes_AS_STRING(b);
|
||||
return init_size;
|
||||
}
|
||||
|
||||
/* Grow the buffer. The avail_out must be 0, please check it before calling.
|
||||
|
||||
On success, return allocated size (>=0)
|
||||
On failure, return -1
|
||||
*/
|
||||
static inline Py_ssize_t
|
||||
_BlocksOutputBuffer_Grow(_BlocksOutputBuffer *buffer,
|
||||
void **next_out,
|
||||
const Py_ssize_t avail_out)
|
||||
{
|
||||
PyObject *b;
|
||||
const Py_ssize_t list_len = Py_SIZE(buffer->list);
|
||||
Py_ssize_t block_size;
|
||||
|
||||
// ensure no gaps in the data
|
||||
if (avail_out != 0) {
|
||||
PyErr_SetString(PyExc_SystemError,
|
||||
"avail_out is non-zero in _BlocksOutputBuffer_Grow().");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// get block size
|
||||
if (list_len < (Py_ssize_t) Py_ARRAY_LENGTH(BUFFER_BLOCK_SIZE)) {
|
||||
block_size = BUFFER_BLOCK_SIZE[list_len];
|
||||
} else {
|
||||
block_size = BUFFER_BLOCK_SIZE[Py_ARRAY_LENGTH(BUFFER_BLOCK_SIZE) - 1];
|
||||
}
|
||||
|
||||
// check max_length
|
||||
if (buffer->max_length >= 0) {
|
||||
// if (rest == 0), should not grow the buffer.
|
||||
Py_ssize_t rest = buffer->max_length - buffer->allocated;
|
||||
assert(rest > 0);
|
||||
|
||||
// block_size of the last block
|
||||
if (block_size > rest) {
|
||||
block_size = rest;
|
||||
}
|
||||
}
|
||||
|
||||
// check buffer->allocated overflow
|
||||
if (block_size > PY_SSIZE_T_MAX - buffer->allocated) {
|
||||
PyErr_SetString(PyExc_MemoryError, unable_allocate_msg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// create the block
|
||||
b = PyBytes_FromStringAndSize(NULL, block_size);
|
||||
if (b == NULL) {
|
||||
PyErr_SetString(PyExc_MemoryError, unable_allocate_msg);
|
||||
return -1;
|
||||
}
|
||||
if (PyList_Append(buffer->list, b) < 0) {
|
||||
Py_DECREF(b);
|
||||
return -1;
|
||||
}
|
||||
Py_DECREF(b);
|
||||
|
||||
// set variables
|
||||
buffer->allocated += block_size;
|
||||
|
||||
*next_out = PyBytes_AS_STRING(b);
|
||||
return block_size;
|
||||
}
|
||||
|
||||
/* Return the current outputted data size. */
|
||||
static inline Py_ssize_t
|
||||
_BlocksOutputBuffer_GetDataSize(_BlocksOutputBuffer *buffer,
|
||||
const Py_ssize_t avail_out)
|
||||
{
|
||||
return buffer->allocated - avail_out;
|
||||
}
|
||||
|
||||
/* Finish the buffer.
|
||||
|
||||
Return a bytes object on success
|
||||
Return NULL on failure
|
||||
*/
|
||||
static inline PyObject *
|
||||
_BlocksOutputBuffer_Finish(_BlocksOutputBuffer *buffer,
|
||||
const Py_ssize_t avail_out)
|
||||
{
|
||||
PyObject *result, *block;
|
||||
const Py_ssize_t list_len = Py_SIZE(buffer->list);
|
||||
|
||||
// fast path for single block
|
||||
if ((list_len == 1 && avail_out == 0) ||
|
||||
(list_len == 2 && Py_SIZE(PyList_GET_ITEM(buffer->list, 1)) == avail_out))
|
||||
{
|
||||
block = PyList_GET_ITEM(buffer->list, 0);
|
||||
Py_INCREF(block);
|
||||
|
||||
Py_CLEAR(buffer->list);
|
||||
return block;
|
||||
}
|
||||
|
||||
// final bytes object
|
||||
result = PyBytes_FromStringAndSize(NULL, buffer->allocated - avail_out);
|
||||
if (result == NULL) {
|
||||
PyErr_SetString(PyExc_MemoryError, unable_allocate_msg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// memory copy
|
||||
if (list_len > 0) {
|
||||
char *posi = PyBytes_AS_STRING(result);
|
||||
|
||||
// blocks except the last one
|
||||
Py_ssize_t i = 0;
|
||||
for (; i < list_len-1; i++) {
|
||||
block = PyList_GET_ITEM(buffer->list, i);
|
||||
memcpy(posi, PyBytes_AS_STRING(block), Py_SIZE(block));
|
||||
posi += Py_SIZE(block);
|
||||
}
|
||||
// the last block
|
||||
block = PyList_GET_ITEM(buffer->list, i);
|
||||
memcpy(posi, PyBytes_AS_STRING(block), Py_SIZE(block) - avail_out);
|
||||
} else {
|
||||
assert(Py_SIZE(result) == 0);
|
||||
}
|
||||
|
||||
Py_CLEAR(buffer->list);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Clean up the buffer when an error occurred. */
|
||||
static inline void
|
||||
_BlocksOutputBuffer_OnError(_BlocksOutputBuffer *buffer)
|
||||
{
|
||||
Py_CLEAR(buffer->list);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* Py_INTERNAL_BLOCKS_OUTPUT_BUFFER_H */
|
||||
@ -1,88 +0,0 @@
|
||||
/* Bytes swap functions, reverse order of bytes:
|
||||
|
||||
- _Py_bswap16(uint16_t)
|
||||
- _Py_bswap32(uint32_t)
|
||||
- _Py_bswap64(uint64_t)
|
||||
*/
|
||||
|
||||
#ifndef Py_INTERNAL_BSWAP_H
|
||||
#define Py_INTERNAL_BSWAP_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) \
|
||||
&& ((__GNUC__ >= 5) || (__GNUC__ == 4) && (__GNUC_MINOR__ >= 8))
|
||||
/* __builtin_bswap16() is available since GCC 4.8,
|
||||
__builtin_bswap32() is available since GCC 4.3,
|
||||
__builtin_bswap64() is available since GCC 4.3. */
|
||||
# define _PY_HAVE_BUILTIN_BSWAP
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Get _byteswap_ushort(), _byteswap_ulong(), _byteswap_uint64() */
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
static inline uint16_t
|
||||
_Py_bswap16(uint16_t word)
|
||||
{
|
||||
#if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap16)
|
||||
return __builtin_bswap16(word);
|
||||
#elif defined(_MSC_VER)
|
||||
Py_BUILD_ASSERT(sizeof(word) == sizeof(unsigned short));
|
||||
return _byteswap_ushort(word);
|
||||
#else
|
||||
// Portable implementation which doesn't rely on circular bit shift
|
||||
return ( ((word & UINT16_C(0x00FF)) << 8)
|
||||
| ((word & UINT16_C(0xFF00)) >> 8));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
_Py_bswap32(uint32_t word)
|
||||
{
|
||||
#if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap32)
|
||||
return __builtin_bswap32(word);
|
||||
#elif defined(_MSC_VER)
|
||||
Py_BUILD_ASSERT(sizeof(word) == sizeof(unsigned long));
|
||||
return _byteswap_ulong(word);
|
||||
#else
|
||||
// Portable implementation which doesn't rely on circular bit shift
|
||||
return ( ((word & UINT32_C(0x000000FF)) << 24)
|
||||
| ((word & UINT32_C(0x0000FF00)) << 8)
|
||||
| ((word & UINT32_C(0x00FF0000)) >> 8)
|
||||
| ((word & UINT32_C(0xFF000000)) >> 24));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
_Py_bswap64(uint64_t word)
|
||||
{
|
||||
#if defined(_PY_HAVE_BUILTIN_BSWAP) || _Py__has_builtin(__builtin_bswap64)
|
||||
return __builtin_bswap64(word);
|
||||
#elif defined(_MSC_VER)
|
||||
return _byteswap_uint64(word);
|
||||
#else
|
||||
// Portable implementation which doesn't rely on circular bit shift
|
||||
return ( ((word & UINT64_C(0x00000000000000FF)) << 56)
|
||||
| ((word & UINT64_C(0x000000000000FF00)) << 40)
|
||||
| ((word & UINT64_C(0x0000000000FF0000)) << 24)
|
||||
| ((word & UINT64_C(0x00000000FF000000)) << 8)
|
||||
| ((word & UINT64_C(0x000000FF00000000)) >> 8)
|
||||
| ((word & UINT64_C(0x0000FF0000000000)) >> 24)
|
||||
| ((word & UINT64_C(0x00FF000000000000)) >> 40)
|
||||
| ((word & UINT64_C(0xFF00000000000000)) >> 56));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_BSWAP_H */
|
||||
|
||||
@ -23,44 +23,50 @@ PyAPI_FUNC(int) _PyEval_AddPendingCall(
|
||||
PyInterpreterState *interp,
|
||||
int (*func)(void *),
|
||||
void *arg);
|
||||
PyAPI_FUNC(void) _PyEval_SignalAsyncExc(PyThreadState *tstate);
|
||||
PyAPI_FUNC(void) _PyEval_SignalAsyncExc(PyInterpreterState *interp);
|
||||
#ifdef HAVE_FORK
|
||||
extern void _PyEval_ReInitThreads(struct pyruntimestate *runtime);
|
||||
extern PyStatus _PyEval_ReInitThreads(PyThreadState *tstate);
|
||||
#endif
|
||||
PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
|
||||
PyThreadState *tstate,
|
||||
int new_depth);
|
||||
|
||||
/* Private function */
|
||||
void _PyEval_Fini(void);
|
||||
|
||||
|
||||
extern PyObject* _PyEval_GetBuiltins(PyThreadState *tstate);
|
||||
extern PyObject *_PyEval_BuiltinsFromGlobals(
|
||||
PyThreadState *tstate,
|
||||
PyObject *globals);
|
||||
|
||||
|
||||
static inline PyObject*
|
||||
_PyEval_EvalFrame(PyThreadState *tstate, PyFrameObject *f, int throwflag)
|
||||
{
|
||||
return tstate->interp->eval_frame(tstate, f, throwflag);
|
||||
}
|
||||
|
||||
extern PyObject *_PyEval_EvalCode(
|
||||
PyThreadState *tstate,
|
||||
PyObject *_co, PyObject *globals, PyObject *locals,
|
||||
PyObject *const *args, Py_ssize_t argcount,
|
||||
PyObject *const *kwnames, PyObject *const *kwargs,
|
||||
Py_ssize_t kwcount, int kwstep,
|
||||
PyObject *const *defs, Py_ssize_t defcount,
|
||||
PyObject *kwdefs, PyObject *closure,
|
||||
PyObject *name, PyObject *qualname);
|
||||
extern PyObject *
|
||||
_PyEval_Vector(PyThreadState *tstate,
|
||||
PyFrameConstructor *desc, PyObject *locals,
|
||||
PyObject* const* args, size_t argcount,
|
||||
PyObject *kwnames);
|
||||
|
||||
#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
|
||||
extern int _PyEval_ThreadsInitialized(PyInterpreterState *interp);
|
||||
#else
|
||||
extern int _PyEval_ThreadsInitialized(struct pyruntimestate *runtime);
|
||||
#endif
|
||||
extern PyStatus _PyEval_InitGIL(PyThreadState *tstate);
|
||||
extern void _PyEval_FiniGIL(PyThreadState *tstate);
|
||||
extern void _PyEval_FiniGIL(PyInterpreterState *interp);
|
||||
|
||||
extern void _PyEval_ReleaseLock(PyThreadState *tstate);
|
||||
|
||||
extern void _PyEval_DeactivateOpCache(void);
|
||||
|
||||
|
||||
/* --- _Py_EnterRecursiveCall() ----------------------------------------- */
|
||||
|
||||
PyAPI_DATA(int) _Py_CheckRecursionLimit;
|
||||
|
||||
#ifdef USE_STACKCHECK
|
||||
/* With USE_STACKCHECK macro defined, trigger stack checks in
|
||||
_Py_CheckRecursiveCall() on every 64th call to Py_EnterRecursiveCall. */
|
||||
@ -90,24 +96,8 @@ static inline int _Py_EnterRecursiveCall_inline(const char *where) {
|
||||
|
||||
#define Py_EnterRecursiveCall(where) _Py_EnterRecursiveCall_inline(where)
|
||||
|
||||
/* Compute the "lower-water mark" for a recursion limit. When
|
||||
* Py_LeaveRecursiveCall() is called with a recursion depth below this mark,
|
||||
* the overflowed flag is reset to 0. */
|
||||
static inline int _Py_RecursionLimitLowerWaterMark(int limit) {
|
||||
if (limit > 200) {
|
||||
return (limit - 50);
|
||||
}
|
||||
else {
|
||||
return (3 * (limit >> 2));
|
||||
}
|
||||
}
|
||||
|
||||
static inline void _Py_LeaveRecursiveCall(PyThreadState *tstate) {
|
||||
tstate->recursion_depth--;
|
||||
int limit = tstate->interp->ceval.recursion_limit;
|
||||
if (tstate->recursion_depth < _Py_RecursionLimitLowerWaterMark(limit)) {
|
||||
tstate->overflowed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void _Py_LeaveRecursiveCall_inline(void) {
|
||||
|
||||
@ -3,16 +3,23 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
PyObject *ptr; /* Cached pointer (borrowed reference) */
|
||||
uint64_t globals_ver; /* ma_version of global dict */
|
||||
uint64_t builtins_ver; /* ma_version of builtin dict */
|
||||
} _PyOpcache_LoadGlobal;
|
||||
|
||||
typedef struct {
|
||||
PyTypeObject *type;
|
||||
Py_ssize_t hint;
|
||||
unsigned int tp_version_tag;
|
||||
} _PyOpCodeOpt_LoadAttr;
|
||||
|
||||
struct _PyOpcache {
|
||||
union {
|
||||
_PyOpcache_LoadGlobal lg;
|
||||
_PyOpCodeOpt_LoadAttr la;
|
||||
} u;
|
||||
char optimized;
|
||||
};
|
||||
|
||||
44
src/external/windows/include/python/internal/pycore_compile.h
vendored
Executable file
44
src/external/windows/include/python/internal/pycore_compile.h
vendored
Executable file
@ -0,0 +1,44 @@
|
||||
#ifndef Py_INTERNAL_COMPILE_H
|
||||
#define Py_INTERNAL_COMPILE_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
struct _arena; // Type defined in pycore_pyarena.h
|
||||
struct _mod; // Type defined in pycore_ast.h
|
||||
|
||||
// Export the symbol for test_peg_generator (built as a library)
|
||||
PyAPI_FUNC(PyCodeObject*) _PyAST_Compile(
|
||||
struct _mod *mod,
|
||||
PyObject *filename,
|
||||
PyCompilerFlags *flags,
|
||||
int optimize,
|
||||
struct _arena *arena);
|
||||
extern PyFutureFeatures* _PyFuture_FromAST(
|
||||
struct _mod * mod,
|
||||
PyObject *filename
|
||||
);
|
||||
|
||||
extern PyObject* _Py_Mangle(PyObject *p, PyObject *name);
|
||||
|
||||
typedef struct {
|
||||
int optimize;
|
||||
int ff_features;
|
||||
|
||||
int recursion_depth; /* current recursion depth */
|
||||
int recursion_limit; /* recursion limit */
|
||||
} _PyASTOptimizeState;
|
||||
|
||||
extern int _PyAST_Optimize(
|
||||
struct _mod *,
|
||||
struct _arena *arena,
|
||||
_PyASTOptimizeState *state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_COMPILE_H */
|
||||
@ -37,6 +37,6 @@ struct _pycontexttokenobject {
|
||||
|
||||
|
||||
int _PyContext_Init(void);
|
||||
void _PyContext_Fini(void);
|
||||
void _PyContext_Fini(PyInterpreterState *interp);
|
||||
|
||||
#endif /* !Py_INTERNAL_CONTEXT_H */
|
||||
|
||||
@ -48,6 +48,11 @@ PyAPI_FUNC(int) _Py_GetLocaleconvNumeric(
|
||||
PyObject **decimal_point,
|
||||
PyObject **thousands_sep);
|
||||
|
||||
PyAPI_FUNC(void) _Py_closerange(int first, int last);
|
||||
|
||||
PyAPI_FUNC(wchar_t*) _Py_GetLocaleEncoding(void);
|
||||
PyAPI_FUNC(PyObject*) _Py_GetLocaleEncodingObject(void);
|
||||
|
||||
#ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION
|
||||
extern int _Py_LocaleUsesNonUnicodeWchar(void);
|
||||
|
||||
|
||||
27
src/external/windows/include/python/internal/pycore_format.h
vendored
Executable file
27
src/external/windows/include/python/internal/pycore_format.h
vendored
Executable file
@ -0,0 +1,27 @@
|
||||
#ifndef Py_INTERNAL_FORMAT_H
|
||||
#define Py_INTERNAL_FORMAT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
/* Format codes
|
||||
* F_LJUST '-'
|
||||
* F_SIGN '+'
|
||||
* F_BLANK ' '
|
||||
* F_ALT '#'
|
||||
* F_ZERO '0'
|
||||
*/
|
||||
#define F_LJUST (1<<0)
|
||||
#define F_SIGN (1<<1)
|
||||
#define F_BLANK (1<<2)
|
||||
#define F_ALT (1<<3)
|
||||
#define F_ZERO (1<<4)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_FORMAT_H */
|
||||
@ -161,17 +161,19 @@ struct _gc_runtime_state {
|
||||
Py_ssize_t long_lived_pending;
|
||||
};
|
||||
|
||||
PyAPI_FUNC(void) _PyGC_InitState(struct _gc_runtime_state *);
|
||||
extern void _PyGC_InitState(struct _gc_runtime_state *);
|
||||
|
||||
extern Py_ssize_t _PyGC_CollectNoFail(PyThreadState *tstate);
|
||||
|
||||
|
||||
// Functions to clear types free lists
|
||||
extern void _PyFrame_ClearFreeList(void);
|
||||
extern void _PyTuple_ClearFreeList(void);
|
||||
extern void _PyFloat_ClearFreeList(void);
|
||||
extern void _PyList_ClearFreeList(void);
|
||||
extern void _PyDict_ClearFreeList(void);
|
||||
extern void _PyAsyncGen_ClearFreeLists(void);
|
||||
extern void _PyContext_ClearFreeList(void);
|
||||
extern void _PyFrame_ClearFreeList(PyInterpreterState *interp);
|
||||
extern void _PyTuple_ClearFreeList(PyInterpreterState *interp);
|
||||
extern void _PyFloat_ClearFreeList(PyInterpreterState *interp);
|
||||
extern void _PyList_ClearFreeList(PyInterpreterState *interp);
|
||||
extern void _PyDict_ClearFreeList(PyInterpreterState *interp);
|
||||
extern void _PyAsyncGen_ClearFreeLists(PyInterpreterState *interp);
|
||||
extern void _PyContext_ClearFreeList(PyInterpreterState *interp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@ -5,15 +5,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin(
|
||||
PyThreadState *tstate,
|
||||
const char *name /* UTF-8 encoded string */
|
||||
);
|
||||
|
||||
#ifdef HAVE_FORK
|
||||
extern void _PyImport_ReInitLock(void);
|
||||
extern PyStatus _PyImport_ReInitLock(void);
|
||||
#endif
|
||||
extern void _PyImport_Cleanup(PyThreadState *tstate);
|
||||
extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@ -44,6 +44,8 @@ struct pyruntimestate;
|
||||
#define _PyStatus_UPDATE_FUNC(err) \
|
||||
do { err.func = _PyStatus_GET_FUNC(); } while (0)
|
||||
|
||||
PyObject* _PyErr_SetFromPyStatus(PyStatus status);
|
||||
|
||||
/* --- PyWideStringList ------------------------------------------------ */
|
||||
|
||||
#define _PyWideStringList_INIT (PyWideStringList){.length = 0, .items = NULL}
|
||||
@ -100,6 +102,7 @@ typedef struct {
|
||||
int isolated; /* -I option */
|
||||
int use_environment; /* -E option */
|
||||
int dev_mode; /* -X dev and PYTHONDEVMODE */
|
||||
int warn_default_encoding; /* -X warn_default_encoding and PYTHONWARNDEFAULTENCODING */
|
||||
} _PyPreCmdline;
|
||||
|
||||
#define _PyPreCmdline_INIT \
|
||||
@ -149,13 +152,19 @@ PyAPI_FUNC(void) _PyConfig_InitCompatConfig(PyConfig *config);
|
||||
extern PyStatus _PyConfig_Copy(
|
||||
PyConfig *config,
|
||||
const PyConfig *config2);
|
||||
extern PyStatus _PyConfig_InitPathConfig(PyConfig *config);
|
||||
extern PyStatus _PyConfig_InitPathConfig(
|
||||
PyConfig *config,
|
||||
int compute_path_config);
|
||||
extern PyStatus _PyConfig_Read(PyConfig *config, int compute_path_config);
|
||||
extern PyStatus _PyConfig_Write(const PyConfig *config,
|
||||
struct pyruntimestate *runtime);
|
||||
extern PyStatus _PyConfig_SetPyArgv(
|
||||
PyConfig *config,
|
||||
const _PyArgv *args);
|
||||
|
||||
PyAPI_FUNC(PyObject*) _PyConfig_AsDict(const PyConfig *config);
|
||||
PyAPI_FUNC(int) _PyConfig_FromDict(PyConfig *config, PyObject *dict);
|
||||
|
||||
|
||||
/* --- Function used for testing ---------------------------------- */
|
||||
|
||||
|
||||
@ -8,12 +8,11 @@ extern "C" {
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "pycore_atomic.h" /* _Py_atomic_address */
|
||||
#include "pycore_gil.h" /* struct _gil_runtime_state */
|
||||
#include "pycore_gc.h" /* struct _gc_runtime_state */
|
||||
#include "pycore_warnings.h" /* struct _warnings_runtime_state */
|
||||
|
||||
/* ceval state */
|
||||
#include "pycore_atomic.h" // _Py_atomic_address
|
||||
#include "pycore_ast_state.h" // struct ast_state
|
||||
#include "pycore_gil.h" // struct _gil_runtime_state
|
||||
#include "pycore_gc.h" // struct _gc_runtime_state
|
||||
#include "pycore_warnings.h" // struct _warnings_runtime_state
|
||||
|
||||
struct _pending_calls {
|
||||
PyThread_type_lock lock;
|
||||
@ -34,18 +33,15 @@ struct _pending_calls {
|
||||
|
||||
struct _ceval_state {
|
||||
int recursion_limit;
|
||||
/* Records whether tracing is on for any thread. Counts the number
|
||||
of threads for which tstate->c_tracefunc is non-NULL, so if the
|
||||
value is 0, we know we don't have to check this thread's
|
||||
c_tracefunc. This speeds up the if statement in
|
||||
_PyEval_EvalFrameDefault() after fast_next_opcode. */
|
||||
int tracing_possible;
|
||||
/* This single variable consolidates all requests to break out of
|
||||
the fast path in the eval loop. */
|
||||
_Py_atomic_int eval_breaker;
|
||||
/* Request for dropping the GIL */
|
||||
_Py_atomic_int gil_drop_request;
|
||||
struct _pending_calls pending;
|
||||
#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
|
||||
struct _gil_runtime_state gil;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* fs_codec.encoding is initialized to NULL.
|
||||
@ -57,8 +53,150 @@ struct _Py_unicode_fs_codec {
|
||||
_Py_error_handler error_handler;
|
||||
};
|
||||
|
||||
struct _Py_bytes_state {
|
||||
PyObject *empty_string;
|
||||
PyBytesObject *characters[256];
|
||||
};
|
||||
|
||||
struct _Py_unicode_ids {
|
||||
Py_ssize_t size;
|
||||
PyObject **array;
|
||||
};
|
||||
|
||||
struct _Py_unicode_state {
|
||||
// The empty Unicode object is a singleton to improve performance.
|
||||
PyObject *empty_string;
|
||||
/* Single character Unicode strings in the Latin-1 range are being
|
||||
shared as well. */
|
||||
PyObject *latin1[256];
|
||||
struct _Py_unicode_fs_codec fs_codec;
|
||||
|
||||
// Unused member kept for ABI backward compatibility with Python 3.10.0:
|
||||
// see bpo-46006.
|
||||
PyObject *unused_interned;
|
||||
|
||||
// Unicode identifiers (_Py_Identifier): see _PyUnicode_FromId()
|
||||
struct _Py_unicode_ids ids;
|
||||
};
|
||||
|
||||
struct _Py_float_state {
|
||||
/* Special free list
|
||||
free_list is a singly-linked list of available PyFloatObjects,
|
||||
linked via abuse of their ob_type members. */
|
||||
int numfree;
|
||||
PyFloatObject *free_list;
|
||||
};
|
||||
|
||||
/* Speed optimization to avoid frequent malloc/free of small tuples */
|
||||
#ifndef PyTuple_MAXSAVESIZE
|
||||
// Largest tuple to save on free list
|
||||
# define PyTuple_MAXSAVESIZE 20
|
||||
#endif
|
||||
#ifndef PyTuple_MAXFREELIST
|
||||
// Maximum number of tuples of each size to save
|
||||
# define PyTuple_MAXFREELIST 2000
|
||||
#endif
|
||||
|
||||
struct _Py_tuple_state {
|
||||
#if PyTuple_MAXSAVESIZE > 0
|
||||
/* Entries 1 up to PyTuple_MAXSAVESIZE are free lists,
|
||||
entry 0 is the empty tuple () of which at most one instance
|
||||
will be allocated. */
|
||||
PyTupleObject *free_list[PyTuple_MAXSAVESIZE];
|
||||
int numfree[PyTuple_MAXSAVESIZE];
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Empty list reuse scheme to save calls to malloc and free */
|
||||
#ifndef PyList_MAXFREELIST
|
||||
# define PyList_MAXFREELIST 80
|
||||
#endif
|
||||
|
||||
struct _Py_list_state {
|
||||
PyListObject *free_list[PyList_MAXFREELIST];
|
||||
int numfree;
|
||||
};
|
||||
|
||||
#ifndef PyDict_MAXFREELIST
|
||||
# define PyDict_MAXFREELIST 80
|
||||
#endif
|
||||
|
||||
struct _Py_dict_state {
|
||||
/* Dictionary reuse scheme to save calls to malloc and free */
|
||||
PyDictObject *free_list[PyDict_MAXFREELIST];
|
||||
int numfree;
|
||||
PyDictKeysObject *keys_free_list[PyDict_MAXFREELIST];
|
||||
int keys_numfree;
|
||||
};
|
||||
|
||||
struct _Py_frame_state {
|
||||
PyFrameObject *free_list;
|
||||
/* number of frames currently in free_list */
|
||||
int numfree;
|
||||
};
|
||||
|
||||
#ifndef _PyAsyncGen_MAXFREELIST
|
||||
# define _PyAsyncGen_MAXFREELIST 80
|
||||
#endif
|
||||
|
||||
struct _Py_async_gen_state {
|
||||
/* Freelists boost performance 6-10%; they also reduce memory
|
||||
fragmentation, as _PyAsyncGenWrappedValue and PyAsyncGenASend
|
||||
are short-living objects that are instantiated for every
|
||||
__anext__() call. */
|
||||
struct _PyAsyncGenWrappedValue* value_freelist[_PyAsyncGen_MAXFREELIST];
|
||||
int value_numfree;
|
||||
|
||||
struct PyAsyncGenASend* asend_freelist[_PyAsyncGen_MAXFREELIST];
|
||||
int asend_numfree;
|
||||
};
|
||||
|
||||
struct _Py_context_state {
|
||||
// List of free PyContext objects
|
||||
PyContext *freelist;
|
||||
int numfree;
|
||||
};
|
||||
|
||||
struct _Py_exc_state {
|
||||
// The dict mapping from errno codes to OSError subclasses
|
||||
PyObject *errnomap;
|
||||
PyBaseExceptionObject *memerrors_freelist;
|
||||
int memerrors_numfree;
|
||||
};
|
||||
|
||||
|
||||
// atexit state
|
||||
typedef struct {
|
||||
PyObject *func;
|
||||
PyObject *args;
|
||||
PyObject *kwargs;
|
||||
} atexit_callback;
|
||||
|
||||
struct atexit_state {
|
||||
atexit_callback **callbacks;
|
||||
int ncallbacks;
|
||||
int callback_len;
|
||||
};
|
||||
|
||||
|
||||
// Type attribute lookup cache: speed up attribute and method lookups,
|
||||
// see _PyType_Lookup().
|
||||
struct type_cache_entry {
|
||||
unsigned int version; // initialized from type->tp_version_tag
|
||||
PyObject *name; // reference to exactly a str or None
|
||||
PyObject *value; // borrowed reference or NULL
|
||||
};
|
||||
|
||||
#define MCACHE_SIZE_EXP 12
|
||||
#define MCACHE_STATS 0
|
||||
|
||||
struct type_cache {
|
||||
struct type_cache_entry hashtable[1 << MCACHE_SIZE_EXP];
|
||||
#if MCACHE_STATS
|
||||
size_t hits;
|
||||
size_t misses;
|
||||
size_t collisions;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -67,6 +205,11 @@ struct _Py_unicode_state {
|
||||
#define _PY_NSMALLPOSINTS 257
|
||||
#define _PY_NSMALLNEGINTS 5
|
||||
|
||||
// _PyLong_GetZero() and _PyLong_GetOne() must always be available
|
||||
#if _PY_NSMALLPOSINTS < 2
|
||||
# error "_PY_NSMALLPOSINTS must be greater than 1"
|
||||
#endif
|
||||
|
||||
// The PyInterpreterState typedef is in Include/pystate.h.
|
||||
struct _is {
|
||||
|
||||
@ -88,10 +231,14 @@ struct _is {
|
||||
struct _ceval_state ceval;
|
||||
struct _gc_runtime_state gc;
|
||||
|
||||
// sys.modules dictionary
|
||||
PyObject *modules;
|
||||
PyObject *modules_by_index;
|
||||
// Dictionary of the sys module
|
||||
PyObject *sysdict;
|
||||
// Dictionary of the builtins module
|
||||
PyObject *builtins;
|
||||
// importlib module
|
||||
PyObject *importlib;
|
||||
|
||||
/* Used in Modules/_threadmodule.c. */
|
||||
@ -107,8 +254,6 @@ struct _is {
|
||||
PyObject *codec_error_registry;
|
||||
int codecs_initialized;
|
||||
|
||||
struct _Py_unicode_state unicode;
|
||||
|
||||
PyConfig config;
|
||||
#ifdef HAVE_DLOPEN
|
||||
int dlopenflags;
|
||||
@ -118,7 +263,7 @@ struct _is {
|
||||
|
||||
PyObject *builtins_copy;
|
||||
PyObject *import_func;
|
||||
/* Initialized to PyEval_EvalFrameDefault(). */
|
||||
// Initialized to _PyEval_EvalFrameDefault().
|
||||
_PyFrameEvalFunction eval_frame;
|
||||
|
||||
Py_ssize_t co_extra_user_count;
|
||||
@ -129,40 +274,41 @@ struct _is {
|
||||
PyObject *after_forkers_parent;
|
||||
PyObject *after_forkers_child;
|
||||
#endif
|
||||
/* AtExit module */
|
||||
void (*pyexitfunc)(PyObject *);
|
||||
PyObject *pyexitmodule;
|
||||
|
||||
uint64_t tstate_next_unique_id;
|
||||
|
||||
struct _warnings_runtime_state warnings;
|
||||
struct atexit_state atexit;
|
||||
|
||||
PyObject *audit_hooks;
|
||||
|
||||
struct {
|
||||
struct {
|
||||
int level;
|
||||
int atbol;
|
||||
} listnode;
|
||||
} parser;
|
||||
|
||||
#if _PY_NSMALLNEGINTS + _PY_NSMALLPOSINTS > 0
|
||||
/* Small integers are preallocated in this array so that they
|
||||
can be shared.
|
||||
The integers that are preallocated are those in the range
|
||||
-_PY_NSMALLNEGINTS (inclusive) to _PY_NSMALLPOSINTS (not inclusive).
|
||||
*/
|
||||
PyLongObject* small_ints[_PY_NSMALLNEGINTS + _PY_NSMALLPOSINTS];
|
||||
#endif
|
||||
struct _Py_bytes_state bytes;
|
||||
struct _Py_unicode_state unicode;
|
||||
struct _Py_float_state float_state;
|
||||
/* Using a cache is very effective since typically only a single slice is
|
||||
created and then deleted again. */
|
||||
PySliceObject *slice_cache;
|
||||
|
||||
struct _Py_tuple_state tuple;
|
||||
struct _Py_list_state list;
|
||||
struct _Py_dict_state dict_state;
|
||||
struct _Py_frame_state frame;
|
||||
struct _Py_async_gen_state async_gen;
|
||||
struct _Py_context_state context;
|
||||
struct _Py_exc_state exc_state;
|
||||
|
||||
struct ast_state ast;
|
||||
struct type_cache type_cache;
|
||||
};
|
||||
|
||||
/* Used by _PyImport_Cleanup() */
|
||||
extern void _PyInterpreterState_ClearModules(PyInterpreterState *interp);
|
||||
|
||||
extern PyStatus _PyInterpreterState_SetConfig(
|
||||
PyInterpreterState *interp,
|
||||
const PyConfig *config);
|
||||
|
||||
extern void _PyInterpreterState_Clear(PyThreadState *tstate);
|
||||
|
||||
|
||||
/* cross-interpreter data registry */
|
||||
@ -182,11 +328,10 @@ struct _xidregitem {
|
||||
PyAPI_FUNC(struct _is*) _PyInterpreterState_LookUpID(int64_t);
|
||||
|
||||
PyAPI_FUNC(int) _PyInterpreterState_IDInitref(struct _is *);
|
||||
PyAPI_FUNC(void) _PyInterpreterState_IDIncref(struct _is *);
|
||||
PyAPI_FUNC(int) _PyInterpreterState_IDIncref(struct _is *);
|
||||
PyAPI_FUNC(void) _PyInterpreterState_IDDecref(struct _is *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_INTERP_H */
|
||||
|
||||
|
||||
20
src/external/windows/include/python/internal/pycore_list.h
vendored
Executable file
20
src/external/windows/include/python/internal/pycore_list.h
vendored
Executable file
@ -0,0 +1,20 @@
|
||||
#ifndef Py_INTERNAL_LIST_H
|
||||
#define Py_INTERNAL_LIST_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "listobject.h" // _PyList_CAST()
|
||||
|
||||
|
||||
#define _PyList_ITEMS(op) (_PyList_CAST(op)->ob_item)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_LIST_H */
|
||||
40
src/external/windows/include/python/internal/pycore_long.h
vendored
Executable file
40
src/external/windows/include/python/internal/pycore_long.h
vendored
Executable file
@ -0,0 +1,40 @@
|
||||
#ifndef Py_INTERNAL_LONG_H
|
||||
#define Py_INTERNAL_LONG_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "pycore_interp.h" // PyInterpreterState.small_ints
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
|
||||
// Don't call this function but _PyLong_GetZero() and _PyLong_GetOne()
|
||||
static inline PyObject* __PyLong_GetSmallInt_internal(int value)
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
assert(-_PY_NSMALLNEGINTS <= value && value < _PY_NSMALLPOSINTS);
|
||||
size_t index = _PY_NSMALLNEGINTS + value;
|
||||
PyObject *obj = (PyObject*)interp->small_ints[index];
|
||||
// _PyLong_GetZero(), _PyLong_GetOne() and get_small_int() must not be
|
||||
// called before _PyLong_Init() nor after _PyLong_Fini().
|
||||
assert(obj != NULL);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Return a borrowed reference to the zero singleton.
|
||||
// The function cannot return NULL.
|
||||
static inline PyObject* _PyLong_GetZero(void)
|
||||
{ return __PyLong_GetSmallInt_internal(0); }
|
||||
|
||||
// Return a borrowed reference to the one singleton.
|
||||
// The function cannot return NULL.
|
||||
static inline PyObject* _PyLong_GetOne(void)
|
||||
{ return __PyLong_GetSmallInt_internal(1); }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_LONG_H */
|
||||
42
src/external/windows/include/python/internal/pycore_moduleobject.h
vendored
Executable file
42
src/external/windows/include/python/internal/pycore_moduleobject.h
vendored
Executable file
@ -0,0 +1,42 @@
|
||||
#ifndef Py_INTERNAL_MODULEOBJECT_H
|
||||
#define Py_INTERNAL_MODULEOBJECT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
PyObject *md_dict;
|
||||
struct PyModuleDef *md_def;
|
||||
void *md_state;
|
||||
PyObject *md_weaklist;
|
||||
// for logging purposes after md_dict is cleared
|
||||
PyObject *md_name;
|
||||
} PyModuleObject;
|
||||
|
||||
static inline PyModuleDef* _PyModule_GetDef(PyObject *mod) {
|
||||
assert(PyModule_Check(mod));
|
||||
return ((PyModuleObject *)mod)->md_def;
|
||||
}
|
||||
|
||||
static inline void* _PyModule_GetState(PyObject* mod) {
|
||||
assert(PyModule_Check(mod));
|
||||
return ((PyModuleObject *)mod)->md_state;
|
||||
}
|
||||
|
||||
static inline PyObject* _PyModule_GetDict(PyObject *mod) {
|
||||
assert(PyModule_Check(mod));
|
||||
PyObject *dict = ((PyModuleObject *)mod) -> md_dict;
|
||||
// _PyModule_GetDict(mod) must not be used after calling module_clear(mod)
|
||||
assert(dict != NULL);
|
||||
return dict;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_MODULEOBJECT_H */
|
||||
@ -8,14 +8,58 @@ extern "C" {
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "pycore_gc.h" // _PyObject_GC_IS_TRACKED()
|
||||
#include "pycore_interp.h" // PyInterpreterState.gc
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_gc.h" // _PyObject_GC_IS_TRACKED()
|
||||
#include "pycore_interp.h" // PyInterpreterState.gc
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
|
||||
PyAPI_FUNC(int) _PyType_CheckConsistency(PyTypeObject *type);
|
||||
PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content);
|
||||
|
||||
/* Update the Python traceback of an object. This function must be called
|
||||
when a memory block is reused from a free list.
|
||||
|
||||
Internal function called by _Py_NewReference(). */
|
||||
extern int _PyTraceMalloc_NewReference(PyObject *op);
|
||||
|
||||
// Fast inlined version of PyType_HasFeature()
|
||||
static inline int
|
||||
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
|
||||
return ((type->tp_flags & feature) != 0);
|
||||
}
|
||||
|
||||
extern void _PyType_InitCache(PyInterpreterState *interp);
|
||||
|
||||
/* Only private in Python 3.10 and 3.9.8+; public in 3.11 */
|
||||
extern PyObject *_PyType_GetQualName(PyTypeObject *type);
|
||||
|
||||
/* Inline functions trading binary compatibility for speed:
|
||||
_PyObject_Init() is the fast version of PyObject_Init(), and
|
||||
_PyObject_InitVar() is the fast version of PyObject_InitVar().
|
||||
|
||||
These inline functions must not be called with op=NULL. */
|
||||
static inline void
|
||||
_PyObject_Init(PyObject *op, PyTypeObject *typeobj)
|
||||
{
|
||||
assert(op != NULL);
|
||||
Py_SET_TYPE(op, typeobj);
|
||||
if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
|
||||
Py_INCREF(typeobj);
|
||||
}
|
||||
_Py_NewReference(op);
|
||||
}
|
||||
|
||||
static inline void
|
||||
_PyObject_InitVar(PyVarObject *op, PyTypeObject *typeobj, Py_ssize_t size)
|
||||
{
|
||||
assert(op != NULL);
|
||||
Py_SET_SIZE(op, size);
|
||||
_PyObject_Init((PyObject *)op, typeobj);
|
||||
}
|
||||
|
||||
|
||||
/* Tell the GC to track this object.
|
||||
*
|
||||
* The object must not be tracked by the GC.
|
||||
*
|
||||
* NB: While the object is tracked by the collector, it must be safe to call the
|
||||
* ob_traverse method.
|
||||
@ -24,23 +68,27 @@ PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content);
|
||||
* because it's not object header. So we don't use _PyGCHead_PREV() and
|
||||
* _PyGCHead_SET_PREV() for it to avoid unnecessary bitwise operations.
|
||||
*
|
||||
* The PyObject_GC_Track() function is the public version of this macro.
|
||||
* See also the public PyObject_GC_Track() function.
|
||||
*/
|
||||
static inline void _PyObject_GC_TRACK_impl(const char *filename, int lineno,
|
||||
PyObject *op)
|
||||
static inline void _PyObject_GC_TRACK(
|
||||
// The preprocessor removes _PyObject_ASSERT_FROM() calls if NDEBUG is defined
|
||||
#ifndef NDEBUG
|
||||
const char *filename, int lineno,
|
||||
#endif
|
||||
PyObject *op)
|
||||
{
|
||||
_PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
|
||||
"object already tracked by the garbage collector",
|
||||
filename, lineno, "_PyObject_GC_TRACK");
|
||||
filename, lineno, __func__);
|
||||
|
||||
PyGC_Head *gc = _Py_AS_GC(op);
|
||||
_PyObject_ASSERT_FROM(op,
|
||||
(gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
|
||||
"object is in generation which is garbage collected",
|
||||
filename, lineno, "_PyObject_GC_TRACK");
|
||||
filename, lineno, __func__);
|
||||
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
PyGC_Head *generation0 = tstate->interp->gc.generation0;
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
PyGC_Head *generation0 = interp->gc.generation0;
|
||||
PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
|
||||
_PyGCHead_SET_NEXT(last, gc);
|
||||
_PyGCHead_SET_PREV(gc, last);
|
||||
@ -48,9 +96,6 @@ static inline void _PyObject_GC_TRACK_impl(const char *filename, int lineno,
|
||||
generation0->_gc_prev = (uintptr_t)gc;
|
||||
}
|
||||
|
||||
#define _PyObject_GC_TRACK(op) \
|
||||
_PyObject_GC_TRACK_impl(__FILE__, __LINE__, _PyObject_CAST(op))
|
||||
|
||||
/* Tell the GC to stop tracking this object.
|
||||
*
|
||||
* Internal note: This may be called while GC. So _PyGC_PREV_MASK_COLLECTING
|
||||
@ -58,14 +103,19 @@ static inline void _PyObject_GC_TRACK_impl(const char *filename, int lineno,
|
||||
*
|
||||
* The object must be tracked by the GC.
|
||||
*
|
||||
* The PyObject_GC_UnTrack() function is the public version of this macro.
|
||||
* See also the public PyObject_GC_UnTrack() which accept an object which is
|
||||
* not tracked.
|
||||
*/
|
||||
static inline void _PyObject_GC_UNTRACK_impl(const char *filename, int lineno,
|
||||
PyObject *op)
|
||||
static inline void _PyObject_GC_UNTRACK(
|
||||
// The preprocessor removes _PyObject_ASSERT_FROM() calls if NDEBUG is defined
|
||||
#ifndef NDEBUG
|
||||
const char *filename, int lineno,
|
||||
#endif
|
||||
PyObject *op)
|
||||
{
|
||||
_PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
|
||||
"object not tracked by the garbage collector",
|
||||
filename, lineno, "_PyObject_GC_UNTRACK");
|
||||
filename, lineno, __func__);
|
||||
|
||||
PyGC_Head *gc = _Py_AS_GC(op);
|
||||
PyGC_Head *prev = _PyGCHead_PREV(gc);
|
||||
@ -76,8 +126,20 @@ static inline void _PyObject_GC_UNTRACK_impl(const char *filename, int lineno,
|
||||
gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
|
||||
}
|
||||
|
||||
#define _PyObject_GC_UNTRACK(op) \
|
||||
_PyObject_GC_UNTRACK_impl(__FILE__, __LINE__, _PyObject_CAST(op))
|
||||
// Macros to accept any type for the parameter, and to automatically pass
|
||||
// the filename and the filename (if NDEBUG is not defined) where the macro
|
||||
// is called.
|
||||
#ifdef NDEBUG
|
||||
# define _PyObject_GC_TRACK(op) \
|
||||
_PyObject_GC_TRACK(_PyObject_CAST(op))
|
||||
# define _PyObject_GC_UNTRACK(op) \
|
||||
_PyObject_GC_UNTRACK(_PyObject_CAST(op))
|
||||
#else
|
||||
# define _PyObject_GC_TRACK(op) \
|
||||
_PyObject_GC_TRACK(__FILE__, __LINE__, _PyObject_CAST(op))
|
||||
# define _PyObject_GC_UNTRACK(op) \
|
||||
_PyObject_GC_UNTRACK(__FILE__, __LINE__, _PyObject_CAST(op))
|
||||
#endif
|
||||
|
||||
#ifdef Py_REF_DEBUG
|
||||
extern void _PyDebug_PrintTotalRefs(void);
|
||||
@ -96,12 +158,6 @@ _PyObject_GET_WEAKREFS_LISTPTR(PyObject *op)
|
||||
return (PyObject **)((char *)op + offset);
|
||||
}
|
||||
|
||||
// Fast inlined version of PyType_HasFeature()
|
||||
static inline int
|
||||
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
|
||||
return ((type->tp_flags & feature) != 0);
|
||||
}
|
||||
|
||||
// Fast inlined version of PyObject_IS_GC()
|
||||
static inline int
|
||||
_PyObject_IS_GC(PyObject *obj)
|
||||
@ -114,6 +170,16 @@ _PyObject_IS_GC(PyObject *obj)
|
||||
// Fast inlined version of PyType_IS_GC()
|
||||
#define _PyType_IS_GC(t) _PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC)
|
||||
|
||||
// Usage: assert(_Py_CheckSlotResult(obj, "__getitem__", result != NULL));
|
||||
extern int _Py_CheckSlotResult(
|
||||
PyObject *obj,
|
||||
const char *slot_name,
|
||||
int success);
|
||||
|
||||
// PyType_Ready() must be called if _PyType_IsReady() is false.
|
||||
// See also the Py_TPFLAGS_READY flag.
|
||||
#define _PyType_IsReady(type) ((type)->tp_dict != NULL)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
31
src/external/windows/include/python/internal/pycore_parser.h
vendored
Executable file
31
src/external/windows/include/python/internal/pycore_parser.h
vendored
Executable file
@ -0,0 +1,31 @@
|
||||
#ifndef Py_INTERNAL_PARSER_H
|
||||
#define Py_INTERNAL_PARSER_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
extern struct _mod* _PyParser_ASTFromString(
|
||||
const char *str,
|
||||
PyObject* filename,
|
||||
int mode,
|
||||
PyCompilerFlags *flags,
|
||||
PyArena *arena);
|
||||
extern struct _mod* _PyParser_ASTFromFile(
|
||||
FILE *fp,
|
||||
PyObject *filename_ob,
|
||||
const char *enc,
|
||||
int mode,
|
||||
const char *ps1,
|
||||
const char *ps2,
|
||||
PyCompilerFlags *flags,
|
||||
int *errcode,
|
||||
PyArena *arena);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_PARSER_H */
|
||||
@ -65,6 +65,7 @@ extern wchar_t* _Py_GetDLLPath(void);
|
||||
|
||||
extern PyStatus _PyConfig_WritePathConfig(const PyConfig *config);
|
||||
extern void _Py_DumpPathConfig(PyThreadState *tstate);
|
||||
extern PyObject* _PyPathConfig_AsDict(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
64
src/external/windows/include/python/internal/pycore_pyarena.h
vendored
Executable file
64
src/external/windows/include/python/internal/pycore_pyarena.h
vendored
Executable file
@ -0,0 +1,64 @@
|
||||
/* An arena-like memory interface for the compiler.
|
||||
*/
|
||||
|
||||
#ifndef Py_INTERNAL_PYARENA_H
|
||||
#define Py_INTERNAL_PYARENA_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
typedef struct _arena PyArena;
|
||||
|
||||
/* _PyArena_New() and _PyArena_Free() create a new arena and free it,
|
||||
respectively. Once an arena has been created, it can be used
|
||||
to allocate memory via _PyArena_Malloc(). Pointers to PyObject can
|
||||
also be registered with the arena via _PyArena_AddPyObject(), and the
|
||||
arena will ensure that the PyObjects stay alive at least until
|
||||
_PyArena_Free() is called. When an arena is freed, all the memory it
|
||||
allocated is freed, the arena releases internal references to registered
|
||||
PyObject*, and none of its pointers are valid.
|
||||
XXX (tim) What does "none of its pointers are valid" mean? Does it
|
||||
XXX mean that pointers previously obtained via _PyArena_Malloc() are
|
||||
XXX no longer valid? (That's clearly true, but not sure that's what
|
||||
XXX the text is trying to say.)
|
||||
|
||||
_PyArena_New() returns an arena pointer. On error, it
|
||||
returns a negative number and sets an exception.
|
||||
XXX (tim): Not true. On error, _PyArena_New() actually returns NULL,
|
||||
XXX and looks like it may or may not set an exception (e.g., if the
|
||||
XXX internal PyList_New(0) returns NULL, _PyArena_New() passes that on
|
||||
XXX and an exception is set; OTOH, if the internal
|
||||
XXX block_new(DEFAULT_BLOCK_SIZE) returns NULL, that's passed on but
|
||||
XXX an exception is not set in that case).
|
||||
*/
|
||||
PyAPI_FUNC(PyArena*) _PyArena_New(void);
|
||||
PyAPI_FUNC(void) _PyArena_Free(PyArena *);
|
||||
|
||||
/* Mostly like malloc(), return the address of a block of memory spanning
|
||||
* `size` bytes, or return NULL (without setting an exception) if enough
|
||||
* new memory can't be obtained. Unlike malloc(0), _PyArena_Malloc() with
|
||||
* size=0 does not guarantee to return a unique pointer (the pointer
|
||||
* returned may equal one or more other pointers obtained from
|
||||
* _PyArena_Malloc()).
|
||||
* Note that pointers obtained via _PyArena_Malloc() must never be passed to
|
||||
* the system free() or realloc(), or to any of Python's similar memory-
|
||||
* management functions. _PyArena_Malloc()-obtained pointers remain valid
|
||||
* until _PyArena_Free(ar) is called, at which point all pointers obtained
|
||||
* from the arena `ar` become invalid simultaneously.
|
||||
*/
|
||||
PyAPI_FUNC(void*) _PyArena_Malloc(PyArena *, size_t size);
|
||||
|
||||
/* This routine isn't a proper arena allocation routine. It takes
|
||||
* a PyObject* and records it so that it can be DECREFed when the
|
||||
* arena is freed.
|
||||
*/
|
||||
PyAPI_FUNC(int) _PyArena_AddPyObject(PyArena *, PyObject *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_PYARENA_H */
|
||||
@ -84,6 +84,12 @@ PyAPI_FUNC(PyObject *) _PyErr_FormatFromCauseTstate(
|
||||
|
||||
PyAPI_FUNC(int) _PyErr_CheckSignalsTstate(PyThreadState *tstate);
|
||||
|
||||
PyAPI_FUNC(void) _Py_DumpExtensionModules(int fd, PyInterpreterState *interp);
|
||||
|
||||
extern PyObject* _Py_Offer_Suggestions(PyObject* exception);
|
||||
PyAPI_FUNC(Py_ssize_t) _Py_UTF8_Edit_Cost(PyObject *str_a, PyObject *str_b,
|
||||
Py_ssize_t max_cost);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -8,6 +8,24 @@ extern "C" {
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include "pycore_runtime.h" // _PyRuntimeState
|
||||
|
||||
#ifndef NSIG
|
||||
# if defined(_NSIG)
|
||||
# define NSIG _NSIG /* For BSD/SysV */
|
||||
# elif defined(_SIGMAX)
|
||||
# define NSIG (_SIGMAX + 1) /* For QNX */
|
||||
# elif defined(SIGMAX)
|
||||
# define NSIG (SIGMAX + 1) /* For djgpp */
|
||||
# else
|
||||
# define NSIG 64 /* Use a reasonable default value */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Forward declarations */
|
||||
struct _PyArgv;
|
||||
struct pyruntimestate;
|
||||
@ -31,64 +49,71 @@ PyAPI_FUNC(int) _Py_IsLocaleCoercionTarget(const char *ctype_loc);
|
||||
|
||||
/* Various one-time initializers */
|
||||
|
||||
extern PyStatus _PyUnicode_Init(void);
|
||||
extern PyStatus _PyUnicode_Init(PyInterpreterState *interp);
|
||||
extern PyStatus _PyUnicode_InitTypes(void);
|
||||
extern PyStatus _PyBytes_Init(PyInterpreterState *interp);
|
||||
extern int _PyStructSequence_Init(void);
|
||||
extern int _PyLong_Init(PyThreadState *tstate);
|
||||
extern int _PyLong_Init(PyInterpreterState *interp);
|
||||
extern int _PyLong_InitTypes(void);
|
||||
extern PyStatus _PyTuple_Init(PyInterpreterState *interp);
|
||||
extern PyStatus _PyFaulthandler_Init(int enable);
|
||||
extern int _PyTraceMalloc_Init(int enable);
|
||||
extern PyObject * _PyBuiltin_Init(PyThreadState *tstate);
|
||||
extern PyObject * _PyBuiltin_Init(PyInterpreterState *interp);
|
||||
extern PyStatus _PySys_Create(
|
||||
PyThreadState *tstate,
|
||||
PyObject **sysmod_p);
|
||||
extern PyStatus _PySys_ReadPreinitWarnOptions(PyWideStringList *options);
|
||||
extern PyStatus _PySys_ReadPreinitXOptions(PyConfig *config);
|
||||
extern int _PySys_InitMain(PyThreadState *tstate);
|
||||
extern PyStatus _PyExc_Init(void);
|
||||
extern PyStatus _PyErr_Init(void);
|
||||
extern int _PySys_UpdateConfig(PyThreadState *tstate);
|
||||
extern PyStatus _PyExc_Init(PyInterpreterState *interp);
|
||||
extern PyStatus _PyErr_InitTypes(void);
|
||||
extern PyStatus _PyBuiltins_AddExceptions(PyObject * bltinmod);
|
||||
extern PyStatus _PyImportHooks_Init(PyThreadState *tstate);
|
||||
extern int _PyFloat_Init(void);
|
||||
extern void _PyFloat_Init(void);
|
||||
extern int _PyFloat_InitTypes(void);
|
||||
extern PyStatus _Py_HashRandomization_Init(const PyConfig *);
|
||||
|
||||
extern PyStatus _PyTypes_Init(void);
|
||||
extern PyStatus _PyTypes_InitSlotDefs(void);
|
||||
extern PyStatus _PyImportZip_Init(PyThreadState *tstate);
|
||||
extern PyStatus _PyGC_Init(PyThreadState *tstate);
|
||||
extern PyStatus _PyGC_Init(PyInterpreterState *interp);
|
||||
extern PyStatus _PyAtExit_Init(PyInterpreterState *interp);
|
||||
|
||||
|
||||
/* Various internal finalizers */
|
||||
|
||||
extern void _PyFrame_Fini(void);
|
||||
extern void _PyDict_Fini(void);
|
||||
extern void _PyTuple_Fini(void);
|
||||
extern void _PyList_Fini(void);
|
||||
extern void _PySet_Fini(void);
|
||||
extern void _PyBytes_Fini(void);
|
||||
extern void _PyFloat_Fini(void);
|
||||
extern void _PySlice_Fini(void);
|
||||
extern void _PyAsyncGen_Fini(void);
|
||||
extern void _PyFrame_Fini(PyInterpreterState *interp);
|
||||
extern void _PyDict_Fini(PyInterpreterState *interp);
|
||||
extern void _PyTuple_Fini(PyInterpreterState *interp);
|
||||
extern void _PyList_Fini(PyInterpreterState *interp);
|
||||
extern void _PyBytes_Fini(PyInterpreterState *interp);
|
||||
extern void _PyFloat_Fini(PyInterpreterState *interp);
|
||||
extern void _PySlice_Fini(PyInterpreterState *interp);
|
||||
extern void _PyAsyncGen_Fini(PyInterpreterState *interp);
|
||||
|
||||
extern int _PySignal_Init(int install_signal_handlers);
|
||||
extern void PyOS_FiniInterrupts(void);
|
||||
extern void _PySignal_Fini(void);
|
||||
|
||||
extern void _PyExc_Fini(void);
|
||||
extern void _PyExc_Fini(PyInterpreterState *interp);
|
||||
extern void _PyImport_Fini(void);
|
||||
extern void _PyImport_Fini2(void);
|
||||
extern void _PyGC_Fini(PyThreadState *tstate);
|
||||
extern void _PyType_Fini(void);
|
||||
extern void _PyGC_Fini(PyInterpreterState *interp);
|
||||
extern void _PyType_Fini(PyInterpreterState *interp);
|
||||
extern void _Py_HashRandomization_Fini(void);
|
||||
extern void _PyUnicode_Fini(PyThreadState *tstate);
|
||||
extern void _PyLong_Fini(PyThreadState *tstate);
|
||||
extern void _PyUnicode_Fini(PyInterpreterState *interp);
|
||||
extern void _PyUnicode_ClearInterned(PyInterpreterState *interp);
|
||||
extern void _PyLong_Fini(PyInterpreterState *interp);
|
||||
extern void _PyFaulthandler_Fini(void);
|
||||
extern void _PyHash_Fini(void);
|
||||
extern void _PyTraceMalloc_Fini(void);
|
||||
extern void _PyWarnings_Fini(PyInterpreterState *interp);
|
||||
extern void _PyAST_Fini(void);
|
||||
extern void _PyAST_Fini(PyInterpreterState *interp);
|
||||
extern void _PyAtExit_Fini(PyInterpreterState *interp);
|
||||
|
||||
extern PyStatus _PyGILState_Init(PyThreadState *tstate);
|
||||
extern void _PyGILState_Fini(PyThreadState *tstate);
|
||||
extern PyStatus _PyGILState_Init(_PyRuntimeState *runtime);
|
||||
extern PyStatus _PyGILState_SetTstate(PyThreadState *tstate);
|
||||
extern void _PyGILState_Fini(PyInterpreterState *interp);
|
||||
|
||||
PyAPI_FUNC(void) _PyGC_DumpShutdownStats(PyThreadState *tstate);
|
||||
PyAPI_FUNC(void) _PyGC_DumpShutdownStats(PyInterpreterState *interp);
|
||||
|
||||
PyAPI_FUNC(PyStatus) _Py_PreInitializeFromPyArgv(
|
||||
const PyPreConfig *src_config,
|
||||
@ -108,6 +133,8 @@ PyAPI_FUNC(void) _PyErr_Display(PyObject *file, PyObject *exception,
|
||||
|
||||
PyAPI_FUNC(void) _PyThreadState_DeleteCurrent(PyThreadState *tstate);
|
||||
|
||||
extern void _PyAtExit_Call(PyInterpreterState *interp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user