Version 3.11.4
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..81445d2 --- /dev/null +++ b/.editorconfig
@@ -0,0 +1,12 @@ +root = true + +[*.{py,c,cpp,h,rst,md,yml}] +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space + +[*.{py,c,cpp,h}] +indent_size = 4 + +[*.yml] +indent_size = 2
diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..013c839 --- /dev/null +++ b/.mailmap
@@ -0,0 +1,3 @@ +# This file sets the canonical name for contributors to the repository. +# Documentation: https://git-scm.com/docs/gitmailmap +Amethyst Reese <amethyst@n7.gg> <john@noswap.com>
diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..898a9ae --- /dev/null +++ b/.readthedocs.yml
@@ -0,0 +1,18 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details +# Project page: https://readthedocs.org/projects/cpython-previews/ + +version: 2 + +sphinx: + configuration: Doc/conf.py + +build: + os: ubuntu-22.04 + tools: + python: "3" + + commands: + - make -C Doc venv html + - mkdir _readthedocs + - mv Doc/build/html _readthedocs/html
diff --git a/Doc/Makefile b/Doc/Makefile new file mode 100644 index 0000000..9188141 --- /dev/null +++ b/Doc/Makefile
@@ -0,0 +1,255 @@ +# +# Makefile for Python documentation +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# + +# You can set these variables from the command line. +PYTHON = python3 +VENVDIR = ./venv +SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build +SPHINXLINT = PATH=$(VENVDIR)/bin:$$PATH sphinx-lint +BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb +JOBS = auto +PAPER = +SOURCES = +DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py) +REQUIREMENTS = requirements.txt +SPHINXERRORHANDLING = -W + +# Internal variables. +PAPEROPT_a4 = -D latex_elements.papersize=a4paper +PAPEROPT_letter = -D latex_elements.papersize=letterpaper + +ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) -j $(JOBS) \ + $(SPHINXOPTS) $(SPHINXERRORHANDLING) . build/$(BUILDER) $(SOURCES) + +.PHONY: help build html htmlhelp latex text texinfo changes linkcheck \ + suspicious coverage doctest pydoc-topics htmlview clean dist check serve \ + autobuild-dev autobuild-stable venv + +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " clean to remove build files" + @echo " venv to create a venv with necessary tools" + @echo " html to make standalone HTML files" + @echo " htmlview to open the index page built by the html target in your browser" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " text to make plain text files" + @echo " texinfo to make Texinfo file" + @echo " epub to make EPUB files" + @echo " changes to make an overview over all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " coverage to check documentation coverage for library and C API" + @echo " doctest to run doctests in the documentation" + @echo " pydoc-topics to regenerate the pydoc topics file" + @echo " dist to create a \"dist\" directory with archived docs for download" + @echo " suspicious to check for suspicious markup in output text" + @echo " check to run a check for frequent markup errors" + +build: + -mkdir -p build +# Look first for a Misc/NEWS file (building from a source release tarball +# or old repo) and use that, otherwise look for a Misc/NEWS.d directory +# (building from a newer repo) and use blurb to generate the NEWS file. + @if [ -f ../Misc/NEWS ] ; then \ + echo "Using existing Misc/NEWS file"; \ + cp ../Misc/NEWS build/NEWS; \ + elif $(BLURB) help >/dev/null 2>&1 && $(SPHINXBUILD) --version >/dev/null 2>&1; then \ + if [ -d ../Misc/NEWS.d ]; then \ + echo "Building NEWS from Misc/NEWS.d with blurb"; \ + $(BLURB) merge -f build/NEWS; \ + else \ + echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \ + exit 1; \ + fi \ + else \ + echo ""; \ + echo "Missing the required blurb or sphinx-build tools."; \ + echo "Please run 'make venv' to install local copies."; \ + echo ""; \ + exit 1; \ + fi + $(SPHINXBUILD) $(ALLSPHINXOPTS) + @echo + +html: BUILDER = html +html: build + @echo "Build finished. The HTML pages are in build/html." + +htmlhelp: BUILDER = htmlhelp +htmlhelp: build + @echo "Build finished; now you can run HTML Help Workshop with the" \ + "build/htmlhelp/pydoc.hhp project file." + +latex: BUILDER = latex +latex: build + @echo "Build finished; the LaTeX files are in build/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +text: BUILDER = text +text: build + @echo "Build finished; the text files are in build/text." + +texinfo: BUILDER = texinfo +texinfo: build + @echo "Build finished; the python.texi file is in build/texinfo." + @echo "Run \`make info' in that directory to run it through makeinfo." + +epub: BUILDER = epub +epub: build + @echo "Build finished; the epub files are in build/epub." + +changes: BUILDER = changes +changes: build + @echo "The overview file is in build/changes." + +linkcheck: BUILDER = linkcheck +linkcheck: + @$(MAKE) build BUILDER=$(BUILDER) || { \ + echo "Link check complete; look for any errors in the above output" \ + "or in build/$(BUILDER)/output.txt"; \ + false; } + +suspicious: BUILDER = suspicious +suspicious: + @$(MAKE) build BUILDER=$(BUILDER) || { \ + echo "Suspicious check complete; look for any errors in the above output" \ + "or in build/$(BUILDER)/suspicious.csv. If all issues are false" \ + "positives, append that file to tools/susp-ignored.csv."; \ + false; } + @echo "⚠ make suspicious is deprecated and will be removed soon." + @echo "⚠ Use:" + @echo "⚠ make check" + @echo "⚠ instead." + +coverage: BUILDER = coverage +coverage: build + @echo "Coverage finished; see c.txt and python.txt in build/coverage" + +doctest: BUILDER = doctest +doctest: + @$(MAKE) build BUILDER=$(BUILDER) || { \ + echo "Testing of doctests in the sources finished, look at the" \ + "results in build/doctest/output.txt"; \ + false; } + +pydoc-topics: BUILDER = pydoc-topics +pydoc-topics: build + @echo "Building finished; now run this:" \ + "cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py" + +htmlview: html + $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))" + +clean: clean-venv + -rm -rf build/* + +clean-venv: + rm -rf $(VENVDIR) + +venv: + @if [ -d $(VENVDIR) ] ; then \ + echo "venv already exists."; \ + echo "To recreate it, remove it first with \`make clean-venv'."; \ + else \ + $(PYTHON) -m venv $(VENVDIR); \ + $(VENVDIR)/bin/python3 -m pip install --upgrade pip; \ + $(VENVDIR)/bin/python3 -m pip install -r $(REQUIREMENTS); \ + echo "The venv has been created in the $(VENVDIR) directory"; \ + fi + +dist: + rm -rf dist + mkdir -p dist + + # archive the HTML + make html + cp -pPR build/html dist/python-$(DISTVERSION)-docs-html + tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html + bzip2 -9 -k dist/python-$(DISTVERSION)-docs-html.tar + (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-html.zip python-$(DISTVERSION)-docs-html) + rm -r dist/python-$(DISTVERSION)-docs-html + rm dist/python-$(DISTVERSION)-docs-html.tar + + # archive the text build + make text + cp -pPR build/text dist/python-$(DISTVERSION)-docs-text + tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar python-$(DISTVERSION)-docs-text + bzip2 -9 -k dist/python-$(DISTVERSION)-docs-text.tar + (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-text.zip python-$(DISTVERSION)-docs-text) + rm -r dist/python-$(DISTVERSION)-docs-text + rm dist/python-$(DISTVERSION)-docs-text.tar + + # archive the A4 latex + rm -rf build/latex + make latex PAPER=a4 + -sed -i 's/makeindex/makeindex -q/' build/latex/Makefile + (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2) + cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip + cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2 + + # archive the letter latex + rm -rf build/latex + make latex PAPER=letter + -sed -i 's/makeindex/makeindex -q/' build/latex/Makefile + (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2) + cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-letter.zip + cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-letter.tar.bz2 + + # copy the epub build + rm -rf build/epub + make epub + cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub + + # archive the texinfo build + rm -rf build/texinfo + make texinfo + make info --directory=build/texinfo + cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo + tar -C dist -cf dist/python-$(DISTVERSION)-docs-texinfo.tar python-$(DISTVERSION)-docs-texinfo + bzip2 -9 -k dist/python-$(DISTVERSION)-docs-texinfo.tar + (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-texinfo.zip python-$(DISTVERSION)-docs-texinfo) + rm -r dist/python-$(DISTVERSION)-docs-texinfo + rm dist/python-$(DISTVERSION)-docs-texinfo.tar + +check: + # Check the docs and NEWS files with sphinx-lint. + # Ignore the tools and venv dirs and check that the default role is not used. + $(SPHINXLINT) -i tools -i $(VENVDIR) --enable default-role + $(SPHINXLINT) --enable default-role ../Misc/NEWS.d/next/ + +serve: + @echo "The serve target was removed, use htmlview instead (see bpo-36329)" + +# Targets for daily automated doc build +# By default, Sphinx only rebuilds pages where the page content has changed. +# This means it doesn't always pick up changes to preferred link targets, etc +# To ensure such changes are picked up, we build the published docs with +# `-E` (to ignore the cached environment) and `-a` (to ignore already existing +# output files) + +# for development releases: always build +autobuild-dev: + make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' + +# for quick rebuilds (HTML only) +autobuild-dev-html: + make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' + +# for stable releases: only build if not in pre-release stage (alpha, beta) +# release candidate downloads are okay, since the stable tree can be in that stage +autobuild-stable: + @case $(DISTVERSION) in *[ab]*) \ + echo "Not building; $(DISTVERSION) is not a release version."; \ + exit 1;; \ + esac + @make autobuild-dev + +autobuild-stable-html: + @case $(DISTVERSION) in *[ab]*) \ + echo "Not building; $(DISTVERSION) is not a release version."; \ + exit 1;; \ + esac + @make autobuild-dev-html
diff --git a/Doc/README.rst b/Doc/README.rst new file mode 100644 index 0000000..d67cad7 --- /dev/null +++ b/Doc/README.rst
@@ -0,0 +1,141 @@ +Python Documentation README +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This directory contains the reStructuredText (reST) sources to the Python +documentation. You don't need to build them yourself, `prebuilt versions are +available <https://docs.python.org/dev/download.html>`_. + +Documentation on authoring Python documentation, including information about +both style and markup, is available in the "`Documenting Python +<https://devguide.python.org/documenting/>`_" chapter of the +developers guide. + + +Building the docs +================= + +The documentation is built with several tools which are not included in this +tree but are maintained separately and are available from +`PyPI <https://pypi.org/>`_. + +* `Sphinx <https://pypi.org/project/Sphinx/>`_ +* `blurb <https://pypi.org/project/blurb/>`_ +* `python-docs-theme <https://pypi.org/project/python-docs-theme/>`_ + +The easiest way to install these tools is to create a virtual environment and +install the tools into there. + +Using make +---------- + +To get started on UNIX, you can create a virtual environment and build +documentation with the commands:: + + make venv + make html + +The virtual environment in the ``venv`` directory will contain all the tools +necessary to build the documentation downloaded and installed from PyPI. +If you'd like to create the virtual environment in a different location, +you can specify it using the ``VENVDIR`` variable. + +You can also skip creating the virtual environment altogether, in which case +the Makefile will look for instances of ``sphinx-build`` and ``blurb`` +installed on your process ``PATH`` (configurable with the ``SPHINXBUILD`` and +``BLURB`` variables). + +On Windows, we try to emulate the Makefile as closely as possible with a +``make.bat`` file. If you need to specify the Python interpreter to use, +set the PYTHON environment variable. + +Available make targets are: + +* "clean", which removes all build files and the virtual environment. + +* "clean-venv", which removes the virtual environment directory. + +* "venv", which creates a virtual environment with all necessary tools + installed. + +* "html", which builds standalone HTML files for offline viewing. + +* "htmlview", which re-uses the "html" builder, but then opens the main page + in your default web browser. + +* "htmlhelp", which builds HTML files and a HTML Help project file usable to + convert them into a single Compiled HTML (.chm) file -- these are popular + under Microsoft Windows, but very handy on every platform. + + To create the CHM file, you need to run the Microsoft HTML Help Workshop + over the generated project (.hhp) file. The make.bat script does this for + you on Windows. + +* "latex", which builds LaTeX source files as input to "pdflatex" to produce + PDF documents. + +* "text", which builds a plain text file for each source file. + +* "epub", which builds an EPUB document, suitable to be viewed on e-book + readers. + +* "linkcheck", which checks all external references to see whether they are + broken, redirected or malformed, and outputs this information to stdout as + well as a plain-text (.txt) file. + +* "changes", which builds an overview over all versionadded/versionchanged/ + deprecated items in the current version. This is meant as a help for the + writer of the "What's New" document. + +* "coverage", which builds a coverage overview for standard library modules and + C API. + +* "pydoc-topics", which builds a Python module containing a dictionary with + plain text documentation for the labels defined in + ``tools/pyspecific.py`` -- pydoc needs these to show topic and keyword help. + +* "suspicious", which checks the parsed markup for text that looks like + malformed and thus unconverted reST. + +* "check", which checks for frequent markup errors. + +* "serve", which serves the build/html directory on port 8000. + +* "dist", (Unix only) which creates distributable archives of HTML, text, + PDF, and EPUB builds. + + +Without make +------------ + +First, install the tool dependencies from PyPI. + +Then, from the ``Doc`` directory, run :: + + sphinx-build -b<builder> . build/<builder> + +where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations +see the make targets above). + +Deprecation header +================== + +You can define the ``outdated`` variable in ``html_context`` to show a +red banner on each page redirecting to the "latest" version. + +The link points to the same page on ``/3/``, sadly for the moment the +language is lost during the process. + + +Contributing +============ + +Bugs in the content should be reported to the +`Python bug tracker <https://github.com/python/cpython/issues>`_. + +Bugs in the toolset should be reported to the tools themselves. + +You can also send a mail to the Python Documentation Team at docs@python.org, +and we will process your request as soon as possible. + +If you want to help the Documentation Team, you are always welcome. Just send +a mail to docs@python.org.
diff --git a/Doc/_static/og-image.png b/Doc/_static/og-image.png new file mode 100644 index 0000000..0e80751 --- /dev/null +++ b/Doc/_static/og-image.png Binary files differ
diff --git a/Doc/about.rst b/Doc/about.rst new file mode 100644 index 0000000..5e6160f --- /dev/null +++ b/Doc/about.rst
@@ -0,0 +1,38 @@ +===================== +About these documents +===================== + + +These documents are generated from `reStructuredText`_ sources by `Sphinx`_, a +document processor specifically written for the Python documentation. + +.. _reStructuredText: https://docutils.sourceforge.io/rst.html +.. _Sphinx: https://www.sphinx-doc.org/ + +.. In the online version of these documents, you can submit comments and suggest + changes directly on the documentation pages. + +Development of the documentation and its toolchain is an entirely volunteer +effort, just like Python itself. If you want to contribute, please take a +look at the :ref:`reporting-bugs` page for information on how to do so. New +volunteers are always welcome! + +Many thanks go to: + +* Fred L. Drake, Jr., the creator of the original Python documentation toolset + and writer of much of the content; +* the `Docutils <https://docutils.sourceforge.io/>`_ project for creating + reStructuredText and the Docutils suite; +* Fredrik Lundh for his Alternative Python Reference project from which Sphinx + got many good ideas. + + +Contributors to the Python Documentation +---------------------------------------- + +Many people have contributed to the Python language, the Python standard +library, and the Python documentation. See :source:`Misc/ACKS` in the Python +source distribution for a partial list of contributors. + +It is only with the input and contributions of the Python community +that Python has such wonderful documentation -- Thank You!
diff --git a/Doc/bugs.rst b/Doc/bugs.rst new file mode 100644 index 0000000..d98192b --- /dev/null +++ b/Doc/bugs.rst
@@ -0,0 +1,108 @@ +.. _reporting-bugs: + +***************** +Dealing with Bugs +***************** + +Python is a mature programming language which has established a reputation for +stability. In order to maintain this reputation, the developers would like to +know of any deficiencies you find in Python. + +It can be sometimes faster to fix bugs yourself and contribute patches to +Python as it streamlines the process and involves less people. Learn how to +:ref:`contribute <contributing-to-python>`. + +Documentation bugs +================== + +If you find a bug in this documentation or would like to propose an improvement, +please submit a bug report on the :ref:`tracker <using-the-tracker>`. If you +have a suggestion on how to fix it, include that as well. + +You can also open a discussion item on our +`Documentation Discourse forum <https://discuss.python.org/c/documentation/26>`_. + +If you're short on time, you can also email documentation bug reports to +docs@python.org (behavioral bugs can be sent to python-list@python.org). +'docs@' is a mailing list run by volunteers; your request will be noticed, +though it may take a while to be processed. + +.. seealso:: + + `Documentation bugs`_ + A list of documentation bugs that have been submitted to the Python issue tracker. + + `Issue Tracking <https://devguide.python.org/tracker/>`_ + Overview of the process involved in reporting an improvement on the tracker. + + `Helping with Documentation <https://devguide.python.org/docquality/#helping-with-documentation>`_ + Comprehensive guide for individuals that are interested in contributing to Python documentation. + + `Documentation Translations <https://devguide.python.org/documenting/#translating>`_ + A list of GitHub pages for documentation translation and their primary contacts. + + +.. _using-the-tracker: + +Using the Python issue tracker +============================== + +Issue reports for Python itself should be submitted via the GitHub issues +tracker (https://github.com/python/cpython/issues). +The GitHub issues tracker offers a web form which allows pertinent information +to be entered and submitted to the developers. + +The first step in filing a report is to determine whether the problem has +already been reported. The advantage in doing so, aside from saving the +developers' time, is that you learn what has been done to fix it; it may be that +the problem has already been fixed for the next release, or additional +information is needed (in which case you are welcome to provide it if you can!). +To do this, search the tracker using the search box at the top of the page. + +If the problem you're reporting is not already in the list, log in to GitHub. +If you don't already have a GitHub account, create a new account using the +"Sign up" link. +It is not possible to submit a bug report anonymously. + +Being now logged in, you can submit an issue. +Click on the "New issue" button in the top bar to report a new issue. + +The submission form has two fields, "Title" and "Comment". + +For the "Title" field, enter a *very* short description of the problem; +fewer than ten words is good. + +In the "Comment" field, describe the problem in detail, including what you +expected to happen and what did happen. Be sure to include whether any +extension modules were involved, and what hardware and software platform you +were using (including version information as appropriate). + +Each issue report will be reviewed by a developer who will determine what needs to +be done to correct the problem. You will receive an update each time an action is +taken on the issue. + + +.. seealso:: + + `How to Report Bugs Effectively <https://www.chiark.greenend.org.uk/~sgtatham/bugs.html>`_ + Article which goes into some detail about how to create a useful bug report. + This describes what kind of information is useful and why it is useful. + + `Bug Writing Guidelines <https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html>`_ + Information about writing a good bug report. Some of this is specific to the + Mozilla project, but describes general good practices. + +.. _contributing-to-python: + +Getting started contributing to Python yourself +=============================================== + +Beyond just reporting bugs that you find, you are also welcome to submit +patches to fix them. You can find more information on how to get started +patching Python in the `Python Developer's Guide`_. If you have questions, +the `core-mentorship mailing list`_ is a friendly place to get answers to +any and all questions pertaining to the process of fixing issues in Python. + +.. _Documentation bugs: https://github.com/python/cpython/issues?q=is%3Aissue+is%3Aopen+label%3Adocs +.. _Python Developer's Guide: https://devguide.python.org/ +.. _core-mentorship mailing list: https://mail.python.org/mailman3/lists/core-mentorship.python.org/
diff --git a/Doc/c-api/abstract.rst b/Doc/c-api/abstract.rst new file mode 100644 index 0000000..1823f9d --- /dev/null +++ b/Doc/c-api/abstract.rst
@@ -0,0 +1,27 @@ +.. highlight:: c + +.. _abstract: + +********************** +Abstract Objects Layer +********************** + +The functions in this chapter interact with Python objects regardless of their +type, or with wide classes of object types (e.g. all numerical types, or all +sequence types). When used on object types for which they do not apply, they +will raise a Python exception. + +It is not possible to use these functions on objects that are not properly +initialized, such as a list object that has been created by :c:func:`PyList_New`, +but whose items have not been set to some non-\ ``NULL`` value yet. + +.. toctree:: + + object.rst + call.rst + number.rst + sequence.rst + mapping.rst + iter.rst + buffer.rst + objbuffer.rst
diff --git a/Doc/c-api/allocation.rst b/Doc/c-api/allocation.rst new file mode 100644 index 0000000..0a8fcc5 --- /dev/null +++ b/Doc/c-api/allocation.rst
@@ -0,0 +1,71 @@ +.. highlight:: c + +.. _allocating-objects: + +Allocating Objects on the Heap +============================== + + +.. c:function:: PyObject* _PyObject_New(PyTypeObject *type) + + +.. c:function:: PyVarObject* _PyObject_NewVar(PyTypeObject *type, Py_ssize_t size) + + +.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type) + + Initialize a newly allocated object *op* with its type and initial + reference. Returns the initialized object. If *type* indicates that the + object participates in the cyclic garbage detector, it is added to the + detector's set of observed objects. Other fields of the object are not + affected. + + +.. c:function:: PyVarObject* PyObject_InitVar(PyVarObject *op, PyTypeObject *type, Py_ssize_t size) + + This does everything :c:func:`PyObject_Init` does, and also initializes the + length information for a variable-size object. + + +.. c:function:: TYPE* PyObject_New(TYPE, PyTypeObject *type) + + Allocate a new Python object using the C structure type *TYPE* and the + Python type object *type*. Fields not defined by the Python object header + are not initialized; the object's reference count will be one. The size of + the memory allocation is determined from the :c:member:`~PyTypeObject.tp_basicsize` field of + the type object. + + +.. c:function:: TYPE* PyObject_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size) + + Allocate a new Python object using the C structure type *TYPE* and the + Python type object *type*. Fields not defined by the Python object header + are not initialized. The allocated memory allows for the *TYPE* structure + plus *size* fields of the size given by the :c:member:`~PyTypeObject.tp_itemsize` field of + *type*. This is useful for implementing objects like tuples, which are + able to determine their size at construction time. Embedding the array of + fields into the same allocation decreases the number of allocations, + improving the memory management efficiency. + + +.. c:function:: void PyObject_Del(void *op) + + Releases memory allocated to an object using :c:func:`PyObject_New` or + :c:func:`PyObject_NewVar`. This is normally called from the + :c:member:`~PyTypeObject.tp_dealloc` handler specified in the object's type. The fields of + the object should not be accessed after this call as the memory is no + longer a valid Python object. + + +.. c:var:: PyObject _Py_NoneStruct + + Object which is visible in Python as ``None``. This should only be accessed + using the :c:macro:`Py_None` macro, which evaluates to a pointer to this + object. + + +.. seealso:: + + :c:func:`PyModule_Create` + To allocate and create extension modules. +
diff --git a/Doc/c-api/apiabiversion.rst b/Doc/c-api/apiabiversion.rst new file mode 100644 index 0000000..62d5429 --- /dev/null +++ b/Doc/c-api/apiabiversion.rst
@@ -0,0 +1,73 @@ +.. highlight:: c + +.. _apiabiversion: + +*********************** +API and ABI Versioning +*********************** + +CPython exposes its version number in the following macros. +Note that these correspond to the version code is **built** with, +not necessarily the version used at **run time**. + +See :ref:`stable` for a discussion of API and ABI stability across versions. + +.. c:macro:: PY_MAJOR_VERSION + + The ``3`` in ``3.4.1a2``. + +.. c:macro:: PY_MINOR_VERSION + + The ``4`` in ``3.4.1a2``. + +.. c:macro:: PY_MICRO_VERSION + + The ``1`` in ``3.4.1a2``. + +.. c:macro:: PY_RELEASE_LEVEL + + The ``a`` in ``3.4.1a2``. + This can be ``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for release + candidate or ``0xF`` for final. + +.. c:macro:: PY_RELEASE_SERIAL + + The ``2`` in ``3.4.1a2``. Zero for final releases. + +.. c:macro:: PY_VERSION_HEX + + The Python version number encoded in a single integer. + + The underlying version information can be found by treating it as a 32 bit + number in the following manner: + + +-------+-------------------------+-------------------------+--------------------------+ + | Bytes | Bits (big endian order) | Meaning | Value for ``3.4.1a2`` | + +=======+=========================+=========================+==========================+ + | 1 | 1-8 | ``PY_MAJOR_VERSION`` | ``0x03`` | + +-------+-------------------------+-------------------------+--------------------------+ + | 2 | 9-16 | ``PY_MINOR_VERSION`` | ``0x04`` | + +-------+-------------------------+-------------------------+--------------------------+ + | 3 | 17-24 | ``PY_MICRO_VERSION`` | ``0x01`` | + +-------+-------------------------+-------------------------+--------------------------+ + | 4 | 25-28 | ``PY_RELEASE_LEVEL`` | ``0xA`` | + + +-------------------------+-------------------------+--------------------------+ + | | 29-32 | ``PY_RELEASE_SERIAL`` | ``0x2`` | + +-------+-------------------------+-------------------------+--------------------------+ + + Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is + hexversion ``0x030a00f0``. + + Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``. + + This version is also available via the symbol :data:`Py_Version`. + +.. c:var:: const unsigned long Py_Version + + The Python runtime version number encoded in a single constant integer, with + the same format as the :c:macro:`PY_VERSION_HEX` macro. + This contains the Python version used at run time. + + .. versionadded:: 3.11 + +All the given macros are defined in :source:`Include/patchlevel.h`.
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst new file mode 100644 index 0000000..6a53c79 --- /dev/null +++ b/Doc/c-api/arg.rst
@@ -0,0 +1,691 @@ +.. highlight:: c + +.. _arg-parsing: + +Parsing arguments and building values +===================================== + +These functions are useful when creating your own extensions functions and +methods. Additional information and examples are available in +:ref:`extending-index`. + +The first three of these functions described, :c:func:`PyArg_ParseTuple`, +:c:func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use *format +strings* which are used to tell the function about the expected arguments. The +format strings use the same syntax for each of these functions. + +----------------- +Parsing arguments +----------------- + +A format string consists of zero or more "format units." A format unit +describes one Python object; it is usually a single character or a parenthesized +sequence of format units. With a few exceptions, a format unit that is not a +parenthesized sequence normally corresponds to a single address argument to +these functions. In the following description, the quoted form is the format +unit; the entry in (round) parentheses is the Python object type that matches +the format unit; and the entry in [square] brackets is the type of the C +variable(s) whose address should be passed. + +Strings and buffers +------------------- + +These formats allow accessing an object as a contiguous chunk of memory. +You don't have to provide raw storage for the returned unicode or bytes +area. + +Unless otherwise stated, buffers are not NUL-terminated. + +There are three ways strings and buffers can be converted to C: + +* Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. + This locks the underlying buffer so that the caller can subsequently use + the buffer even inside a :c:type:`Py_BEGIN_ALLOW_THREADS` + block without the risk of mutable data being resized or destroyed. + As a result, **you have to call** :c:func:`PyBuffer_Release` after you have + finished processing the data (or in any early abort case). + +* The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. + **You have to call** :c:func:`PyMem_Free` after you have finished + processing the data (or in any early abort case). + +* .. _c-arg-borrowed-buffer: + + Other formats take a :class:`str` or a read-only :term:`bytes-like object`, + such as :class:`bytes`, and provide a ``const char *`` pointer to + its buffer. + In this case the buffer is "borrowed": it is managed by the corresponding + Python object, and shares the lifetime of this object. + You won't have to release any memory yourself. + + To ensure that the underlying buffer may be safely borrowed, the object's + :c:member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. + This disallows common mutable objects such as :class:`bytearray`, + but also some read-only objects such as :class:`memoryview` of + :class:`bytes`. + + Besides this ``bf_releasebuffer`` requirement, there is no check to verify + whether the input object is immutable (e.g. whether it would honor a request + for a writable buffer, or whether another thread can mutate the data). + +.. note:: + + For all ``#`` variants of formats (``s#``, ``y#``, etc.), the macro + :c:macro:`PY_SSIZE_T_CLEAN` must be defined before including + :file:`Python.h`. On Python 3.9 and older, the type of the length argument + is :c:type:`Py_ssize_t` if the :c:macro:`PY_SSIZE_T_CLEAN` macro is defined, + or int otherwise. + + +``s`` (:class:`str`) [const char \*] + Convert a Unicode object to a C pointer to a character string. + A pointer to an existing string is stored in the character pointer + variable whose address you pass. The C string is NUL-terminated. + The Python string must not contain embedded null code points; if it does, + a :exc:`ValueError` exception is raised. Unicode objects are converted + to C strings using ``'utf-8'`` encoding. If this conversion fails, a + :exc:`UnicodeError` is raised. + + .. note:: + This format does not accept :term:`bytes-like objects + <bytes-like object>`. If you want to accept + filesystem paths and convert them to C character strings, it is + preferable to use the ``O&`` format with :c:func:`PyUnicode_FSConverter` + as *converter*. + + .. versionchanged:: 3.5 + Previously, :exc:`TypeError` was raised when embedded null code points + were encountered in the Python string. + +``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer] + This format accepts Unicode objects as well as bytes-like objects. + It fills a :c:type:`Py_buffer` structure provided by the caller. + In this case the resulting C string may contain embedded NUL bytes. + Unicode objects are converted to C strings using ``'utf-8'`` encoding. + +``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \*, :c:type:`Py_ssize_t`] + Like ``s*``, except that it provides a :ref:`borrowed buffer <c-arg-borrowed-buffer>`. + The result is stored into two C variables, + the first one a pointer to a C string, the second one its length. + The string may contain embedded null bytes. Unicode objects are converted + to C strings using ``'utf-8'`` encoding. + +``z`` (:class:`str` or ``None``) [const char \*] + Like ``s``, but the Python object may also be ``None``, in which case the C + pointer is set to ``NULL``. + +``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer] + Like ``s*``, but the Python object may also be ``None``, in which case the + ``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``. + +``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) [const char \*, :c:type:`Py_ssize_t`] + Like ``s#``, but the Python object may also be ``None``, in which case the C + pointer is set to ``NULL``. + +``y`` (read-only :term:`bytes-like object`) [const char \*] + This format converts a bytes-like object to a C pointer to a + :ref:`borrowed <c-arg-borrowed-buffer>` character string; + it does not accept Unicode objects. The bytes buffer must not + contain embedded null bytes; if it does, a :exc:`ValueError` + exception is raised. + + .. versionchanged:: 3.5 + Previously, :exc:`TypeError` was raised when embedded null bytes were + encountered in the bytes buffer. + +``y*`` (:term:`bytes-like object`) [Py_buffer] + This variant on ``s*`` doesn't accept Unicode objects, only + bytes-like objects. **This is the recommended way to accept + binary data.** + +``y#`` (read-only :term:`bytes-like object`) [const char \*, :c:type:`Py_ssize_t`] + This variant on ``s#`` doesn't accept Unicode objects, only bytes-like + objects. + +``S`` (:class:`bytes`) [PyBytesObject \*] + Requires that the Python object is a :class:`bytes` object, without + attempting any conversion. Raises :exc:`TypeError` if the object is not + a bytes object. The C variable may also be declared as :c:expr:`PyObject*`. + +``Y`` (:class:`bytearray`) [PyByteArrayObject \*] + Requires that the Python object is a :class:`bytearray` object, without + attempting any conversion. Raises :exc:`TypeError` if the object is not + a :class:`bytearray` object. The C variable may also be declared as :c:expr:`PyObject*`. + +``u`` (:class:`str`) [const Py_UNICODE \*] + Convert a Python Unicode object to a C pointer to a NUL-terminated buffer of + Unicode characters. You must pass the address of a :c:type:`Py_UNICODE` + pointer variable, which will be filled with the pointer to an existing + Unicode buffer. Please note that the width of a :c:type:`Py_UNICODE` + character depends on compilation options (it is either 16 or 32 bits). + The Python string must not contain embedded null code points; if it does, + a :exc:`ValueError` exception is raised. + + .. versionchanged:: 3.5 + Previously, :exc:`TypeError` was raised when embedded null code points + were encountered in the Python string. + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using + :c:func:`PyUnicode_AsWideCharString`. + +``u#`` (:class:`str`) [const Py_UNICODE \*, :c:type:`Py_ssize_t`] + This variant on ``u`` stores into two C variables, the first one a pointer to a + Unicode data buffer, the second one its length. This variant allows + null code points. + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using + :c:func:`PyUnicode_AsWideCharString`. + +``Z`` (:class:`str` or ``None``) [const Py_UNICODE \*] + Like ``u``, but the Python object may also be ``None``, in which case the + :c:type:`Py_UNICODE` pointer is set to ``NULL``. + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using + :c:func:`PyUnicode_AsWideCharString`. + +``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \*, :c:type:`Py_ssize_t`] + Like ``u#``, but the Python object may also be ``None``, in which case the + :c:type:`Py_UNICODE` pointer is set to ``NULL``. + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using + :c:func:`PyUnicode_AsWideCharString`. + +``U`` (:class:`str`) [PyObject \*] + Requires that the Python object is a Unicode object, without attempting + any conversion. Raises :exc:`TypeError` if the object is not a Unicode + object. The C variable may also be declared as :c:expr:`PyObject*`. + +``w*`` (read-write :term:`bytes-like object`) [Py_buffer] + This format accepts any object which implements the read-write buffer + interface. It fills a :c:type:`Py_buffer` structure provided by the caller. + The buffer may contain embedded null bytes. The caller have to call + :c:func:`PyBuffer_Release` when it is done with the buffer. + +``es`` (:class:`str`) [const char \*encoding, char \*\*buffer] + This variant on ``s`` is used for encoding Unicode into a character buffer. + It only works for encoded data without embedded NUL bytes. + + This format requires two arguments. The first is only used as input, and + must be a :c:expr:`const char*` which points to the name of an encoding as a + NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. + An exception is raised if the named encoding is not known to Python. The + second argument must be a :c:expr:`char**`; the value of the pointer it + references will be set to a buffer with the contents of the argument text. + The text will be encoded in the encoding specified by the first argument. + + :c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy the + encoded data into this buffer and adjust *\*buffer* to reference the newly + allocated storage. The caller is responsible for calling :c:func:`PyMem_Free` to + free the allocated buffer after use. + +``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char \*encoding, char \*\*buffer] + Same as ``es`` except that byte string objects are passed through without + recoding them. Instead, the implementation assumes that the byte string object uses + the encoding passed in as parameter. + +``es#`` (:class:`str`) [const char \*encoding, char \*\*buffer, :c:type:`Py_ssize_t` \*buffer_length] + This variant on ``s#`` is used for encoding Unicode into a character buffer. + Unlike the ``es`` format, this variant allows input data which contains NUL + characters. + + It requires three arguments. The first is only used as input, and must be a + :c:expr:`const char*` which points to the name of an encoding as a + NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. + An exception is raised if the named encoding is not known to Python. The + second argument must be a :c:expr:`char**`; the value of the pointer it + references will be set to a buffer with the contents of the argument text. + The text will be encoded in the encoding specified by the first argument. + The third argument must be a pointer to an integer; the referenced integer + will be set to the number of bytes in the output buffer. + + There are two modes of operation: + + If *\*buffer* points a ``NULL`` pointer, the function will allocate a buffer of + the needed size, copy the encoded data into this buffer and set *\*buffer* to + reference the newly allocated storage. The caller is responsible for calling + :c:func:`PyMem_Free` to free the allocated buffer after usage. + + If *\*buffer* points to a non-``NULL`` pointer (an already allocated buffer), + :c:func:`PyArg_ParseTuple` will use this location as the buffer and interpret the + initial value of *\*buffer_length* as the buffer size. It will then copy the + encoded data into the buffer and NUL-terminate it. If the buffer is not large + enough, a :exc:`ValueError` will be set. + + In both cases, *\*buffer_length* is set to the length of the encoded data + without the trailing NUL byte. + +``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char \*encoding, char \*\*buffer, :c:type:`Py_ssize_t` \*buffer_length] + Same as ``es#`` except that byte string objects are passed through without recoding + them. Instead, the implementation assumes that the byte string object uses the + encoding passed in as parameter. + +Numbers +------- + +``b`` (:class:`int`) [unsigned char] + Convert a nonnegative Python integer to an unsigned tiny int, stored in a C + :c:expr:`unsigned char`. + +``B`` (:class:`int`) [unsigned char] + Convert a Python integer to a tiny int without overflow checking, stored in a C + :c:expr:`unsigned char`. + +``h`` (:class:`int`) [short int] + Convert a Python integer to a C :c:expr:`short int`. + +``H`` (:class:`int`) [unsigned short int] + Convert a Python integer to a C :c:expr:`unsigned short int`, without overflow + checking. + +``i`` (:class:`int`) [int] + Convert a Python integer to a plain C :c:expr:`int`. + +``I`` (:class:`int`) [unsigned int] + Convert a Python integer to a C :c:expr:`unsigned int`, without overflow + checking. + +``l`` (:class:`int`) [long int] + Convert a Python integer to a C :c:expr:`long int`. + +``k`` (:class:`int`) [unsigned long] + Convert a Python integer to a C :c:expr:`unsigned long` without + overflow checking. + +``L`` (:class:`int`) [long long] + Convert a Python integer to a C :c:expr:`long long`. + +``K`` (:class:`int`) [unsigned long long] + Convert a Python integer to a C :c:expr:`unsigned long long` + without overflow checking. + +``n`` (:class:`int`) [:c:type:`Py_ssize_t`] + Convert a Python integer to a C :c:type:`Py_ssize_t`. + +``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char] + Convert a Python byte, represented as a :class:`bytes` or + :class:`bytearray` object of length 1, to a C :c:expr:`char`. + + .. versionchanged:: 3.3 + Allow :class:`bytearray` objects. + +``C`` (:class:`str` of length 1) [int] + Convert a Python character, represented as a :class:`str` object of + length 1, to a C :c:expr:`int`. + +``f`` (:class:`float`) [float] + Convert a Python floating point number to a C :c:expr:`float`. + +``d`` (:class:`float`) [double] + Convert a Python floating point number to a C :c:expr:`double`. + +``D`` (:class:`complex`) [Py_complex] + Convert a Python complex number to a C :c:type:`Py_complex` structure. + +Other objects +------------- + +``O`` (object) [PyObject \*] + Store a Python object (without any conversion) in a C object pointer. The C + program thus receives the actual object that was passed. The object's reference + count is not increased. The pointer stored is not ``NULL``. + +``O!`` (object) [*typeobject*, PyObject \*] + Store a Python object in a C object pointer. This is similar to ``O``, but + takes two C arguments: the first is the address of a Python type object, the + second is the address of the C variable (of type :c:expr:`PyObject*`) into which + the object pointer is stored. If the Python object does not have the required + type, :exc:`TypeError` is raised. + +.. _o_ampersand: + +``O&`` (object) [*converter*, *anything*] + Convert a Python object to a C variable through a *converter* function. This + takes two arguments: the first is a function, the second is the address of a C + variable (of arbitrary type), converted to :c:expr:`void *`. The *converter* + function in turn is called as follows:: + + status = converter(object, address); + + where *object* is the Python object to be converted and *address* is the + :c:expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. + The returned *status* should be ``1`` for a successful conversion and ``0`` if + the conversion has failed. When the conversion fails, the *converter* function + should raise an exception and leave the content of *address* unmodified. + + If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a + second time if the argument parsing eventually fails, giving the converter a + chance to release any memory that it had already allocated. In this second + call, the *object* parameter will be ``NULL``; *address* will have the same value + as in the original call. + + .. versionchanged:: 3.1 + ``Py_CLEANUP_SUPPORTED`` was added. + +``p`` (:class:`bool`) [int] + Tests the value passed in for truth (a boolean **p**\ redicate) and converts + the result to its equivalent C true/false integer value. + Sets the int to ``1`` if the expression was true and ``0`` if it was false. + This accepts any valid Python value. See :ref:`truth` for more + information about how Python tests values for truth. + + .. versionadded:: 3.3 + +``(items)`` (:class:`tuple`) [*matching-items*] + The object must be a Python sequence whose length is the number of format units + in *items*. The C arguments must correspond to the individual format units in + *items*. Format units for sequences may be nested. + +It is possible to pass "long" integers (integers whose value exceeds the +platform's :const:`LONG_MAX`) however no proper range checking is done --- the +most significant bits are silently truncated when the receiving field is too +small to receive the value (actually, the semantics are inherited from downcasts +in C --- your mileage may vary). + +A few other characters have a meaning in a format string. These may not occur +inside nested parentheses. They are: + +``|`` + Indicates that the remaining arguments in the Python argument list are optional. + The C variables corresponding to optional arguments should be initialized to + their default value --- when an optional argument is not specified, + :c:func:`PyArg_ParseTuple` does not touch the contents of the corresponding C + variable(s). + +``$`` + :c:func:`PyArg_ParseTupleAndKeywords` only: + Indicates that the remaining arguments in the Python argument list are + keyword-only. Currently, all keyword-only arguments must also be optional + arguments, so ``|`` must always be specified before ``$`` in the format + string. + + .. versionadded:: 3.3 + +``:`` + The list of format units ends here; the string after the colon is used as the + function name in error messages (the "associated value" of the exception that + :c:func:`PyArg_ParseTuple` raises). + +``;`` + The list of format units ends here; the string after the semicolon is used as + the error message *instead* of the default error message. ``:`` and ``;`` + mutually exclude each other. + +Note that any Python object references which are provided to the caller are +*borrowed* references; do not decrement their reference count! + +Additional arguments passed to these functions must be addresses of variables +whose type is determined by the format string; these are used to store values +from the input tuple. There are a few cases, as described in the list of format +units above, where these parameters are used as input values; they should match +what is specified for the corresponding format unit in that case. + +For the conversion to succeed, the *arg* object must match the format +and the format must be exhausted. On success, the +``PyArg_Parse*`` functions return true, otherwise they return +false and raise an appropriate exception. When the +``PyArg_Parse*`` functions fail due to conversion failure in one +of the format units, the variables at the addresses corresponding to that +and the following format units are left untouched. + +API Functions +------------- + +.. c:function:: int PyArg_ParseTuple(PyObject *args, const char *format, ...) + + Parse the parameters of a function that takes only positional parameters into + local variables. Returns true on success; on failure, it returns false and + raises the appropriate exception. + + +.. c:function:: int PyArg_VaParse(PyObject *args, const char *format, va_list vargs) + + Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list rather + than a variable number of arguments. + + +.. c:function:: int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...) + + Parse the parameters of a function that takes both positional and keyword + parameters into local variables. The *keywords* argument is a + ``NULL``-terminated array of keyword parameter names. Empty names denote + :ref:`positional-only parameters <positional-only_parameter>`. + Returns true on success; on failure, it returns false and raises the + appropriate exception. + + .. versionchanged:: 3.6 + Added support for :ref:`positional-only parameters + <positional-only_parameter>`. + + +.. c:function:: int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], va_list vargs) + + Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a + va_list rather than a variable number of arguments. + + +.. c:function:: int PyArg_ValidateKeywordArguments(PyObject *) + + Ensure that the keys in the keywords argument dictionary are strings. This + is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since the + latter already does this check. + + .. versionadded:: 3.2 + + +.. XXX deprecated, will be removed +.. c:function:: int PyArg_Parse(PyObject *args, const char *format, ...) + + Function used to deconstruct the argument lists of "old-style" functions --- + these are functions which use the :const:`METH_OLDARGS` parameter parsing + method, which has been removed in Python 3. This is not recommended for use + in parameter parsing in new code, and most code in the standard interpreter + has been modified to no longer use this for that purpose. It does remain a + convenient way to decompose other tuples, however, and may continue to be + used for that purpose. + + +.. c:function:: int PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, ...) + + A simpler form of parameter retrieval which does not use a format string to + specify the types of the arguments. Functions which use this method to retrieve + their parameters should be declared as :const:`METH_VARARGS` in function or + method tables. The tuple containing the actual parameters should be passed as + *args*; it must actually be a tuple. The length of the tuple must be at least + *min* and no more than *max*; *min* and *max* may be equal. Additional + arguments must be passed to the function, each of which should be a pointer to a + :c:expr:`PyObject*` variable; these will be filled in with the values from + *args*; they will contain :term:`borrowed references <borrowed reference>`. + The variables which correspond + to optional parameters not given by *args* will not be filled in; these should + be initialized by the caller. This function returns true on success and false if + *args* is not a tuple or contains the wrong number of elements; an exception + will be set if there was a failure. + + This is an example of the use of this function, taken from the sources for the + :mod:`_weakref` helper module for weak references:: + + static PyObject * + weakref_ref(PyObject *self, PyObject *args) + { + PyObject *object; + PyObject *callback = NULL; + PyObject *result = NULL; + + if (PyArg_UnpackTuple(args, "ref", 1, 2, &object, &callback)) { + result = PyWeakref_NewRef(object, callback); + } + return result; + } + + The call to :c:func:`PyArg_UnpackTuple` in this example is entirely equivalent to + this call to :c:func:`PyArg_ParseTuple`:: + + PyArg_ParseTuple(args, "O|O:ref", &object, &callback) + + +--------------- +Building values +--------------- + +.. c:function:: PyObject* Py_BuildValue(const char *format, ...) + + Create a new value based on a format string similar to those accepted by the + ``PyArg_Parse*`` family of functions and a sequence of values. Returns + the value or ``NULL`` in the case of an error; an exception will be raised if + ``NULL`` is returned. + + :c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple only if + its format string contains two or more format units. If the format string is + empty, it returns ``None``; if it contains exactly one format unit, it returns + whatever object is described by that format unit. To force it to return a tuple + of size 0 or one, parenthesize the format string. + + When memory buffers are passed as parameters to supply data to build objects, as + for the ``s`` and ``s#`` formats, the required data is copied. Buffers provided + by the caller are never referenced by the objects created by + :c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:`malloc` + and passes the allocated memory to :c:func:`Py_BuildValue`, your code is + responsible for calling :c:func:`free` for that memory once + :c:func:`Py_BuildValue` returns. + + In the following description, the quoted form is the format unit; the entry in + (round) parentheses is the Python object type that the format unit will return; + and the entry in [square] brackets is the type of the C value(s) to be passed. + + The characters space, tab, colon and comma are ignored in format strings (but + not within format units such as ``s#``). This can be used to make long format + strings a tad more readable. + + ``s`` (:class:`str` or ``None``) [const char \*] + Convert a null-terminated C string to a Python :class:`str` object using ``'utf-8'`` + encoding. If the C string pointer is ``NULL``, ``None`` is used. + + ``s#`` (:class:`str` or ``None``) [const char \*, :c:type:`Py_ssize_t`] + Convert a C string and its length to a Python :class:`str` object using ``'utf-8'`` + encoding. If the C string pointer is ``NULL``, the length is ignored and + ``None`` is returned. + + ``y`` (:class:`bytes`) [const char \*] + This converts a C string to a Python :class:`bytes` object. If the C + string pointer is ``NULL``, ``None`` is returned. + + ``y#`` (:class:`bytes`) [const char \*, :c:type:`Py_ssize_t`] + This converts a C string and its lengths to a Python object. If the C + string pointer is ``NULL``, ``None`` is returned. + + ``z`` (:class:`str` or ``None``) [const char \*] + Same as ``s``. + + ``z#`` (:class:`str` or ``None``) [const char \*, :c:type:`Py_ssize_t`] + Same as ``s#``. + + ``u`` (:class:`str`) [const wchar_t \*] + Convert a null-terminated :c:expr:`wchar_t` buffer of Unicode (UTF-16 or UCS-4) + data to a Python Unicode object. If the Unicode buffer pointer is ``NULL``, + ``None`` is returned. + + ``u#`` (:class:`str`) [const wchar_t \*, :c:type:`Py_ssize_t`] + Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python + Unicode object. If the Unicode buffer pointer is ``NULL``, the length is ignored + and ``None`` is returned. + + ``U`` (:class:`str` or ``None``) [const char \*] + Same as ``s``. + + ``U#`` (:class:`str` or ``None``) [const char \*, :c:type:`Py_ssize_t`] + Same as ``s#``. + + ``i`` (:class:`int`) [int] + Convert a plain C :c:expr:`int` to a Python integer object. + + ``b`` (:class:`int`) [char] + Convert a plain C :c:expr:`char` to a Python integer object. + + ``h`` (:class:`int`) [short int] + Convert a plain C :c:expr:`short int` to a Python integer object. + + ``l`` (:class:`int`) [long int] + Convert a C :c:expr:`long int` to a Python integer object. + + ``B`` (:class:`int`) [unsigned char] + Convert a C :c:expr:`unsigned char` to a Python integer object. + + ``H`` (:class:`int`) [unsigned short int] + Convert a C :c:expr:`unsigned short int` to a Python integer object. + + ``I`` (:class:`int`) [unsigned int] + Convert a C :c:expr:`unsigned int` to a Python integer object. + + ``k`` (:class:`int`) [unsigned long] + Convert a C :c:expr:`unsigned long` to a Python integer object. + + ``L`` (:class:`int`) [long long] + Convert a C :c:expr:`long long` to a Python integer object. + + ``K`` (:class:`int`) [unsigned long long] + Convert a C :c:expr:`unsigned long long` to a Python integer object. + + ``n`` (:class:`int`) [:c:type:`Py_ssize_t`] + Convert a C :c:type:`Py_ssize_t` to a Python integer. + + ``c`` (:class:`bytes` of length 1) [char] + Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` object of + length 1. + + ``C`` (:class:`str` of length 1) [int] + Convert a C :c:expr:`int` representing a character to Python :class:`str` + object of length 1. + + ``d`` (:class:`float`) [double] + Convert a C :c:expr:`double` to a Python floating point number. + + ``f`` (:class:`float`) [float] + Convert a C :c:expr:`float` to a Python floating point number. + + ``D`` (:class:`complex`) [Py_complex \*] + Convert a C :c:type:`Py_complex` structure to a Python complex number. + + ``O`` (object) [PyObject \*] + Pass a Python object untouched (except for its reference count, which is + incremented by one). If the object passed in is a ``NULL`` pointer, it is assumed + that this was caused because the call producing the argument found an error and + set an exception. Therefore, :c:func:`Py_BuildValue` will return ``NULL`` but won't + raise an exception. If no exception has been raised yet, :exc:`SystemError` is + set. + + ``S`` (object) [PyObject \*] + Same as ``O``. + + ``N`` (object) [PyObject \*] + Same as ``O``, except it doesn't increment the reference count on the object. + Useful when the object is created by a call to an object constructor in the + argument list. + + ``O&`` (object) [*converter*, *anything*] + Convert *anything* to a Python object through a *converter* function. The + function is called with *anything* (which should be compatible with :c:expr:`void*`) + as its argument and should return a "new" Python object, or ``NULL`` if an + error occurred. + + ``(items)`` (:class:`tuple`) [*matching-items*] + Convert a sequence of C values to a Python tuple with the same number of items. + + ``[items]`` (:class:`list`) [*matching-items*] + Convert a sequence of C values to a Python list with the same number of items. + + ``{items}`` (:class:`dict`) [*matching-items*] + Convert a sequence of C values to a Python dictionary. Each pair of consecutive + C values adds one item to the dictionary, serving as key and value, + respectively. + + If there is an error in the format string, the :exc:`SystemError` exception is + set and ``NULL`` returned. + +.. c:function:: PyObject* Py_VaBuildValue(const char *format, va_list vargs) + + Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list + rather than a variable number of arguments.
diff --git a/Doc/c-api/bool.rst b/Doc/c-api/bool.rst new file mode 100644 index 0000000..c197d44 --- /dev/null +++ b/Doc/c-api/bool.rst
@@ -0,0 +1,47 @@ +.. highlight:: c + +.. _boolobjects: + +Boolean Objects +--------------- + +Booleans in Python are implemented as a subclass of integers. There are only +two booleans, :const:`Py_False` and :const:`Py_True`. As such, the normal +creation and deletion functions don't apply to booleans. The following macros +are available, however. + + +.. c:function:: int PyBool_Check(PyObject *o) + + Return true if *o* is of type :c:data:`PyBool_Type`. This function always + succeeds. + + +.. c:var:: PyObject* Py_False + + The Python ``False`` object. This object has no methods. It needs to be + treated just like any other object with respect to reference counts. + + +.. c:var:: PyObject* Py_True + + The Python ``True`` object. This object has no methods. It needs to be treated + just like any other object with respect to reference counts. + + +.. c:macro:: Py_RETURN_FALSE + + Return :const:`Py_False` from a function, properly incrementing its reference + count. + + +.. c:macro:: Py_RETURN_TRUE + + Return :const:`Py_True` from a function, properly incrementing its reference + count. + + +.. c:function:: PyObject* PyBool_FromLong(long v) + + Return a new reference to :const:`Py_True` or :const:`Py_False` depending on the + truth value of *v*.
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst new file mode 100644 index 0000000..91d1edd --- /dev/null +++ b/Doc/c-api/buffer.rst
@@ -0,0 +1,532 @@ +.. highlight:: c + +.. index:: + single: buffer protocol + single: buffer interface; (see buffer protocol) + single: buffer object; (see buffer protocol) + +.. _bufferobjects: + +Buffer Protocol +--------------- + +.. sectionauthor:: Greg Stein <gstein@lyra.org> +.. sectionauthor:: Benjamin Peterson +.. sectionauthor:: Stefan Krah + + +Certain objects available in Python wrap access to an underlying memory +array or *buffer*. Such objects include the built-in :class:`bytes` and +:class:`bytearray`, and some extension types like :class:`array.array`. +Third-party libraries may define their own types for special purposes, such +as image processing or numeric analysis. + +While each of these types have their own semantics, they share the common +characteristic of being backed by a possibly large memory buffer. It is +then desirable, in some situations, to access that buffer directly and +without intermediate copying. + +Python provides such a facility at the C level in the form of the :ref:`buffer +protocol <bufferobjects>`. This protocol has two sides: + +.. index:: single: PyBufferProcs + +- on the producer side, a type can export a "buffer interface" which allows + objects of that type to expose information about their underlying buffer. + This interface is described in the section :ref:`buffer-structs`; + +- on the consumer side, several means are available to obtain a pointer to + the raw underlying data of an object (for example a method parameter). + +Simple objects such as :class:`bytes` and :class:`bytearray` expose their +underlying buffer in byte-oriented form. Other forms are possible; for example, +the elements exposed by an :class:`array.array` can be multi-byte values. + +An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase.write` +method of file objects: any object that can export a series of bytes through +the buffer interface can be written to a file. While :meth:`write` only +needs read-only access to the internal contents of the object passed to it, +other methods such as :meth:`~io.BufferedIOBase.readinto` need write access +to the contents of their argument. The buffer interface allows objects to +selectively allow or reject exporting of read-write and read-only buffers. + +There are two ways for a consumer of the buffer interface to acquire a buffer +over a target object: + +* call :c:func:`PyObject_GetBuffer` with the right parameters; + +* call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the + ``y*``, ``w*`` or ``s*`` :ref:`format codes <arg-parsing>`. + +In both cases, :c:func:`PyBuffer_Release` must be called when the buffer +isn't needed anymore. Failure to do so could lead to various issues such as +resource leaks. + + +.. _buffer-structure: + +Buffer structure +================ + +Buffer structures (or simply "buffers") are useful as a way to expose the +binary data from another object to the Python programmer. They can also be +used as a zero-copy slicing mechanism. Using their ability to reference a +block of memory, it is possible to expose any data to the Python programmer +quite easily. The memory could be a large, constant array in a C extension, +it could be a raw block of memory for manipulation before passing to an +operating system library, or it could be used to pass around structured data +in its native, in-memory format. + +Contrary to most data types exposed by the Python interpreter, buffers +are not :c:type:`PyObject` pointers but rather simple C structures. This +allows them to be created and copied very simply. When a generic wrapper +around a buffer is needed, a :ref:`memoryview <memoryview-objects>` object +can be created. + +For short instructions how to write an exporting object, see +:ref:`Buffer Object Structures <buffer-structs>`. For obtaining +a buffer, see :c:func:`PyObject_GetBuffer`. + +.. c:type:: Py_buffer + + .. c:member:: void *buf + + A pointer to the start of the logical structure described by the buffer + fields. This can be any location within the underlying physical memory + block of the exporter. For example, with negative :c:member:`~Py_buffer.strides` + the value may point to the end of the memory block. + + For :term:`contiguous` arrays, the value points to the beginning of + the memory block. + + .. c:member:: PyObject *obj + + A new reference to the exporting object. The reference is owned by + the consumer and automatically decremented and set to ``NULL`` by + :c:func:`PyBuffer_Release`. The field is the equivalent of the return + value of any standard C-API function. + + As a special case, for *temporary* buffers that are wrapped by + :c:func:`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` + this field is ``NULL``. In general, exporting objects MUST NOT + use this scheme. + + .. c:member:: Py_ssize_t len + + ``product(shape) * itemsize``. For contiguous arrays, this is the length + of the underlying memory block. For non-contiguous arrays, it is the length + that the logical structure would have if it were copied to a contiguous + representation. + + Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid + if the buffer has been obtained by a request that guarantees contiguity. In + most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:`PyBUF_WRITABLE`. + + .. c:member:: int readonly + + An indicator of whether the buffer is read-only. This field is controlled + by the :c:macro:`PyBUF_WRITABLE` flag. + + .. c:member:: Py_ssize_t itemsize + + Item size in bytes of a single element. Same as the value of :func:`struct.calcsize` + called on non-``NULL`` :c:member:`~Py_buffer.format` values. + + Important exception: If a consumer requests a buffer without the + :c:macro:`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will + be set to ``NULL``, but :c:member:`~Py_buffer.itemsize` still has + the value for the original format. + + If :c:member:`~Py_buffer.shape` is present, the equality + ``product(shape) * itemsize == len`` still holds and the consumer + can use :c:member:`~Py_buffer.itemsize` to navigate the buffer. + + If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:`PyBUF_SIMPLE` + or a :c:macro:`PyBUF_WRITABLE` request, the consumer must disregard + :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``. + + .. c:member:: const char *format + + A *NUL* terminated string in :mod:`struct` module style syntax describing + the contents of a single item. If this is ``NULL``, ``"B"`` (unsigned bytes) + is assumed. + + This field is controlled by the :c:macro:`PyBUF_FORMAT` flag. + + .. c:member:: int ndim + + The number of dimensions the memory represents as an n-dimensional array. + If it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing + a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides` + and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``. + + The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions + to 64. Exporters MUST respect this limit, consumers of multi-dimensional + buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions. + + .. c:member:: Py_ssize_t *shape + + An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` + indicating the shape of the memory as an n-dimensional array. Note that + ``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to + :c:member:`~Py_buffer.len`. + + Shape values are restricted to ``shape[n] >= 0``. The case + ``shape[n] == 0`` requires special attention. See `complex arrays`_ + for further information. + + The shape array is read-only for the consumer. + + .. c:member:: Py_ssize_t *strides + + An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` + giving the number of bytes to skip to get to a new element in each + dimension. + + Stride values can be any integer. For regular arrays, strides are + usually positive, but a consumer MUST be able to handle the case + ``strides[n] <= 0``. See `complex arrays`_ for further information. + + The strides array is read-only for the consumer. + + .. c:member:: Py_ssize_t *suboffsets + + An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. + If ``suboffsets[n] >= 0``, the values stored along the nth dimension are + pointers and the suboffset value dictates how many bytes to add to each + pointer after de-referencing. A suboffset value that is negative + indicates that no de-referencing should occur (striding in a contiguous + memory block). + + If all suboffsets are negative (i.e. no de-referencing is needed), then + this field must be ``NULL`` (the default value). + + This type of array representation is used by the Python Imaging Library + (PIL). See `complex arrays`_ for further information how to access elements + of such an array. + + The suboffsets array is read-only for the consumer. + + .. c:member:: void *internal + + This is for use internally by the exporting object. For example, this + might be re-cast as an integer by the exporter and used to store flags + about whether or not the shape, strides, and suboffsets arrays must be + freed when the buffer is released. The consumer MUST NOT alter this + value. + +.. _buffer-request-types: + +Buffer request types +==================== + +Buffers are usually obtained by sending a buffer request to an exporting +object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical +structure of the memory can vary drastically, the consumer uses the *flags* +argument to specify the exact buffer type it can handle. + +All :c:data:`Py_buffer` fields are unambiguously defined by the request +type. + +request-independent fields +~~~~~~~~~~~~~~~~~~~~~~~~~~ +The following fields are not influenced by *flags* and must always be filled in +with the correct values: :c:member:`~Py_buffer.obj`, :c:member:`~Py_buffer.buf`, +:c:member:`~Py_buffer.len`, :c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`. + + +readonly, format +~~~~~~~~~~~~~~~~ + + .. c:macro:: PyBUF_WRITABLE + + Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter + MUST provide a writable buffer or else report failure. Otherwise, the + exporter MAY provide either a read-only or writable buffer, but the choice + MUST be consistent for all consumers. + + .. c:macro:: PyBUF_FORMAT + + Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST + be filled in correctly. Otherwise, this field MUST be ``NULL``. + + +:c:macro:`PyBUF_WRITABLE` can be \|'d to any of the flags in the next section. +Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:`PyBUF_WRITABLE` +can be used as a stand-alone flag to request a simple writable buffer. + +:c:macro:`PyBUF_FORMAT` can be \|'d to any of the flags except :c:macro:`PyBUF_SIMPLE`. +The latter already implies format ``B`` (unsigned bytes). + + +shape, strides, suboffsets +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The flags that control the logical structure of the memory are listed +in decreasing order of complexity. Note that each flag contains all bits +of the flags below it. + +.. tabularcolumns:: |p{0.35\linewidth}|l|l|l| + ++-----------------------------+-------+---------+------------+ +| Request | shape | strides | suboffsets | ++=============================+=======+=========+============+ +| .. c:macro:: PyBUF_INDIRECT | yes | yes | if needed | ++-----------------------------+-------+---------+------------+ +| .. c:macro:: PyBUF_STRIDES | yes | yes | NULL | ++-----------------------------+-------+---------+------------+ +| .. c:macro:: PyBUF_ND | yes | NULL | NULL | ++-----------------------------+-------+---------+------------+ +| .. c:macro:: PyBUF_SIMPLE | NULL | NULL | NULL | ++-----------------------------+-------+---------+------------+ + + +.. index:: contiguous, C-contiguous, Fortran contiguous + +contiguity requests +~~~~~~~~~~~~~~~~~~~ + +C or Fortran :term:`contiguity <contiguous>` can be explicitly requested, +with and without stride information. Without stride information, the buffer +must be C-contiguous. + +.. tabularcolumns:: |p{0.35\linewidth}|l|l|l|l| + ++-----------------------------------+-------+---------+------------+--------+ +| Request | shape | strides | suboffsets | contig | ++===================================+=======+=========+============+========+ +| .. c:macro:: PyBUF_C_CONTIGUOUS | yes | yes | NULL | C | ++-----------------------------------+-------+---------+------------+--------+ +| .. c:macro:: PyBUF_F_CONTIGUOUS | yes | yes | NULL | F | ++-----------------------------------+-------+---------+------------+--------+ +| .. c:macro:: PyBUF_ANY_CONTIGUOUS | yes | yes | NULL | C or F | ++-----------------------------------+-------+---------+------------+--------+ +| :c:macro:`PyBUF_ND` | yes | NULL | NULL | C | ++-----------------------------------+-------+---------+------------+--------+ + + +compound requests +~~~~~~~~~~~~~~~~~ + +All possible requests are fully defined by some combination of the flags in +the previous section. For convenience, the buffer protocol provides frequently +used combinations as single flags. + +In the following table *U* stands for undefined contiguity. The consumer would +have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity. + +.. tabularcolumns:: |p{0.35\linewidth}|l|l|l|l|l|l| + ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| Request | shape | strides | suboffsets | contig | readonly | format | ++===============================+=======+=========+============+========+==========+========+ +| .. c:macro:: PyBUF_FULL | yes | yes | if needed | U | 0 | yes | ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| .. c:macro:: PyBUF_FULL_RO | yes | yes | if needed | U | 1 or 0 | yes | ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| .. c:macro:: PyBUF_RECORDS | yes | yes | NULL | U | 0 | yes | ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| .. c:macro:: PyBUF_RECORDS_RO | yes | yes | NULL | U | 1 or 0 | yes | ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| .. c:macro:: PyBUF_STRIDED | yes | yes | NULL | U | 0 | NULL | ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| .. c:macro:: PyBUF_STRIDED_RO | yes | yes | NULL | U | 1 or 0 | NULL | ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| .. c:macro:: PyBUF_CONTIG | yes | NULL | NULL | C | 0 | NULL | ++-------------------------------+-------+---------+------------+--------+----------+--------+ +| .. c:macro:: PyBUF_CONTIG_RO | yes | NULL | NULL | C | 1 or 0 | NULL | ++-------------------------------+-------+---------+------------+--------+----------+--------+ + + +Complex arrays +============== + +NumPy-style: shape and strides +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The logical structure of NumPy-style arrays is defined by :c:member:`~Py_buffer.itemsize`, +:c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer.strides`. + +If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer.buf` is +interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In that case, +both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer.strides` are ``NULL``. + +If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as +a standard n-dimensional C-array. Otherwise, the consumer must access an +n-dimensional array as follows: + +.. code-block:: c + + ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * strides[n-1]; + item = *((typeof(item) *)ptr); + + +As noted above, :c:member:`~Py_buffer.buf` can point to any location within +the actual memory block. An exporter can check the validity of a buffer with +this function: + +.. code-block:: python + + def verify_structure(memlen, itemsize, ndim, shape, strides, offset): + """Verify that the parameters represent a valid array within + the bounds of the allocated memory: + char *mem: start of the physical memory block + memlen: length of the physical memory block + offset: (char *)buf - mem + """ + if offset % itemsize: + return False + if offset < 0 or offset+itemsize > memlen: + return False + if any(v % itemsize for v in strides): + return False + + if ndim <= 0: + return ndim == 0 and not shape and not strides + if 0 in shape: + return True + + imin = sum(strides[j]*(shape[j]-1) for j in range(ndim) + if strides[j] <= 0) + imax = sum(strides[j]*(shape[j]-1) for j in range(ndim) + if strides[j] > 0) + + return 0 <= offset+imin and offset+imax+itemsize <= memlen + + +PIL-style: shape, strides and suboffsets +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In addition to the regular items, PIL-style arrays can contain pointers +that must be followed in order to get to the next element in a dimension. +For example, the regular three-dimensional C-array ``char v[2][2][3]`` can +also be viewed as an array of 2 pointers to 2 two-dimensional arrays: +``char (*v[2])[2][3]``. In suboffsets representation, those two pointers +can be embedded at the start of :c:member:`~Py_buffer.buf`, pointing +to two ``char x[2][3]`` arrays that can be located anywhere in memory. + + +Here is a function that returns a pointer to the element in an N-D array +pointed to by an N-dimensional index when there are both non-``NULL`` strides +and suboffsets:: + + void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides, + Py_ssize_t *suboffsets, Py_ssize_t *indices) { + char *pointer = (char*)buf; + int i; + for (i = 0; i < ndim; i++) { + pointer += strides[i] * indices[i]; + if (suboffsets[i] >=0 ) { + pointer = *((char**)pointer) + suboffsets[i]; + } + } + return (void*)pointer; + } + + +Buffer-related functions +======================== + +.. c:function:: int PyObject_CheckBuffer(PyObject *obj) + + Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When ``1`` is + returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` will + succeed. This function always succeeds. + + +.. c:function:: int PyObject_GetBuffer(PyObject *exporter, Py_buffer *view, int flags) + + Send a request to *exporter* to fill in *view* as specified by *flags*. + If the exporter cannot provide a buffer of the exact type, it MUST raise + :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and + return ``-1``. + + On success, fill in *view*, set ``view->obj`` to a new reference + to *exporter* and return 0. In the case of chained buffer providers + that redirect requests to a single object, ``view->obj`` MAY + refer to this object instead of *exporter* (See :ref:`Buffer Object Structures <buffer-structs>`). + + Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls + to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:`free`. + Thus, after the consumer is done with the buffer, :c:func:`PyBuffer_Release` + must be called exactly once. + + +.. c:function:: void PyBuffer_Release(Py_buffer *view) + + Release the buffer *view* and decrement the reference count for + ``view->obj``. This function MUST be called when the buffer + is no longer being used, otherwise reference leaks may occur. + + It is an error to call this function on a buffer that was not obtained via + :c:func:`PyObject_GetBuffer`. + + +.. c:function:: Py_ssize_t PyBuffer_SizeFromFormat(const char *format) + + Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer.format`. + On error, raise an exception and return -1. + + .. versionadded:: 3.9 + + +.. c:function:: int PyBuffer_IsContiguous(const Py_buffer *view, char order) + + Return ``1`` if the memory defined by the *view* is C-style (*order* is + ``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either one + (*order* is ``'A'``). Return ``0`` otherwise. This function always succeeds. + + +.. c:function:: void* PyBuffer_GetPointer(const Py_buffer *view, const Py_ssize_t *indices) + + Get the memory area pointed to by the *indices* inside the given *view*. + *indices* must point to an array of ``view->ndim`` indices. + + +.. c:function:: int PyBuffer_FromContiguous(const Py_buffer *view, const void *buf, Py_ssize_t len, char fort) + + Copy contiguous *len* bytes from *buf* to *view*. + *fort* can be ``'C'`` or ``'F'`` (for C-style or Fortran-style ordering). + ``0`` is returned on success, ``-1`` on error. + + +.. c:function:: int PyBuffer_ToContiguous(void *buf, const Py_buffer *src, Py_ssize_t len, char order) + + Copy *len* bytes from *src* to its contiguous representation in *buf*. + *order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style + ordering or either one). ``0`` is returned on success, ``-1`` on error. + + This function fails if *len* != *src->len*. + + +.. c:function:: int PyObject_CopyData(PyObject *dest, PyObject *src) + + Copy data from *src* to *dest* buffer. Can convert between C-style and + or Fortran-style buffers. + + ``0`` is returned on success, ``-1`` on error. + +.. c:function:: void PyBuffer_FillContiguousStrides(int ndims, Py_ssize_t *shape, Py_ssize_t *strides, int itemsize, char order) + + Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style if + *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the + given shape with the given number of bytes per element. + + +.. c:function:: int PyBuffer_FillInfo(Py_buffer *view, PyObject *exporter, void *buf, Py_ssize_t len, int readonly, int flags) + + Handle buffer requests for an exporter that wants to expose *buf* of size *len* + with writability set according to *readonly*. *buf* is interpreted as a sequence + of unsigned bytes. + + The *flags* argument indicates the request type. This function always fills in + *view* as specified by flags, unless *buf* has been designated as read-only + and :c:macro:`PyBUF_WRITABLE` is set in *flags*. + + On success, set ``view->obj`` to a new reference to *exporter* and + return 0. Otherwise, raise :c:data:`PyExc_BufferError`, set + ``view->obj`` to ``NULL`` and return ``-1``; + + If this function is used as part of a :ref:`getbufferproc <buffer-structs>`, + *exporter* MUST be set to the exporting object and *flags* must be passed + unmodified. Otherwise, *exporter* MUST be ``NULL``.
diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst new file mode 100644 index 0000000..456f7d8 --- /dev/null +++ b/Doc/c-api/bytearray.rst
@@ -0,0 +1,85 @@ +.. highlight:: c + +.. _bytearrayobjects: + +Byte Array Objects +------------------ + +.. index:: pair: object; bytearray + + +.. c:type:: PyByteArrayObject + + This subtype of :c:type:`PyObject` represents a Python bytearray object. + + +.. c:var:: PyTypeObject PyByteArray_Type + + This instance of :c:type:`PyTypeObject` represents the Python bytearray type; + it is the same object as :class:`bytearray` in the Python layer. + + +Type check macros +^^^^^^^^^^^^^^^^^ + +.. c:function:: int PyByteArray_Check(PyObject *o) + + Return true if the object *o* is a bytearray object or an instance of a + subtype of the bytearray type. This function always succeeds. + + +.. c:function:: int PyByteArray_CheckExact(PyObject *o) + + Return true if the object *o* is a bytearray object, but not an instance of a + subtype of the bytearray type. This function always succeeds. + + +Direct API functions +^^^^^^^^^^^^^^^^^^^^ + +.. c:function:: PyObject* PyByteArray_FromObject(PyObject *o) + + Return a new bytearray object from any object, *o*, that implements the + :ref:`buffer protocol <bufferobjects>`. + + +.. c:function:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len) + + Create a new bytearray object from *string* and its length, *len*. On + failure, ``NULL`` is returned. + + +.. c:function:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) + + Concat bytearrays *a* and *b* and return a new bytearray with the result. + + +.. c:function:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) + + Return the size of *bytearray* after checking for a ``NULL`` pointer. + + +.. c:function:: char* PyByteArray_AsString(PyObject *bytearray) + + Return the contents of *bytearray* as a char array after checking for a + ``NULL`` pointer. The returned array always has an extra + null byte appended. + + +.. c:function:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) + + Resize the internal buffer of *bytearray* to *len*. + +Macros +^^^^^^ + +These macros trade safety for speed and they don't check pointers. + +.. c:function:: char* PyByteArray_AS_STRING(PyObject *bytearray) + + Similar to :c:func:`PyByteArray_AsString`, but without error checking. + + +.. c:function:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) + + Similar to :c:func:`PyByteArray_Size`, but without error checking.
diff --git a/Doc/c-api/bytes.rst b/Doc/c-api/bytes.rst new file mode 100644 index 0000000..21a5ab9 --- /dev/null +++ b/Doc/c-api/bytes.rst
@@ -0,0 +1,205 @@ +.. highlight:: c + +.. _bytesobjects: + +Bytes Objects +------------- + +These functions raise :exc:`TypeError` when expecting a bytes parameter and +called with a non-bytes parameter. + +.. index:: pair: object; bytes + + +.. c:type:: PyBytesObject + + This subtype of :c:type:`PyObject` represents a Python bytes object. + + +.. c:var:: PyTypeObject PyBytes_Type + + This instance of :c:type:`PyTypeObject` represents the Python bytes type; it + is the same object as :class:`bytes` in the Python layer. + + +.. c:function:: int PyBytes_Check(PyObject *o) + + Return true if the object *o* is a bytes object or an instance of a subtype + of the bytes type. This function always succeeds. + + +.. c:function:: int PyBytes_CheckExact(PyObject *o) + + Return true if the object *o* is a bytes object, but not an instance of a + subtype of the bytes type. This function always succeeds. + + +.. c:function:: PyObject* PyBytes_FromString(const char *v) + + Return a new bytes object with a copy of the string *v* as value on success, + and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will not be + checked. + + +.. c:function:: PyObject* PyBytes_FromStringAndSize(const char *v, Py_ssize_t len) + + Return a new bytes object with a copy of the string *v* as value and length + *len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents of + the bytes object are uninitialized. + + +.. c:function:: PyObject* PyBytes_FromFormat(const char *format, ...) + + Take a C :c:func:`printf`\ -style *format* string and a variable number of + arguments, calculate the size of the resulting Python bytes object and return + a bytes object with the values formatted into it. The variable arguments + must be C types and must correspond exactly to the format characters in the + *format* string. The following format characters are allowed: + + .. % XXX: This should be exactly the same as the table in PyErr_Format. + .. % One should just refer to the other. + .. % XXX: The descriptions for %zd and %zu are wrong, but the truth is complicated + .. % because not all compilers support the %z width modifier -- we fake it + .. % when necessary via interpolating PY_FORMAT_SIZE_T. + + .. tabularcolumns:: |l|l|L| + + +-------------------+---------------+--------------------------------+ + | Format Characters | Type | Comment | + +===================+===============+================================+ + | :attr:`%%` | *n/a* | The literal % character. | + +-------------------+---------------+--------------------------------+ + | :attr:`%c` | int | A single byte, | + | | | represented as a C int. | + +-------------------+---------------+--------------------------------+ + | :attr:`%d` | int | Equivalent to | + | | | ``printf("%d")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%u` | unsigned int | Equivalent to | + | | | ``printf("%u")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%ld` | long | Equivalent to | + | | | ``printf("%ld")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%lu` | unsigned long | Equivalent to | + | | | ``printf("%lu")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%zd` | :c:type:`\ | Equivalent to | + | | Py_ssize_t` | ``printf("%zd")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%zu` | size_t | Equivalent to | + | | | ``printf("%zu")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%i` | int | Equivalent to | + | | | ``printf("%i")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%x` | int | Equivalent to | + | | | ``printf("%x")``. [1]_ | + +-------------------+---------------+--------------------------------+ + | :attr:`%s` | const char\* | A null-terminated C character | + | | | array. | + +-------------------+---------------+--------------------------------+ + | :attr:`%p` | const void\* | The hex representation of a C | + | | | pointer. Mostly equivalent to | + | | | ``printf("%p")`` except that | + | | | it is guaranteed to start with | + | | | the literal ``0x`` regardless | + | | | of what the platform's | + | | | ``printf`` yields. | + +-------------------+---------------+--------------------------------+ + + An unrecognized format character causes all the rest of the format string to be + copied as-is to the result object, and any extra arguments discarded. + + .. [1] For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion + flag has effect even when a precision is given. + + +.. c:function:: PyObject* PyBytes_FromFormatV(const char *format, va_list vargs) + + Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two + arguments. + + +.. c:function:: PyObject* PyBytes_FromObject(PyObject *o) + + Return the bytes representation of object *o* that implements the buffer + protocol. + + +.. c:function:: Py_ssize_t PyBytes_Size(PyObject *o) + + Return the length of the bytes in bytes object *o*. + + +.. c:function:: Py_ssize_t PyBytes_GET_SIZE(PyObject *o) + + Similar to :c:func:`PyBytes_Size`, but without error checking. + + +.. c:function:: char* PyBytes_AsString(PyObject *o) + + Return a pointer to the contents of *o*. The pointer + refers to the internal buffer of *o*, which consists of ``len(o) + 1`` + bytes. The last byte in the buffer is always null, regardless of + whether there are any other null bytes. The data must not be + modified in any way, unless the object was just created using + ``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If + *o* is not a bytes object at all, :c:func:`PyBytes_AsString` returns ``NULL`` + and raises :exc:`TypeError`. + + +.. c:function:: char* PyBytes_AS_STRING(PyObject *string) + + Similar to :c:func:`PyBytes_AsString`, but without error checking. + + +.. c:function:: int PyBytes_AsStringAndSize(PyObject *obj, char **buffer, Py_ssize_t *length) + + Return the null-terminated contents of the object *obj* + through the output variables *buffer* and *length*. + + If *length* is ``NULL``, the bytes object + may not contain embedded null bytes; + if it does, the function returns ``-1`` and a :exc:`ValueError` is raised. + + The buffer refers to an internal buffer of *obj*, which includes an + additional null byte at the end (not counted in *length*). The data + must not be modified in any way, unless the object was just created using + ``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If + *obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` + returns ``-1`` and raises :exc:`TypeError`. + + .. versionchanged:: 3.5 + Previously, :exc:`TypeError` was raised when embedded null bytes were + encountered in the bytes object. + + +.. c:function:: void PyBytes_Concat(PyObject **bytes, PyObject *newpart) + + Create a new bytes object in *\*bytes* containing the contents of *newpart* + appended to *bytes*; the caller will own the new reference. The reference to + the old value of *bytes* will be stolen. If the new object cannot be + created, the old reference to *bytes* will still be discarded and the value + of *\*bytes* will be set to ``NULL``; the appropriate exception will be set. + + +.. c:function:: void PyBytes_ConcatAndDel(PyObject **bytes, PyObject *newpart) + + Create a new bytes object in *\*bytes* containing the contents of *newpart* + appended to *bytes*. This version decrements the reference count of + *newpart*. + + +.. c:function:: int _PyBytes_Resize(PyObject **bytes, Py_ssize_t newsize) + + A way to resize a bytes object even though it is "immutable". Only use this + to build up a brand new bytes object; don't use this if the bytes may already + be known in other parts of the code. It is an error to call this function if + the refcount on the input bytes object is not one. Pass the address of an + existing bytes object as an lvalue (it may be written into), and the new size + desired. On success, *\*bytes* holds the resized bytes object and ``0`` is + returned; the address in *\*bytes* may differ from its input value. If the + reallocation fails, the original bytes object at *\*bytes* is deallocated, + *\*bytes* is set to ``NULL``, :exc:`MemoryError` is set, and ``-1`` is + returned.
diff --git a/Doc/c-api/call.rst b/Doc/c-api/call.rst new file mode 100644 index 0000000..36149f1 --- /dev/null +++ b/Doc/c-api/call.rst
@@ -0,0 +1,406 @@ +.. highlight:: c + +.. _call: + +Call Protocol +============= + +CPython supports two different calling protocols: +*tp_call* and vectorcall. + +The *tp_call* Protocol +---------------------- + +Instances of classes that set :c:member:`~PyTypeObject.tp_call` are callable. +The signature of the slot is:: + + PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs); + +A call is made using a tuple for the positional arguments +and a dict for the keyword arguments, similarly to +``callable(*args, **kwargs)`` in Python code. +*args* must be non-NULL (use an empty tuple if there are no arguments) +but *kwargs* may be *NULL* if there are no keyword arguments. + +This convention is not only used by *tp_call*: +:c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_init` +also pass arguments this way. + +To call an object, use :c:func:`PyObject_Call` or another +:ref:`call API <capi-call>`. + + +.. _vectorcall: + +The Vectorcall Protocol +----------------------- + +.. versionadded:: 3.9 + +The vectorcall protocol was introduced in :pep:`590` as an additional protocol +for making calls more efficient. + +As rule of thumb, CPython will prefer the vectorcall for internal calls +if the callable supports it. However, this is not a hard rule. +Additionally, some third-party extensions use *tp_call* directly +(rather than using :c:func:`PyObject_Call`). +Therefore, a class supporting vectorcall must also implement +:c:member:`~PyTypeObject.tp_call`. +Moreover, the callable must behave the same +regardless of which protocol is used. +The recommended way to achieve this is by setting +:c:member:`~PyTypeObject.tp_call` to :c:func:`PyVectorcall_Call`. +This bears repeating: + +.. warning:: + + A class supporting vectorcall **must** also implement + :c:member:`~PyTypeObject.tp_call` with the same semantics. + +A class should not implement vectorcall if that would be slower +than *tp_call*. For example, if the callee needs to convert +the arguments to an args tuple and kwargs dict anyway, then there is no point +in implementing vectorcall. + +Classes can implement the vectorcall protocol by enabling the +:const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting +:c:member:`~PyTypeObject.tp_vectorcall_offset` to the offset inside the +object structure where a *vectorcallfunc* appears. +This is a pointer to a function with the following signature: + +.. c:type:: PyObject *(*vectorcallfunc)(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames) + +- *callable* is the object being called. +- *args* is a C array consisting of the positional arguments followed by the + values of the keyword arguments. + This can be *NULL* if there are no arguments. +- *nargsf* is the number of positional arguments plus possibly the + :const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. + To get the actual number of positional arguments from *nargsf*, + use :c:func:`PyVectorcall_NARGS`. +- *kwnames* is a tuple containing the names of the keyword arguments; + in other words, the keys of the kwargs dict. + These names must be strings (instances of ``str`` or a subclass) + and they must be unique. + If there are no keyword arguments, then *kwnames* can instead be *NULL*. + +.. c:macro:: PY_VECTORCALL_ARGUMENTS_OFFSET + + If this flag is set in a vectorcall *nargsf* argument, the callee is allowed + to temporarily change ``args[-1]``. In other words, *args* points to + argument 1 (not 0) in the allocated vector. + The callee must restore the value of ``args[-1]`` before returning. + + For :c:func:`PyObject_VectorcallMethod`, this flag means instead that + ``args[0]`` may be changed. + + Whenever they can do so cheaply (without additional allocation), callers + are encouraged to use :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. + Doing so will allow callables such as bound methods to make their onward + calls (which include a prepended *self* argument) very efficiently. + +To call an object that implements vectorcall, use a :ref:`call API <capi-call>` +function as with any other callable. +:c:func:`PyObject_Vectorcall` will usually be most efficient. + + +.. note:: + + In CPython 3.8, the vectorcall API and related functions were available + provisionally under names with a leading underscore: + ``_PyObject_Vectorcall``, ``_Py_TPFLAGS_HAVE_VECTORCALL``, + ``_PyObject_VectorcallMethod``, ``_PyVectorcall_Function``, + ``_PyObject_CallOneArg``, ``_PyObject_CallMethodNoArgs``, + ``_PyObject_CallMethodOneArg``. + Additionally, ``PyObject_VectorcallDict`` was available as + ``_PyObject_FastCallDict``. + The old names are still defined as aliases of the new, non-underscored names. + + +Recursion Control +................. + +When using *tp_call*, callees do not need to worry about +:ref:`recursion <recursion>`: CPython uses +:c:func:`Py_EnterRecursiveCall` and :c:func:`Py_LeaveRecursiveCall` +for calls made using *tp_call*. + +For efficiency, this is not the case for calls done using vectorcall: +the callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* +if needed. + + +Vectorcall Support API +...................... + +.. c:function:: Py_ssize_t PyVectorcall_NARGS(size_t nargsf) + + Given a vectorcall *nargsf* argument, return the actual number of + arguments. + Currently equivalent to:: + + (Py_ssize_t)(nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET) + + However, the function ``PyVectorcall_NARGS`` should be used to allow + for future extensions. + + .. versionadded:: 3.8 + +.. c:function:: vectorcallfunc PyVectorcall_Function(PyObject *op) + + If *op* does not support the vectorcall protocol (either because the type + does not or because the specific instance does not), return *NULL*. + Otherwise, return the vectorcall function pointer stored in *op*. + This function never raises an exception. + + This is mostly useful to check whether or not *op* supports vectorcall, + which can be done by checking ``PyVectorcall_Function(op) != NULL``. + + .. versionadded:: 3.8 + +.. c:function:: PyObject* PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *dict) + + Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword + arguments given in a tuple and dict, respectively. + + This is a specialized function, intended to be put in the + :c:member:`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. + It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag + and it does not fall back to ``tp_call``. + + .. versionadded:: 3.8 + + +.. _capi-call: + +Object Calling API +------------------ + +Various functions are available for calling a Python object. +Each converts its arguments to a convention supported by the called object – +either *tp_call* or vectorcall. +In order to do as little conversion as possible, pick one that best fits +the format of data you have available. + +The following table summarizes the available functions; +please see individual documentation for details. + ++------------------------------------------+------------------+--------------------+---------------+ +| Function | callable | args | kwargs | ++==========================================+==================+====================+===============+ +| :c:func:`PyObject_Call` | ``PyObject *`` | tuple | dict/``NULL`` | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallNoArgs` | ``PyObject *`` | --- | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallOneArg` | ``PyObject *`` | 1 object | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallObject` | ``PyObject *`` | tuple/``NULL`` | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallFunction` | ``PyObject *`` | format | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallMethod` | obj + ``char*`` | format | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallFunctionObjArgs` | ``PyObject *`` | variadic | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallMethodObjArgs` | obj + name | variadic | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallMethodNoArgs` | obj + name | --- | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_CallMethodOneArg` | obj + name | 1 object | --- | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_Vectorcall` | ``PyObject *`` | vectorcall | vectorcall | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_VectorcallDict` | ``PyObject *`` | vectorcall | dict/``NULL`` | ++------------------------------------------+------------------+--------------------+---------------+ +| :c:func:`PyObject_VectorcallMethod` | arg + name | vectorcall | vectorcall | ++------------------------------------------+------------------+--------------------+---------------+ + + +.. c:function:: PyObject* PyObject_Call(PyObject *callable, PyObject *args, PyObject *kwargs) + + Call a callable Python object *callable*, with arguments given by the + tuple *args*, and named arguments given by the dictionary *kwargs*. + + *args* must not be *NULL*; use an empty tuple if no arguments are needed. + If no named arguments are needed, *kwargs* can be *NULL*. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + This is the equivalent of the Python expression: + ``callable(*args, **kwargs)``. + + +.. c:function:: PyObject* PyObject_CallNoArgs(PyObject *callable) + + Call a callable Python object *callable* without any arguments. It is the + most efficient way to call a callable Python object without any argument. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + .. versionadded:: 3.9 + + +.. c:function:: PyObject* PyObject_CallOneArg(PyObject *callable, PyObject *arg) + + Call a callable Python object *callable* with exactly 1 positional argument + *arg* and no keyword arguments. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + .. versionadded:: 3.9 + + +.. c:function:: PyObject* PyObject_CallObject(PyObject *callable, PyObject *args) + + Call a callable Python object *callable*, with arguments given by the + tuple *args*. If no arguments are needed, then *args* can be *NULL*. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + This is the equivalent of the Python expression: ``callable(*args)``. + + +.. c:function:: PyObject* PyObject_CallFunction(PyObject *callable, const char *format, ...) + + Call a callable Python object *callable*, with a variable number of C arguments. + The C arguments are described using a :c:func:`Py_BuildValue` style format + string. The format can be *NULL*, indicating that no arguments are provided. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + This is the equivalent of the Python expression: ``callable(*args)``. + + Note that if you only pass :c:expr:`PyObject *` args, + :c:func:`PyObject_CallFunctionObjArgs` is a faster alternative. + + .. versionchanged:: 3.4 + The type of *format* was changed from ``char *``. + + +.. c:function:: PyObject* PyObject_CallMethod(PyObject *obj, const char *name, const char *format, ...) + + Call the method named *name* of object *obj* with a variable number of C + arguments. The C arguments are described by a :c:func:`Py_BuildValue` format + string that should produce a tuple. + + The format can be *NULL*, indicating that no arguments are provided. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + This is the equivalent of the Python expression: + ``obj.name(arg1, arg2, ...)``. + + Note that if you only pass :c:expr:`PyObject *` args, + :c:func:`PyObject_CallMethodObjArgs` is a faster alternative. + + .. versionchanged:: 3.4 + The types of *name* and *format* were changed from ``char *``. + + +.. c:function:: PyObject* PyObject_CallFunctionObjArgs(PyObject *callable, ...) + + Call a callable Python object *callable*, with a variable number of + :c:expr:`PyObject *` arguments. The arguments are provided as a variable number + of parameters followed by *NULL*. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + This is the equivalent of the Python expression: + ``callable(arg1, arg2, ...)``. + + +.. c:function:: PyObject* PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ...) + + Call a method of the Python object *obj*, where the name of the method is given as a + Python string object in *name*. It is called with a variable number of + :c:expr:`PyObject *` arguments. The arguments are provided as a variable number + of parameters followed by *NULL*. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + +.. c:function:: PyObject* PyObject_CallMethodNoArgs(PyObject *obj, PyObject *name) + + Call a method of the Python object *obj* without arguments, + where the name of the method is given as a Python string object in *name*. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + .. versionadded:: 3.9 + + +.. c:function:: PyObject* PyObject_CallMethodOneArg(PyObject *obj, PyObject *name, PyObject *arg) + + Call a method of the Python object *obj* with a single positional argument + *arg*, where the name of the method is given as a Python string object in + *name*. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + .. versionadded:: 3.9 + + +.. c:function:: PyObject* PyObject_Vectorcall(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames) + + Call a callable Python object *callable*. + The arguments are the same as for :c:type:`vectorcallfunc`. + If *callable* supports vectorcall_, this directly calls + the vectorcall function stored in *callable*. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + .. versionadded:: 3.9 + +.. c:function:: PyObject* PyObject_VectorcallDict(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwdict) + + Call *callable* with positional arguments passed exactly as in the vectorcall_ protocol, + but with keyword arguments passed as a dictionary *kwdict*. + The *args* array contains only the positional arguments. + + Regardless of which protocol is used internally, + a conversion of arguments needs to be done. + Therefore, this function should only be used if the caller + already has a dictionary ready to use for the keyword arguments, + but not a tuple for the positional arguments. + + .. versionadded:: 3.9 + +.. c:function:: PyObject* PyObject_VectorcallMethod(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) + + Call a method using the vectorcall calling convention. The name of the method + is given as a Python string *name*. The object whose method is called is + *args[0]*, and the *args* array starting at *args[1]* represents the arguments + of the call. There must be at least one positional argument. + *nargsf* is the number of positional arguments including *args[0]*, + plus :const:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may + temporarily be changed. Keyword arguments can be passed just like in + :c:func:`PyObject_Vectorcall`. + + If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, + this will call the unbound method object with the full + *args* vector as arguments. + + Return the result of the call on success, or raise an exception and return + *NULL* on failure. + + .. versionadded:: 3.9 + + +Call Support API +---------------- + +.. c:function:: int PyCallable_Check(PyObject *o) + + Determine if the object *o* is callable. Return ``1`` if the object is callable + and ``0`` otherwise. This function always succeeds.
diff --git a/Doc/c-api/capsule.rst b/Doc/c-api/capsule.rst new file mode 100644 index 0000000..427ed95 --- /dev/null +++ b/Doc/c-api/capsule.rst
@@ -0,0 +1,159 @@ +.. highlight:: c + +.. _capsules: + +Capsules +-------- + +.. index:: pair: object; Capsule + +Refer to :ref:`using-capsules` for more information on using these objects. + +.. versionadded:: 3.1 + + +.. c:type:: PyCapsule + + This subtype of :c:type:`PyObject` represents an opaque value, useful for C + extension modules who need to pass an opaque value (as a :c:expr:`void*` + pointer) through Python code to other C code. It is often used to make a C + function pointer defined in one module available to other modules, so the + regular import mechanism can be used to access C APIs defined in dynamically + loaded modules. + + +.. c:type:: PyCapsule_Destructor + + The type of a destructor callback for a capsule. Defined as:: + + typedef void (*PyCapsule_Destructor)(PyObject *); + + See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor + callbacks. + + +.. c:function:: int PyCapsule_CheckExact(PyObject *p) + + Return true if its argument is a :c:type:`PyCapsule`. This function always + succeeds. + + +.. c:function:: PyObject* PyCapsule_New(void *pointer, const char *name, PyCapsule_Destructor destructor) + + Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* + argument may not be ``NULL``. + + On failure, set an exception and return ``NULL``. + + The *name* string may either be ``NULL`` or a pointer to a valid C string. If + non-``NULL``, this string must outlive the capsule. (Though it is permitted to + free it inside the *destructor*.) + + If the *destructor* argument is not ``NULL``, it will be called with the + capsule as its argument when it is destroyed. + + If this capsule will be stored as an attribute of a module, the *name* should + be specified as ``modulename.attributename``. This will enable other modules + to import the capsule using :c:func:`PyCapsule_Import`. + + +.. c:function:: void* PyCapsule_GetPointer(PyObject *capsule, const char *name) + + Retrieve the *pointer* stored in the capsule. On failure, set an exception + and return ``NULL``. + + The *name* parameter must compare exactly to the name stored in the capsule. + If the name stored in the capsule is ``NULL``, the *name* passed in must also + be ``NULL``. Python uses the C function :c:func:`strcmp` to compare capsule + names. + + +.. c:function:: PyCapsule_Destructor PyCapsule_GetDestructor(PyObject *capsule) + + Return the current destructor stored in the capsule. On failure, set an + exception and return ``NULL``. + + It is legal for a capsule to have a ``NULL`` destructor. This makes a ``NULL`` + return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or + :c:func:`PyErr_Occurred` to disambiguate. + + +.. c:function:: void* PyCapsule_GetContext(PyObject *capsule) + + Return the current context stored in the capsule. On failure, set an + exception and return ``NULL``. + + It is legal for a capsule to have a ``NULL`` context. This makes a ``NULL`` + return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or + :c:func:`PyErr_Occurred` to disambiguate. + + +.. c:function:: const char* PyCapsule_GetName(PyObject *capsule) + + Return the current name stored in the capsule. On failure, set an exception + and return ``NULL``. + + It is legal for a capsule to have a ``NULL`` name. This makes a ``NULL`` return + code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or + :c:func:`PyErr_Occurred` to disambiguate. + + +.. c:function:: void* PyCapsule_Import(const char *name, int no_block) + + Import a pointer to a C object from a capsule attribute in a module. The + *name* parameter should specify the full name to the attribute, as in + ``module.attribute``. The *name* stored in the capsule must match this + string exactly. + + Return the capsule's internal *pointer* on success. On failure, set an + exception and return ``NULL``. + + .. versionchanged:: 3.3 + *no_block* has no effect anymore. + + +.. c:function:: int PyCapsule_IsValid(PyObject *capsule, const char *name) + + Determines whether or not *capsule* is a valid capsule. A valid capsule is + non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` pointer + stored in it, and its internal name matches the *name* parameter. (See + :c:func:`PyCapsule_GetPointer` for information on how capsule names are + compared.) + + In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls to + any of the accessors (any function starting with :c:func:`PyCapsule_Get`) are + guaranteed to succeed. + + Return a nonzero value if the object is valid and matches the name passed in. + Return ``0`` otherwise. This function will not fail. + + +.. c:function:: int PyCapsule_SetContext(PyObject *capsule, void *context) + + Set the context pointer inside *capsule* to *context*. + + Return ``0`` on success. Return nonzero and set an exception on failure. + + +.. c:function:: int PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor) + + Set the destructor inside *capsule* to *destructor*. + + Return ``0`` on success. Return nonzero and set an exception on failure. + + +.. c:function:: int PyCapsule_SetName(PyObject *capsule, const char *name) + + Set the name inside *capsule* to *name*. If non-``NULL``, the name must + outlive the capsule. If the previous *name* stored in the capsule was not + ``NULL``, no attempt is made to free it. + + Return ``0`` on success. Return nonzero and set an exception on failure. + + +.. c:function:: int PyCapsule_SetPointer(PyObject *capsule, void *pointer) + + Set the void pointer inside *capsule* to *pointer*. The pointer may not be + ``NULL``. + + Return ``0`` on success. Return nonzero and set an exception on failure.
diff --git a/Doc/c-api/cell.rst b/Doc/c-api/cell.rst new file mode 100644 index 0000000..ac4ef5a --- /dev/null +++ b/Doc/c-api/cell.rst
@@ -0,0 +1,63 @@ +.. highlight:: c + +.. _cell-objects: + +Cell Objects +------------ + +"Cell" objects are used to implement variables referenced by multiple scopes. +For each such variable, a cell object is created to store the value; the local +variables of each stack frame that references the value contains a reference to +the cells from outer scopes which also use that variable. When the value is +accessed, the value contained in the cell is used instead of the cell object +itself. This de-referencing of the cell object requires support from the +generated byte-code; these are not automatically de-referenced when accessed. +Cell objects are not likely to be useful elsewhere. + + +.. c:type:: PyCellObject + + The C structure used for cell objects. + + +.. c:var:: PyTypeObject PyCell_Type + + The type object corresponding to cell objects. + + +.. c:function:: int PyCell_Check(ob) + + Return true if *ob* is a cell object; *ob* must not be ``NULL``. This + function always succeeds. + + +.. c:function:: PyObject* PyCell_New(PyObject *ob) + + Create and return a new cell object containing the value *ob*. The parameter may + be ``NULL``. + + +.. c:function:: PyObject* PyCell_Get(PyObject *cell) + + Return the contents of the cell *cell*. + + +.. c:function:: PyObject* PyCell_GET(PyObject *cell) + + Return the contents of the cell *cell*, but without checking that *cell* is + non-``NULL`` and a cell object. + + +.. c:function:: int PyCell_Set(PyObject *cell, PyObject *value) + + Set the contents of the cell object *cell* to *value*. This releases the + reference to any current content of the cell. *value* may be ``NULL``. *cell* + must be non-``NULL``; if it is not a cell object, ``-1`` will be returned. On + success, ``0`` will be returned. + + +.. c:function:: void PyCell_SET(PyObject *cell, PyObject *value) + + Sets the value of the cell object *cell* to *value*. No reference counts are + adjusted, and no checks are made for safety; *cell* must be non-``NULL`` and must + be a cell object.
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst new file mode 100644 index 0000000..ee39f2a --- /dev/null +++ b/Doc/c-api/code.rst
@@ -0,0 +1,119 @@ +.. highlight:: c + +.. index:: object; code, code object + +.. _codeobjects: + +Code Objects +------------ + +.. sectionauthor:: Jeffrey Yasskin <jyasskin@gmail.com> + +Code objects are a low-level detail of the CPython implementation. +Each one represents a chunk of executable code that hasn't yet been +bound into a function. + +.. c:type:: PyCodeObject + + The C structure of the objects used to describe code objects. The + fields of this type are subject to change at any time. + + +.. c:var:: PyTypeObject PyCode_Type + + This is an instance of :c:type:`PyTypeObject` representing the Python + :class:`code` type. + + +.. c:function:: int PyCode_Check(PyObject *co) + + Return true if *co* is a :class:`code` object. This function always succeeds. + +.. c:function:: int PyCode_GetNumFree(PyCodeObject *co) + + Return the number of free variables in *co*. + +.. c:function:: PyCodeObject* PyCode_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *linetable, PyObject *exceptiontable) + + Return a new code object. If you need a dummy code object to create a frame, + use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` directly + will bind you to a precise Python version since the definition of the bytecode + changes often. The many arguments of this function are inter-dependent in complex + ways, meaning that subtle changes to values are likely to result in incorrect + execution or VM crashes. Use this function only with extreme care. + + .. versionchanged:: 3.11 + Added ``exceptiontable`` parameter. + +.. c:function:: PyCodeObject* PyCode_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *linetable, PyObject *exceptiontable) + + Similar to :c:func:`PyCode_New`, but with an extra "posonlyargcount" for positional-only arguments. + The same caveats that apply to ``PyCode_New`` also apply to this function. + + .. versionadded:: 3.8 + + .. versionchanged:: 3.11 + Added ``exceptiontable`` parameter. + +.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno) + + Return a new empty code object with the specified filename, + function name, and first line number. The resulting code + object will raise an ``Exception`` if executed. + +.. c:function:: int PyCode_Addr2Line(PyCodeObject *co, int byte_offset) + + Return the line number of the instruction that occurs on or before ``byte_offset`` and ends after it. + If you just need the line number of a frame, use :c:func:`PyFrame_GetLineNumber` instead. + + For efficiently iterating over the line numbers in a code object, use `the API described in PEP 626 + <https://peps.python.org/pep-0626/#out-of-process-debuggers-and-profilers>`_. + +.. c:function:: int PyCode_Addr2Location(PyObject *co, int byte_offset, int *start_line, int *start_column, int *end_line, int *end_column) + + Sets the passed ``int`` pointers to the source code line and column numbers + for the instruction at ``byte_offset``. Sets the value to ``0`` when + information is not available for any particular element. + + Returns ``1`` if the function succeeds and 0 otherwise. + + .. versionadded:: 3.11 + +.. c:function:: PyObject* PyCode_GetCode(PyCodeObject *co) + + Equivalent to the Python code ``getattr(co, 'co_code')``. + Returns a strong reference to a :c:type:`PyBytesObject` representing the + bytecode in a code object. On error, ``NULL`` is returned and an exception + is raised. + + This ``PyBytesObject`` may be created on-demand by the interpreter and does + not necessarily represent the bytecode actually executed by CPython. The + primary use case for this function is debuggers and profilers. + + .. versionadded:: 3.11 + +.. c:function:: PyObject* PyCode_GetVarnames(PyCodeObject *co) + + Equivalent to the Python code ``getattr(co, 'co_varnames')``. + Returns a new reference to a :c:type:`PyTupleObject` containing the names of + the local variables. On error, ``NULL`` is returned and an exception + is raised. + + .. versionadded:: 3.11 + +.. c:function:: PyObject* PyCode_GetCellvars(PyCodeObject *co) + + Equivalent to the Python code ``getattr(co, 'co_cellvars')``. + Returns a new reference to a :c:type:`PyTupleObject` containing the names of + the local variables that are referenced by nested functions. On error, ``NULL`` + is returned and an exception is raised. + + .. versionadded:: 3.11 + +.. c:function:: PyObject* PyCode_GetFreevars(PyCodeObject *co) + + Equivalent to the Python code ``getattr(co, 'co_freevars')``. + Returns a new reference to a :c:type:`PyTupleObject` containing the names of + the free variables. On error, ``NULL`` is returned and an exception is raised. + + .. versionadded:: 3.11
diff --git a/Doc/c-api/codec.rst b/Doc/c-api/codec.rst new file mode 100644 index 0000000..235c77c --- /dev/null +++ b/Doc/c-api/codec.rst
@@ -0,0 +1,131 @@ +.. _codec-registry: + +Codec registry and support functions +==================================== + +.. c:function:: int PyCodec_Register(PyObject *search_function) + + Register a new codec search function. + + As side effect, this tries to load the :mod:`encodings` package, if not yet + done, to make sure that it is always first in the list of search functions. + +.. c:function:: int PyCodec_Unregister(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. + + .. versionadded:: 3.10 + +.. c:function:: int PyCodec_KnownEncoding(const char *encoding) + + Return ``1`` or ``0`` depending on whether there is a registered codec for + the given *encoding*. This function always succeeds. + +.. c:function:: PyObject* PyCodec_Encode(PyObject *object, const char *encoding, const char *errors) + + Generic codec based encoding API. + + *object* is passed through the encoder function found for the given + *encoding* using the error handling method defined by *errors*. *errors* may + be ``NULL`` to use the default method defined for the codec. Raises a + :exc:`LookupError` if no encoder can be found. + +.. c:function:: PyObject* PyCodec_Decode(PyObject *object, const char *encoding, const char *errors) + + Generic codec based decoding API. + + *object* is passed through the decoder function found for the given + *encoding* using the error handling method defined by *errors*. *errors* may + be ``NULL`` to use the default method defined for the codec. Raises a + :exc:`LookupError` if no encoder can be found. + + +Codec lookup API +---------------- + +In the following functions, the *encoding* string is looked up converted to all +lower-case characters, which makes encodings looked up through this mechanism +effectively case-insensitive. If no codec is found, a :exc:`KeyError` is set +and ``NULL`` returned. + +.. c:function:: PyObject* PyCodec_Encoder(const char *encoding) + + Get an encoder function for the given *encoding*. + +.. c:function:: PyObject* PyCodec_Decoder(const char *encoding) + + Get a decoder function for the given *encoding*. + +.. c:function:: PyObject* PyCodec_IncrementalEncoder(const char *encoding, const char *errors) + + Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*. + +.. c:function:: PyObject* PyCodec_IncrementalDecoder(const char *encoding, const char *errors) + + Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*. + +.. c:function:: PyObject* PyCodec_StreamReader(const char *encoding, PyObject *stream, const char *errors) + + Get a :class:`~codecs.StreamReader` factory function for the given *encoding*. + +.. c:function:: PyObject* PyCodec_StreamWriter(const char *encoding, PyObject *stream, const char *errors) + + Get a :class:`~codecs.StreamWriter` factory function for the given *encoding*. + + +Registry API for Unicode encoding error handlers +------------------------------------------------ + +.. c:function:: int PyCodec_RegisterError(const char *name, PyObject *error) + + Register the error handling callback function *error* under the given *name*. + This callback function will be called by a codec when it encounters + unencodable characters/undecodable bytes and *name* is specified as the error + parameter in the call to the encode/decode function. + + The callback gets a single argument, an instance of + :exc:`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or + :exc:`UnicodeTranslateError` that holds information about the problematic + sequence of characters or bytes and their offset in the original string (see + :ref:`unicodeexceptions` for functions to extract this information). The + callback must either raise the given exception, or return a two-item tuple + containing the replacement for the problematic sequence, and an integer + giving the offset in the original string at which encoding/decoding should be + resumed. + + Return ``0`` on success, ``-1`` on error. + +.. c:function:: PyObject* PyCodec_LookupError(const char *name) + + Lookup the error handling callback function registered under *name*. As a + special case ``NULL`` can be passed, in which case the error handling callback + for "strict" will be returned. + +.. c:function:: PyObject* PyCodec_StrictErrors(PyObject *exc) + + Raise *exc* as an exception. + +.. c:function:: PyObject* PyCodec_IgnoreErrors(PyObject *exc) + + Ignore the unicode error, skipping the faulty input. + +.. c:function:: PyObject* PyCodec_ReplaceErrors(PyObject *exc) + + Replace the unicode encode error with ``?`` or ``U+FFFD``. + +.. c:function:: PyObject* PyCodec_XMLCharRefReplaceErrors(PyObject *exc) + + Replace the unicode encode error with XML character references. + +.. c:function:: PyObject* PyCodec_BackslashReplaceErrors(PyObject *exc) + + Replace the unicode encode error with backslash escapes (``\x``, ``\u`` and + ``\U``). + +.. c:function:: PyObject* PyCodec_NameReplaceErrors(PyObject *exc) + + Replace the unicode encode error with ``\N{...}`` escapes. + + .. versionadded:: 3.5
diff --git a/Doc/c-api/complex.rst b/Doc/c-api/complex.rst new file mode 100644 index 0000000..344da90 --- /dev/null +++ b/Doc/c-api/complex.rst
@@ -0,0 +1,138 @@ +.. highlight:: c + +.. _complexobjects: + +Complex Number Objects +---------------------- + +.. index:: pair: object; complex number + +Python's complex number objects are implemented as two distinct types when +viewed from the C API: one is the Python object exposed to Python programs, and +the other is a C structure which represents the actual complex number value. +The API provides functions for working with both. + + +Complex Numbers as C Structures +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Note that the functions which accept these structures as parameters and return +them as results do so *by value* rather than dereferencing them through +pointers. This is consistent throughout the API. + + +.. c:type:: Py_complex + + The C structure which corresponds to the value portion of a Python complex + number object. Most of the functions for dealing with complex number objects + use structures of this type as input or output values, as appropriate. It is + defined as:: + + typedef struct { + double real; + double imag; + } Py_complex; + + +.. c:function:: Py_complex _Py_c_sum(Py_complex left, Py_complex right) + + Return the sum of two complex numbers, using the C :c:type:`Py_complex` + representation. + + +.. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right) + + Return the difference between two complex numbers, using the C + :c:type:`Py_complex` representation. + + +.. c:function:: Py_complex _Py_c_neg(Py_complex num) + + Return the negation of the complex number *num*, using the C + :c:type:`Py_complex` representation. + + +.. c:function:: Py_complex _Py_c_prod(Py_complex left, Py_complex right) + + Return the product of two complex numbers, using the C :c:type:`Py_complex` + representation. + + +.. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor) + + Return the quotient of two complex numbers, using the C :c:type:`Py_complex` + representation. + + If *divisor* is null, this method returns zero and sets + :c:data:`errno` to :c:data:`EDOM`. + + +.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp) + + Return the exponentiation of *num* by *exp*, using the C :c:type:`Py_complex` + representation. + + If *num* is null and *exp* is not a positive real number, + this method returns zero and sets :c:data:`errno` to :c:data:`EDOM`. + + +Complex Numbers as Python Objects +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +.. c:type:: PyComplexObject + + This subtype of :c:type:`PyObject` represents a Python complex number object. + + +.. c:var:: PyTypeObject PyComplex_Type + + This instance of :c:type:`PyTypeObject` represents the Python complex number + type. It is the same object as :class:`complex` in the Python layer. + + +.. c:function:: int PyComplex_Check(PyObject *p) + + Return true if its argument is a :c:type:`PyComplexObject` or a subtype of + :c:type:`PyComplexObject`. This function always succeeds. + + +.. c:function:: int PyComplex_CheckExact(PyObject *p) + + Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of + :c:type:`PyComplexObject`. This function always succeeds. + + +.. c:function:: PyObject* PyComplex_FromCComplex(Py_complex v) + + Create a new Python complex number object from a C :c:type:`Py_complex` value. + + +.. c:function:: PyObject* PyComplex_FromDoubles(double real, double imag) + + Return a new :c:type:`PyComplexObject` object from *real* and *imag*. + + +.. c:function:: double PyComplex_RealAsDouble(PyObject *op) + + Return the real part of *op* as a C :c:expr:`double`. + + +.. c:function:: double PyComplex_ImagAsDouble(PyObject *op) + + Return the imaginary part of *op* as a C :c:expr:`double`. + + +.. c:function:: Py_complex PyComplex_AsCComplex(PyObject *op) + + Return the :c:type:`Py_complex` value of the complex number *op*. + + If *op* is not a Python complex number object but has a :meth:`__complex__` + method, this method will first be called to convert *op* to a Python complex + number object. If ``__complex__()`` is not defined then it falls back to + :meth:`__float__`. If ``__float__()`` is not defined then it falls back + to :meth:`__index__`. Upon failure, this method returns ``-1.0`` as a real + value. + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available.
diff --git a/Doc/c-api/concrete.rst b/Doc/c-api/concrete.rst new file mode 100644 index 0000000..880f7b1 --- /dev/null +++ b/Doc/c-api/concrete.rst
@@ -0,0 +1,119 @@ +.. highlight:: c + + +.. _concrete: + +********************** +Concrete Objects Layer +********************** + +The functions in this chapter are specific to certain Python object types. +Passing them an object of the wrong type is not a good idea; if you receive an +object from a Python program and you are not sure that it has the right type, +you must perform a type check first; for example, to check that an object is a +dictionary, use :c:func:`PyDict_Check`. The chapter is structured like the +"family tree" of Python object types. + +.. warning:: + + While the functions described in this chapter carefully check the type of the + objects which are passed in, many of them do not check for ``NULL`` being passed + instead of a valid object. Allowing ``NULL`` to be passed in can cause memory + access violations and immediate termination of the interpreter. + + +.. _fundamental: + +Fundamental Objects +=================== + +This section describes Python type objects and the singleton object ``None``. + +.. toctree:: + + type.rst + none.rst + + +.. _numericobjects: + +Numeric Objects +=============== + +.. index:: pair: object; numeric + +.. toctree:: + + long.rst + bool.rst + float.rst + complex.rst + + +.. _sequenceobjects: + +Sequence Objects +================ + +.. index:: pair: object; sequence + +Generic operations on sequence objects were discussed in the previous chapter; +this section deals with the specific kinds of sequence objects that are +intrinsic to the Python language. + +.. XXX sort out unicode, str, bytes and bytearray + +.. toctree:: + + bytes.rst + bytearray.rst + unicode.rst + tuple.rst + list.rst + + +.. _mapobjects: + +Container Objects +================= + +.. index:: pair: object; mapping + +.. toctree:: + + dict.rst + set.rst + + +.. _otherobjects: + +Function Objects +================ + +.. toctree:: + + function.rst + method.rst + cell.rst + code.rst + + +Other Objects +============= + +.. toctree:: + + file.rst + module.rst + iterator.rst + descriptor.rst + slice.rst + memoryview.rst + weakref.rst + capsule.rst + frame.rst + gen.rst + coro.rst + contextvars.rst + datetime.rst + typehints.rst
diff --git a/Doc/c-api/contextvars.rst b/Doc/c-api/contextvars.rst new file mode 100644 index 0000000..d970f54 --- /dev/null +++ b/Doc/c-api/contextvars.rst
@@ -0,0 +1,138 @@ +.. highlight:: c + +.. _contextvarsobjects: + +Context Variables Objects +------------------------- + +.. _contextvarsobjects_pointertype_change: +.. versionchanged:: 3.7.1 + + .. note:: + + In Python 3.7.1 the signatures of all context variables + C APIs were **changed** to use :c:type:`PyObject` pointers instead + of :c:type:`PyContext`, :c:type:`PyContextVar`, and + :c:type:`PyContextToken`, e.g.:: + + // in 3.7.0: + PyContext *PyContext_New(void); + + // in 3.7.1+: + PyObject *PyContext_New(void); + + See :issue:`34762` for more details. + + +.. versionadded:: 3.7 + +This section details the public C API for the :mod:`contextvars` module. + +.. c:type:: PyContext + + The C structure used to represent a :class:`contextvars.Context` + object. + +.. c:type:: PyContextVar + + The C structure used to represent a :class:`contextvars.ContextVar` + object. + +.. c:type:: PyContextToken + + The C structure used to represent a :class:`contextvars.Token` object. + +.. c:var:: PyTypeObject PyContext_Type + + The type object representing the *context* type. + +.. c:var:: PyTypeObject PyContextVar_Type + + The type object representing the *context variable* type. + +.. c:var:: PyTypeObject PyContextToken_Type + + The type object representing the *context variable token* type. + + +Type-check macros: + +.. c:function:: int PyContext_CheckExact(PyObject *o) + + Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be + ``NULL``. This function always succeeds. + +.. c:function:: int PyContextVar_CheckExact(PyObject *o) + + Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be + ``NULL``. This function always succeeds. + +.. c:function:: int PyContextToken_CheckExact(PyObject *o) + + Return true if *o* is of type :c:data:`PyContextToken_Type`. + *o* must not be ``NULL``. This function always succeeds. + + +Context object management functions: + +.. c:function:: PyObject *PyContext_New(void) + + Create a new empty context object. Returns ``NULL`` if an error + has occurred. + +.. c:function:: PyObject *PyContext_Copy(PyObject *ctx) + + Create a shallow copy of the passed *ctx* context object. + Returns ``NULL`` if an error has occurred. + +.. c:function:: PyObject *PyContext_CopyCurrent(void) + + Create a shallow copy of the current thread context. + Returns ``NULL`` if an error has occurred. + +.. c:function:: int PyContext_Enter(PyObject *ctx) + + Set *ctx* as the current context for the current thread. + Returns ``0`` on success, and ``-1`` on error. + +.. c:function:: int PyContext_Exit(PyObject *ctx) + + Deactivate the *ctx* context and restore the previous context as the + current context for the current thread. Returns ``0`` on success, + and ``-1`` on error. + + +Context variable functions: + +.. c:function:: PyObject *PyContextVar_New(const char *name, PyObject *def) + + Create a new ``ContextVar`` object. The *name* parameter is used + for introspection and debug purposes. The *def* parameter specifies + a default value for the context variable, or ``NULL`` for no default. + If an error has occurred, this function returns ``NULL``. + +.. c:function:: int PyContextVar_Get(PyObject *var, PyObject *default_value, PyObject **value) + + Get the value of a context variable. Returns ``-1`` if an error has + occurred during lookup, and ``0`` if no error occurred, whether or not + a value was found. + + If the context variable was found, *value* will be a pointer to it. + If the context variable was *not* found, *value* will point to: + + - *default_value*, if not ``NULL``; + - the default value of *var*, if not ``NULL``; + - ``NULL`` + + Except for ``NULL``, the function returns a new reference. + +.. c:function:: PyObject *PyContextVar_Set(PyObject *var, PyObject *value) + + Set the value of *var* to *value* in the current context. Returns + a new token object for this change, or ``NULL`` if an error has occurred. + +.. c:function:: int PyContextVar_Reset(PyObject *var, PyObject *token) + + Reset the state of the *var* context variable to that it was in before + :c:func:`PyContextVar_Set` that returned the *token* was called. + This function returns ``0`` on success and ``-1`` on error.
diff --git a/Doc/c-api/conversion.rst b/Doc/c-api/conversion.rst new file mode 100644 index 0000000..fdb321f --- /dev/null +++ b/Doc/c-api/conversion.rst
@@ -0,0 +1,128 @@ +.. highlight:: c + +.. _string-conversion: + +String conversion and formatting +================================ + +Functions for number conversion and formatted string output. + + +.. c:function:: int PyOS_snprintf(char *str, size_t size, const char *format, ...) + + Output not more than *size* bytes to *str* according to the format string + *format* and the extra arguments. See the Unix man page :manpage:`snprintf(3)`. + + +.. c:function:: int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) + + Output not more than *size* bytes to *str* according to the format string + *format* and the variable argument list *va*. Unix man page + :manpage:`vsnprintf(3)`. + +:c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C library +functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose is to +guarantee consistent behavior in corner cases, which the Standard C functions do +not. + +The wrappers ensure that ``str[size-1]`` is always ``'\0'`` upon return. They +never write more than *size* bytes (including the trailing ``'\0'``) into str. +Both functions require that ``str != NULL``, ``size > 0``, ``format != NULL`` +and ``size < INT_MAX``. Note that this means there is no equivalent to the C99 +``n = snprintf(NULL, 0, ...)`` which would determine the necessary buffer size. + +The return value (*rv*) for these functions should be interpreted as follows: + +* When ``0 <= rv < size``, the output conversion was successful and *rv* + characters were written to *str* (excluding the trailing ``'\0'`` byte at + ``str[rv]``). + +* When ``rv >= size``, the output conversion was truncated and a buffer with + ``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is ``'\0'`` + in this case. + +* When ``rv < 0``, "something bad happened." ``str[size-1]`` is ``'\0'`` in + this case too, but the rest of *str* is undefined. The exact cause of the error + depends on the underlying platform. + + +The following functions provide locale-independent string to number conversions. + +.. c:function:: double PyOS_string_to_double(const char *s, char **endptr, PyObject *overflow_exception) + + Convert a string ``s`` to a :c:expr:`double`, raising a Python + exception on failure. The set of accepted strings corresponds to + the set of strings accepted by Python's :func:`float` constructor, + except that ``s`` must not have leading or trailing whitespace. + The conversion is independent of the current locale. + + If ``endptr`` is ``NULL``, convert the whole string. Raise + :exc:`ValueError` and return ``-1.0`` if the string is not a valid + representation of a floating-point number. + + If endptr is not ``NULL``, convert as much of the string as + possible and set ``*endptr`` to point to the first unconverted + character. If no initial segment of the string is the valid + representation of a floating-point number, set ``*endptr`` to point + to the beginning of the string, raise ValueError, and return + ``-1.0``. + + If ``s`` represents a value that is too large to store in a float + (for example, ``"1e500"`` is such a string on many platforms) then + if ``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with + an appropriate sign) and don't set any exception. Otherwise, + ``overflow_exception`` must point to a Python exception object; + raise that exception and return ``-1.0``. In both cases, set + ``*endptr`` to point to the first character after the converted value. + + If any other error occurs during the conversion (for example an + out-of-memory error), set the appropriate Python exception and + return ``-1.0``. + + .. versionadded:: 3.1 + + +.. c:function:: char* PyOS_double_to_string(double val, char format_code, int precision, int flags, int *ptype) + + Convert a :c:expr:`double` *val* to a string using supplied + *format_code*, *precision*, and *flags*. + + *format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, + ``'g'``, ``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* + must be 0 and is ignored. The ``'r'`` format code specifies the + standard :func:`repr` format. + + *flags* can be zero or more of the values ``Py_DTSF_SIGN``, + ``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together: + + * ``Py_DTSF_SIGN`` means to always precede the returned string with a sign + character, even if *val* is non-negative. + + * ``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look + like an integer. + + * ``Py_DTSF_ALT`` means to apply "alternate" formatting rules. See the + documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for + details. + + If *ptype* is non-``NULL``, then the value it points to will be set to one of + ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying that + *val* is a finite number, an infinite number, or not a number, respectively. + + The return value is a pointer to *buffer* with the converted string or + ``NULL`` if the conversion failed. The caller is responsible for freeing the + returned string by calling :c:func:`PyMem_Free`. + + .. versionadded:: 3.1 + + +.. c:function:: int PyOS_stricmp(const char *s1, const char *s2) + + Case insensitive comparison of strings. The function works almost + identically to :c:func:`strcmp` except that it ignores the case. + + +.. c:function:: int PyOS_strnicmp(const char *s1, const char *s2, Py_ssize_t size) + + Case insensitive comparison of strings. The function works almost + identically to :c:func:`strncmp` except that it ignores the case.
diff --git a/Doc/c-api/coro.rst b/Doc/c-api/coro.rst new file mode 100644 index 0000000..caa855a --- /dev/null +++ b/Doc/c-api/coro.rst
@@ -0,0 +1,35 @@ +.. highlight:: c + +.. _coro-objects: + +Coroutine Objects +----------------- + +.. versionadded:: 3.5 + +Coroutine objects are what functions declared with an ``async`` keyword +return. + + +.. c:type:: PyCoroObject + + The C structure used for coroutine objects. + + +.. c:var:: PyTypeObject PyCoro_Type + + The type object corresponding to coroutine objects. + + +.. c:function:: int PyCoro_CheckExact(PyObject *ob) + + Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be ``NULL``. + This function always succeeds. + + +.. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname) + + Create and return a new coroutine object based on the *frame* object, + with ``__name__`` and ``__qualname__`` set to *name* and *qualname*. + A reference to *frame* is stolen by this function. The *frame* argument + must not be ``NULL``.
diff --git a/Doc/c-api/datetime.rst b/Doc/c-api/datetime.rst new file mode 100644 index 0000000..72fc07a --- /dev/null +++ b/Doc/c-api/datetime.rst
@@ -0,0 +1,284 @@ +.. highlight:: c + +.. _datetimeobjects: + +DateTime Objects +---------------- + +Various date and time objects are supplied by the :mod:`datetime` module. +Before using any of these functions, the header file :file:`datetime.h` must be +included in your source (note that this is not included by :file:`Python.h`), +and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as part of +the module initialisation function. The macro puts a pointer to a C structure +into a static variable, :c:data:`PyDateTimeAPI`, that is used by the following +macros. + +Macro for access to the UTC singleton: + +.. c:var:: PyObject* PyDateTime_TimeZone_UTC + + Returns the time zone singleton representing UTC, the same object as + :attr:`datetime.timezone.utc`. + + .. versionadded:: 3.7 + + +Type-check macros: + +.. c:function:: int PyDate_Check(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype of + :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. This function always + succeeds. + + +.. c:function:: int PyDate_CheckExact(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not be + ``NULL``. This function always succeeds. + + +.. c:function:: int PyDateTime_Check(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a subtype of + :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. This function always + succeeds. + + +.. c:function:: int PyDateTime_CheckExact(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must not + be ``NULL``. This function always succeeds. + + +.. c:function:: int PyTime_Check(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype of + :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. This function always + succeeds. + + +.. c:function:: int PyTime_CheckExact(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not be + ``NULL``. This function always succeeds. + + +.. c:function:: int PyDelta_Check(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype of + :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. This function always + succeeds. + + +.. c:function:: int PyDelta_CheckExact(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not be + ``NULL``. This function always succeeds. + + +.. c:function:: int PyTZInfo_Check(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype of + :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This function always + succeeds. + + +.. c:function:: int PyTZInfo_CheckExact(PyObject *ob) + + Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must not be + ``NULL``. This function always succeeds. + + +Macros to create objects: + +.. c:function:: PyObject* PyDate_FromDate(int year, int month, int day) + + Return a :class:`datetime.date` object with the specified year, month and day. + + +.. c:function:: PyObject* PyDateTime_FromDateAndTime(int year, int month, int day, int hour, int minute, int second, int usecond) + + Return a :class:`datetime.datetime` object with the specified year, month, day, hour, + minute, second and microsecond. + + +.. c:function:: PyObject* PyDateTime_FromDateAndTimeAndFold(int year, int month, int day, int hour, int minute, int second, int usecond, int fold) + + Return a :class:`datetime.datetime` object with the specified year, month, day, hour, + minute, second, microsecond and fold. + + .. versionadded:: 3.6 + + +.. c:function:: PyObject* PyTime_FromTime(int hour, int minute, int second, int usecond) + + Return a :class:`datetime.time` object with the specified hour, minute, second and + microsecond. + + +.. c:function:: PyObject* PyTime_FromTimeAndFold(int hour, int minute, int second, int usecond, int fold) + + Return a :class:`datetime.time` object with the specified hour, minute, second, + microsecond and fold. + + .. versionadded:: 3.6 + + +.. c:function:: PyObject* PyDelta_FromDSU(int days, int seconds, int useconds) + + Return a :class:`datetime.timedelta` object representing the given number + of days, seconds and microseconds. Normalization is performed so that the + resulting number of microseconds and seconds lie in the ranges documented for + :class:`datetime.timedelta` objects. + + +.. c:function:: PyObject* PyTimeZone_FromOffset(PyDateTime_DeltaType* offset) + + Return a :class:`datetime.timezone` object with an unnamed fixed offset + represented by the *offset* argument. + + .. versionadded:: 3.7 + + +.. c:function:: PyObject* PyTimeZone_FromOffsetAndName(PyDateTime_DeltaType* offset, PyUnicode* name) + + Return a :class:`datetime.timezone` object with a fixed offset represented + by the *offset* argument and with tzname *name*. + + .. versionadded:: 3.7 + + +Macros to extract fields from date objects. The argument must be an instance of +:c:data:`PyDateTime_Date`, including subclasses (such as +:c:data:`PyDateTime_DateTime`). The argument must not be ``NULL``, and the type is +not checked: + +.. c:function:: int PyDateTime_GET_YEAR(PyDateTime_Date *o) + + Return the year, as a positive int. + + +.. c:function:: int PyDateTime_GET_MONTH(PyDateTime_Date *o) + + Return the month, as an int from 1 through 12. + + +.. c:function:: int PyDateTime_GET_DAY(PyDateTime_Date *o) + + Return the day, as an int from 1 through 31. + + +Macros to extract fields from datetime objects. The argument must be an +instance of :c:data:`PyDateTime_DateTime`, including subclasses. The argument +must not be ``NULL``, and the type is not checked: + +.. c:function:: int PyDateTime_DATE_GET_HOUR(PyDateTime_DateTime *o) + + Return the hour, as an int from 0 through 23. + + +.. c:function:: int PyDateTime_DATE_GET_MINUTE(PyDateTime_DateTime *o) + + Return the minute, as an int from 0 through 59. + + +.. c:function:: int PyDateTime_DATE_GET_SECOND(PyDateTime_DateTime *o) + + Return the second, as an int from 0 through 59. + + +.. c:function:: int PyDateTime_DATE_GET_MICROSECOND(PyDateTime_DateTime *o) + + Return the microsecond, as an int from 0 through 999999. + + +.. c:function:: int PyDateTime_DATE_GET_FOLD(PyDateTime_DateTime *o) + + Return the fold, as an int from 0 through 1. + + .. versionadded:: 3.6 + + +.. c:function:: PyObject* PyDateTime_DATE_GET_TZINFO(PyDateTime_DateTime *o) + + Return the tzinfo (which may be ``None``). + + .. versionadded:: 3.10 + + +Macros to extract fields from time objects. The argument must be an instance of +:c:data:`PyDateTime_Time`, including subclasses. The argument must not be ``NULL``, +and the type is not checked: + +.. c:function:: int PyDateTime_TIME_GET_HOUR(PyDateTime_Time *o) + + Return the hour, as an int from 0 through 23. + + +.. c:function:: int PyDateTime_TIME_GET_MINUTE(PyDateTime_Time *o) + + Return the minute, as an int from 0 through 59. + + +.. c:function:: int PyDateTime_TIME_GET_SECOND(PyDateTime_Time *o) + + Return the second, as an int from 0 through 59. + + +.. c:function:: int PyDateTime_TIME_GET_MICROSECOND(PyDateTime_Time *o) + + Return the microsecond, as an int from 0 through 999999. + + +.. c:function:: int PyDateTime_TIME_GET_FOLD(PyDateTime_Time *o) + + Return the fold, as an int from 0 through 1. + + .. versionadded:: 3.6 + + +.. c:function:: PyObject* PyDateTime_TIME_GET_TZINFO(PyDateTime_Time *o) + + Return the tzinfo (which may be ``None``). + + .. versionadded:: 3.10 + + +Macros to extract fields from time delta objects. The argument must be an +instance of :c:data:`PyDateTime_Delta`, including subclasses. The argument must +not be ``NULL``, and the type is not checked: + +.. c:function:: int PyDateTime_DELTA_GET_DAYS(PyDateTime_Delta *o) + + Return the number of days, as an int from -999999999 to 999999999. + + .. versionadded:: 3.3 + + +.. c:function:: int PyDateTime_DELTA_GET_SECONDS(PyDateTime_Delta *o) + + Return the number of seconds, as an int from 0 through 86399. + + .. versionadded:: 3.3 + + +.. c:function:: int PyDateTime_DELTA_GET_MICROSECONDS(PyDateTime_Delta *o) + + Return the number of microseconds, as an int from 0 through 999999. + + .. versionadded:: 3.3 + + +Macros for the convenience of modules implementing the DB API: + +.. c:function:: PyObject* PyDateTime_FromTimestamp(PyObject *args) + + Create and return a new :class:`datetime.datetime` object given an argument + tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`. + + +.. c:function:: PyObject* PyDate_FromTimestamp(PyObject *args) + + Create and return a new :class:`datetime.date` object given an argument + tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`.
diff --git a/Doc/c-api/descriptor.rst b/Doc/c-api/descriptor.rst new file mode 100644 index 0000000..b32c113 --- /dev/null +++ b/Doc/c-api/descriptor.rst
@@ -0,0 +1,40 @@ +.. highlight:: c + +.. _descriptor-objects: + +Descriptor Objects +------------------ + +"Descriptors" are objects that describe some attribute of an object. They are +found in the dictionary of type objects. + +.. XXX document these! + +.. c:var:: PyTypeObject PyProperty_Type + + The type object for the built-in descriptor types. + + +.. c:function:: PyObject* PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset) + + +.. c:function:: PyObject* PyDescr_NewMember(PyTypeObject *type, struct PyMemberDef *meth) + + +.. c:function:: PyObject* PyDescr_NewMethod(PyTypeObject *type, struct PyMethodDef *meth) + + +.. c:function:: PyObject* PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped) + + +.. c:function:: PyObject* PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method) + + +.. c:function:: int PyDescr_IsData(PyObject *descr) + + Return non-zero if the descriptor objects *descr* describes a data attribute, or + ``0`` if it describes a method. *descr* must be a descriptor object; there is + no error checking. + + +.. c:function:: PyObject* PyWrapper_New(PyObject *, PyObject *)
diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst new file mode 100644 index 0000000..17cde77 --- /dev/null +++ b/Doc/c-api/dict.rst
@@ -0,0 +1,240 @@ +.. highlight:: c + +.. _dictobjects: + +Dictionary Objects +------------------ + +.. index:: pair: object; dictionary + + +.. c:type:: PyDictObject + + This subtype of :c:type:`PyObject` represents a Python dictionary object. + + +.. c:var:: PyTypeObject PyDict_Type + + This instance of :c:type:`PyTypeObject` represents the Python dictionary + type. This is the same object as :class:`dict` in the Python layer. + + +.. c:function:: int PyDict_Check(PyObject *p) + + Return true if *p* is a dict object or an instance of a subtype of the dict + type. This function always succeeds. + + +.. c:function:: int PyDict_CheckExact(PyObject *p) + + Return true if *p* is a dict object, but not an instance of a subtype of + the dict type. This function always succeeds. + + +.. c:function:: PyObject* PyDict_New() + + Return a new empty dictionary, or ``NULL`` on failure. + + +.. c:function:: PyObject* PyDictProxy_New(PyObject *mapping) + + Return a :class:`types.MappingProxyType` object for a mapping which + enforces read-only behavior. This is normally used to create a view to + prevent modification of the dictionary for non-dynamic class types. + + +.. c:function:: void PyDict_Clear(PyObject *p) + + Empty an existing dictionary of all key-value pairs. + + +.. c:function:: int PyDict_Contains(PyObject *p, PyObject *key) + + Determine if dictionary *p* contains *key*. If an item in *p* is matches + *key*, return ``1``, otherwise return ``0``. On error, return ``-1``. + This is equivalent to the Python expression ``key in p``. + + +.. c:function:: PyObject* PyDict_Copy(PyObject *p) + + Return a new dictionary that contains the same key-value pairs as *p*. + + +.. c:function:: int PyDict_SetItem(PyObject *p, PyObject *key, PyObject *val) + + Insert *val* into the dictionary *p* with a key of *key*. *key* must be + :term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return + ``0`` on success or ``-1`` on failure. This function *does not* steal a + reference to *val*. + + +.. c:function:: int PyDict_SetItemString(PyObject *p, const char *key, PyObject *val) + + .. index:: single: PyUnicode_FromString() + + Insert *val* into the dictionary *p* using *key* as a key. *key* should + be a :c:expr:`const char*`. The key object is created using + ``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on + failure. This function *does not* steal a reference to *val*. + + +.. c:function:: int PyDict_DelItem(PyObject *p, PyObject *key) + + Remove the entry in dictionary *p* with key *key*. *key* must be :term:`hashable`; + if it isn't, :exc:`TypeError` is raised. + If *key* is not in the dictionary, :exc:`KeyError` is raised. + Return ``0`` on success or ``-1`` on failure. + + +.. c:function:: int PyDict_DelItemString(PyObject *p, const char *key) + + Remove the entry in dictionary *p* which has a key specified by the string *key*. + If *key* is not in the dictionary, :exc:`KeyError` is raised. + Return ``0`` on success or ``-1`` on failure. + + +.. c:function:: PyObject* PyDict_GetItem(PyObject *p, PyObject *key) + + Return the object from dictionary *p* which has a key *key*. Return ``NULL`` + if the key *key* is not present, but *without* setting an exception. + + Note that exceptions which occur while calling :meth:`__hash__` and + :meth:`__eq__` methods will get suppressed. + To get error reporting use :c:func:`PyDict_GetItemWithError()` instead. + + .. versionchanged:: 3.10 + Calling this API without :term:`GIL` held had been allowed for historical + reason. It is no longer allowed. + + +.. c:function:: PyObject* PyDict_GetItemWithError(PyObject *p, PyObject *key) + + Variant of :c:func:`PyDict_GetItem` that does not suppress + exceptions. Return ``NULL`` **with** an exception set if an exception + occurred. Return ``NULL`` **without** an exception set if the key + wasn't present. + + +.. c:function:: PyObject* PyDict_GetItemString(PyObject *p, const char *key) + + This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a + :c:expr:`const char*`, rather than a :c:expr:`PyObject*`. + + Note that exceptions which occur while calling :meth:`__hash__` and + :meth:`__eq__` methods and creating a temporary string object + will get suppressed. + To get error reporting use :c:func:`PyDict_GetItemWithError()` instead. + + +.. c:function:: PyObject* PyDict_SetDefault(PyObject *p, PyObject *key, PyObject *defaultobj) + + This is the same as the Python-level :meth:`dict.setdefault`. If present, it + returns the value corresponding to *key* from the dictionary *p*. If the key + is not in the dict, it is inserted with value *defaultobj* and *defaultobj* + is returned. This function evaluates the hash function of *key* only once, + instead of evaluating it independently for the lookup and the insertion. + + .. versionadded:: 3.4 + +.. c:function:: PyObject* PyDict_Items(PyObject *p) + + Return a :c:type:`PyListObject` containing all the items from the dictionary. + + +.. c:function:: PyObject* PyDict_Keys(PyObject *p) + + Return a :c:type:`PyListObject` containing all the keys from the dictionary. + + +.. c:function:: PyObject* PyDict_Values(PyObject *p) + + Return a :c:type:`PyListObject` containing all the values from the dictionary + *p*. + + +.. c:function:: Py_ssize_t PyDict_Size(PyObject *p) + + .. index:: pair: built-in function; len + + Return the number of items in the dictionary. This is equivalent to + ``len(p)`` on a dictionary. + + +.. c:function:: int PyDict_Next(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) + + Iterate over all key-value pairs in the dictionary *p*. The + :c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` + prior to the first call to this function to start the iteration; the + function returns true for each pair in the dictionary, and false once all + pairs have been reported. The parameters *pkey* and *pvalue* should either + point to :c:expr:`PyObject*` variables that will be filled in with each key + and value, respectively, or may be ``NULL``. Any references returned through + them are borrowed. *ppos* should not be altered during iteration. Its + value represents offsets within the internal dictionary structure, and + since the structure is sparse, the offsets are not consecutive. + + For example:: + + PyObject *key, *value; + Py_ssize_t pos = 0; + + while (PyDict_Next(self->dict, &pos, &key, &value)) { + /* do something interesting with the values... */ + ... + } + + The dictionary *p* should not be mutated during iteration. It is safe to + modify the values of the keys as you iterate over the dictionary, but only + so long as the set of keys does not change. For example:: + + PyObject *key, *value; + Py_ssize_t pos = 0; + + while (PyDict_Next(self->dict, &pos, &key, &value)) { + long i = PyLong_AsLong(value); + if (i == -1 && PyErr_Occurred()) { + return -1; + } + PyObject *o = PyLong_FromLong(i + 1); + if (o == NULL) + return -1; + if (PyDict_SetItem(self->dict, key, o) < 0) { + Py_DECREF(o); + return -1; + } + Py_DECREF(o); + } + + +.. c:function:: int PyDict_Merge(PyObject *a, PyObject *b, int override) + + Iterate over mapping object *b* adding key-value pairs to dictionary *a*. + *b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` + and :c:func:`PyObject_GetItem`. If *override* is true, existing pairs in *a* + will be replaced if a matching key is found in *b*, otherwise pairs will + only be added if there is not a matching key in *a*. Return ``0`` on + success or ``-1`` if an exception was raised. + + +.. c:function:: int PyDict_Update(PyObject *a, PyObject *b) + + This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to + ``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall + back to the iterating over a sequence of key value pairs if the second + argument has no "keys" attribute. Return ``0`` on success or ``-1`` if an + exception was raised. + + +.. c:function:: int PyDict_MergeFromSeq2(PyObject *a, PyObject *seq2, int override) + + Update or merge into dictionary *a*, from the key-value pairs in *seq2*. + *seq2* must be an iterable object producing iterable objects of length 2, + viewed as key-value pairs. In case of duplicate keys, the last wins if + *override* is true, else the first wins. Return ``0`` on success or ``-1`` + if an exception was raised. Equivalent Python (except for the return + value):: + + def PyDict_MergeFromSeq2(a, seq2, override): + for key, value in seq2: + if override or key not in a: + a[key] = value
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst new file mode 100644 index 0000000..092e548 --- /dev/null +++ b/Doc/c-api/exceptions.rst
@@ -0,0 +1,1119 @@ +.. highlight:: c + + +.. _exceptionhandling: + +****************** +Exception Handling +****************** + +The functions described in this chapter will let you handle and raise Python +exceptions. It is important to understand some of the basics of Python +exception handling. It works somewhat like the POSIX :c:data:`errno` variable: +there is a global indicator (per thread) of the last error that occurred. Most +C API functions don't clear this on success, but will set it to indicate the +cause of the error on failure. Most C API functions also return an error +indicator, usually ``NULL`` if they are supposed to return a pointer, or ``-1`` +if they return an integer (exception: the ``PyArg_*`` functions +return ``1`` for success and ``0`` for failure). + +Concretely, the error indicator consists of three object pointers: the +exception's type, the exception's value, and the traceback object. Any +of those pointers can be ``NULL`` if non-set (although some combinations are +forbidden, for example you can't have a non-``NULL`` traceback if the exception +type is ``NULL``). + +When a function must fail because some function it called failed, it generally +doesn't set the error indicator; the function it called already set it. It is +responsible for either handling the error and clearing the exception or +returning after cleaning up any resources it holds (such as object references or +memory allocations); it should *not* continue normally if it is not prepared to +handle the error. If returning due to an error, it is important to indicate to +the caller that an error has been set. If the error is not handled or carefully +propagated, additional calls into the Python/C API may not behave as intended +and may fail in mysterious ways. + +.. note:: + The error indicator is **not** the result of :func:`sys.exc_info()`. + The former corresponds to an exception that is not yet caught (and is + therefore still propagating), while the latter returns an exception after + it is caught (and has therefore stopped propagating). + + +Printing and clearing +===================== + + +.. c:function:: void PyErr_Clear() + + Clear the error indicator. If the error indicator is not set, there is no + effect. + + +.. c:function:: void PyErr_PrintEx(int set_sys_last_vars) + + Print a standard traceback to ``sys.stderr`` and clear the error indicator. + **Unless** the error is a ``SystemExit``, in that case no traceback is + printed and the Python process will exit with the error code specified by + the ``SystemExit`` instance. + + Call this function **only** when the error indicator is set. Otherwise it + will cause a fatal error! + + If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`, + :data:`sys.last_value` and :data:`sys.last_traceback` will be set to the + type, value and traceback of the printed exception, respectively. + + +.. c:function:: void PyErr_Print() + + Alias for ``PyErr_PrintEx(1)``. + + +.. c:function:: void PyErr_WriteUnraisable(PyObject *obj) + + Call :func:`sys.unraisablehook` using the current exception and *obj* + argument. + + This utility function prints a warning message to ``sys.stderr`` when an + exception has been set but it is impossible for the interpreter to actually + raise the exception. It is used, for example, when an exception occurs in an + :meth:`__del__` method. + + The function is called with a single argument *obj* that identifies the context + in which the unraisable exception occurred. If possible, + the repr of *obj* will be printed in the warning message. + + An exception must be set when calling this function. + + +Raising exceptions +================== + +These functions help you set the current thread's error indicator. +For convenience, some of these functions will always return a +``NULL`` pointer for use in a ``return`` statement. + + +.. c:function:: void PyErr_SetString(PyObject *type, const char *message) + + This is the most common way to set the error indicator. The first argument + specifies the exception type; it is normally one of the standard exceptions, + e.g. :c:data:`PyExc_RuntimeError`. You need not increment its reference count. + The second argument is an error message; it is decoded from ``'utf-8'``. + + +.. c:function:: void PyErr_SetObject(PyObject *type, PyObject *value) + + This function is similar to :c:func:`PyErr_SetString` but lets you specify an + arbitrary Python object for the "value" of the exception. + + +.. c:function:: PyObject* PyErr_Format(PyObject *exception, const char *format, ...) + + This function sets the error indicator and returns ``NULL``. *exception* + should be a Python exception class. The *format* and subsequent + parameters help format the error message; they have the same meaning and + values as in :c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded + string. + + +.. c:function:: PyObject* PyErr_FormatV(PyObject *exception, const char *format, va_list vargs) + + Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument rather + than a variable number of arguments. + + .. versionadded:: 3.5 + + +.. c:function:: void PyErr_SetNone(PyObject *type) + + This is a shorthand for ``PyErr_SetObject(type, Py_None)``. + + +.. c:function:: int PyErr_BadArgument() + + This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where + *message* indicates that a built-in operation was invoked with an illegal + argument. It is mostly for internal use. + + +.. c:function:: PyObject* PyErr_NoMemory() + + This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns ``NULL`` + so an object allocation function can write ``return PyErr_NoMemory();`` when it + runs out of memory. + + +.. c:function:: PyObject* PyErr_SetFromErrno(PyObject *type) + + .. index:: single: strerror() + + This is a convenience function to raise an exception when a C library function + has returned an error and set the C variable :c:data:`errno`. It constructs a + tuple object whose first item is the integer :c:data:`errno` value and whose + second item is the corresponding error message (gotten from :c:func:`strerror`), + and then calls ``PyErr_SetObject(type, object)``. On Unix, when the + :c:data:`errno` value is :const:`EINTR`, indicating an interrupted system call, + this calls :c:func:`PyErr_CheckSignals`, and if that set the error indicator, + leaves it set to that. The function always returns ``NULL``, so a wrapper + function around a system call can write ``return PyErr_SetFromErrno(type);`` + when the system call returns an error. + + +.. c:function:: PyObject* PyErr_SetFromErrnoWithFilenameObject(PyObject *type, PyObject *filenameObject) + + Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that if + *filenameObject* is not ``NULL``, it is passed to the constructor of *type* as + a third parameter. In the case of :exc:`OSError` exception, + this is used to define the :attr:`filename` attribute of the + exception instance. + + +.. c:function:: PyObject* PyErr_SetFromErrnoWithFilenameObjects(PyObject *type, PyObject *filenameObject, PyObject *filenameObject2) + + Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a second + filename object, for raising errors when a function that takes two filenames + fails. + + .. versionadded:: 3.4 + + +.. c:function:: PyObject* PyErr_SetFromErrnoWithFilename(PyObject *type, const char *filename) + + Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename + is given as a C string. *filename* is decoded from the :term:`filesystem + encoding and error handler`. + + +.. c:function:: PyObject* PyErr_SetFromWindowsErr(int ierr) + + This is a convenience function to raise :exc:`WindowsError`. If called with + *ierr* of ``0``, the error code returned by a call to :c:func:`GetLastError` + is used instead. It calls the Win32 function :c:func:`FormatMessage` to retrieve + the Windows description of error code given by *ierr* or :c:func:`GetLastError`, + then it constructs a tuple object whose first item is the *ierr* value and whose + second item is the corresponding error message (gotten from + :c:func:`FormatMessage`), and then calls ``PyErr_SetObject(PyExc_WindowsError, + object)``. This function always returns ``NULL``. + + .. availability:: Windows. + + +.. c:function:: PyObject* PyErr_SetExcFromWindowsErr(PyObject *type, int ierr) + + Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter + specifying the exception type to be raised. + + .. availability:: Windows. + + +.. c:function:: PyObject* PyErr_SetFromWindowsErrWithFilename(int ierr, const char *filename) + + Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the + filename is given as a C string. *filename* is decoded from the filesystem + encoding (:func:`os.fsdecode`). + + .. availability:: Windows. + + +.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObject(PyObject *type, int ierr, PyObject *filename) + + Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an + additional parameter specifying the exception type to be raised. + + .. availability:: Windows. + + +.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObjects(PyObject *type, int ierr, PyObject *filename, PyObject *filename2) + + Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, + but accepts a second filename object. + + .. availability:: Windows. + + .. versionadded:: 3.4 + + +.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilename(PyObject *type, int ierr, const char *filename) + + Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional + parameter specifying the exception type to be raised. + + .. availability:: Windows. + + +.. c:function:: PyObject* PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path) + + This is a convenience function to raise :exc:`ImportError`. *msg* will be + set as the exception's message string. *name* and *path*, both of which can + be ``NULL``, will be set as the :exc:`ImportError`'s respective ``name`` + and ``path`` attributes. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyErr_SetImportErrorSubclass(PyObject *exception, PyObject *msg, PyObject *name, PyObject *path) + + Much like :c:func:`PyErr_SetImportError` but this function allows for + specifying a subclass of :exc:`ImportError` to raise. + + .. versionadded:: 3.6 + + +.. c:function:: void PyErr_SyntaxLocationObject(PyObject *filename, int lineno, int col_offset) + + Set file, line, and offset information for the current exception. If the + current exception is not a :exc:`SyntaxError`, then it sets additional + attributes, which make the exception printing subsystem think the exception + is a :exc:`SyntaxError`. + + .. versionadded:: 3.4 + + +.. c:function:: void PyErr_SyntaxLocationEx(const char *filename, int lineno, int col_offset) + + Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string + decoded from the :term:`filesystem encoding and error handler`. + + .. versionadded:: 3.2 + + +.. c:function:: void PyErr_SyntaxLocation(const char *filename, int lineno) + + Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is + omitted. + + +.. c:function:: void PyErr_BadInternalCall() + + This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, + where *message* indicates that an internal operation (e.g. a Python/C API + function) was invoked with an illegal argument. It is mostly for internal + use. + + +Issuing warnings +================ + +Use these functions to issue warnings from C code. They mirror similar +functions exported by the Python :mod:`warnings` module. They normally +print a warning message to *sys.stderr*; however, it is +also possible that the user has specified that warnings are to be turned into +errors, and in that case they will raise an exception. It is also possible that +the functions raise an exception because of a problem with the warning machinery. +The return value is ``0`` if no exception is raised, or ``-1`` if an exception +is raised. (It is not possible to determine whether a warning message is +actually printed, nor what the reason is for the exception; this is +intentional.) If an exception is raised, the caller should do its normal +exception handling (for example, :c:func:`Py_DECREF` owned references and return +an error value). + +.. c:function:: int PyErr_WarnEx(PyObject *category, const char *message, Py_ssize_t stack_level) + + Issue a warning message. The *category* argument is a warning category (see + below) or ``NULL``; the *message* argument is a UTF-8 encoded string. *stack_level* is a + positive number giving a number of stack frames; the warning will be issued from + the currently executing line of code in that stack frame. A *stack_level* of 1 + is the function calling :c:func:`PyErr_WarnEx`, 2 is the function above that, + and so forth. + + Warning categories must be subclasses of :c:data:`PyExc_Warning`; + :c:data:`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; + the default warning category is :c:data:`PyExc_RuntimeWarning`. The standard + Python warning categories are available as global variables whose names are + enumerated at :ref:`standardwarningcategories`. + + For information about warning control, see the documentation for the + :mod:`warnings` module and the :option:`-W` option in the command line + documentation. There is no C API for warning control. + + +.. c:function:: int PyErr_WarnExplicitObject(PyObject *category, PyObject *message, PyObject *filename, int lineno, PyObject *module, PyObject *registry) + + Issue a warning message with explicit control over all warning attributes. This + is a straightforward wrapper around the Python function + :func:`warnings.warn_explicit`; see there for more information. The *module* + and *registry* arguments may be set to ``NULL`` to get the default effect + described there. + + .. versionadded:: 3.4 + + +.. c:function:: int PyErr_WarnExplicit(PyObject *category, const char *message, const char *filename, int lineno, const char *module, PyObject *registry) + + Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and + *module* are UTF-8 encoded strings, and *filename* is decoded from the + :term:`filesystem encoding and error handler`. + + +.. c:function:: int PyErr_WarnFormat(PyObject *category, Py_ssize_t stack_level, const char *format, ...) + + Function similar to :c:func:`PyErr_WarnEx`, but use + :c:func:`PyUnicode_FromFormat` to format the warning message. *format* is + an ASCII-encoded string. + + .. versionadded:: 3.2 + + +.. c:function:: int PyErr_ResourceWarning(PyObject *source, Py_ssize_t stack_level, const char *format, ...) + + Function similar to :c:func:`PyErr_WarnFormat`, but *category* is + :exc:`ResourceWarning` and it passes *source* to :func:`warnings.WarningMessage`. + + .. versionadded:: 3.6 + + +Querying the error indicator +============================ + +.. c:function:: PyObject* PyErr_Occurred() + + Test whether the error indicator is set. If set, return the exception *type* + (the first argument to the last call to one of the ``PyErr_Set*`` + functions or to :c:func:`PyErr_Restore`). If not set, return ``NULL``. You do not + own a reference to the return value, so you do not need to :c:func:`Py_DECREF` + it. + + The caller must hold the GIL. + + .. note:: + + Do not compare the return value to a specific exception; use + :c:func:`PyErr_ExceptionMatches` instead, shown below. (The comparison could + easily fail since the exception may be an instance instead of a class, in the + case of a class exception, or it may be a subclass of the expected exception.) + + +.. c:function:: int PyErr_ExceptionMatches(PyObject *exc) + + Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This + should only be called when an exception is actually set; a memory access + violation will occur if no exception has been raised. + + +.. c:function:: int PyErr_GivenExceptionMatches(PyObject *given, PyObject *exc) + + Return true if the *given* exception matches the exception type in *exc*. If + *exc* is a class object, this also returns true when *given* is an instance + of a subclass. If *exc* is a tuple, all exception types in the tuple (and + recursively in subtuples) are searched for a match. + + +.. c:function:: void PyErr_Fetch(PyObject **ptype, PyObject **pvalue, PyObject **ptraceback) + + Retrieve the error indicator into three variables whose addresses are passed. + If the error indicator is not set, set all three variables to ``NULL``. If it is + set, it will be cleared and you own a reference to each object retrieved. The + value and traceback object may be ``NULL`` even when the type object is not. + + .. note:: + + This function is normally only used by code that needs to catch exceptions or + by code that needs to save and restore the error indicator temporarily, e.g.:: + + { + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + + /* ... code that might produce other errors ... */ + + PyErr_Restore(type, value, traceback); + } + + +.. c:function:: void PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) + + Set the error indicator from the three objects. If the error indicator is + already set, it is cleared first. If the objects are ``NULL``, the error + indicator is cleared. Do not pass a ``NULL`` type and non-``NULL`` value or + traceback. The exception type should be a class. Do not pass an invalid + exception type or value. (Violating these rules will cause subtle problems + later.) This call takes away a reference to each object: you must own a + reference to each object before the call and after the call you no longer own + these references. (If you don't understand this, don't use this function. I + warned you.) + + .. note:: + + This function is normally only used by code that needs to save and restore the + error indicator temporarily. Use :c:func:`PyErr_Fetch` to save the current + error indicator. + + +.. c:function:: void PyErr_NormalizeException(PyObject **exc, PyObject **val, PyObject **tb) + + Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` below + can be "unnormalized", meaning that ``*exc`` is a class object but ``*val`` is + not an instance of the same class. This function can be used to instantiate + the class in that case. If the values are already normalized, nothing happens. + The delayed normalization is implemented to improve performance. + + .. note:: + + This function *does not* implicitly set the ``__traceback__`` + attribute on the exception value. If setting the traceback + appropriately is desired, the following additional snippet is needed:: + + if (tb != NULL) { + PyException_SetTraceback(val, tb); + } + + +.. c:function:: PyObject* PyErr_GetHandledException(void) + + Retrieve the active exception instance, as would be returned by :func:`sys.exception`. + This refers to an exception that was *already caught*, not to an exception that was + freshly raised. Returns a new reference to the exception or ``NULL``. + Does not modify the interpreter's exception state. + + .. note:: + + This function is not normally used by code that wants to handle exceptions. + Rather, it can be used when code needs to save and restore the exception + state temporarily. Use :c:func:`PyErr_SetHandledException` to restore or + clear the exception state. + + .. versionadded:: 3.11 + +.. c:function:: void PyErr_SetHandledException(PyObject *exc) + + Set the active exception, as known from ``sys.exception()``. This refers + to an exception that was *already caught*, not to an exception that was + freshly raised. + To clear the exception state, pass ``NULL``. + + .. note:: + + This function is not normally used by code that wants to handle exceptions. + Rather, it can be used when code needs to save and restore the exception + state temporarily. Use :c:func:`PyErr_GetHandledException` to get the exception + state. + + .. versionadded:: 3.11 + +.. c:function:: void PyErr_GetExcInfo(PyObject **ptype, PyObject **pvalue, PyObject **ptraceback) + + Retrieve the old-style representation of the exception info, as known from + :func:`sys.exc_info`. This refers to an exception that was *already caught*, + not to an exception that was freshly raised. Returns new references for the + three objects, any of which may be ``NULL``. Does not modify the exception + info state. This function is kept for backwards compatibility. Prefer using + :c:func:`PyErr_GetHandledException`. + + .. note:: + + This function is not normally used by code that wants to handle exceptions. + Rather, it can be used when code needs to save and restore the exception + state temporarily. Use :c:func:`PyErr_SetExcInfo` to restore or clear the + exception state. + + .. versionadded:: 3.3 + + +.. c:function:: void PyErr_SetExcInfo(PyObject *type, PyObject *value, PyObject *traceback) + + Set the exception info, as known from ``sys.exc_info()``. This refers + to an exception that was *already caught*, not to an exception that was + freshly raised. This function steals the references of the arguments. + To clear the exception state, pass ``NULL`` for all three arguments. + This function is kept for backwards compatibility. Prefer using + :c:func:`PyErr_SetHandledException`. + + .. note:: + + This function is not normally used by code that wants to handle exceptions. + Rather, it can be used when code needs to save and restore the exception + state temporarily. Use :c:func:`PyErr_GetExcInfo` to read the exception + state. + + .. versionadded:: 3.3 + + .. versionchanged:: 3.11 + The ``type`` and ``traceback`` arguments are no longer used and + can be NULL. The interpreter now derives them from the exception + instance (the ``value`` argument). The function still steals + references of all three arguments. + + +Signal Handling +=============== + + +.. c:function:: int PyErr_CheckSignals() + + .. index:: + pair: module; signal + single: SIGINT + single: KeyboardInterrupt (built-in exception) + + This function interacts with Python's signal handling. + + If the function is called from the main thread and under the main Python + interpreter, it checks whether a signal has been sent to the processes + and if so, invokes the corresponding signal handler. If the :mod:`signal` + module is supported, this can invoke a signal handler written in Python. + + The function attempts to handle all pending signals, and then returns ``0``. + However, if a Python signal handler raises an exception, the error + indicator is set and the function returns ``-1`` immediately (such that + other pending signals may not have been handled yet: they will be on the + next :c:func:`PyErr_CheckSignals()` invocation). + + If the function is called from a non-main thread, or under a non-main + Python interpreter, it does nothing and returns ``0``. + + This function can be called by long-running C code that wants to + be interruptible by user requests (such as by pressing Ctrl-C). + + .. note:: + The default Python signal handler for :const:`SIGINT` raises the + :exc:`KeyboardInterrupt` exception. + + +.. c:function:: void PyErr_SetInterrupt() + + .. index:: + pair: module; signal + single: SIGINT + single: KeyboardInterrupt (built-in exception) + + Simulate the effect of a :const:`SIGINT` signal arriving. + This is equivalent to ``PyErr_SetInterruptEx(SIGINT)``. + + .. note:: + This function is async-signal-safe. It can be called without + the :term:`GIL` and from a C signal handler. + + +.. c:function:: int PyErr_SetInterruptEx(int signum) + + .. index:: + pair: module; signal + single: KeyboardInterrupt (built-in exception) + + Simulate the effect of a signal arriving. The next time + :c:func:`PyErr_CheckSignals` is called, the Python signal handler for + the given signal number will be called. + + This function can be called by C code that sets up its own signal handling + and wants Python signal handlers to be invoked as expected when an + interruption is requested (for example when the user presses Ctrl-C + to interrupt an operation). + + If the given signal isn't handled by Python (it was set to + :data:`signal.SIG_DFL` or :data:`signal.SIG_IGN`), it will be ignored. + + If *signum* is outside of the allowed range of signal numbers, ``-1`` + is returned. Otherwise, ``0`` is returned. The error indicator is + never changed by this function. + + .. note:: + This function is async-signal-safe. It can be called without + the :term:`GIL` and from a C signal handler. + + .. versionadded:: 3.10 + + +.. c:function:: int PySignal_SetWakeupFd(int fd) + + This utility function specifies a file descriptor to which the signal number + is written as a single byte whenever a signal is received. *fd* must be + non-blocking. It returns the previous such file descriptor. + + The value ``-1`` disables the feature; this is the initial state. + This is equivalent to :func:`signal.set_wakeup_fd` in Python, but without any + error checking. *fd* should be a valid file descriptor. The function should + only be called from the main thread. + + .. versionchanged:: 3.5 + On Windows, the function now also supports socket handles. + + +Exception Classes +================= + +.. c:function:: PyObject* PyErr_NewException(const char *name, PyObject *base, PyObject *dict) + + This utility function creates and returns a new exception class. The *name* + argument must be the name of the new exception, a C string of the form + ``module.classname``. The *base* and *dict* arguments are normally ``NULL``. + This creates a class object derived from :exc:`Exception` (accessible in C as + :c:data:`PyExc_Exception`). + + The :attr:`__module__` attribute of the new class is set to the first part (up + to the last dot) of the *name* argument, and the class name is set to the last + part (after the last dot). The *base* argument can be used to specify alternate + base classes; it can either be only one class or a tuple of classes. The *dict* + argument can be used to specify a dictionary of class variables and methods. + + +.. c:function:: PyObject* PyErr_NewExceptionWithDoc(const char *name, const char *doc, PyObject *base, PyObject *dict) + + Same as :c:func:`PyErr_NewException`, except that the new exception class can + easily be given a docstring: If *doc* is non-``NULL``, it will be used as the + docstring for the exception class. + + .. versionadded:: 3.2 + + +Exception Objects +================= + +.. c:function:: PyObject* PyException_GetTraceback(PyObject *ex) + + Return the traceback associated with the exception as a new reference, as + accessible from Python through :attr:`__traceback__`. If there is no + traceback associated, this returns ``NULL``. + + +.. c:function:: int PyException_SetTraceback(PyObject *ex, PyObject *tb) + + Set the traceback associated with the exception to *tb*. Use ``Py_None`` to + clear it. + + +.. c:function:: PyObject* PyException_GetContext(PyObject *ex) + + Return the context (another exception instance during whose handling *ex* was + raised) associated with the exception as a new reference, as accessible from + Python through :attr:`__context__`. If there is no context associated, this + returns ``NULL``. + + +.. c:function:: void PyException_SetContext(PyObject *ex, PyObject *ctx) + + Set the context associated with the exception to *ctx*. Use ``NULL`` to clear + it. There is no type check to make sure that *ctx* is an exception instance. + This steals a reference to *ctx*. + + +.. c:function:: PyObject* PyException_GetCause(PyObject *ex) + + Return the cause (either an exception instance, or :const:`None`, + set by ``raise ... from ...``) associated with the exception as a new + reference, as accessible from Python through :attr:`__cause__`. + + +.. c:function:: void PyException_SetCause(PyObject *ex, PyObject *cause) + + Set the cause associated with the exception to *cause*. Use ``NULL`` to clear + it. There is no type check to make sure that *cause* is either an exception + instance or :const:`None`. This steals a reference to *cause*. + + :attr:`__suppress_context__` is implicitly set to ``True`` by this function. + + +.. _unicodeexceptions: + +Unicode Exception Objects +========================= + +The following functions are used to create and modify Unicode exceptions from C. + +.. c:function:: PyObject* PyUnicodeDecodeError_Create(const char *encoding, const char *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason) + + Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, + *object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are + UTF-8 encoded strings. + +.. c:function:: PyObject* PyUnicodeDecodeError_GetEncoding(PyObject *exc) + PyObject* PyUnicodeEncodeError_GetEncoding(PyObject *exc) + + Return the *encoding* attribute of the given exception object. + +.. c:function:: PyObject* PyUnicodeDecodeError_GetObject(PyObject *exc) + PyObject* PyUnicodeEncodeError_GetObject(PyObject *exc) + PyObject* PyUnicodeTranslateError_GetObject(PyObject *exc) + + Return the *object* attribute of the given exception object. + +.. c:function:: int PyUnicodeDecodeError_GetStart(PyObject *exc, Py_ssize_t *start) + int PyUnicodeEncodeError_GetStart(PyObject *exc, Py_ssize_t *start) + int PyUnicodeTranslateError_GetStart(PyObject *exc, Py_ssize_t *start) + + Get the *start* attribute of the given exception object and place it into + *\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` on + failure. + +.. c:function:: int PyUnicodeDecodeError_SetStart(PyObject *exc, Py_ssize_t start) + int PyUnicodeEncodeError_SetStart(PyObject *exc, Py_ssize_t start) + int PyUnicodeTranslateError_SetStart(PyObject *exc, Py_ssize_t start) + + Set the *start* attribute of the given exception object to *start*. Return + ``0`` on success, ``-1`` on failure. + +.. c:function:: int PyUnicodeDecodeError_GetEnd(PyObject *exc, Py_ssize_t *end) + int PyUnicodeEncodeError_GetEnd(PyObject *exc, Py_ssize_t *end) + int PyUnicodeTranslateError_GetEnd(PyObject *exc, Py_ssize_t *end) + + Get the *end* attribute of the given exception object and place it into + *\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on + failure. + +.. c:function:: int PyUnicodeDecodeError_SetEnd(PyObject *exc, Py_ssize_t end) + int PyUnicodeEncodeError_SetEnd(PyObject *exc, Py_ssize_t end) + int PyUnicodeTranslateError_SetEnd(PyObject *exc, Py_ssize_t end) + + Set the *end* attribute of the given exception object to *end*. Return ``0`` + on success, ``-1`` on failure. + +.. c:function:: PyObject* PyUnicodeDecodeError_GetReason(PyObject *exc) + PyObject* PyUnicodeEncodeError_GetReason(PyObject *exc) + PyObject* PyUnicodeTranslateError_GetReason(PyObject *exc) + + Return the *reason* attribute of the given exception object. + +.. c:function:: int PyUnicodeDecodeError_SetReason(PyObject *exc, const char *reason) + int PyUnicodeEncodeError_SetReason(PyObject *exc, const char *reason) + int PyUnicodeTranslateError_SetReason(PyObject *exc, const char *reason) + + Set the *reason* attribute of the given exception object to *reason*. Return + ``0`` on success, ``-1`` on failure. + + +.. _recursion: + +Recursion Control +================= + +These two functions provide a way to perform safe recursive calls at the C +level, both in the core and in extension modules. They are needed if the +recursive code does not necessarily invoke Python code (which tracks its +recursion depth automatically). +They are also not needed for *tp_call* implementations +because the :ref:`call protocol <call>` takes care of recursion handling. + +.. c:function:: int Py_EnterRecursiveCall(const char *where) + + Marks a point where a recursive C-level call is about to be performed. + + If :const:`USE_STACKCHECK` is defined, this function checks if the OS + stack overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it + sets a :exc:`MemoryError` and returns a nonzero value. + + The function then checks if the recursion limit is reached. If this is the + case, a :exc:`RecursionError` is set and a nonzero value is returned. + Otherwise, zero is returned. + + *where* should be a UTF-8 encoded string such as ``" in instance check"`` to + be concatenated to the :exc:`RecursionError` message caused by the recursion + depth limit. + + .. versionchanged:: 3.9 + This function is now also available in the limited API. + +.. c:function:: void Py_LeaveRecursiveCall(void) + + Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each + *successful* invocation of :c:func:`Py_EnterRecursiveCall`. + + .. versionchanged:: 3.9 + This function is now also available in the limited API. + +Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types requires +special recursion handling. In addition to protecting the stack, +:c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent cycles. The +following two functions facilitate this functionality. Effectively, +these are the C equivalent to :func:`reprlib.recursive_repr`. + +.. c:function:: int Py_ReprEnter(PyObject *object) + + Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` implementation to + detect cycles. + + If the object has already been processed, the function returns a + positive integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation + should return a string object indicating a cycle. As examples, + :class:`dict` objects return ``{...}`` and :class:`list` objects + return ``[...]``. + + The function will return a negative integer if the recursion limit + is reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation should + typically return ``NULL``. + + Otherwise, the function returns zero and the :c:member:`~PyTypeObject.tp_repr` + implementation can continue normally. + +.. c:function:: void Py_ReprLeave(PyObject *object) + + Ends a :c:func:`Py_ReprEnter`. Must be called once for each + invocation of :c:func:`Py_ReprEnter` that returns zero. + + +.. _standardexceptions: + +Standard Exceptions +=================== + +All standard Python exceptions are available as global variables whose names are +``PyExc_`` followed by the Python exception name. These have the type +:c:expr:`PyObject*`; they are all class objects. For completeness, here are all +the variables: + +.. index:: + single: PyExc_BaseException + single: PyExc_Exception + single: PyExc_ArithmeticError + single: PyExc_AssertionError + single: PyExc_AttributeError + single: PyExc_BlockingIOError + single: PyExc_BrokenPipeError + single: PyExc_BufferError + single: PyExc_ChildProcessError + single: PyExc_ConnectionAbortedError + single: PyExc_ConnectionError + single: PyExc_ConnectionRefusedError + single: PyExc_ConnectionResetError + single: PyExc_EOFError + single: PyExc_FileExistsError + single: PyExc_FileNotFoundError + single: PyExc_FloatingPointError + single: PyExc_GeneratorExit + single: PyExc_ImportError + single: PyExc_IndentationError + single: PyExc_IndexError + single: PyExc_InterruptedError + single: PyExc_IsADirectoryError + single: PyExc_KeyError + single: PyExc_KeyboardInterrupt + single: PyExc_LookupError + single: PyExc_MemoryError + single: PyExc_ModuleNotFoundError + single: PyExc_NameError + single: PyExc_NotADirectoryError + single: PyExc_NotImplementedError + single: PyExc_OSError + single: PyExc_OverflowError + single: PyExc_PermissionError + single: PyExc_ProcessLookupError + single: PyExc_RecursionError + single: PyExc_ReferenceError + single: PyExc_RuntimeError + single: PyExc_StopAsyncIteration + single: PyExc_StopIteration + single: PyExc_SyntaxError + single: PyExc_SystemError + single: PyExc_SystemExit + single: PyExc_TabError + single: PyExc_TimeoutError + single: PyExc_TypeError + single: PyExc_UnboundLocalError + single: PyExc_UnicodeDecodeError + single: PyExc_UnicodeEncodeError + single: PyExc_UnicodeError + single: PyExc_UnicodeTranslateError + single: PyExc_ValueError + single: PyExc_ZeroDivisionError + ++-----------------------------------------+---------------------------------+----------+ +| C Name | Python Name | Notes | ++=========================================+=================================+==========+ +| :c:data:`PyExc_BaseException` | :exc:`BaseException` | [1]_ | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_Exception` | :exc:`Exception` | [1]_ | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ArithmeticError` | :exc:`ArithmeticError` | [1]_ | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_AssertionError` | :exc:`AssertionError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_AttributeError` | :exc:`AttributeError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_BlockingIOError` | :exc:`BlockingIOError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_BrokenPipeError` | :exc:`BrokenPipeError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_BufferError` | :exc:`BufferError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ChildProcessError` | :exc:`ChildProcessError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ConnectionAbortedError` | :exc:`ConnectionAbortedError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ConnectionError` | :exc:`ConnectionError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ConnectionRefusedError` | :exc:`ConnectionRefusedError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ConnectionResetError` | :exc:`ConnectionResetError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_EOFError` | :exc:`EOFError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_FileExistsError` | :exc:`FileExistsError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_FileNotFoundError` | :exc:`FileNotFoundError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_FloatingPointError` | :exc:`FloatingPointError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_GeneratorExit` | :exc:`GeneratorExit` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ImportError` | :exc:`ImportError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_IndentationError` | :exc:`IndentationError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_IndexError` | :exc:`IndexError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_InterruptedError` | :exc:`InterruptedError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_IsADirectoryError` | :exc:`IsADirectoryError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_KeyError` | :exc:`KeyError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_KeyboardInterrupt` | :exc:`KeyboardInterrupt` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_LookupError` | :exc:`LookupError` | [1]_ | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_MemoryError` | :exc:`MemoryError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ModuleNotFoundError` | :exc:`ModuleNotFoundError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_NameError` | :exc:`NameError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_NotADirectoryError` | :exc:`NotADirectoryError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_NotImplementedError` | :exc:`NotImplementedError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_OSError` | :exc:`OSError` | [1]_ | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_OverflowError` | :exc:`OverflowError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_PermissionError` | :exc:`PermissionError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ProcessLookupError` | :exc:`ProcessLookupError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_RecursionError` | :exc:`RecursionError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ReferenceError` | :exc:`ReferenceError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_RuntimeError` | :exc:`RuntimeError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_StopAsyncIteration` | :exc:`StopAsyncIteration` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_StopIteration` | :exc:`StopIteration` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_SyntaxError` | :exc:`SyntaxError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_SystemError` | :exc:`SystemError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_SystemExit` | :exc:`SystemExit` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_TabError` | :exc:`TabError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_TimeoutError` | :exc:`TimeoutError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_TypeError` | :exc:`TypeError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_UnboundLocalError` | :exc:`UnboundLocalError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_UnicodeDecodeError` | :exc:`UnicodeDecodeError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_UnicodeEncodeError` | :exc:`UnicodeEncodeError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_UnicodeError` | :exc:`UnicodeError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_UnicodeTranslateError` | :exc:`UnicodeTranslateError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ValueError` | :exc:`ValueError` | | ++-----------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ZeroDivisionError` | :exc:`ZeroDivisionError` | | ++-----------------------------------------+---------------------------------+----------+ + +.. versionadded:: 3.3 + :c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, + :c:data:`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, + :c:data:`PyExc_ConnectionAbortedError`, :c:data:`PyExc_ConnectionRefusedError`, + :c:data:`PyExc_ConnectionResetError`, :c:data:`PyExc_FileExistsError`, + :c:data:`PyExc_FileNotFoundError`, :c:data:`PyExc_InterruptedError`, + :c:data:`PyExc_IsADirectoryError`, :c:data:`PyExc_NotADirectoryError`, + :c:data:`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` + and :c:data:`PyExc_TimeoutError` were introduced following :pep:`3151`. + +.. versionadded:: 3.5 + :c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`. + +.. versionadded:: 3.6 + :c:data:`PyExc_ModuleNotFoundError`. + +These are compatibility aliases to :c:data:`PyExc_OSError`: + +.. index:: + single: PyExc_EnvironmentError + single: PyExc_IOError + single: PyExc_WindowsError + ++-------------------------------------+----------+ +| C Name | Notes | ++=====================================+==========+ +| :c:data:`PyExc_EnvironmentError` | | ++-------------------------------------+----------+ +| :c:data:`PyExc_IOError` | | ++-------------------------------------+----------+ +| :c:data:`PyExc_WindowsError` | [2]_ | ++-------------------------------------+----------+ + +.. versionchanged:: 3.3 + These aliases used to be separate exception types. + +Notes: + +.. [1] + This is a base class for other standard exceptions. + +.. [2] + Only defined on Windows; protect code that uses this by testing that the + preprocessor macro ``MS_WINDOWS`` is defined. + +.. _standardwarningcategories: + +Standard Warning Categories +=========================== + +All standard Python warning categories are available as global variables whose +names are ``PyExc_`` followed by the Python exception name. These have the type +:c:expr:`PyObject*`; they are all class objects. For completeness, here are all +the variables: + +.. index:: + single: PyExc_Warning + single: PyExc_BytesWarning + single: PyExc_DeprecationWarning + single: PyExc_FutureWarning + single: PyExc_ImportWarning + single: PyExc_PendingDeprecationWarning + single: PyExc_ResourceWarning + single: PyExc_RuntimeWarning + single: PyExc_SyntaxWarning + single: PyExc_UnicodeWarning + single: PyExc_UserWarning + ++------------------------------------------+---------------------------------+----------+ +| C Name | Python Name | Notes | ++==========================================+=================================+==========+ +| :c:data:`PyExc_Warning` | :exc:`Warning` | [3]_ | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_BytesWarning` | :exc:`BytesWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_DeprecationWarning` | :exc:`DeprecationWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_FutureWarning` | :exc:`FutureWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ImportWarning` | :exc:`ImportWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_PendingDeprecationWarning`| :exc:`PendingDeprecationWarning`| | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_ResourceWarning` | :exc:`ResourceWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_RuntimeWarning` | :exc:`RuntimeWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_SyntaxWarning` | :exc:`SyntaxWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_UnicodeWarning` | :exc:`UnicodeWarning` | | ++------------------------------------------+---------------------------------+----------+ +| :c:data:`PyExc_UserWarning` | :exc:`UserWarning` | | ++------------------------------------------+---------------------------------+----------+ + +.. versionadded:: 3.2 + :c:data:`PyExc_ResourceWarning`. + +Notes: + +.. [3] + This is a base class for other standard warning categories.
diff --git a/Doc/c-api/file.rst b/Doc/c-api/file.rst new file mode 100644 index 0000000..f32ecba --- /dev/null +++ b/Doc/c-api/file.rst
@@ -0,0 +1,104 @@ +.. highlight:: c + +.. _fileobjects: + +File Objects +------------ + +.. index:: pair: object; file + +These APIs are a minimal emulation of the Python 2 C API for built-in file +objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support +from the C standard library. In Python 3, files and streams use the new +:mod:`io` module, which defines several layers over the low-level unbuffered +I/O of the operating system. The functions described below are +convenience C wrappers over these new APIs, and meant mostly for internal +error reporting in the interpreter; third-party code is advised to access +the :mod:`io` APIs instead. + + +.. c:function:: PyObject* PyFile_FromFd(int fd, const char *name, const char *mode, int buffering, const char *encoding, const char *errors, const char *newline, int closefd) + + Create a Python file object from the file descriptor of an already + opened file *fd*. The arguments *name*, *encoding*, *errors* and *newline* + can be ``NULL`` to use the defaults; *buffering* can be *-1* to use the + default. *name* is ignored and kept for backward compatibility. Return + ``NULL`` on failure. For a more comprehensive description of the arguments, + please refer to the :func:`io.open` function documentation. + + .. warning:: + + Since Python streams have their own buffering layer, mixing them with + OS-level file descriptors can produce various issues (such as unexpected + ordering of data). + + .. versionchanged:: 3.2 + Ignore *name* attribute. + + +.. c:function:: int PyObject_AsFileDescriptor(PyObject *p) + + Return the file descriptor associated with *p* as an :c:expr:`int`. If the + object is an integer, its value is returned. If not, the + object's :meth:`~io.IOBase.fileno` method is called if it exists; the + method must return an integer, which is returned as the file descriptor + value. Sets an exception and returns ``-1`` on failure. + + +.. c:function:: PyObject* PyFile_GetLine(PyObject *p, int n) + + .. index:: single: EOFError (built-in exception) + + Equivalent to ``p.readline([n])``, this function reads one line from the + object *p*. *p* may be a file object or any object with a + :meth:`~io.IOBase.readline` + method. If *n* is ``0``, exactly one line is read, regardless of the length of + the line. If *n* is greater than ``0``, no more than *n* bytes will be read + from the file; a partial line can be returned. In both cases, an empty string + is returned if the end of the file is reached immediately. If *n* is less than + ``0``, however, one line is read regardless of length, but :exc:`EOFError` is + raised if the end of the file is reached immediately. + + +.. c:function:: int PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction handler) + + Overrides the normal behavior of :func:`io.open_code` to pass its parameter + through the provided handler. + + The handler is a function of type :c:expr:`PyObject *(\*)(PyObject *path, + void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`. + + The *userData* pointer is passed into the hook function. Since hook + functions may be called from different runtimes, this pointer should not + refer directly to Python state. + + As this hook is intentionally used during import, avoid importing new modules + during its execution unless they are known to be frozen or available in + ``sys.modules``. + + Once a hook has been set, it cannot be removed or replaced, and later calls to + :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function returns + -1 and sets an exception if the interpreter has been initialized. + + This function is safe to call before :c:func:`Py_Initialize`. + + .. audit-event:: setopencodehook "" c.PyFile_SetOpenCodeHook + + .. versionadded:: 3.8 + + + +.. c:function:: int PyFile_WriteObject(PyObject *obj, PyObject *p, int flags) + + .. index:: single: Py_PRINT_RAW + + Write object *obj* to file object *p*. The only supported flag for *flags* is + :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written + instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; the + appropriate exception will be set. + + +.. c:function:: int PyFile_WriteString(const char *s, PyObject *p) + + Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on + failure; the appropriate exception will be set.
diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst new file mode 100644 index 0000000..05b2d10 --- /dev/null +++ b/Doc/c-api/float.rst
@@ -0,0 +1,164 @@ +.. highlight:: c + +.. _floatobjects: + +Floating Point Objects +---------------------- + +.. index:: pair: object; floating point + + +.. c:type:: PyFloatObject + + This subtype of :c:type:`PyObject` represents a Python floating point object. + + +.. c:var:: PyTypeObject PyFloat_Type + + This instance of :c:type:`PyTypeObject` represents the Python floating point + type. This is the same object as :class:`float` in the Python layer. + + +.. c:function:: int PyFloat_Check(PyObject *p) + + Return true if its argument is a :c:type:`PyFloatObject` or a subtype of + :c:type:`PyFloatObject`. This function always succeeds. + + +.. c:function:: int PyFloat_CheckExact(PyObject *p) + + Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype of + :c:type:`PyFloatObject`. This function always succeeds. + + +.. c:function:: PyObject* PyFloat_FromString(PyObject *str) + + Create a :c:type:`PyFloatObject` object based on the string value in *str*, or + ``NULL`` on failure. + + +.. c:function:: PyObject* PyFloat_FromDouble(double v) + + Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure. + + +.. c:function:: double PyFloat_AsDouble(PyObject *pyfloat) + + Return a C :c:expr:`double` representation of the contents of *pyfloat*. If + *pyfloat* is not a Python floating point object but has a :meth:`__float__` + method, this method will first be called to convert *pyfloat* into a float. + If ``__float__()`` is not defined then it falls back to :meth:`__index__`. + This method returns ``-1.0`` upon failure, so one should call + :c:func:`PyErr_Occurred` to check for errors. + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available. + + +.. c:function:: double PyFloat_AS_DOUBLE(PyObject *pyfloat) + + Return a C :c:expr:`double` representation of the contents of *pyfloat*, but + without error checking. + + +.. c:function:: PyObject* PyFloat_GetInfo(void) + + Return a structseq instance which contains information about the + precision, minimum and maximum values of a float. It's a thin wrapper + around the header file :file:`float.h`. + + +.. c:function:: double PyFloat_GetMax() + + Return the maximum representable finite float *DBL_MAX* as C :c:expr:`double`. + + +.. c:function:: double PyFloat_GetMin() + + Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`. + + +Pack and Unpack functions +========================= + +The pack and unpack functions provide an efficient platform-independent way to +store floating-point values as byte strings. The Pack routines produce a bytes +string from a C :c:expr:`double`, and the Unpack routines produce a C +:c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies the +number of bytes in the bytes string. + +On platforms that appear to use IEEE 754 formats these functions work by +copying bits. On other platforms, the 2-byte format is identical to the IEEE +754 binary16 half-precision format, the 4-byte format (32-bit) is identical to +the IEEE 754 binary32 single precision format, and the 8-byte format to the +IEEE 754 binary64 double precision format, although the packing of INFs and +NaNs (if such things exist on the platform) isn't handled correctly, and +attempting to unpack a bytes string containing an IEEE INF or NaN will raise an +exception. + +On non-IEEE platforms with more precision, or larger dynamic range, than IEEE +754 supports, not all values can be packed; on non-IEEE platforms with less +precision, or smaller dynamic range, not all values can be unpacked. What +happens in such cases is partly accidental (alas). + +.. versionadded:: 3.11 + +Pack functions +-------------- + +The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an +:c:expr:`int` argument, non-zero if you want the bytes string in little-endian +format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you +want big-endian format (exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` +constant can be used to use the native endian: it is equal to ``1`` on big +endian processor, or ``0`` on little endian processor. + +Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, +most likely :exc:`OverflowError`). + +There are two problems on non-IEEE platforms: + +* What this does is undefined if *x* is a NaN or infinity. +* ``-0.0`` and ``+0.0`` produce the same bytes string. + +.. c:function:: int PyFloat_Pack2(double x, unsigned char *p, int le) + + Pack a C double as the IEEE 754 binary16 half-precision format. + +.. c:function:: int PyFloat_Pack4(double x, unsigned char *p, int le) + + Pack a C double as the IEEE 754 binary32 single precision format. + +.. c:function:: int PyFloat_Pack8(double x, unsigned char *p, int le) + + Pack a C double as the IEEE 754 binary64 double precision format. + + +Unpack functions +---------------- + +The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an +:c:expr:`int` argument, non-zero if the bytes string is in little-endian format +(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-endian +(exponent first, at *p*). The :c:data:`PY_BIG_ENDIAN` constant can be used to +use the native endian: it is equal to ``1`` on big endian processor, or ``0`` +on little endian processor. + +Return value: The unpacked double. On error, this is ``-1.0`` and +:c:func:`PyErr_Occurred` is true (and an exception is set, most likely +:exc:`OverflowError`). + +Note that on a non-IEEE platform this will refuse to unpack a bytes string that +represents a NaN or infinity. + +.. c:function:: double PyFloat_Unpack2(const unsigned char *p, int le) + + Unpack the IEEE 754 binary16 half-precision format as a C double. + +.. c:function:: double PyFloat_Unpack4(const unsigned char *p, int le) + + Unpack the IEEE 754 binary32 single precision format as a C double. + +.. c:function:: double PyFloat_Unpack8(const unsigned char *p, int le) + + Unpack the IEEE 754 binary64 double precision format as a C double.
diff --git a/Doc/c-api/frame.rst b/Doc/c-api/frame.rst new file mode 100644 index 0000000..b52f347 --- /dev/null +++ b/Doc/c-api/frame.rst
@@ -0,0 +1,111 @@ +.. highlight:: c + +Frame Objects +------------- + +.. c:type:: PyFrameObject + + The C structure of the objects used to describe frame objects. + + There are no public members in this structure. + + .. versionchanged:: 3.11 + The members of this structure were removed from the public C API. + Refer to the :ref:`What's New entry <pyframeobject-3.11-hiding>` + for details. + +The :c:func:`PyEval_GetFrame` and :c:func:`PyThreadState_GetFrame` functions +can be used to get a frame object. + +See also :ref:`Reflection <reflection>`. + +.. c:var:: PyTypeObject PyFrame_Type + + The type of frame objects. + It is the same object as :py:class:`types.FrameType` in the Python layer. + + .. versionchanged:: 3.11 + + Previously, this type was only available after including + ``<frameobject.h>``. + +.. c:function:: int PyFrame_Check(PyObject *obj) + + Return non-zero if *obj* is a frame object. + + .. versionchanged:: 3.11 + + Previously, this function was only available after including + ``<frameobject.h>``. + +.. c:function:: PyFrameObject* PyFrame_GetBack(PyFrameObject *frame) + + Get the *frame* next outer frame. + + Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer + frame. + + .. versionadded:: 3.9 + + +.. c:function:: PyObject* PyFrame_GetBuiltins(PyFrameObject *frame) + + Get the *frame*'s ``f_builtins`` attribute. + + Return a :term:`strong reference`. The result cannot be ``NULL``. + + .. versionadded:: 3.11 + + +.. c:function:: PyCodeObject* PyFrame_GetCode(PyFrameObject *frame) + + Get the *frame* code. + + Return a :term:`strong reference`. + + The result (frame code) cannot be ``NULL``. + + .. versionadded:: 3.9 + + +.. c:function:: PyObject* PyFrame_GetGenerator(PyFrameObject *frame) + + Get the generator, coroutine, or async generator that owns this frame, + or ``NULL`` if this frame is not owned by a generator. + Does not raise an exception, even if the return value is ``NULL``. + + Return a :term:`strong reference`, or ``NULL``. + + .. versionadded:: 3.11 + + +.. c:function:: PyObject* PyFrame_GetGlobals(PyFrameObject *frame) + + Get the *frame*'s ``f_globals`` attribute. + + Return a :term:`strong reference`. The result cannot be ``NULL``. + + .. versionadded:: 3.11 + + +.. c:function:: int PyFrame_GetLasti(PyFrameObject *frame) + + Get the *frame*'s ``f_lasti`` attribute. + + Returns -1 if ``frame.f_lasti`` is ``None``. + + .. versionadded:: 3.11 + + +.. c:function:: PyObject* PyFrame_GetLocals(PyFrameObject *frame) + + Get the *frame*'s ``f_locals`` attribute (:class:`dict`). + + Return a :term:`strong reference`. + + .. versionadded:: 3.11 + + +.. c:function:: int PyFrame_GetLineNumber(PyFrameObject *frame) + + Return the line number that *frame* is currently executing.
diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst new file mode 100644 index 0000000..1f28a68 --- /dev/null +++ b/Doc/c-api/function.rst
@@ -0,0 +1,111 @@ +.. highlight:: c + +.. _function-objects: + +Function Objects +---------------- + +.. index:: pair: object; function + +There are a few functions specific to Python functions. + + +.. c:type:: PyFunctionObject + + The C structure used for functions. + + +.. c:var:: PyTypeObject PyFunction_Type + + .. index:: single: MethodType (in module types) + + This is an instance of :c:type:`PyTypeObject` and represents the Python function + type. It is exposed to Python programmers as ``types.FunctionType``. + + +.. c:function:: int PyFunction_Check(PyObject *o) + + Return true if *o* is a function object (has type :c:data:`PyFunction_Type`). + The parameter must not be ``NULL``. This function always succeeds. + + +.. c:function:: PyObject* PyFunction_New(PyObject *code, PyObject *globals) + + Return a new function object associated with the code object *code*. *globals* + must be a dictionary with the global variables accessible to the function. + + The function's docstring and name are retrieved from the code object. *__module__* + is retrieved from *globals*. The argument defaults, annotations and closure are + set to ``NULL``. *__qualname__* is set to the same value as the code object's + ``co_qualname`` field. + + +.. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname) + + As :c:func:`PyFunction_New`, but also allows setting the function object's + ``__qualname__`` attribute. *qualname* should be a unicode object or ``NULL``; + if ``NULL``, the ``__qualname__`` attribute is set to the same value as the + code object's ``co_qualname`` field. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyFunction_GetCode(PyObject *op) + + Return the code object associated with the function object *op*. + + +.. c:function:: PyObject* PyFunction_GetGlobals(PyObject *op) + + Return the globals dictionary associated with the function object *op*. + + +.. c:function:: PyObject* PyFunction_GetModule(PyObject *op) + + Return a :term:`borrowed reference` to the *__module__* attribute of the + function object *op*. It can be *NULL*. + + This is normally a string containing the module name, but can be set to any + other object by Python code. + + +.. c:function:: PyObject* PyFunction_GetDefaults(PyObject *op) + + Return the argument default values of the function object *op*. This can be a + tuple of arguments or ``NULL``. + + +.. c:function:: int PyFunction_SetDefaults(PyObject *op, PyObject *defaults) + + Set the argument default values for the function object *op*. *defaults* must be + ``Py_None`` or a tuple. + + Raises :exc:`SystemError` and returns ``-1`` on failure. + + +.. c:function:: PyObject* PyFunction_GetClosure(PyObject *op) + + Return the closure associated with the function object *op*. This can be ``NULL`` + or a tuple of cell objects. + + +.. c:function:: int PyFunction_SetClosure(PyObject *op, PyObject *closure) + + Set the closure associated with the function object *op*. *closure* must be + ``Py_None`` or a tuple of cell objects. + + Raises :exc:`SystemError` and returns ``-1`` on failure. + + +.. c:function:: PyObject *PyFunction_GetAnnotations(PyObject *op) + + Return the annotations of the function object *op*. This can be a + mutable dictionary or ``NULL``. + + +.. c:function:: int PyFunction_SetAnnotations(PyObject *op, PyObject *annotations) + + Set the annotations for the function object *op*. *annotations* + must be a dictionary or ``Py_None``. + + Raises :exc:`SystemError` and returns ``-1`` on failure.
diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst new file mode 100644 index 0000000..8c90d1e --- /dev/null +++ b/Doc/c-api/gcsupport.rst
@@ -0,0 +1,230 @@ +.. highlight:: c + +.. _supporting-cycle-detection: + +Supporting Cyclic Garbage Collection +==================================== + +Python's support for detecting and collecting garbage which involves circular +references requires support from object types which are "containers" for other +objects which may also be containers. Types which do not store references to +other objects, or which only store references to atomic types (such as numbers +or strings), do not need to provide any explicit support for garbage +collection. + +To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of the type object must +include the :const:`Py_TPFLAGS_HAVE_GC` and provide an implementation of the +:c:member:`~PyTypeObject.tp_traverse` handler. If instances of the type are mutable, a +:c:member:`~PyTypeObject.tp_clear` implementation must also be provided. + + +.. data:: Py_TPFLAGS_HAVE_GC + :noindex: + + Objects with a type with this flag set must conform with the rules + documented here. For convenience these objects will be referred to as + container objects. + +Constructors for container types must conform to two rules: + +#. The memory for the object must be allocated using :c:func:`PyObject_GC_New` + or :c:func:`PyObject_GC_NewVar`. + +#. Once all the fields which may contain references to other containers are + initialized, it must call :c:func:`PyObject_GC_Track`. + +Similarly, the deallocator for the object must conform to a similar pair of +rules: + +#. Before fields which refer to other containers are invalidated, + :c:func:`PyObject_GC_UnTrack` must be called. + +#. The object's memory must be deallocated using :c:func:`PyObject_GC_Del`. + + .. warning:: + If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least + a :c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one + from its subclass or subclasses. + + When calling :c:func:`PyType_Ready` or some of the APIs that indirectly + call it like :c:func:`PyType_FromSpecWithBases` or + :c:func:`PyType_FromSpec` the interpreter will automatically populate the + :c:member:`~PyTypeObject.tp_flags`, :c:member:`~PyTypeObject.tp_traverse` + and :c:member:`~PyTypeObject.tp_clear` fields if the type inherits from a + class that implements the garbage collector protocol and the child class + does *not* include the :const:`Py_TPFLAGS_HAVE_GC` flag. + +.. c:function:: TYPE* PyObject_GC_New(TYPE, PyTypeObject *type) + + Analogous to :c:func:`PyObject_New` but for container objects with the + :const:`Py_TPFLAGS_HAVE_GC` flag set. + + +.. c:function:: TYPE* PyObject_GC_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size) + + Analogous to :c:func:`PyObject_NewVar` but for container objects with the + :const:`Py_TPFLAGS_HAVE_GC` flag set. + + +.. c:function:: TYPE* PyObject_GC_Resize(TYPE, PyVarObject *op, Py_ssize_t newsize) + + Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the + resized object or ``NULL`` on failure. *op* must not be tracked by the collector yet. + + +.. c:function:: void PyObject_GC_Track(PyObject *op) + + Adds the object *op* to the set of container objects tracked by the + collector. The collector can run at unexpected times so objects must be + valid while being tracked. This should be called once all the fields + followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, usually near the + end of the constructor. + + +.. c:function:: int PyObject_IS_GC(PyObject *obj) + + Returns non-zero if the object implements the garbage collector protocol, + otherwise returns 0. + + The object cannot be tracked by the garbage collector if this function returns 0. + + +.. c:function:: int PyObject_GC_IsTracked(PyObject *op) + + Returns 1 if the object type of *op* implements the GC protocol and *op* is being + currently tracked by the garbage collector and 0 otherwise. + + This is analogous to the Python function :func:`gc.is_tracked`. + + .. versionadded:: 3.9 + + +.. c:function:: int PyObject_GC_IsFinalized(PyObject *op) + + Returns 1 if the object type of *op* implements the GC protocol and *op* has been + already finalized by the garbage collector and 0 otherwise. + + This is analogous to the Python function :func:`gc.is_finalized`. + + .. versionadded:: 3.9 + + +.. c:function:: void PyObject_GC_Del(void *op) + + Releases memory allocated to an object using :c:func:`PyObject_GC_New` or + :c:func:`PyObject_GC_NewVar`. + + +.. c:function:: void PyObject_GC_UnTrack(void *op) + + Remove the object *op* from the set of container objects tracked by the + collector. Note that :c:func:`PyObject_GC_Track` can be called again on + this object to add it back to the set of tracked objects. The deallocator + (:c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object before any of + the fields used by the :c:member:`~PyTypeObject.tp_traverse` handler become invalid. + + +.. versionchanged:: 3.8 + + The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros + have been removed from the public C API. + +The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function parameter of this type: + + +.. c:type:: int (*visitproc)(PyObject *object, void *arg) + + Type of the visitor function passed to the :c:member:`~PyTypeObject.tp_traverse` handler. + The function should be called with an object to traverse as *object* and + the third parameter to the :c:member:`~PyTypeObject.tp_traverse` handler as *arg*. The + Python core uses several visitor functions to implement cyclic garbage + detection; it's not expected that users will need to write their own + visitor functions. + +The :c:member:`~PyTypeObject.tp_traverse` handler must have the following type: + + +.. c:type:: int (*traverseproc)(PyObject *self, visitproc visit, void *arg) + + Traversal function for a container object. Implementations must call the + *visit* function for each object directly contained by *self*, with the + parameters to *visit* being the contained object and the *arg* value passed + to the handler. The *visit* function must not be called with a ``NULL`` + object argument. If *visit* returns a non-zero value that value should be + returned immediately. + +To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:func:`Py_VISIT` macro is +provided. In order to use this macro, the :c:member:`~PyTypeObject.tp_traverse` implementation +must name its arguments exactly *visit* and *arg*: + + +.. c:function:: void Py_VISIT(PyObject *o) + + If *o* is not ``NULL``, call the *visit* callback, with arguments *o* + and *arg*. If *visit* returns a non-zero value, then return it. + Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers + look like:: + + static int + my_traverse(Noddy *self, visitproc visit, void *arg) + { + Py_VISIT(self->foo); + Py_VISIT(self->bar); + return 0; + } + +The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:`inquiry` type, or ``NULL`` +if the object is immutable. + + +.. c:type:: int (*inquiry)(PyObject *self) + + Drop references that may have created reference cycles. Immutable objects + do not have to define this method since they can never directly create + reference cycles. Note that the object must still be valid after calling + this method (don't just call :c:func:`Py_DECREF` on a reference). The + collector will call this method if it detects that this object is involved + in a reference cycle. + + +Controlling the Garbage Collector State +--------------------------------------- + +The C-API provides the following functions for controlling +garbage collection runs. + +.. c:function:: Py_ssize_t PyGC_Collect(void) + + Perform a full garbage collection, if the garbage collector is enabled. + (Note that :func:`gc.collect` runs it unconditionally.) + + Returns the number of collected + unreachable objects which cannot + be collected. + If the garbage collector is disabled or already collecting, + returns ``0`` immediately. + Errors during garbage collection are passed to :data:`sys.unraisablehook`. + This function does not raise exceptions. + + +.. c:function:: int PyGC_Enable(void) + + Enable the garbage collector: similar to :func:`gc.enable`. + Returns the previous state, 0 for disabled and 1 for enabled. + + .. versionadded:: 3.10 + + +.. c:function:: int PyGC_Disable(void) + + Disable the garbage collector: similar to :func:`gc.disable`. + Returns the previous state, 0 for disabled and 1 for enabled. + + .. versionadded:: 3.10 + + +.. c:function:: int PyGC_IsEnabled(void) + + Query the state of the garbage collector: similar to :func:`gc.isenabled`. + Returns the current state, 0 for disabled and 1 for enabled. + + .. versionadded:: 3.10
diff --git a/Doc/c-api/gen.rst b/Doc/c-api/gen.rst new file mode 100644 index 0000000..0eb5922 --- /dev/null +++ b/Doc/c-api/gen.rst
@@ -0,0 +1,46 @@ +.. highlight:: c + +.. _gen-objects: + +Generator Objects +----------------- + +Generator objects are what Python uses to implement generator iterators. They +are normally created by iterating over a function that yields values, rather +than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`. + + +.. c:type:: PyGenObject + + The C structure used for generator objects. + + +.. c:var:: PyTypeObject PyGen_Type + + The type object corresponding to generator objects. + + +.. c:function:: int PyGen_Check(PyObject *ob) + + Return true if *ob* is a generator object; *ob* must not be ``NULL``. This + function always succeeds. + + +.. c:function:: int PyGen_CheckExact(PyObject *ob) + + Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be + ``NULL``. This function always succeeds. + + +.. c:function:: PyObject* PyGen_New(PyFrameObject *frame) + + Create and return a new generator object based on the *frame* object. + A reference to *frame* is stolen by this function. The argument must not be + ``NULL``. + +.. c:function:: PyObject* PyGen_NewWithQualName(PyFrameObject *frame, PyObject *name, PyObject *qualname) + + Create and return a new generator object based on the *frame* object, + with ``__name__`` and ``__qualname__`` set to *name* and *qualname*. + A reference to *frame* is stolen by this function. The *frame* argument + must not be ``NULL``.
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst new file mode 100644 index 0000000..57328fc --- /dev/null +++ b/Doc/c-api/import.rst
@@ -0,0 +1,310 @@ +.. highlight:: c + +.. _importing: + +Importing Modules +================= + + +.. c:function:: PyObject* PyImport_ImportModule(const char *name) + + .. index:: + single: package variable; __all__ + single: __all__ (package variable) + single: modules (in module sys) + + This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, + leaving the *globals* and *locals* arguments set to ``NULL`` and *level* set + to 0. When the *name* + argument contains a dot (when it specifies a submodule of a package), the + *fromlist* argument is set to the list ``['*']`` so that the return value is the + named module rather than the top-level package containing it as would otherwise + be the case. (Unfortunately, this has an additional side effect when *name* in + fact specifies a subpackage instead of a submodule: the submodules specified in + the package's ``__all__`` variable are loaded.) Return a new reference to the + imported module, or ``NULL`` with an exception set on failure. A failing + import of a module doesn't leave the module in :data:`sys.modules`. + + This function always uses absolute imports. + + +.. c:function:: PyObject* PyImport_ImportModuleNoBlock(const char *name) + + This function is a deprecated alias of :c:func:`PyImport_ImportModule`. + + .. versionchanged:: 3.3 + This function used to fail immediately when the import lock was held + by another thread. In Python 3.3 though, the locking scheme switched + to per-module locks for most purposes, so this function's special + behaviour isn't needed anymore. + + +.. c:function:: PyObject* PyImport_ImportModuleEx(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist) + + .. index:: pair: built-in function; __import__ + + Import a module. This is best described by referring to the built-in Python + function :func:`__import__`. + + The return value is a new reference to the imported module or top-level + package, or ``NULL`` with an exception set on failure. Like for + :func:`__import__`, the return value when a submodule of a package was + requested is normally the top-level package, unless a non-empty *fromlist* + was given. + + Failing imports remove incomplete module objects, like with + :c:func:`PyImport_ImportModule`. + + +.. c:function:: PyObject* PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level) + + Import a module. This is best described by referring to the built-in Python + function :func:`__import__`, as the standard :func:`__import__` function calls + this function directly. + + The return value is a new reference to the imported module or top-level package, + or ``NULL`` with an exception set on failure. Like for :func:`__import__`, + the return value when a submodule of a package was requested is normally the + top-level package, unless a non-empty *fromlist* was given. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyImport_ImportModuleLevel(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level) + + Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a + UTF-8 encoded string instead of a Unicode object. + + .. versionchanged:: 3.3 + Negative values for *level* are no longer accepted. + +.. c:function:: PyObject* PyImport_Import(PyObject *name) + + This is a higher-level interface that calls the current "import hook + function" (with an explicit *level* of 0, meaning absolute import). It + invokes the :func:`__import__` function from the ``__builtins__`` of the + current globals. This means that the import is done using whatever import + hooks are installed in the current environment. + + This function always uses absolute imports. + + +.. c:function:: PyObject* PyImport_ReloadModule(PyObject *m) + + Reload a module. Return a new reference to the reloaded module, or ``NULL`` with + an exception set on failure (the module still exists in this case). + + +.. c:function:: PyObject* PyImport_AddModuleObject(PyObject *name) + + Return the module object corresponding to a module name. The *name* argument + may be of the form ``package.module``. First check the modules dictionary if + there's one there, and if not, create a new one and insert it in the modules + dictionary. Return ``NULL`` with an exception set on failure. + + .. note:: + + This function does not load or import the module; if the module wasn't already + loaded, you will get an empty module object. Use :c:func:`PyImport_ImportModule` + or one of its variants to import a module. Package structures implied by a + dotted name for *name* are not created if not already present. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyImport_AddModule(const char *name) + + Similar to :c:func:`PyImport_AddModuleObject`, but the name is a UTF-8 + encoded string instead of a Unicode object. + + +.. c:function:: PyObject* PyImport_ExecCodeModule(const char *name, PyObject *co) + + .. index:: pair: built-in function; compile + + Given a module name (possibly of the form ``package.module``) and a code object + read from a Python bytecode file or obtained from the built-in function + :func:`compile`, load the module. Return a new reference to the module object, + or ``NULL`` with an exception set if an error occurred. *name* + is removed from :attr:`sys.modules` in error cases, even if *name* was already + in :attr:`sys.modules` on entry to :c:func:`PyImport_ExecCodeModule`. Leaving + incompletely initialized modules in :attr:`sys.modules` is dangerous, as imports of + such modules have no way to know that the module object is an unknown (and + probably damaged with respect to the module author's intents) state. + + The module's :attr:`__spec__` and :attr:`__loader__` will be set, if + not set already, with the appropriate values. The spec's loader will + be set to the module's ``__loader__`` (if set) and to an instance of + :class:`SourceFileLoader` otherwise. + + The module's :attr:`__file__` attribute will be set to the code object's + :c:member:`co_filename`. If applicable, :attr:`__cached__` will also + be set. + + This function will reload the module if it was already imported. See + :c:func:`PyImport_ReloadModule` for the intended way to reload a module. + + If *name* points to a dotted name of the form ``package.module``, any package + structures not already created will still not be created. + + See also :c:func:`PyImport_ExecCodeModuleEx` and + :c:func:`PyImport_ExecCodeModuleWithPathnames`. + + +.. c:function:: PyObject* PyImport_ExecCodeModuleEx(const char *name, PyObject *co, const char *pathname) + + Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute of + the module object is set to *pathname* if it is non-``NULL``. + + See also :c:func:`PyImport_ExecCodeModuleWithPathnames`. + + +.. c:function:: PyObject* PyImport_ExecCodeModuleObject(PyObject *name, PyObject *co, PyObject *pathname, PyObject *cpathname) + + Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__` + attribute of the module object is set to *cpathname* if it is + non-``NULL``. Of the three functions, this is the preferred one to use. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyImport_ExecCodeModuleWithPathnames(const char *name, PyObject *co, const char *pathname, const char *cpathname) + + Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and + *cpathname* are UTF-8 encoded strings. Attempts are also made to figure out + what the value for *pathname* should be from *cpathname* if the former is + set to ``NULL``. + + .. versionadded:: 3.2 + .. versionchanged:: 3.3 + Uses :func:`imp.source_from_cache()` in calculating the source path if + only the bytecode path is provided. + + +.. c:function:: long PyImport_GetMagicNumber() + + Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` file). + The magic number should be present in the first four bytes of the bytecode + file, in little-endian byte order. Returns ``-1`` on error. + + .. versionchanged:: 3.3 + Return value of ``-1`` upon failure. + + +.. c:function:: const char * PyImport_GetMagicTag() + + Return the magic tag string for :pep:`3147` format Python bytecode file + names. Keep in mind that the value at ``sys.implementation.cache_tag`` is + authoritative and should be used instead of this function. + + .. versionadded:: 3.2 + +.. c:function:: PyObject* PyImport_GetModuleDict() + + Return the dictionary used for the module administration (a.k.a. + ``sys.modules``). Note that this is a per-interpreter variable. + +.. c:function:: PyObject* PyImport_GetModule(PyObject *name) + + Return the already imported module with the given name. If the + module has not been imported yet then returns ``NULL`` but does not set + an error. Returns ``NULL`` and sets an error if the lookup failed. + + .. versionadded:: 3.7 + +.. c:function:: PyObject* PyImport_GetImporter(PyObject *path) + + Return a finder object for a :data:`sys.path`/:attr:`pkg.__path__` item + *path*, possibly by fetching it from the :data:`sys.path_importer_cache` + dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook + is found that can handle the path item. Return ``None`` if no hook could; + this tells our caller that the :term:`path based finder` could not find a + finder for this path item. Cache the result in :data:`sys.path_importer_cache`. + Return a new reference to the finder object. + + +.. c:function:: int PyImport_ImportFrozenModuleObject(PyObject *name) + + Load a frozen module named *name*. Return ``1`` for success, ``0`` if the + module is not found, and ``-1`` with an exception set if the initialization + failed. To access the imported module on a successful load, use + :c:func:`PyImport_ImportModule`. (Note the misnomer --- this function would + reload the module if it was already imported.) + + .. versionadded:: 3.3 + + .. versionchanged:: 3.4 + The ``__file__`` attribute is no longer set on the module. + + +.. c:function:: int PyImport_ImportFrozenModule(const char *name) + + Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a + UTF-8 encoded string instead of a Unicode object. + + +.. c:struct:: _frozen + + .. index:: single: freeze utility + + This is the structure type definition for frozen module descriptors, as + generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the + Python source distribution). Its definition, found in :file:`Include/import.h`, + is:: + + struct _frozen { + const char *name; + const unsigned char *code; + int size; + bool is_package; + }; + + .. versionchanged:: 3.11 + The new ``is_package`` field indicates whether the module is a package or not. + This replaces setting the ``size`` field to a negative value. + +.. c:var:: const struct _frozen* PyImport_FrozenModules + + This pointer is initialized to point to an array of :c:struct:`_frozen` + records, terminated by one whose members are all ``NULL`` or zero. When a frozen + module is imported, it is searched in this table. Third-party code could play + tricks with this to provide a dynamically created collection of frozen modules. + + +.. c:function:: int PyImport_AppendInittab(const char *name, PyObject* (*initfunc)(void)) + + Add a single module to the existing table of built-in modules. This is a + convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning ``-1`` if + the table could not be extended. The new module can be imported by the name + *name*, and uses the function *initfunc* as the initialization function called + on the first attempted import. This should be called before + :c:func:`Py_Initialize`. + + +.. c:struct:: _inittab + + Structure describing a single entry in the list of built-in modules. Each of + these structures gives the name and initialization function for a module built + into the interpreter. The name is an ASCII encoded string. Programs which + embed Python may use an array of these structures in conjunction with + :c:func:`PyImport_ExtendInittab` to provide additional built-in modules. + The structure is defined in :file:`Include/import.h` as:: + + struct _inittab { + const char *name; /* ASCII encoded string */ + PyObject* (*initfunc)(void); + }; + + +.. c:function:: int PyImport_ExtendInittab(struct _inittab *newtab) + + Add a collection of modules to the table of built-in modules. The *newtab* + array must end with a sentinel entry which contains ``NULL`` for the :attr:`name` + field; failure to provide the sentinel value can result in a memory fault. + Returns ``0`` on success or ``-1`` if insufficient memory could be allocated to + extend the internal table. In the event of failure, no modules are added to the + internal table. This must be called before :c:func:`Py_Initialize`. + + If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` or + :c:func:`PyImport_ExtendInittab` must be called before each Python + initialization.
diff --git a/Doc/c-api/index.rst b/Doc/c-api/index.rst new file mode 100644 index 0000000..9a8f150 --- /dev/null +++ b/Doc/c-api/index.rst
@@ -0,0 +1,27 @@ +.. _c-api-index: + +################################## + Python/C API Reference Manual +################################## + +This manual documents the API used by C and C++ programmers who want to write +extension modules or embed Python. It is a companion to :ref:`extending-index`, +which describes the general principles of extension writing but does not +document the API functions in detail. + +.. toctree:: + :maxdepth: 2 + + intro.rst + stable.rst + veryhigh.rst + refcounting.rst + exceptions.rst + utilities.rst + abstract.rst + concrete.rst + init.rst + init_config.rst + memory.rst + objimpl.rst + apiabiversion.rst
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst new file mode 100644 index 0000000..dda87f4 --- /dev/null +++ b/Doc/c-api/init.rst
@@ -0,0 +1,1877 @@ +.. highlight:: c + + +.. _initialization: + +***************************************** +Initialization, Finalization, and Threads +***************************************** + +See also :ref:`Python Initialization Configuration <init-config>`. + +.. _pre-init-safe: + +Before Python Initialization +============================ + +In an application embedding Python, the :c:func:`Py_Initialize` function must +be called before using any other Python/C API functions; with the exception of +a few functions and the :ref:`global configuration variables +<global-conf-vars>`. + +The following functions can be safely called before Python is initialized: + +* Configuration functions: + + * :c:func:`PyImport_AppendInittab` + * :c:func:`PyImport_ExtendInittab` + * :c:func:`PyInitFrozenExtensions` + * :c:func:`PyMem_SetAllocator` + * :c:func:`PyMem_SetupDebugHooks` + * :c:func:`PyObject_SetArenaAllocator` + * :c:func:`Py_SetPath` + * :c:func:`Py_SetProgramName` + * :c:func:`Py_SetPythonHome` + * :c:func:`Py_SetStandardStreamEncoding` + * :c:func:`PySys_AddWarnOption` + * :c:func:`PySys_AddXOption` + * :c:func:`PySys_ResetWarnOptions` + +* Informative functions: + + * :c:func:`Py_IsInitialized` + * :c:func:`PyMem_GetAllocator` + * :c:func:`PyObject_GetArenaAllocator` + * :c:func:`Py_GetBuildInfo` + * :c:func:`Py_GetCompiler` + * :c:func:`Py_GetCopyright` + * :c:func:`Py_GetPlatform` + * :c:func:`Py_GetVersion` + +* Utilities: + + * :c:func:`Py_DecodeLocale` + +* Memory allocators: + + * :c:func:`PyMem_RawMalloc` + * :c:func:`PyMem_RawRealloc` + * :c:func:`PyMem_RawCalloc` + * :c:func:`PyMem_RawFree` + +.. note:: + + The following functions **should not be called** before + :c:func:`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, + :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, + :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, + :c:func:`Py_GetProgramName` and :c:func:`PyEval_InitThreads`. + + +.. _global-conf-vars: + +Global configuration variables +============================== + +Python has variables for the global configuration to control different features +and options. By default, these flags are controlled by :ref:`command line +options <using-on-interface-options>`. + +When a flag is set by an option, the value of the flag is the number of times +that the option was set. For example, ``-b`` sets :c:data:`Py_BytesWarningFlag` +to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. + +.. c:var:: int Py_BytesWarningFlag + + Issue a warning when comparing :class:`bytes` or :class:`bytearray` with + :class:`str` or :class:`bytes` with :class:`int`. Issue an error if greater + or equal to ``2``. + + Set by the :option:`-b` option. + +.. c:var:: int Py_DebugFlag + + Turn on parser debugging output (for expert only, depending on compilation + options). + + Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment + variable. + +.. c:var:: int Py_DontWriteBytecodeFlag + + If set to non-zero, Python won't try to write ``.pyc`` files on the + import of source modules. + + Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` + environment variable. + +.. c:var:: int Py_FrozenFlag + + Suppress error messages when calculating the module search path in + :c:func:`Py_GetPath`. + + Private flag used by ``_freeze_module`` and ``frozenmain`` programs. + +.. c:var:: int Py_HashRandomizationFlag + + Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to + a non-empty string. + + If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment + variable to initialize the secret hash seed. + +.. c:var:: int Py_IgnoreEnvironmentFlag + + Ignore all :envvar:`PYTHON*` environment variables, e.g. + :envvar:`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set. + + Set by the :option:`-E` and :option:`-I` options. + +.. c:var:: int Py_InspectFlag + + When a script is passed as first argument or the :option:`-c` option is used, + enter interactive mode after executing the script or the command, even when + :data:`sys.stdin` does not appear to be a terminal. + + Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment + variable. + +.. c:var:: int Py_InteractiveFlag + + Set by the :option:`-i` option. + +.. c:var:: int Py_IsolatedFlag + + Run Python in isolated mode. In isolated mode :data:`sys.path` contains + neither the script's directory nor the user's site-packages directory. + + Set by the :option:`-I` option. + + .. versionadded:: 3.4 + +.. c:var:: int Py_LegacyWindowsFSEncodingFlag + + If the flag is non-zero, use the ``mbcs`` encoding with ``replace`` error + handler, instead of the UTF-8 encoding with ``surrogatepass`` error handler, + for the :term:`filesystem encoding and error handler`. + + Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment + variable is set to a non-empty string. + + See :pep:`529` for more details. + + .. availability:: Windows. + +.. c:var:: int Py_LegacyWindowsStdioFlag + + If the flag is non-zero, use :class:`io.FileIO` instead of + :class:`WindowsConsoleIO` for :mod:`sys` standard streams. + + Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment + variable is set to a non-empty string. + + See :pep:`528` for more details. + + .. availability:: Windows. + +.. c:var:: int Py_NoSiteFlag + + Disable the import of the module :mod:`site` and the site-dependent + manipulations of :data:`sys.path` that it entails. Also disable these + manipulations if :mod:`site` is explicitly imported later (call + :func:`site.main` if you want them to be triggered). + + Set by the :option:`-S` option. + +.. c:var:: int Py_NoUserSiteDirectory + + Don't add the :data:`user site-packages directory <site.USER_SITE>` to + :data:`sys.path`. + + Set by the :option:`-s` and :option:`-I` options, and the + :envvar:`PYTHONNOUSERSITE` environment variable. + +.. c:var:: int Py_OptimizeFlag + + Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment + variable. + +.. c:var:: int Py_QuietFlag + + Don't display the copyright and version messages even in interactive mode. + + Set by the :option:`-q` option. + + .. versionadded:: 3.2 + +.. c:var:: int Py_UnbufferedStdioFlag + + Force the stdout and stderr streams to be unbuffered. + + Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` + environment variable. + +.. c:var:: int Py_VerboseFlag + + 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. + + Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment + variable. + + +Initializing and finalizing the interpreter +=========================================== + + +.. c:function:: void Py_Initialize() + + .. index:: + single: Py_SetProgramName() + single: PyEval_InitThreads() + single: modules (in module sys) + single: path (in module sys) + pair: module; builtins + pair: module; __main__ + pair: module; sys + triple: module; search; path + single: PySys_SetArgv() + single: PySys_SetArgvEx() + single: Py_FinalizeEx() + + Initialize the Python interpreter. In an application embedding Python, + this should be called before using any other Python/C API functions; see + :ref:`Before Python Initialization <pre-init-safe>` for the few exceptions. + + This initializes + the table of loaded modules (``sys.modules``), and creates the fundamental + modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It also initializes + the module search path (``sys.path``). It does not set ``sys.argv``; use + :c:func:`PySys_SetArgvEx` for that. This is a no-op when called for a second time + (without calling :c:func:`Py_FinalizeEx` first). There is no return value; it is a + fatal error if the initialization fails. + + .. note:: + On Windows, changes the console mode from ``O_TEXT`` to ``O_BINARY``, which will + also affect non-Python uses of the console using the C Runtime. + + +.. c:function:: void Py_InitializeEx(int initsigs) + + This function works like :c:func:`Py_Initialize` if *initsigs* is ``1``. If + *initsigs* is ``0``, it skips initialization registration of signal handlers, which + might be useful when Python is embedded. + + +.. c:function:: int Py_IsInitialized() + + Return true (nonzero) when the Python interpreter has been initialized, false + (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns false until + :c:func:`Py_Initialize` is called again. + + +.. c:function:: int Py_FinalizeEx() + + Undo all initializations made by :c:func:`Py_Initialize` and subsequent use of + Python/C API functions, and destroy all sub-interpreters (see + :c:func:`Py_NewInterpreter` below) that were created and not yet destroyed since + the last call to :c:func:`Py_Initialize`. Ideally, this frees all memory + allocated by the Python interpreter. This is a no-op when called for a second + time (without calling :c:func:`Py_Initialize` again first). Normally the + return value is ``0``. If there were errors during finalization + (flushing buffered data), ``-1`` is returned. + + This function is provided for a number of reasons. An embedding application + might want to restart Python without having to restart the application itself. + An application that has loaded the Python interpreter from a dynamically + loadable library (or DLL) might want to free all memory allocated by Python + before unloading the DLL. During a hunt for memory leaks in an application a + developer might want to free all memory allocated by Python before exiting from + the application. + + **Bugs and caveats:** The destruction of modules and objects in modules is done + in random order; this may cause destructors (:meth:`__del__` methods) to fail + when they depend on other objects (even functions) or modules. Dynamically + loaded extension modules loaded by Python are not unloaded. Small amounts of + memory allocated by the Python interpreter may not be freed (if you find a leak, + please report it). Memory tied up in circular references between objects is not + freed. Some memory allocated by extension modules may not be freed. Some + extensions may not work properly if their initialization routine is called more + than once; this can happen if an application calls :c:func:`Py_Initialize` and + :c:func:`Py_FinalizeEx` more than once. + + .. audit-event:: cpython._PySys_ClearAuditHooks "" c.Py_FinalizeEx + + .. versionadded:: 3.6 + +.. c:function:: void Py_Finalize() + + This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that + disregards the return value. + + +Process-wide parameters +======================= + + +.. c:function:: int Py_SetStandardStreamEncoding(const char *encoding, const char *errors) + + .. index:: + single: Py_Initialize() + single: main() + triple: stdin; stdout; sdterr + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.stdio_encoding` and :c:member:`PyConfig.stdio_errors` + should be used instead, see :ref:`Python Initialization Configuration + <init-config>`. + + This function should be called before :c:func:`Py_Initialize`, if it is + called at all. It specifies which encoding and error handling to use + with standard IO, with the same meanings as in :func:`str.encode`. + + It overrides :envvar:`PYTHONIOENCODING` values, and allows embedding code + to control IO encoding when the environment variable does not work. + + *encoding* and/or *errors* may be ``NULL`` to use + :envvar:`PYTHONIOENCODING` and/or default values (depending on other + settings). + + Note that :data:`sys.stderr` always uses the "backslashreplace" error + handler, regardless of this (or any other) setting. + + If :c:func:`Py_FinalizeEx` is called, this function will need to be called + again in order to affect subsequent calls to :c:func:`Py_Initialize`. + + Returns ``0`` if successful, a nonzero value on error (e.g. calling after the + interpreter has already been initialized). + + .. versionadded:: 3.4 + + .. deprecated:: 3.11 + + +.. c:function:: void Py_SetProgramName(const wchar_t *name) + + .. index:: + single: Py_Initialize() + single: main() + single: Py_GetPath() + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.program_name` should be used instead, see :ref:`Python + Initialization Configuration <init-config>`. + + This function should be called before :c:func:`Py_Initialize` is called for + the first time, if it is called at all. It tells the interpreter the value + of the ``argv[0]`` argument to the :c:func:`main` function of the program + (converted to wide characters). + This is used by :c:func:`Py_GetPath` and some other functions below to find + the Python run-time libraries relative to the interpreter executable. The + default value is ``'python'``. The argument should point to a + zero-terminated wide character string in static storage whose contents will not + change for the duration of the program's execution. No code in the Python + interpreter will change the contents of this storage. + + Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a + :c:expr:`wchar_*` string. + + .. deprecated:: 3.11 + + +.. c:function:: wchar* Py_GetProgramName() + + .. index:: single: Py_SetProgramName() + + Return the program name set with :c:func:`Py_SetProgramName`, or the default. + The returned string points into static storage; the caller should not modify its + value. + + This function should not be called before :c:func:`Py_Initialize`, otherwise + it returns ``NULL``. + + .. versionchanged:: 3.10 + It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + + +.. c:function:: wchar_t* Py_GetPrefix() + + Return the *prefix* for installed platform-independent files. This is derived + through a number of complicated rules from the program name set with + :c:func:`Py_SetProgramName` and some environment variables; for example, if the + program name is ``'/usr/local/bin/python'``, the prefix is ``'/usr/local'``. The + returned string points into static storage; the caller should not modify its + value. This corresponds to the :makevar:`prefix` variable in the top-level + :file:`Makefile` and the :option:`--prefix` argument to the :program:`configure` + script at build time. The value is available to Python code as ``sys.prefix``. + It is only useful on Unix. See also the next function. + + This function should not be called before :c:func:`Py_Initialize`, otherwise + it returns ``NULL``. + + .. versionchanged:: 3.10 + It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + + +.. c:function:: wchar_t* Py_GetExecPrefix() + + Return the *exec-prefix* for installed platform-*dependent* files. This is + derived through a number of complicated rules from the program name set with + :c:func:`Py_SetProgramName` and some environment variables; for example, if the + program name is ``'/usr/local/bin/python'``, the exec-prefix is + ``'/usr/local'``. The returned string points into static storage; the caller + should not modify its value. This corresponds to the :makevar:`exec_prefix` + variable in the top-level :file:`Makefile` and the ``--exec-prefix`` + argument to the :program:`configure` script at build time. The value is + available to Python code as ``sys.exec_prefix``. It is only useful on Unix. + + Background: The exec-prefix differs from the prefix when platform dependent + files (such as executables and shared libraries) are installed in a different + directory tree. In a typical installation, platform dependent files may be + installed in the :file:`/usr/local/plat` subtree while platform independent may + be installed in :file:`/usr/local`. + + Generally speaking, a platform is a combination of hardware and software + families, e.g. Sparc machines running the Solaris 2.x operating system are + considered the same platform, but Intel machines running Solaris 2.x are another + platform, and Intel machines running Linux are yet another platform. Different + major revisions of the same operating system generally also form different + platforms. Non-Unix operating systems are a different story; the installation + strategies on those systems are so different that the prefix and exec-prefix are + meaningless, and set to the empty string. Note that compiled Python bytecode + files are platform independent (but not independent from the Python version by + which they were compiled!). + + System administrators will know how to configure the :program:`mount` or + :program:`automount` programs to share :file:`/usr/local` between platforms + while having :file:`/usr/local/plat` be a different filesystem for each + platform. + + This function should not be called before :c:func:`Py_Initialize`, otherwise + it returns ``NULL``. + + .. versionchanged:: 3.10 + It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + + +.. c:function:: wchar_t* Py_GetProgramFullPath() + + .. index:: + single: Py_SetProgramName() + single: executable (in module sys) + + Return the full program name of the Python executable; this is computed as a + side-effect of deriving the default module search path from the program name + (set by :c:func:`Py_SetProgramName` above). The returned string points into + static storage; the caller should not modify its value. The value is available + to Python code as ``sys.executable``. + + This function should not be called before :c:func:`Py_Initialize`, otherwise + it returns ``NULL``. + + .. versionchanged:: 3.10 + It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + + +.. c:function:: wchar_t* Py_GetPath() + + .. index:: + triple: module; search; path + single: path (in module sys) + single: Py_SetPath() + + Return the default module search path; this is computed from the program name + (set by :c:func:`Py_SetProgramName` above) and some environment variables. + The returned string consists of a series of directory names separated by a + platform dependent delimiter character. The delimiter character is ``':'`` + on Unix and macOS, ``';'`` on Windows. The returned string points into + static storage; the caller should not modify its value. The list + :data:`sys.path` is initialized with this value on interpreter startup; it + can be (and usually is) modified later to change the search path for loading + modules. + + This function should not be called before :c:func:`Py_Initialize`, otherwise + it returns ``NULL``. + + .. XXX should give the exact rules + + .. versionchanged:: 3.10 + It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + + +.. c:function:: void Py_SetPath(const wchar_t *) + + .. index:: + triple: module; search; path + single: path (in module sys) + single: Py_GetPath() + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.module_search_paths` and + :c:member:`PyConfig.module_search_paths_set` should be used instead, see + :ref:`Python Initialization Configuration <init-config>`. + + Set the default module search path. If this function is called before + :c:func:`Py_Initialize`, then :c:func:`Py_GetPath` won't attempt to compute a + default search path but uses the one provided instead. This is useful if + Python is embedded by an application that has full knowledge of the location + of all modules. The path components should be separated by the platform + dependent delimiter character, which is ``':'`` on Unix and macOS, ``';'`` + on Windows. + + This also causes :data:`sys.executable` to be set to the program + full path (see :c:func:`Py_GetProgramFullPath`) and for :data:`sys.prefix` and + :data:`sys.exec_prefix` to be empty. It is up to the caller to modify these + if required after calling :c:func:`Py_Initialize`. + + Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a + :c:expr:`wchar_*` string. + + The path argument is copied internally, so the caller may free it after the + call completes. + + .. versionchanged:: 3.8 + The program full path is now used for :data:`sys.executable`, instead + of the program name. + + .. deprecated:: 3.11 + + +.. c:function:: const char* Py_GetVersion() + + Return the version of this Python interpreter. This is a string that looks + something like :: + + "3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \n[GCC 4.2.3]" + + .. index:: single: version (in module sys) + + The first word (up to the first space character) is the current Python version; + the first characters are the major and minor version separated by a + period. The returned string points into static storage; the caller should not + modify its value. The value is available to Python code as :data:`sys.version`. + + See also the :c:var:`Py_Version` constant. + + +.. c:function:: const char* Py_GetPlatform() + + .. index:: single: platform (in module sys) + + Return the platform identifier for the current platform. On Unix, this is + formed from the "official" name of the operating system, converted to lower + case, followed by the major revision number; e.g., for Solaris 2.x, which is + also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it is + ``'darwin'``. On Windows, it is ``'win'``. The returned string points into + static storage; the caller should not modify its value. The value is available + to Python code as ``sys.platform``. + + +.. c:function:: const char* Py_GetCopyright() + + Return the official copyright string for the current Python version, for example + + ``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'`` + + .. index:: single: copyright (in module sys) + + The returned string points into static storage; the caller should not modify its + value. The value is available to Python code as ``sys.copyright``. + + +.. c:function:: const char* Py_GetCompiler() + + Return an indication of the compiler used to build the current Python version, + in square brackets, for example:: + + "[GCC 2.7.2.2]" + + .. index:: single: version (in module sys) + + The returned string points into static storage; the caller should not modify its + value. The value is available to Python code as part of the variable + ``sys.version``. + + +.. c:function:: const char* Py_GetBuildInfo() + + Return information about the sequence number and build date and time of the + current Python interpreter instance, for example :: + + "#67, Aug 1 1997, 22:34:28" + + .. index:: single: version (in module sys) + + The returned string points into static storage; the caller should not modify its + value. The value is available to Python code as part of the variable + ``sys.version``. + + +.. c:function:: void PySys_SetArgvEx(int argc, wchar_t **argv, int updatepath) + + .. index:: + single: main() + single: Py_FatalError() + single: argv (in module sys) + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.argv`, :c:member:`PyConfig.parse_argv` and + :c:member:`PyConfig.safe_path` should be used instead, see :ref:`Python + Initialization Configuration <init-config>`. + + Set :data:`sys.argv` based on *argc* and *argv*. These parameters are + similar to those passed to the program's :c:func:`main` function with the + difference that the first entry should refer to the script file to be + executed rather than the executable hosting the Python interpreter. If there + isn't a script that will be run, the first entry in *argv* can be an empty + string. If this function fails to initialize :data:`sys.argv`, a fatal + condition is signalled using :c:func:`Py_FatalError`. + + If *updatepath* is zero, this is all the function does. If *updatepath* + is non-zero, the function also modifies :data:`sys.path` according to the + following algorithm: + + - If the name of an existing script is passed in ``argv[0]``, the absolute + path of the directory where the script is located is prepended to + :data:`sys.path`. + - Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point + to an existing file name), an empty string is prepended to + :data:`sys.path`, which is the same as prepending the current working + directory (``"."``). + + Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a + :c:expr:`wchar_*` string. + + See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` + members of the :ref:`Python Initialization Configuration <init-config>`. + + .. note:: + It is recommended that applications embedding the Python interpreter + for purposes other than executing a single script pass ``0`` as *updatepath*, + and update :data:`sys.path` themselves if desired. + See `CVE-2008-5983 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_. + + On versions before 3.1.3, you can achieve the same effect by manually + popping the first :data:`sys.path` element after having called + :c:func:`PySys_SetArgv`, for example using:: + + PyRun_SimpleString("import sys; sys.path.pop(0)\n"); + + .. versionadded:: 3.1.3 + + .. XXX impl. doesn't seem consistent in allowing ``0``/``NULL`` for the params; + check w/ Guido. + + .. deprecated:: 3.11 + + +.. c:function:: void PySys_SetArgv(int argc, wchar_t **argv) + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` should be used + instead, see :ref:`Python Initialization Configuration <init-config>`. + + This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set + to ``1`` unless the :program:`python` interpreter was started with the + :option:`-I`. + + Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a + :c:expr:`wchar_*` string. + + See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` + members of the :ref:`Python Initialization Configuration <init-config>`. + + .. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`. + + .. deprecated:: 3.11 + + +.. c:function:: void Py_SetPythonHome(const wchar_t *home) + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.home` should be used instead, see :ref:`Python + Initialization Configuration <init-config>`. + + Set the default "home" directory, that is, the location of the standard + Python libraries. See :envvar:`PYTHONHOME` for the meaning of the + argument string. + + The argument should point to a zero-terminated character string in static + storage whose contents will not change for the duration of the program's + execution. No code in the Python interpreter will change the contents of + this storage. + + Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a + :c:expr:`wchar_*` string. + + .. deprecated:: 3.11 + + +.. c:function:: wchar_t* Py_GetPythonHome() + + Return the default "home", that is, the value set by a previous call to + :c:func:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME` + environment variable if it is set. + + This function should not be called before :c:func:`Py_Initialize`, otherwise + it returns ``NULL``. + + .. versionchanged:: 3.10 + It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + + +.. _threads: + +Thread State and the Global Interpreter Lock +============================================ + +.. index:: + single: global interpreter lock + single: interpreter lock + single: lock, interpreter + +The Python interpreter is not fully thread-safe. In order to support +multi-threaded Python programs, there's a global lock, called the :term:`global +interpreter lock` or :term:`GIL`, that must be held by the current thread before +it can safely access Python objects. Without the lock, even the simplest +operations could cause problems in a multi-threaded program: for example, when +two threads simultaneously increment the reference count of the same object, the +reference count could end up being incremented only once instead of twice. + +.. index:: single: setswitchinterval() (in module sys) + +Therefore, the rule exists that only the thread that has acquired the +:term:`GIL` may operate on Python objects or call Python/C API functions. +In order to emulate concurrency of execution, the interpreter regularly +tries to switch threads (see :func:`sys.setswitchinterval`). The lock is also +released around potentially blocking I/O operations like reading or writing +a file, so that other Python threads can run in the meantime. + +.. index:: + single: PyThreadState + single: PyThreadState + +The Python interpreter keeps some thread-specific bookkeeping information +inside a data structure called :c:type:`PyThreadState`. There's also one +global variable pointing to the current :c:type:`PyThreadState`: it can +be retrieved using :c:func:`PyThreadState_Get`. + +Releasing the GIL from extension code +------------------------------------- + +Most extension code manipulating the :term:`GIL` has the following simple +structure:: + + Save the thread state in a local variable. + Release the global interpreter lock. + ... Do some blocking I/O operation ... + Reacquire the global interpreter lock. + Restore the thread state from the local variable. + +This is so common that a pair of macros exists to simplify it:: + + Py_BEGIN_ALLOW_THREADS + ... Do some blocking I/O operation ... + Py_END_ALLOW_THREADS + +.. index:: + single: Py_BEGIN_ALLOW_THREADS + single: Py_END_ALLOW_THREADS + +The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a +hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the +block. + +The block above expands to the following code:: + + PyThreadState *_save; + + _save = PyEval_SaveThread(); + ... Do some blocking I/O operation ... + PyEval_RestoreThread(_save); + +.. index:: + single: PyEval_RestoreThread() + single: PyEval_SaveThread() + +Here is how these functions work: the global interpreter lock is used to protect the pointer to the +current thread state. When releasing the lock and saving the thread state, +the current thread state pointer must be retrieved before the lock is released +(since another thread could immediately acquire the lock and store its own thread +state in the global variable). Conversely, when acquiring the lock and restoring +the thread state, the lock must be acquired before storing the thread state +pointer. + +.. note:: + Calling system I/O functions is the most common use case for releasing + the GIL, but it can also be useful before calling long-running computations + which don't need access to Python objects, such as compression or + cryptographic functions operating over memory buffers. For example, the + standard :mod:`zlib` and :mod:`hashlib` modules release the GIL when + compressing or hashing data. + + +.. _gilstate: + +Non-Python created threads +-------------------------- + +When threads are created using the dedicated Python APIs (such as the +:mod:`threading` module), a thread state is automatically associated to them +and the code showed above is therefore correct. However, when threads are +created from C (for example by a third-party library with its own thread +management), they don't hold the GIL, nor is there a thread state structure +for them. + +If you need to call Python code from these threads (often this will be part +of a callback API provided by the aforementioned third-party library), +you must first register these threads with the interpreter by +creating a thread state data structure, then acquiring the GIL, and finally +storing their thread state pointer, before you can start using the Python/C +API. When you are done, you should reset the thread state pointer, release +the GIL, and finally free the thread state data structure. + +The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions do +all of the above automatically. The typical idiom for calling into Python +from a C thread is:: + + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); + + /* Perform Python actions here. */ + result = CallSomeFunction(); + /* evaluate result or handle exception */ + + /* Release the thread. No Python API allowed beyond this point. */ + PyGILState_Release(gstate); + +Note that the ``PyGILState_*`` functions assume there is only one global +interpreter (created automatically by :c:func:`Py_Initialize`). Python +supports the creation of additional interpreters (using +:c:func:`Py_NewInterpreter`), but mixing multiple interpreters and the +``PyGILState_*`` API is unsupported. + + +.. _fork-and-threads: + +Cautions about fork() +--------------------- + +Another important thing to note about threads is their behaviour in the face +of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a +process forks only the thread that issued the fork will exist. This has a +concrete impact both on how locks must be handled and on all stored state +in CPython's runtime. + +The fact that only the "current" thread remains +means any locks held by other threads will never be released. Python solves +this for :func:`os.fork` by acquiring the locks it uses internally before +the fork, and releasing them afterwards. In addition, it resets any +:ref:`lock-objects` in the child. When extending or embedding Python, there +is no way to inform Python of additional (non-Python) locks that need to be +acquired before or reset after a fork. OS facilities such as +:c:func:`pthread_atfork` would need to be used to accomplish the same thing. +Additionally, when extending or embedding Python, calling :c:func:`fork` +directly rather than through :func:`os.fork` (and returning to or calling +into Python) may result in a deadlock by one of Python's internal locks +being held by a thread that is defunct after the fork. +:c:func:`PyOS_AfterFork_Child` tries to reset the necessary locks, but is not +always able to. + +The fact that all other threads go away also means that CPython's +runtime state there must be cleaned up properly, which :func:`os.fork` +does. This means finalizing all other :c:type:`PyThreadState` objects +belonging to the current interpreter and all other +:c:type:`PyInterpreterState` objects. Due to this and the special +nature of the :ref:`"main" interpreter <sub-interpreter-support>`, +:c:func:`fork` should only be called in that interpreter's "main" +thread, where the CPython global runtime was originally initialized. +The only exception is if :c:func:`exec` will be called immediately +after. + + +High-level API +-------------- + +These are the most commonly used types and functions when writing C extension +code, or when embedding the Python interpreter: + +.. c:type:: PyInterpreterState + + This data structure represents the state shared by a number of cooperating + threads. Threads belonging to the same interpreter share their module + administration and a few other internal items. There are no public members in + this structure. + + Threads belonging to different interpreters initially share nothing, except + process state like available memory, open file descriptors and such. The global + interpreter lock is also shared by all threads, regardless of to which + interpreter they belong. + + +.. c:type:: PyThreadState + + This data structure represents the state of a single thread. The only public + data member is :attr:`interp` (:c:expr:`PyInterpreterState *`), which points to + this thread's interpreter state. + + +.. c:function:: void PyEval_InitThreads() + + .. index:: + single: PyEval_AcquireThread() + single: PyEval_ReleaseThread() + single: PyEval_SaveThread() + single: PyEval_RestoreThread() + + Deprecated function which does nothing. + + In Python 3.6 and older, this function created the GIL if it didn't exist. + + .. versionchanged:: 3.9 + The function now does nothing. + + .. versionchanged:: 3.7 + This function is now called by :c:func:`Py_Initialize()`, so you don't + have to call it yourself anymore. + + .. versionchanged:: 3.2 + This function cannot be called before :c:func:`Py_Initialize()` anymore. + + .. deprecated:: 3.9 + + .. index:: pair: module; _thread + + +.. c:function:: int PyEval_ThreadsInitialized() + + Returns a non-zero value if :c:func:`PyEval_InitThreads` has been called. This + function can be called without holding the GIL, and therefore can be used to + avoid calls to the locking API when running single-threaded. + + .. versionchanged:: 3.7 + The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`. + + .. deprecated:: 3.9 + + +.. c:function:: PyThreadState* PyEval_SaveThread() + + Release the global interpreter lock (if it has been created) and reset the + thread state to ``NULL``, returning the previous thread state (which is not + ``NULL``). If the lock has been created, the current thread must have + acquired it. + + +.. c:function:: void PyEval_RestoreThread(PyThreadState *tstate) + + Acquire the global interpreter lock (if it has been created) and set the + thread state to *tstate*, which must not be ``NULL``. If the lock has been + created, the current thread must not have acquired it, otherwise deadlock + ensues. + + .. note:: + Calling this function from a thread when the runtime is finalizing + will terminate the thread, even if the thread was not created by Python. + You can use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to + check if the interpreter is in process of being finalized before calling + this function to avoid unwanted termination. + +.. c:function:: PyThreadState* PyThreadState_Get() + + Return the current thread state. The global interpreter lock must be held. + When the current thread state is ``NULL``, this issues a fatal error (so that + the caller needn't check for ``NULL``). + + +.. c:function:: PyThreadState* PyThreadState_Swap(PyThreadState *tstate) + + Swap the current thread state with the thread state given by the argument + *tstate*, which may be ``NULL``. The global interpreter lock must be held + and is not released. + + +The following functions use thread-local storage, and are not compatible +with sub-interpreters: + +.. c:function:: PyGILState_STATE PyGILState_Ensure() + + Ensure that the current thread is ready to call the Python C API regardless + of the current state of Python, or of the global interpreter lock. This may + be called as many times as desired by a thread as long as each call is + matched with a call to :c:func:`PyGILState_Release`. In general, other + thread-related APIs may be used between :c:func:`PyGILState_Ensure` and + :c:func:`PyGILState_Release` calls as long as the thread state is restored to + its previous state before the Release(). For example, normal usage of the + :c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros is + acceptable. + + The return value is an opaque "handle" to the thread state when + :c:func:`PyGILState_Ensure` was called, and must be passed to + :c:func:`PyGILState_Release` to ensure Python is left in the same state. Even + though recursive calls are allowed, these handles *cannot* be shared - each + unique call to :c:func:`PyGILState_Ensure` must save the handle for its call + to :c:func:`PyGILState_Release`. + + When the function returns, the current thread will hold the GIL and be able + to call arbitrary Python code. Failure is a fatal error. + + .. note:: + Calling this function from a thread when the runtime is finalizing + will terminate the thread, even if the thread was not created by Python. + You can use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to + check if the interpreter is in process of being finalized before calling + this function to avoid unwanted termination. + +.. c:function:: void PyGILState_Release(PyGILState_STATE) + + Release any resources previously acquired. After this call, Python's state will + be the same as it was prior to the corresponding :c:func:`PyGILState_Ensure` call + (but generally this state will be unknown to the caller, hence the use of the + GILState API). + + Every call to :c:func:`PyGILState_Ensure` must be matched by a call to + :c:func:`PyGILState_Release` on the same thread. + + +.. c:function:: PyThreadState* PyGILState_GetThisThreadState() + + Get the current thread state for this thread. May return ``NULL`` if no + GILState API has been used on the current thread. Note that the main thread + always has such a thread-state, even if no auto-thread-state call has been + made on the main thread. This is mainly a helper/diagnostic function. + + +.. c:function:: int PyGILState_Check() + + Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. + This function can be called from any thread at any time. + Only if it has had its Python thread state initialized and currently is + holding the GIL will it return ``1``. + This is mainly a helper/diagnostic function. It can be useful + for example in callback contexts or memory allocation functions when + knowing that the GIL is locked can allow the caller to perform sensitive + actions or otherwise behave differently. + + .. versionadded:: 3.4 + + +The following macros are normally used without a trailing semicolon; look for +example usage in the Python source distribution. + + +.. c:macro:: Py_BEGIN_ALLOW_THREADS + + This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();``. + Note that it contains an opening brace; it must be matched with a following + :c:macro:`Py_END_ALLOW_THREADS` macro. See above for further discussion of this + macro. + + +.. c:macro:: Py_END_ALLOW_THREADS + + This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it contains + a closing brace; it must be matched with an earlier + :c:macro:`Py_BEGIN_ALLOW_THREADS` macro. See above for further discussion of + this macro. + + +.. c:macro:: Py_BLOCK_THREADS + + This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to + :c:macro:`Py_END_ALLOW_THREADS` without the closing brace. + + +.. c:macro:: Py_UNBLOCK_THREADS + + This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to + :c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable + declaration. + + +Low-level API +------------- + +All of the following functions must be called after :c:func:`Py_Initialize`. + +.. versionchanged:: 3.7 + :c:func:`Py_Initialize()` now initializes the :term:`GIL`. + + +.. c:function:: PyInterpreterState* PyInterpreterState_New() + + Create a new interpreter state object. The global interpreter lock need not + be held, but may be held if it is necessary to serialize calls to this + function. + + .. audit-event:: cpython.PyInterpreterState_New "" c.PyInterpreterState_New + + +.. c:function:: void PyInterpreterState_Clear(PyInterpreterState *interp) + + Reset all information in an interpreter state object. The global interpreter + lock must be held. + + .. audit-event:: cpython.PyInterpreterState_Clear "" c.PyInterpreterState_Clear + + +.. c:function:: void PyInterpreterState_Delete(PyInterpreterState *interp) + + Destroy an interpreter state object. The global interpreter lock need not be + held. The interpreter state must have been reset with a previous call to + :c:func:`PyInterpreterState_Clear`. + + +.. c:function:: PyThreadState* PyThreadState_New(PyInterpreterState *interp) + + Create a new thread state object belonging to the given interpreter object. + The global interpreter lock need not be held, but may be held if it is + necessary to serialize calls to this function. + + +.. c:function:: void PyThreadState_Clear(PyThreadState *tstate) + + Reset all information in a thread state object. The global interpreter lock + must be held. + + .. versionchanged:: 3.9 + This function now calls the :c:member:`PyThreadState.on_delete` callback. + Previously, that happened in :c:func:`PyThreadState_Delete`. + + +.. c:function:: void PyThreadState_Delete(PyThreadState *tstate) + + Destroy a thread state object. The global interpreter lock need not be held. + The thread state must have been reset with a previous call to + :c:func:`PyThreadState_Clear`. + + +.. c:function:: void PyThreadState_DeleteCurrent(void) + + Destroy the current thread state and release the global interpreter lock. + Like :c:func:`PyThreadState_Delete`, the global interpreter lock need not + be held. The thread state must have been reset with a previous call + to :c:func:`PyThreadState_Clear`. + + +.. c:function:: PyFrameObject* PyThreadState_GetFrame(PyThreadState *tstate) + + Get the current frame of the Python thread state *tstate*. + + Return a :term:`strong reference`. Return ``NULL`` if no frame is currently + executing. + + See also :c:func:`PyEval_GetFrame`. + + *tstate* must not be ``NULL``. + + .. versionadded:: 3.9 + + +.. c:function:: uint64_t PyThreadState_GetID(PyThreadState *tstate) + + Get the unique thread state identifier of the Python thread state *tstate*. + + *tstate* must not be ``NULL``. + + .. versionadded:: 3.9 + + +.. c:function:: PyInterpreterState* PyThreadState_GetInterpreter(PyThreadState *tstate) + + Get the interpreter of the Python thread state *tstate*. + + *tstate* must not be ``NULL``. + + .. versionadded:: 3.9 + + +.. c:function:: void PyThreadState_EnterTracing(PyThreadState *tstate) + + Suspend tracing and profiling in the Python thread state *tstate*. + + Resume them using the :c:func:`PyThreadState_LeaveTracing` function. + + .. versionadded:: 3.11 + + +.. c:function:: void PyThreadState_LeaveTracing(PyThreadState *tstate) + + Resume tracing and profiling in the Python thread state *tstate* suspended + by the :c:func:`PyThreadState_EnterTracing` function. + + See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` + functions. + + .. versionadded:: 3.11 + + +.. c:function:: PyInterpreterState* PyInterpreterState_Get(void) + + Get the current interpreter. + + Issue a fatal error if there no current Python thread state or no current + interpreter. It cannot return NULL. + + The caller must hold the GIL. + + .. versionadded:: 3.9 + + +.. c:function:: int64_t PyInterpreterState_GetID(PyInterpreterState *interp) + + Return the interpreter's unique ID. If there was any error in doing + so then ``-1`` is returned and an error is set. + + The caller must hold the GIL. + + .. versionadded:: 3.7 + + +.. c:function:: PyObject* PyInterpreterState_GetDict(PyInterpreterState *interp) + + Return a dictionary in which interpreter-specific data may be stored. + If this function returns ``NULL`` then no exception has been raised and + the caller should assume no interpreter-specific dict is available. + + This is not a replacement for :c:func:`PyModule_GetState()`, which + extensions should use to store interpreter-specific state information. + + .. versionadded:: 3.8 + +.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag) + + Type of a frame evaluation function. + + The *throwflag* parameter is used by the ``throw()`` method of generators: + if non-zero, handle the current exception. + + .. versionchanged:: 3.9 + The function now takes a *tstate* parameter. + + .. versionchanged:: 3.11 + The *frame* parameter changed from ``PyFrameObject*`` to ``_PyInterpreterFrame*``. + +.. c:function:: _PyFrameEvalFunction _PyInterpreterState_GetEvalFrameFunc(PyInterpreterState *interp) + + Get the frame evaluation function. + + See the :pep:`523` "Adding a frame evaluation API to CPython". + + .. versionadded:: 3.9 + +.. c:function:: void _PyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, _PyFrameEvalFunction eval_frame) + + Set the frame evaluation function. + + See the :pep:`523` "Adding a frame evaluation API to CPython". + + .. versionadded:: 3.9 + + +.. c:function:: PyObject* PyThreadState_GetDict() + + Return a dictionary in which extensions can store thread-specific state + information. Each extension should use a unique key to use to store state in + the dictionary. It is okay to call this function when no current thread state + is available. If this function returns ``NULL``, no exception has been raised and + the caller should assume no current thread state is available. + + +.. c:function:: int PyThreadState_SetAsyncExc(unsigned long id, PyObject *exc) + + Asynchronously raise an exception in a thread. The *id* argument is the thread + id of the target thread; *exc* is the exception object to be raised. This + function does not steal any references to *exc*. To prevent naive misuse, you + must write your own C extension to call this. Must be called with the GIL held. + Returns the number of thread states modified; this is normally one, but will be + zero if the thread id isn't found. If *exc* is :const:`NULL`, the pending + exception (if any) for the thread is cleared. This raises no exceptions. + + .. versionchanged:: 3.7 + The type of the *id* parameter changed from :c:expr:`long` to + :c:expr:`unsigned long`. + +.. c:function:: void PyEval_AcquireThread(PyThreadState *tstate) + + Acquire the global interpreter lock and set the current thread state to + *tstate*, which must not be ``NULL``. The lock must have been created earlier. + If this thread already has the lock, deadlock ensues. + + .. note:: + Calling this function from a thread when the runtime is finalizing + will terminate the thread, even if the thread was not created by Python. + You can use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to + check if the interpreter is in process of being finalized before calling + this function to avoid unwanted termination. + + .. versionchanged:: 3.8 + Updated to be consistent with :c:func:`PyEval_RestoreThread`, + :c:func:`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, + and terminate the current thread if called while the interpreter is finalizing. + + :c:func:`PyEval_RestoreThread` is a higher-level function which is always + available (even when threads have not been initialized). + + +.. c:function:: void PyEval_ReleaseThread(PyThreadState *tstate) + + Reset the current thread state to ``NULL`` and release the global interpreter + lock. The lock must have been created earlier and must be held by the current + thread. The *tstate* argument, which must not be ``NULL``, is only used to check + that it represents the current thread state --- if it isn't, a fatal error is + reported. + + :c:func:`PyEval_SaveThread` is a higher-level function which is always + available (even when threads have not been initialized). + + +.. c:function:: void PyEval_AcquireLock() + + Acquire the global interpreter lock. The lock must have been created earlier. + If this thread already has the lock, a deadlock ensues. + + .. deprecated:: 3.2 + This function does not update the current thread state. Please use + :c:func:`PyEval_RestoreThread` or :c:func:`PyEval_AcquireThread` + instead. + + .. note:: + Calling this function from a thread when the runtime is finalizing + will terminate the thread, even if the thread was not created by Python. + You can use :c:func:`_Py_IsFinalizing` or :func:`sys.is_finalizing` to + check if the interpreter is in process of being finalized before calling + this function to avoid unwanted termination. + + .. versionchanged:: 3.8 + Updated to be consistent with :c:func:`PyEval_RestoreThread`, + :c:func:`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, + and terminate the current thread if called while the interpreter is finalizing. + + +.. c:function:: void PyEval_ReleaseLock() + + Release the global interpreter lock. The lock must have been created earlier. + + .. deprecated:: 3.2 + This function does not update the current thread state. Please use + :c:func:`PyEval_SaveThread` or :c:func:`PyEval_ReleaseThread` + instead. + + +.. _sub-interpreter-support: + +Sub-interpreter support +======================= + +While in most uses, you will only embed a single Python interpreter, there +are cases where you need to create several independent interpreters in the +same process and perhaps even in the same thread. Sub-interpreters allow +you to do that. + +The "main" interpreter is the first one created when the runtime initializes. +It is usually the only Python interpreter in a process. Unlike sub-interpreters, +the main interpreter has unique process-global responsibilities like signal +handling. It is also responsible for execution during runtime initialization and +is usually the active interpreter during runtime finalization. The +:c:func:`PyInterpreterState_Main` function returns a pointer to its state. + +You can switch between sub-interpreters using the :c:func:`PyThreadState_Swap` +function. You can create and destroy them using the following functions: + + +.. c:function:: PyThreadState* Py_NewInterpreter() + + .. index:: + pair: module; builtins + pair: module; __main__ + pair: module; sys + single: stdout (in module sys) + single: stderr (in module sys) + single: stdin (in module sys) + + Create a new sub-interpreter. This is an (almost) totally separate environment + for the execution of Python code. In particular, the new interpreter has + separate, independent versions of all imported modules, including the + fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. The + table of loaded modules (``sys.modules``) and the module search path + (``sys.path``) are also separate. The new environment has no ``sys.argv`` + variable. It has new standard I/O stream file objects ``sys.stdin``, + ``sys.stdout`` and ``sys.stderr`` (however these refer to the same underlying + file descriptors). + + The return value points to the first thread state created in the new + sub-interpreter. This thread state is made in the current thread state. + Note that no actual thread is created; see the discussion of thread states + below. If creation of the new interpreter is unsuccessful, ``NULL`` is + returned; no exception is set since the exception state is stored in the + current thread state and there may not be a current thread state. (Like all + other Python/C API functions, the global interpreter lock must be held before + calling this function and is still held when it returns; however, unlike most + other Python/C API functions, there needn't be a current thread state on + entry.) + + .. index:: + single: Py_FinalizeEx() + single: Py_Initialize() + + Extension modules are shared between (sub-)interpreters as follows: + + * For modules using multi-phase initialization, + e.g. :c:func:`PyModule_FromDefAndSpec`, a separate module object is + created and initialized for each interpreter. + Only C-level static and global variables are shared between these + module objects. + + * For modules using single-phase initialization, + e.g. :c:func:`PyModule_Create`, the first time a particular extension + is imported, it is initialized normally, and a (shallow) copy of its + module's dictionary is squirreled away. + When the same extension is imported by another (sub-)interpreter, a new + module is initialized and filled with the contents of this copy; the + extension's ``init`` function is not called. + Objects in the module's dictionary thus end up shared across + (sub-)interpreters, which might cause unwanted behavior (see + `Bugs and caveats`_ below). + + Note that this is different from what happens when an extension is + imported after the interpreter has been completely re-initialized by + calling :c:func:`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that + case, the extension's ``initmodule`` function *is* called again. + As with multi-phase initialization, this means that only C-level static + and global variables are shared between these modules. + + .. index:: single: close() (in module os) + + +.. c:function:: void Py_EndInterpreter(PyThreadState *tstate) + + .. index:: single: Py_FinalizeEx() + + Destroy the (sub-)interpreter represented by the given thread state. The given + thread state must be the current thread state. See the discussion of thread + states below. When the call returns, the current thread state is ``NULL``. All + thread states associated with this interpreter are destroyed. (The global + interpreter lock must be held before calling this function and is still held + when it returns.) :c:func:`Py_FinalizeEx` will destroy all sub-interpreters that + haven't been explicitly destroyed at that point. + + +Bugs and caveats +---------------- + +Because sub-interpreters (and the main interpreter) are part of the same +process, the insulation between them isn't perfect --- for example, using +low-level file operations like :func:`os.close` they can +(accidentally or maliciously) affect each other's open files. Because of the +way extensions are shared between (sub-)interpreters, some extensions may not +work properly; this is especially likely when using single-phase initialization +or (static) global variables. +It is possible to insert objects created in one sub-interpreter into +a namespace of another (sub-)interpreter; this should be avoided if possible. + +Special care should be taken to avoid sharing user-defined functions, +methods, instances or classes between sub-interpreters, since import +operations executed by such objects may affect the wrong (sub-)interpreter's +dictionary of loaded modules. It is equally important to avoid sharing +objects from which the above are reachable. + +Also note that combining this functionality with ``PyGILState_*`` APIs +is delicate, because these APIs assume a bijection between Python thread states +and OS-level threads, an assumption broken by the presence of sub-interpreters. +It is highly recommended that you don't switch sub-interpreters between a pair +of matching :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls. +Furthermore, extensions (such as :mod:`ctypes`) using these APIs to allow calling +of Python code from non-Python created threads will probably be broken when using +sub-interpreters. + + +Asynchronous Notifications +========================== + +A mechanism is provided to make asynchronous notifications to the main +interpreter thread. These notifications take the form of a function +pointer and a void pointer argument. + + +.. c:function:: int Py_AddPendingCall(int (*func)(void *), void *arg) + + .. index:: single: Py_AddPendingCall() + + Schedule a function to be called from the main interpreter thread. On + success, ``0`` is returned and *func* is queued for being called in the + main thread. On failure, ``-1`` is returned without setting any exception. + + When successfully queued, *func* will be *eventually* called from the + main interpreter thread with the argument *arg*. It will be called + asynchronously with respect to normally running Python code, but with + both these conditions met: + + * on a :term:`bytecode` boundary; + * with the main thread holding the :term:`global interpreter lock` + (*func* can therefore use the full C API). + + *func* must return ``0`` on success, or ``-1`` on failure with an exception + set. *func* won't be interrupted to perform another asynchronous + notification recursively, but it can still be interrupted to switch + threads if the global interpreter lock is released. + + This function doesn't need a current thread state to run, and it doesn't + need the global interpreter lock. + + To call this function in a subinterpreter, the caller must hold the GIL. + Otherwise, the function *func* can be scheduled to be called from the wrong + interpreter. + + .. warning:: + This is a low-level function, only useful for very special cases. + There is no guarantee that *func* will be called as quick as + possible. If the main thread is busy executing a system call, + *func* won't be called before the system call returns. This + function is generally **not** suitable for calling Python code from + arbitrary C threads. Instead, use the :ref:`PyGILState API<gilstate>`. + + .. versionchanged:: 3.9 + If this function is called in a subinterpreter, the function *func* is + now scheduled to be called from the subinterpreter, rather than being + called from the main interpreter. Each subinterpreter now has its own + list of scheduled calls. + + .. versionadded:: 3.1 + +.. _profiling: + +Profiling and Tracing +===================== + +.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> + + +The Python interpreter provides some low-level support for attaching profiling +and execution tracing facilities. These are used for profiling, debugging, and +coverage analysis tools. + +This C interface allows the profiling or tracing code to avoid the overhead of +calling through Python-level callable objects, making a direct C function call +instead. The essential attributes of the facility have not changed; the +interface allows trace functions to be installed per-thread, and the basic +events reported to the trace function are the same as had been reported to the +Python-level trace functions in previous versions. + + +.. c:type:: int (*Py_tracefunc)(PyObject *obj, PyFrameObject *frame, int what, PyObject *arg) + + The type of the trace function registered using :c:func:`PyEval_SetProfile` and + :c:func:`PyEval_SetTrace`. The first parameter is the object passed to the + registration function as *obj*, *frame* is the frame object to which the event + pertains, *what* is one of the constants :const:`PyTrace_CALL`, + :const:`PyTrace_EXCEPTION`, :const:`PyTrace_LINE`, :const:`PyTrace_RETURN`, + :const:`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, :const:`PyTrace_C_RETURN`, + or :const:`PyTrace_OPCODE`, and *arg* depends on the value of *what*: + + +------------------------------+----------------------------------------+ + | Value of *what* | Meaning of *arg* | + +==============================+========================================+ + | :const:`PyTrace_CALL` | Always :c:data:`Py_None`. | + +------------------------------+----------------------------------------+ + | :const:`PyTrace_EXCEPTION` | Exception information as returned by | + | | :func:`sys.exc_info`. | + +------------------------------+----------------------------------------+ + | :const:`PyTrace_LINE` | Always :c:data:`Py_None`. | + +------------------------------+----------------------------------------+ + | :const:`PyTrace_RETURN` | Value being returned to the caller, | + | | or ``NULL`` if caused by an exception. | + +------------------------------+----------------------------------------+ + | :const:`PyTrace_C_CALL` | Function object being called. | + +------------------------------+----------------------------------------+ + | :const:`PyTrace_C_EXCEPTION` | Function object being called. | + +------------------------------+----------------------------------------+ + | :const:`PyTrace_C_RETURN` | Function object being called. | + +------------------------------+----------------------------------------+ + | :const:`PyTrace_OPCODE` | Always :c:data:`Py_None`. | + +------------------------------+----------------------------------------+ + +.. c:var:: int PyTrace_CALL + + The value of the *what* parameter to a :c:type:`Py_tracefunc` function when a new + call to a function or method is being reported, or a new entry into a generator. + Note that the creation of the iterator for a generator function is not reported + as there is no control transfer to the Python bytecode in the corresponding + frame. + + +.. c:var:: int PyTrace_EXCEPTION + + The value of the *what* parameter to a :c:type:`Py_tracefunc` function when an + exception has been raised. The callback function is called with this value for + *what* when after any bytecode is processed after which the exception becomes + set within the frame being executed. The effect of this is that as exception + propagation causes the Python stack to unwind, the callback is called upon + return to each frame as the exception propagates. Only trace functions receives + these events; they are not needed by the profiler. + + +.. c:var:: int PyTrace_LINE + + The value passed as the *what* parameter to a :c:type:`Py_tracefunc` function + (but not a profiling function) when a line-number event is being reported. + It may be disabled for a frame by setting :attr:`f_trace_lines` to *0* on that frame. + + +.. c:var:: int PyTrace_RETURN + + The value for the *what* parameter to :c:type:`Py_tracefunc` functions when a + call is about to return. + + +.. c:var:: int PyTrace_C_CALL + + The value for the *what* parameter to :c:type:`Py_tracefunc` functions when a C + function is about to be called. + + +.. c:var:: int PyTrace_C_EXCEPTION + + The value for the *what* parameter to :c:type:`Py_tracefunc` functions when a C + function has raised an exception. + + +.. c:var:: int PyTrace_C_RETURN + + The value for the *what* parameter to :c:type:`Py_tracefunc` functions when a C + function has returned. + + +.. c:var:: int PyTrace_OPCODE + + The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but not + profiling functions) when a new opcode is about to be executed. This event is + not emitted by default: it must be explicitly requested by setting + :attr:`f_trace_opcodes` to *1* on the frame. + + +.. c:function:: void PyEval_SetProfile(Py_tracefunc func, PyObject *obj) + + Set the profiler function to *func*. The *obj* parameter is passed to the + function as its first parameter, and may be any Python object, or ``NULL``. If + the profile function needs to maintain state, using a different value for *obj* + for each thread provides a convenient and thread-safe place to store it. The + profile function is called for all monitored events except :const:`PyTrace_LINE` + :const:`PyTrace_OPCODE` and :const:`PyTrace_EXCEPTION`. + + See also the :func:`sys.setprofile` function. + + The caller must hold the :term:`GIL`. + + +.. c:function:: void PyEval_SetTrace(Py_tracefunc func, PyObject *obj) + + Set the tracing function to *func*. This is similar to + :c:func:`PyEval_SetProfile`, except the tracing function does receive line-number + events and per-opcode events, but does not receive any event related to C function + objects being called. Any trace function registered using :c:func:`PyEval_SetTrace` + will not receive :const:`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION` or + :const:`PyTrace_C_RETURN` as a value for the *what* parameter. + + See also the :func:`sys.settrace` function. + + The caller must hold the :term:`GIL`. + + +.. _advanced-debugging: + +Advanced Debugger Support +========================= + +.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> + + +These functions are only intended to be used by advanced debugging tools. + + +.. c:function:: PyInterpreterState* PyInterpreterState_Head() + + Return the interpreter state object at the head of the list of all such objects. + + +.. c:function:: PyInterpreterState* PyInterpreterState_Main() + + Return the main interpreter state object. + + +.. c:function:: PyInterpreterState* PyInterpreterState_Next(PyInterpreterState *interp) + + Return the next interpreter state object after *interp* from the list of all + such objects. + + +.. c:function:: PyThreadState * PyInterpreterState_ThreadHead(PyInterpreterState *interp) + + Return the pointer to the first :c:type:`PyThreadState` object in the list of + threads associated with the interpreter *interp*. + + +.. c:function:: PyThreadState* PyThreadState_Next(PyThreadState *tstate) + + Return the next thread state object after *tstate* from the list of all such + objects belonging to the same :c:type:`PyInterpreterState` object. + + +.. _thread-local-storage: + +Thread Local Storage Support +============================ + +.. sectionauthor:: Masayuki Yamamoto <ma3yuki.8mamo10@gmail.com> + +The Python interpreter provides low-level support for thread-local storage +(TLS) which wraps the underlying native TLS implementation to support the +Python-level thread local storage API (:class:`threading.local`). The +CPython C level APIs are similar to those offered by pthreads and Windows: +use a thread key and functions to associate a :c:expr:`void*` value per +thread. + +The GIL does *not* need to be held when calling these functions; they supply +their own locking. + +Note that :file:`Python.h` does not include the declaration of the TLS APIs, +you need to include :file:`pythread.h` to use thread-local storage. + +.. note:: + None of these API functions handle memory management on behalf of the + :c:expr:`void*` values. You need to allocate and deallocate them yourself. + If the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, these + functions don't do refcount operations on them either. + +.. _thread-specific-storage-api: + +Thread Specific Storage (TSS) API +--------------------------------- + +TSS API is introduced to supersede the use of the existing TLS API within the +CPython interpreter. This API uses a new type :c:type:`Py_tss_t` instead of +:c:expr:`int` to represent thread keys. + +.. versionadded:: 3.7 + +.. seealso:: "A New C-API for Thread-Local Storage in CPython" (:pep:`539`) + + +.. c:type:: Py_tss_t + + This data structure represents the state of a thread key, the definition of + which may depend on the underlying TLS implementation, and it has an + internal field representing the key's initialization state. There are no + public members in this structure. + + When :ref:`Py_LIMITED_API <stable>` is not defined, static allocation of + this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed. + + +.. c:macro:: Py_tss_NEEDS_INIT + + This macro expands to the initializer for :c:type:`Py_tss_t` variables. + Note that this macro won't be defined with :ref:`Py_LIMITED_API <stable>`. + + +Dynamic Allocation +~~~~~~~~~~~~~~~~~~ + +Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules +built with :ref:`Py_LIMITED_API <stable>`, where static allocation of this type +is not possible due to its implementation being opaque at build time. + + +.. c:function:: Py_tss_t* PyThread_tss_alloc() + + Return a value which is the same state as a value initialized with + :c:macro:`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation + failure. + + +.. c:function:: void PyThread_tss_free(Py_tss_t *key) + + Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after + first calling :c:func:`PyThread_tss_delete` to ensure any associated + thread locals have been unassigned. This is a no-op if the *key* + argument is ``NULL``. + + .. note:: + A freed key becomes a dangling pointer. You should reset the key to + ``NULL``. + + +Methods +~~~~~~~ + +The parameter *key* of these functions must not be ``NULL``. Moreover, the +behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are +undefined if the given :c:type:`Py_tss_t` has not been initialized by +:c:func:`PyThread_tss_create`. + + +.. c:function:: int PyThread_tss_is_created(Py_tss_t *key) + + Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized + by :c:func:`PyThread_tss_create`. + + +.. c:function:: int PyThread_tss_create(Py_tss_t *key) + + Return a zero value on successful initialization of a TSS key. The behavior + is undefined if the value pointed to by the *key* argument is not + initialized by :c:macro:`Py_tss_NEEDS_INIT`. This function can be called + repeatedly on the same key -- calling it on an already initialized key is a + no-op and immediately returns success. + + +.. c:function:: void PyThread_tss_delete(Py_tss_t *key) + + Destroy a TSS key to forget the values associated with the key across all + threads, and change the key's initialization state to uninitialized. A + destroyed key is able to be initialized again by + :c:func:`PyThread_tss_create`. This function can be called repeatedly on + the same key -- calling it on an already destroyed key is a no-op. + + +.. c:function:: int PyThread_tss_set(Py_tss_t *key, void *value) + + Return a zero value to indicate successfully associating a :c:expr:`void*` + value with a TSS key in the current thread. Each thread has a distinct + mapping of the key to a :c:expr:`void*` value. + + +.. c:function:: void* PyThread_tss_get(Py_tss_t *key) + + Return the :c:expr:`void*` value associated with a TSS key in the current + thread. This returns ``NULL`` if no value is associated with the key in the + current thread. + + +.. _thread-local-storage-api: + +Thread Local Storage (TLS) API +------------------------------ + +.. deprecated:: 3.7 + This API is superseded by + :ref:`Thread Specific Storage (TSS) API <thread-specific-storage-api>`. + +.. note:: + This version of the API does not support platforms where the native TLS key + is defined in a way that cannot be safely cast to ``int``. On such platforms, + :c:func:`PyThread_create_key` will return immediately with a failure status, + and the other TLS functions will all be no-ops on such platforms. + +Due to the compatibility problem noted above, this version of the API should not +be used in new code. + +.. c:function:: int PyThread_create_key() +.. c:function:: void PyThread_delete_key(int key) +.. c:function:: int PyThread_set_key_value(int key, void *value) +.. c:function:: void* PyThread_get_key_value(int key) +.. c:function:: void PyThread_delete_key_value(int key) +.. c:function:: void PyThread_ReInitTLS() +
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst new file mode 100644 index 0000000..24d6620 --- /dev/null +++ b/Doc/c-api/init_config.rst
@@ -0,0 +1,1593 @@ +.. highlight:: c + +.. _init-config: + +*********************************** +Python Initialization Configuration +*********************************** + +.. versionadded:: 3.8 + +Python can be initialized with :c:func:`Py_InitializeFromConfig` and the +:c:type:`PyConfig` structure. It can be preinitialized with +:c:func:`Py_PreInitialize` and the :c:type:`PyPreConfig` structure. + +There are two kinds of configuration: + +* The :ref:`Python Configuration <init-python-config>` can be used to build a + customized Python which behaves as the regular Python. For example, + environment variables and command line arguments are used to configure + Python. + +* The :ref:`Isolated Configuration <init-isolated-conf>` can be used to embed + Python into an application. It isolates Python from the system. For example, + environment variables are ignored, the LC_CTYPE locale is left unchanged and + no signal handler is registered. + +The :c:func:`Py_RunMain` function can be used to write a customized Python +program. + +See also :ref:`Initialization, Finalization, and Threads <initialization>`. + +.. seealso:: + :pep:`587` "Python Initialization Configuration". + + +Example +======= + +Example of customized Python always running in isolated mode:: + + int main(int argc, char **argv) + { + PyStatus status; + + PyConfig config; + PyConfig_InitPythonConfig(&config); + config.isolated = 1; + + /* Decode command line arguments. + Implicitly preinitialize Python (in isolated mode). */ + status = PyConfig_SetBytesArgv(&config, argc, argv); + if (PyStatus_Exception(status)) { + goto exception; + } + + status = Py_InitializeFromConfig(&config); + if (PyStatus_Exception(status)) { + goto exception; + } + PyConfig_Clear(&config); + + return Py_RunMain(); + + exception: + PyConfig_Clear(&config); + if (PyStatus_IsExit(status)) { + return status.exitcode; + } + /* Display the error message and exit the process with + non-zero exit code */ + Py_ExitStatusException(status); + } + + +PyWideStringList +================ + +.. c:type:: PyWideStringList + + List of ``wchar_t*`` strings. + + If *length* is non-zero, *items* must be non-``NULL`` and all strings must be + non-``NULL``. + + Methods: + + .. c:function:: PyStatus PyWideStringList_Append(PyWideStringList *list, const wchar_t *item) + + Append *item* to *list*. + + Python must be preinitialized to call this function. + + .. c:function:: PyStatus PyWideStringList_Insert(PyWideStringList *list, Py_ssize_t index, const wchar_t *item) + + Insert *item* into *list* at *index*. + + If *index* is greater than or equal to *list* length, append *item* to + *list*. + + *index* must be greater than or equal to ``0``. + + Python must be preinitialized to call this function. + + Structure fields: + + .. c:member:: Py_ssize_t length + + List length. + + .. c:member:: wchar_t** items + + List items. + +PyStatus +======== + +.. c:type:: PyStatus + + Structure to store an initialization function status: success, error + or exit. + + For an error, it can store the C function name which created the error. + + Structure fields: + + .. c:member:: int exitcode + + Exit code. Argument passed to ``exit()``. + + .. c:member:: const char *err_msg + + Error message. + + .. c:member:: const char *func + + Name of the function which created an error, can be ``NULL``. + + Functions to create a status: + + .. c:function:: PyStatus PyStatus_Ok(void) + + Success. + + .. c:function:: PyStatus PyStatus_Error(const char *err_msg) + + Initialization error with a message. + + *err_msg* must not be ``NULL``. + + .. c:function:: PyStatus PyStatus_NoMemory(void) + + Memory allocation failure (out of memory). + + .. c:function:: PyStatus PyStatus_Exit(int exitcode) + + Exit Python with the specified exit code. + + Functions to handle a status: + + .. c:function:: int PyStatus_Exception(PyStatus status) + + Is the status an error or an exit? If true, the exception must be + handled; by calling :c:func:`Py_ExitStatusException` for example. + + .. c:function:: int PyStatus_IsError(PyStatus status) + + Is the result an error? + + .. c:function:: int PyStatus_IsExit(PyStatus status) + + Is the result an exit? + + .. c:function:: void Py_ExitStatusException(PyStatus status) + + Call ``exit(exitcode)`` if *status* is an exit. Print the error + message and exit with a non-zero exit code if *status* is an error. Must + only be called if ``PyStatus_Exception(status)`` is non-zero. + +.. note:: + Internally, Python uses macros which set ``PyStatus.func``, + whereas functions to create a status set ``func`` to ``NULL``. + +Example:: + + PyStatus alloc(void **ptr, size_t size) + { + *ptr = PyMem_RawMalloc(size); + if (*ptr == NULL) { + return PyStatus_NoMemory(); + } + return PyStatus_Ok(); + } + + int main(int argc, char **argv) + { + void *ptr; + PyStatus status = alloc(&ptr, 16); + if (PyStatus_Exception(status)) { + Py_ExitStatusException(status); + } + PyMem_Free(ptr); + return 0; + } + + +PyPreConfig +=========== + +.. c:type:: PyPreConfig + + Structure used to preinitialize Python. + + Function to initialize a preconfiguration: + + .. c:function:: void PyPreConfig_InitPythonConfig(PyPreConfig *preconfig) + + Initialize the preconfiguration with :ref:`Python Configuration + <init-python-config>`. + + .. c:function:: void PyPreConfig_InitIsolatedConfig(PyPreConfig *preconfig) + + Initialize the preconfiguration with :ref:`Isolated Configuration + <init-isolated-conf>`. + + Structure fields: + + .. c:member:: int allocator + + Name of the Python memory allocators: + + * ``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators + (use defaults). + * ``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators + <default-memory-allocators>`. + * ``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators + <default-memory-allocators>` with :ref:`debug hooks + <pymem-debug-hooks>`. + * ``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library. + * ``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of + ``malloc()`` with :ref:`debug hooks <pymem-debug-hooks>`. + * ``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory + allocator <pymalloc>`. + * ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc + memory allocator <pymalloc>` with :ref:`debug hooks + <pymem-debug-hooks>`. + + ``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are + not supported if Python is :option:`configured using --without-pymalloc + <--without-pymalloc>`. + + See :ref:`Memory Management <memory>`. + + Default: ``PYMEM_ALLOCATOR_NOT_SET``. + + .. c:member:: int configure_locale + + Set the LC_CTYPE locale to the user preferred locale. + + If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` and + :c:member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``. + + See the :term:`locale encoding`. + + Default: ``1`` in Python config, ``0`` in isolated config. + + .. c:member:: int coerce_c_locale + + If equals to ``2``, coerce the C locale. + + If equals to ``1``, read the LC_CTYPE locale to decide if it should be + coerced. + + See the :term:`locale encoding`. + + Default: ``-1`` in Python config, ``0`` in isolated config. + + .. c:member:: int coerce_c_locale_warn + + If non-zero, emit a warning if the C locale is coerced. + + Default: ``-1`` in Python config, ``0`` in isolated config. + + .. c:member:: int dev_mode + + :ref:`Python Development Mode <devmode>`: see + :c:member:`PyConfig.dev_mode`. + + Default: ``-1`` in Python mode, ``0`` in isolated mode. + + .. c:member:: int isolated + + Isolated mode: see :c:member:`PyConfig.isolated`. + + Default: ``0`` in Python mode, ``1`` in isolated mode. + + .. c:member:: int legacy_windows_fs_encoding + + If non-zero: + + * Set :c:member:`PyPreConfig.utf8_mode` to ``0``, + * Set :c:member:`PyConfig.filesystem_encoding` to ``"mbcs"``, + * Set :c:member:`PyConfig.filesystem_errors` to ``"replace"``. + + Initialized the from :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment + variable value. + + Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for + Windows specific code. + + Default: ``0``. + + .. c:member:: int parse_argv + + If non-zero, :c:func:`Py_PreInitializeFromArgs` and + :c:func:`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the + same way the regular Python parses command line arguments: see + :ref:`Command Line Arguments <using-on-cmdline>`. + + Default: ``1`` in Python config, ``0`` in isolated config. + + .. c:member:: int use_environment + + Use :ref:`environment variables <using-on-envvars>`? See + :c:member:`PyConfig.use_environment`. + + Default: ``1`` in Python config and ``0`` in isolated config. + + .. c:member:: int utf8_mode + + If non-zero, enable the :ref:`Python UTF-8 Mode <utf8-mode>`. + + Set to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option + and the :envvar:`PYTHONUTF8` environment variable. + + Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``. + + Default: ``-1`` in Python config and ``0`` in isolated config. + + +.. _c-preinit: + +Preinitialize Python with PyPreConfig +===================================== + +The preinitialization of Python: + +* Set the Python memory allocators (:c:member:`PyPreConfig.allocator`) +* Configure the LC_CTYPE locale (:term:`locale encoding`) +* Set the :ref:`Python UTF-8 Mode <utf8-mode>` + (:c:member:`PyPreConfig.utf8_mode`) + +The current preconfiguration (``PyPreConfig`` type) is stored in +``_PyRuntime.preconfig``. + +Functions to preinitialize Python: + +.. c:function:: PyStatus Py_PreInitialize(const PyPreConfig *preconfig) + + Preinitialize Python from *preconfig* preconfiguration. + + *preconfig* must not be ``NULL``. + +.. c:function:: PyStatus Py_PreInitializeFromBytesArgs(const PyPreConfig *preconfig, int argc, char * const *argv) + + Preinitialize Python from *preconfig* preconfiguration. + + Parse *argv* command line arguments (bytes strings) if + :c:member:`~PyPreConfig.parse_argv` of *preconfig* is non-zero. + + *preconfig* must not be ``NULL``. + +.. c:function:: PyStatus Py_PreInitializeFromArgs(const PyPreConfig *preconfig, int argc, wchar_t * const * argv) + + Preinitialize Python from *preconfig* preconfiguration. + + Parse *argv* command line arguments (wide strings) if + :c:member:`~PyPreConfig.parse_argv` of *preconfig* is non-zero. + + *preconfig* must not be ``NULL``. + +The caller is responsible to handle exceptions (error or exit) using +:c:func:`PyStatus_Exception` and :c:func:`Py_ExitStatusException`. + +For :ref:`Python Configuration <init-python-config>` +(:c:func:`PyPreConfig_InitPythonConfig`), if Python is initialized with +command line arguments, the command line arguments must also be passed to +preinitialize Python, since they have an effect on the pre-configuration +like encodings. For example, the :option:`-X utf8 <-X>` command line option +enables the :ref:`Python UTF-8 Mode <utf8-mode>`. + +``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and +before :c:func:`Py_InitializeFromConfig` to install a custom memory allocator. +It can be called before :c:func:`Py_PreInitialize` if +:c:member:`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``. + +Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not be +used before the Python preinitialization, whereas calling directly ``malloc()`` +and ``free()`` is always safe. :c:func:`Py_DecodeLocale` must not be called +before the Python preinitialization. + +Example using the preinitialization to enable +the :ref:`Python UTF-8 Mode <utf8-mode>`:: + + PyStatus status; + PyPreConfig preconfig; + PyPreConfig_InitPythonConfig(&preconfig); + + preconfig.utf8_mode = 1; + + status = Py_PreInitialize(&preconfig); + if (PyStatus_Exception(status)) { + Py_ExitStatusException(status); + } + + /* at this point, Python speaks UTF-8 */ + + Py_Initialize(); + /* ... use Python API here ... */ + Py_Finalize(); + + +PyConfig +======== + +.. c:type:: PyConfig + + Structure containing most parameters to configure Python. + + When done, the :c:func:`PyConfig_Clear` function must be used to release the + configuration memory. + + Structure methods: + + .. c:function:: void PyConfig_InitPythonConfig(PyConfig *config) + + Initialize configuration with the :ref:`Python Configuration + <init-python-config>`. + + .. c:function:: void PyConfig_InitIsolatedConfig(PyConfig *config) + + Initialize configuration with the :ref:`Isolated Configuration + <init-isolated-conf>`. + + .. c:function:: PyStatus PyConfig_SetString(PyConfig *config, wchar_t * const *config_str, const wchar_t *str) + + Copy the wide character string *str* into ``*config_str``. + + :ref:`Preinitialize Python <c-preinit>` if needed. + + .. c:function:: PyStatus PyConfig_SetBytesString(PyConfig *config, wchar_t * const *config_str, const char *str) + + Decode *str* using :c:func:`Py_DecodeLocale` and set the result into + ``*config_str``. + + :ref:`Preinitialize Python <c-preinit>` if needed. + + .. c:function:: PyStatus PyConfig_SetArgv(PyConfig *config, int argc, wchar_t * const *argv) + + Set command line arguments (:c:member:`~PyConfig.argv` member of + *config*) from the *argv* list of wide character strings. + + :ref:`Preinitialize Python <c-preinit>` if needed. + + .. c:function:: PyStatus PyConfig_SetBytesArgv(PyConfig *config, int argc, char * const *argv) + + Set command line arguments (:c:member:`~PyConfig.argv` member of + *config*) from the *argv* list of bytes strings. Decode bytes using + :c:func:`Py_DecodeLocale`. + + :ref:`Preinitialize Python <c-preinit>` if needed. + + .. c:function:: PyStatus PyConfig_SetWideStringList(PyConfig *config, PyWideStringList *list, Py_ssize_t length, wchar_t **items) + + Set the list of wide strings *list* to *length* and *items*. + + :ref:`Preinitialize Python <c-preinit>` if needed. + + .. c:function:: PyStatus PyConfig_Read(PyConfig *config) + + Read all Python configuration. + + Fields which are already initialized are left unchanged. + + Fields for :ref:`path configuration <init-path-config>` are no longer + calculated or modified when calling this function, as of Python 3.11. + + The :c:func:`PyConfig_Read` function only parses + :c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv` + is set to ``2`` after arguments are parsed. Since Python arguments are + strippped from :c:member:`PyConfig.argv`, parsing arguments twice would + parse the application options as Python options. + + :ref:`Preinitialize Python <c-preinit>` if needed. + + .. versionchanged:: 3.10 + The :c:member:`PyConfig.argv` arguments are now only parsed once, + :c:member:`PyConfig.parse_argv` is set to ``2`` after arguments are + parsed, and arguments are only parsed if + :c:member:`PyConfig.parse_argv` equals ``1``. + + .. versionchanged:: 3.11 + :c:func:`PyConfig_Read` no longer calculates all paths, and so fields + listed under :ref:`Python Path Configuration <init-path-config>` may + no longer be updated until :c:func:`Py_InitializeFromConfig` is + called. + + .. c:function:: void PyConfig_Clear(PyConfig *config) + + Release configuration memory. + + Most ``PyConfig`` methods :ref:`preinitialize Python <c-preinit>` if needed. + In that case, the Python preinitialization configuration + (:c:type:`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration + fields which are in common with :c:type:`PyPreConfig` are tuned, they must + be set before calling a :c:type:`PyConfig` method: + + * :c:member:`PyConfig.dev_mode` + * :c:member:`PyConfig.isolated` + * :c:member:`PyConfig.parse_argv` + * :c:member:`PyConfig.use_environment` + + Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` + is used, this method must be called before other methods, since the + preinitialization configuration depends on command line arguments (if + :c:member:`parse_argv` is non-zero). + + The caller of these methods is responsible to handle exceptions (error or + exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``. + + Structure fields: + + .. c:member:: PyWideStringList argv + + Command line arguments: :data:`sys.argv`. + + Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse + :c:member:`~PyConfig.argv` the same way the regular Python parses Python + command line arguments and then to strip Python arguments from + :c:member:`~PyConfig.argv`. + + If :c:member:`~PyConfig.argv` is empty, an empty string is added to + ensure that :data:`sys.argv` always exists and is never empty. + + Default: ``NULL``. + + See also the :c:member:`~PyConfig.orig_argv` member. + + .. c:member:: int safe_path + + If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to + :data:`sys.path` at startup: + + * If :c:member:`argv[0] <PyConfig.argv>` is equal to ``L"-m"`` + (``python -m module``), prepend the current working directory. + * If running a script (``python script.py``), prepend the script's + directory. If it's a symbolic link, resolve symbolic links. + * Otherwise (``python -c code`` and ``python``), prepend an empty string, + which means the current working directory. + + Set to ``1`` by the :option:`-P` command line option and the + :envvar:`PYTHONSAFEPATH` environment variable. + + Default: ``0`` in Python config, ``1`` in isolated config. + + .. versionadded:: 3.11 + + .. c:member:: wchar_t* base_exec_prefix + + :data:`sys.base_exec_prefix`. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` output. + + .. c:member:: wchar_t* base_executable + + Python base executable: :data:`sys._base_executable`. + + Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable. + + Set from :c:member:`PyConfig.executable` if ``NULL``. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` output. + + .. c:member:: wchar_t* base_prefix + + :data:`sys.base_prefix`. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` output. + + .. c:member:: int buffered_stdio + + If equals to ``0`` and :c:member:`~PyConfig.configure_c_stdio` is non-zero, + disable buffering on the C streams stdout and stderr. + + Set to ``0`` by the :option:`-u` command line option and the + :envvar:`PYTHONUNBUFFERED` environment variable. + + stdin is always opened in buffered mode. + + Default: ``1``. + + .. c:member:: int bytes_warning + + If equals to ``1``, issue a warning when comparing :class:`bytes` or + :class:`bytearray` with :class:`str`, or comparing :class:`bytes` with + :class:`int`. + + If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these + cases. + + Incremented by the :option:`-b` command line option. + + Default: ``0``. + + .. c:member:: int warn_default_encoding + + If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io.TextIOWrapper` + uses its default encoding. See :ref:`io-encoding-warning` for details. + + Default: ``0``. + + .. versionadded:: 3.10 + + .. c:member:: int code_debug_ranges + + If equals to ``0``, disables the inclusion of the end line and column + mappings in code objects. Also disables traceback printing carets to + specific error locations. + + Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable + and by the :option:`-X no_debug_ranges <-X>` command line option. + + Default: ``1``. + + .. versionadded:: 3.11 + + .. c:member:: wchar_t* check_hash_pycs_mode + + Control the validation behavior of hash-based ``.pyc`` files: + value of the :option:`--check-hash-based-pycs` command line option. + + Valid values: + + - ``L"always"``: Hash the source file for invalidation regardless of + value of the 'check_source' flag. + - ``L"never"``: Assume that hash-based pycs always are valid. + - ``L"default"``: The 'check_source' flag in hash-based pycs + determines invalidation. + + Default: ``L"default"``. + + See also :pep:`552` "Deterministic pycs". + + .. c:member:: int configure_c_stdio + + If non-zero, configure C standard streams: + + * On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and + stderr. + * If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering + of stdin, stdout and stderr streams. + * If :c:member:`~PyConfig.interactive` is non-zero, enable stream + buffering on stdin and stdout (only stdout on Windows). + + Default: ``1`` in Python config, ``0`` in isolated config. + + .. c:member:: int dev_mode + + If non-zero, enable the :ref:`Python Development Mode <devmode>`. + + Set to ``1`` by the :option:`-X dev <-X>` option and the + :envvar:`PYTHONDEVMODE` environment variable. + + Default: ``-1`` in Python mode, ``0`` in isolated mode. + + .. c:member:: int dump_refs + + Dump Python references? + + If non-zero, dump all objects which are still alive at exit. + + Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable. + + Need a special build of Python with the ``Py_TRACE_REFS`` macro defined: + see the :option:`configure --with-trace-refs option <--with-trace-refs>`. + + Default: ``0``. + + .. c:member:: wchar_t* exec_prefix + + The site-specific directory prefix where the platform-dependent Python + files are installed: :data:`sys.exec_prefix`. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` output. + + .. c:member:: wchar_t* executable + + The absolute path of the executable binary for the Python interpreter: + :data:`sys.executable`. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` output. + + .. c:member:: int faulthandler + + Enable faulthandler? + + If non-zero, call :func:`faulthandler.enable` at startup. + + Set to ``1`` by :option:`-X faulthandler <-X>` and the + :envvar:`PYTHONFAULTHANDLER` environment variable. + + Default: ``-1`` in Python mode, ``0`` in isolated mode. + + .. c:member:: wchar_t* filesystem_encoding + + :term:`Filesystem encoding <filesystem encoding and error handler>`: + :func:`sys.getfilesystemencoding`. + + On macOS, Android and VxWorks: use ``"utf-8"`` by default. + + On Windows: use ``"utf-8"`` by default, or ``"mbcs"`` if + :c:member:`~PyPreConfig.legacy_windows_fs_encoding` of + :c:type:`PyPreConfig` is non-zero. + + Default encoding on other platforms: + + * ``"utf-8"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero. + * ``"ascii"`` if Python detects that ``nl_langinfo(CODESET)`` announces + the ASCII encoding, whereas the ``mbstowcs()`` function + decodes from a different encoding (usually Latin1). + * ``"utf-8"`` if ``nl_langinfo(CODESET)`` returns an empty string. + * Otherwise, use the :term:`locale encoding`: + ``nl_langinfo(CODESET)`` result. + + At Python startup, the encoding name is normalized to the Python codec + name. For example, ``"ANSI_X3.4-1968"`` is replaced with ``"ascii"``. + + See also the :c:member:`~PyConfig.filesystem_errors` member. + + .. c:member:: wchar_t* filesystem_errors + + :term:`Filesystem error handler <filesystem encoding and error handler>`: + :func:`sys.getfilesystemencodeerrors`. + + On Windows: use ``"surrogatepass"`` by default, or ``"replace"`` if + :c:member:`~PyPreConfig.legacy_windows_fs_encoding` of + :c:type:`PyPreConfig` is non-zero. + + On other platforms: use ``"surrogateescape"`` by default. + + Supported error handlers: + + * ``"strict"`` + * ``"surrogateescape"`` + * ``"surrogatepass"`` (only supported with the UTF-8 encoding) + + See also the :c:member:`~PyConfig.filesystem_encoding` member. + + .. c:member:: unsigned long hash_seed + .. c:member:: int use_hash_seed + + Randomized hash function seed. + + If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly + at Python startup, and :c:member:`~PyConfig.hash_seed` is ignored. + + Set by the :envvar:`PYTHONHASHSEED` environment variable. + + Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated + mode. + + .. c:member:: wchar_t* home + + Python home directory. + + If :c:func:`Py_SetPythonHome` has been called, use its argument if it is + not ``NULL``. + + Set by the :envvar:`PYTHONHOME` environment variable. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` input. + + .. c:member:: int import_time + + If non-zero, profile import time. + + Set the ``1`` by the :option:`-X importtime <-X>` option and the + :envvar:`PYTHONPROFILEIMPORTTIME` environment variable. + + Default: ``0``. + + .. c:member:: int inspect + + Enter interactive mode after executing a script or a command. + + 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 :data:`sys.stdin` does not appear to + be a terminal. + + Incremented by the :option:`-i` command line option. Set to ``1`` if the + :envvar:`PYTHONINSPECT` environment variable is non-empty. + + Default: ``0``. + + .. c:member:: int install_signal_handlers + + Install Python signal handlers? + + Default: ``1`` in Python mode, ``0`` in isolated mode. + + .. c:member:: int interactive + + If greater than ``0``, enable the interactive mode (REPL). + + Incremented by the :option:`-i` command line option. + + Default: ``0``. + + .. c:member:: int isolated + + If greater than ``0``, enable isolated mode: + + * Set :c:member:`~PyConfig.safe_path` to ``1``: + don't prepend a potentially unsafe path to :data:`sys.path` at Python + startup. + * Set :c:member:`~PyConfig.use_environment` to ``0``. + * Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user + site directory to :data:`sys.path`. + * Python REPL doesn't import :mod:`readline` nor enable default readline + configuration on interactive prompts. + + Set to ``1`` by the :option:`-I` command line option. + + Default: ``0`` in Python mode, ``1`` in isolated mode. + + See also :c:member:`PyPreConfig.isolated`. + + .. c:member:: int legacy_windows_stdio + + If non-zero, use :class:`io.FileIO` instead of + :class:`io.WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` + and :data:`sys.stderr`. + + Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment + variable is set to a non-empty string. + + Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for + Windows specific code. + + Default: ``0``. + + See also the :pep:`528` (Change Windows console encoding to UTF-8). + + .. c:member:: int malloc_stats + + If non-zero, dump statistics on :ref:`Python pymalloc memory allocator + <pymalloc>` at exit. + + Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable. + + The option is ignored if Python is :option:`configured using + the --without-pymalloc option <--without-pymalloc>`. + + Default: ``0``. + + .. c:member:: wchar_t* platlibdir + + Platform library directory name: :data:`sys.platlibdir`. + + Set by the :envvar:`PYTHONPLATLIBDIR` environment variable. + + Default: value of the ``PLATLIBDIR`` macro which is set by the + :option:`configure --with-platlibdir option <--with-platlibdir>` + (default: ``"lib"``, or ``"DLLs"`` on Windows). + + Part of the :ref:`Python Path Configuration <init-path-config>` input. + + .. versionadded:: 3.9 + + .. versionchanged:: 3.11 + This macro is now used on Windows to locate the standard + library extension modules, typically under ``DLLs``. However, + for compatibility, note that this value is ignored for any + non-standard layouts, including in-tree builds and virtual + environments. + + .. c:member:: wchar_t* pythonpath_env + + Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` + (:data:`os.path.pathsep`). + + Set by the :envvar:`PYTHONPATH` environment variable. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` input. + + .. c:member:: PyWideStringList module_search_paths + .. c:member:: int module_search_paths_set + + Module search paths: :data:`sys.path`. + + If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, + :c:func:`Py_InitializeFromConfig` will replace + :c:member:`~PyConfig.module_search_paths` and sets + :c:member:`~PyConfig.module_search_paths_set` to ``1``. + + Default: empty list (``module_search_paths``) and ``0`` + (``module_search_paths_set``). + + Part of the :ref:`Python Path Configuration <init-path-config>` output. + + .. c:member:: int optimization_level + + Compilation optimization level: + + * ``0``: Peephole optimizer, set ``__debug__`` to ``True``. + * ``1``: Level 0, remove assertions, set ``__debug__`` to ``False``. + * ``2``: Level 1, strip docstrings. + + Incremented by the :option:`-O` command line option. Set to the + :envvar:`PYTHONOPTIMIZE` environment variable value. + + Default: ``0``. + + .. c:member:: PyWideStringList orig_argv + + The list of the original command line arguments passed to the Python + executable: :data:`sys.orig_argv`. + + If :c:member:`~PyConfig.orig_argv` list is empty and + :c:member:`~PyConfig.argv` is not a list only containing an empty + string, :c:func:`PyConfig_Read` copies :c:member:`~PyConfig.argv` into + :c:member:`~PyConfig.orig_argv` before modifying + :c:member:`~PyConfig.argv` (if :c:member:`~PyConfig.parse_argv` is + non-zero). + + See also the :c:member:`~PyConfig.argv` member and the + :c:func:`Py_GetArgcArgv` function. + + Default: empty list. + + .. versionadded:: 3.10 + + .. c:member:: int parse_argv + + Parse command line arguments? + + If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the regular + Python parses :ref:`command line arguments <using-on-cmdline>`, and strip + Python arguments from :c:member:`~PyConfig.argv`. + + The :c:func:`PyConfig_Read` function only parses + :c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv` + is set to ``2`` after arguments are parsed. Since Python arguments are + strippped from :c:member:`PyConfig.argv`, parsing arguments twice would + parse the application options as Python options. + + Default: ``1`` in Python mode, ``0`` in isolated mode. + + .. versionchanged:: 3.10 + The :c:member:`PyConfig.argv` arguments are now only parsed if + :c:member:`PyConfig.parse_argv` equals to ``1``. + + .. c:member:: int parser_debug + + Parser debug mode. If greater than ``0``, turn on parser debugging output (for expert only, depending + on compilation options). + + Incremented by the :option:`-d` command line option. Set to the + :envvar:`PYTHONDEBUG` environment variable value. + + Default: ``0``. + + .. c:member:: int pathconfig_warnings + + If non-zero, calculation of path configuration is allowed to log + warnings into ``stderr``. If equals to ``0``, suppress these warnings. + + Default: ``1`` in Python mode, ``0`` in isolated mode. + + Part of the :ref:`Python Path Configuration <init-path-config>` input. + + .. versionchanged:: 3.11 + Now also applies on Windows. + + .. c:member:: wchar_t* prefix + + The site-specific directory prefix where the platform independent Python + files are installed: :data:`sys.prefix`. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` output. + + .. c:member:: wchar_t* program_name + + Program name used to initialize :c:member:`~PyConfig.executable` and in + early error messages during Python initialization. + + * If :func:`Py_SetProgramName` has been called, use its argument. + * On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set. + * If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use + :envvar:`__PYVENV_LAUNCHER__` environment variable if set. + * Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and + non-empty. + * Otherwise, use ``L"python"`` on Windows, or ``L"python3"`` on other + platforms. + + Default: ``NULL``. + + Part of the :ref:`Python Path Configuration <init-path-config>` input. + + .. c:member:: wchar_t* pycache_prefix + + Directory where cached ``.pyc`` files are written: + :data:`sys.pycache_prefix`. + + Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and + the :envvar:`PYTHONPYCACHEPREFIX` environment variable. + + If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``. + + Default: ``NULL``. + + .. c:member:: int quiet + + Quiet mode. If greater than ``0``, don't display the copyright and version at + Python startup in interactive mode. + + Incremented by the :option:`-q` command line option. + + Default: ``0``. + + .. c:member:: wchar_t* run_command + + Value of the :option:`-c` command line option. + + Used by :c:func:`Py_RunMain`. + + Default: ``NULL``. + + .. c:member:: wchar_t* run_filename + + Filename passed on the command line: trailing command line argument + without :option:`-c` or :option:`-m`. It is used by the + :c:func:`Py_RunMain` function. + + For example, it is set to ``script.py`` by the ``python3 script.py arg`` + command line. + + See also the :c:member:`PyConfig.skip_source_first_line` option. + + Default: ``NULL``. + + .. c:member:: wchar_t* run_module + + Value of the :option:`-m` command line option. + + Used by :c:func:`Py_RunMain`. + + Default: ``NULL``. + + .. c:member:: int show_ref_count + + Show total reference count at exit? + + Set to ``1`` by :option:`-X showrefcount <-X>` command line option. + + Need a :ref:`debug build of Python <debug-build>` (the ``Py_REF_DEBUG`` + macro must be defined). + + Default: ``0``. + + .. c:member:: int site_import + + Import the :mod:`site` module at startup? + + If equal to zero, disable the import of the module site and the + site-dependent manipulations of :data:`sys.path` that it entails. + + Also disable these manipulations if the :mod:`site` module is explicitly + imported later (call :func:`site.main` if you want them to be triggered). + + Set to ``0`` by the :option:`-S` command line option. + + :data:`sys.flags.no_site` is set to the inverted value of + :c:member:`~PyConfig.site_import`. + + Default: ``1``. + + .. c:member:: int skip_source_first_line + + If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` + source. + + It allows the usage of non-Unix forms of ``#!cmd``. This is intended for + a DOS specific hack only. + + Set to ``1`` by the :option:`-x` command line option. + + Default: ``0``. + + .. c:member:: wchar_t* stdio_encoding + .. c:member:: wchar_t* stdio_errors + + Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and + :data:`sys.stderr` (but :data:`sys.stderr` always uses + ``"backslashreplace"`` error handler). + + If :c:func:`Py_SetStandardStreamEncoding` has been called, use its + *error* and *errors* arguments if they are not ``NULL``. + + Use the :envvar:`PYTHONIOENCODING` environment variable if it is + non-empty. + + Default encoding: + + * ``"UTF-8"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero. + * Otherwise, use the :term:`locale encoding`. + + Default error handler: + + * On Windows: use ``"surrogateescape"``. + * ``"surrogateescape"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, + or if the LC_CTYPE locale is "C" or "POSIX". + * ``"strict"`` otherwise. + + .. c:member:: int tracemalloc + + Enable tracemalloc? + + If non-zero, call :func:`tracemalloc.start` at startup. + + Set by :option:`-X tracemalloc=N <-X>` command line option and by the + :envvar:`PYTHONTRACEMALLOC` environment variable. + + Default: ``-1`` in Python mode, ``0`` in isolated mode. + + .. c:member:: int use_environment + + Use :ref:`environment variables <using-on-envvars>`? + + If equals to zero, ignore the :ref:`environment variables + <using-on-envvars>`. + + Set to ``0`` by the :option:`-E` environment variable. + + Default: ``1`` in Python config and ``0`` in isolated config. + + .. c:member:: int user_site_directory + + If non-zero, add the user site directory to :data:`sys.path`. + + Set to ``0`` by the :option:`-s` and :option:`-I` command line options. + + Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable. + + Default: ``1`` in Python mode, ``0`` in isolated mode. + + .. c:member:: int verbose + + Verbose mode. If greater than ``0``, print a message each time a module is + imported, 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 :option:`-v` command line option. + + Set to the :envvar:`PYTHONVERBOSE` environment variable value. + + Default: ``0``. + + .. c:member:: PyWideStringList warnoptions + + Options of the :mod:`warnings` module to build warnings filters, lowest + to highest priority: :data:`sys.warnoptions`. + + The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse + order: the last :c:member:`PyConfig.warnoptions` item becomes the first + item of :data:`warnings.filters` which is checked first (highest + priority). + + The :option:`-W` command line options adds its value to + :c:member:`~PyConfig.warnoptions`, it can be used multiple times. + + The :envvar:`PYTHONWARNINGS` environment variable can also be used to add + warning options. Multiple options can be specified, separated by commas + (``,``). + + Default: empty list. + + .. c:member:: int write_bytecode + + If equal to ``0``, Python won't try to write ``.pyc`` files on the import of + source modules. + + Set to ``0`` by the :option:`-B` command line option and the + :envvar:`PYTHONDONTWRITEBYTECODE` environment variable. + + :data:`sys.dont_write_bytecode` is initialized to the inverted value of + :c:member:`~PyConfig.write_bytecode`. + + Default: ``1``. + + .. c:member:: PyWideStringList xoptions + + Values of the :option:`-X` command line options: :data:`sys._xoptions`. + + Default: empty list. + +If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` +arguments are parsed the same way the regular Python parses :ref:`command line +arguments <using-on-cmdline>`, and Python arguments are stripped from +:c:member:`~PyConfig.argv`. + +The :c:member:`~PyConfig.xoptions` options are parsed to set other options: see +the :option:`-X` command line option. + +.. versionchanged:: 3.9 + + The ``show_alloc_count`` field has been removed. + + +Initialization with PyConfig +============================ + +Function to initialize Python: + +.. c:function:: PyStatus Py_InitializeFromConfig(const PyConfig *config) + + Initialize Python from *config* configuration. + +The caller is responsible to handle exceptions (error or exit) using +:c:func:`PyStatus_Exception` and :c:func:`Py_ExitStatusException`. + +If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or +:c:func:`PyImport_ExtendInittab` are used, they must be set or called after +Python preinitialization and before the Python initialization. If Python is +initialized multiple times, :c:func:`PyImport_AppendInittab` or +:c:func:`PyImport_ExtendInittab` must be called before each Python +initialization. + +The current configuration (``PyConfig`` type) is stored in +``PyInterpreterState.config``. + +Example setting the program name:: + + void init_python(void) + { + PyStatus status; + + PyConfig config; + PyConfig_InitPythonConfig(&config); + + /* Set the program name. Implicitly preinitialize Python. */ + status = PyConfig_SetString(&config, &config.program_name, + L"/path/to/my_program"); + if (PyStatus_Exception(status)) { + goto exception; + } + + status = Py_InitializeFromConfig(&config); + if (PyStatus_Exception(status)) { + goto exception; + } + PyConfig_Clear(&config); + return; + + exception: + PyConfig_Clear(&config); + Py_ExitStatusException(status); + } + +More complete example modifying the default configuration, read the +configuration, and then override some parameters. Note that since +3.11, many parameters are not calculated until initialization, and +so values cannot be read from the configuration structure. Any values +set before initialize is called will be left unchanged by +initialization:: + + PyStatus init_python(const char *program_name) + { + PyStatus status; + + PyConfig config; + PyConfig_InitPythonConfig(&config); + + /* Set the program name before reading the configuration + (decode byte string from the locale encoding). + + Implicitly preinitialize Python. */ + status = PyConfig_SetBytesString(&config, &config.program_name, + program_name); + if (PyStatus_Exception(status)) { + goto done; + } + + /* Read all configuration at once */ + status = PyConfig_Read(&config); + if (PyStatus_Exception(status)) { + goto done; + } + + /* Specify sys.path explicitly */ + /* If you want to modify the default set of paths, finish + initialization first and then use PySys_GetObject("path") */ + config.module_search_paths_set = 1; + status = PyWideStringList_Append(&config.module_search_paths, + L"/path/to/stdlib"); + if (PyStatus_Exception(status)) { + goto done; + } + status = PyWideStringList_Append(&config.module_search_paths, + L"/path/to/more/modules"); + if (PyStatus_Exception(status)) { + goto done; + } + + /* Override executable computed by PyConfig_Read() */ + status = PyConfig_SetString(&config, &config.executable, + L"/path/to/my_executable"); + if (PyStatus_Exception(status)) { + goto done; + } + + status = Py_InitializeFromConfig(&config); + + done: + PyConfig_Clear(&config); + return status; + } + + +.. _init-isolated-conf: + +Isolated Configuration +====================== + +:c:func:`PyPreConfig_InitIsolatedConfig` and +:c:func:`PyConfig_InitIsolatedConfig` functions create a configuration to +isolate Python from the system. For example, to embed Python into an +application. + +This configuration ignores global configuration variables, environment +variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) +and user site directory. The C standard streams (ex: ``stdout``) and the +LC_CTYPE locale are left unchanged. Signal handlers are not installed. + +Configuration files are still used with this configuration to determine +paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified +to avoid computing the default path configuration. + + +.. _init-python-config: + +Python Configuration +==================== + +:c:func:`PyPreConfig_InitPythonConfig` and :c:func:`PyConfig_InitPythonConfig` +functions create a configuration to build a customized Python which behaves as +the regular Python. + +Environments variables and command line arguments are used to configure +Python, whereas global configuration variables are ignored. + +This function enables C locale coercion (:pep:`538`) +and :ref:`Python UTF-8 Mode <utf8-mode>` +(:pep:`540`) depending on the LC_CTYPE locale, :envvar:`PYTHONUTF8` and +:envvar:`PYTHONCOERCECLOCALE` environment variables. + + +.. _init-path-config: + +Python Path Configuration +========================= + +:c:type:`PyConfig` contains multiple fields for the path configuration: + +* Path configuration inputs: + + * :c:member:`PyConfig.home` + * :c:member:`PyConfig.platlibdir` + * :c:member:`PyConfig.pathconfig_warnings` + * :c:member:`PyConfig.program_name` + * :c:member:`PyConfig.pythonpath_env` + * current working directory: to get absolute paths + * ``PATH`` environment variable to get the program full path + (from :c:member:`PyConfig.program_name`) + * ``__PYVENV_LAUNCHER__`` environment variable + * (Windows only) Application paths in the registry under + "Software\Python\PythonCore\X.Y\PythonPath" of HKEY_CURRENT_USER and + HKEY_LOCAL_MACHINE (where X.Y is the Python version). + +* Path configuration output fields: + + * :c:member:`PyConfig.base_exec_prefix` + * :c:member:`PyConfig.base_executable` + * :c:member:`PyConfig.base_prefix` + * :c:member:`PyConfig.exec_prefix` + * :c:member:`PyConfig.executable` + * :c:member:`PyConfig.module_search_paths_set`, + :c:member:`PyConfig.module_search_paths` + * :c:member:`PyConfig.prefix` + +If at least one "output field" is not set, Python calculates the path +configuration to fill unset fields. If +:c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, +:c:member:`~PyConfig.module_search_paths` is overridden and +:c:member:`~PyConfig.module_search_paths_set` is set to ``1``. + +It is possible to completely ignore the function calculating the default +path configuration by setting explicitly all path configuration output +fields listed above. A string is considered as set even if it is non-empty. +``module_search_paths`` is considered as set if +``module_search_paths_set`` is set to ``1``. In this case, +``module_search_paths`` will be used without modification. + +Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings when +calculating the path configuration (Unix only, Windows does not log any warning). + +If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig.base_exec_prefix` +fields are not set, they inherit their value from :c:member:`~PyConfig.prefix` +and :c:member:`~PyConfig.exec_prefix` respectively. + +:c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`: + +* If :c:member:`~PyConfig.run_filename` is set and is a directory which contains a + ``__main__.py`` script, prepend :c:member:`~PyConfig.run_filename` to + :data:`sys.path`. +* If :c:member:`~PyConfig.isolated` is zero: + + * If :c:member:`~PyConfig.run_module` is set, prepend the current directory + to :data:`sys.path`. Do nothing if the current directory cannot be read. + * If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the + filename to :data:`sys.path`. + * Otherwise, prepend an empty string to :data:`sys.path`. + +If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be +modified by the :mod:`site` module. If +:c:member:`~PyConfig.user_site_directory` is non-zero and the user's +site-package directory exists, the :mod:`site` module appends the user's +site-package directory to :data:`sys.path`. + +The following configuration files are used by the path configuration: + +* ``pyvenv.cfg`` +* ``._pth`` file (ex: ``python._pth``) +* ``pybuilddir.txt`` (Unix only) + +If a ``._pth`` file is present: + +* Set :c:member:`~PyConfig.isolated` to ``1``. +* Set :c:member:`~PyConfig.use_environment` to ``0``. +* Set :c:member:`~PyConfig.site_import` to ``0``. +* Set :c:member:`~PyConfig.safe_path` to ``1``. + +The ``__PYVENV_LAUNCHER__`` environment variable is used to set +:c:member:`PyConfig.base_executable` + + +Py_RunMain() +============ + +.. c:function:: int Py_RunMain(void) + + Execute the command (:c:member:`PyConfig.run_command`), the script + (:c:member:`PyConfig.run_filename`) or the module + (:c:member:`PyConfig.run_module`) specified on the command line or in the + configuration. + + By default and when if :option:`-i` option is used, run the REPL. + + Finally, finalizes Python and returns an exit status that can be passed to + the ``exit()`` function. + +See :ref:`Python Configuration <init-python-config>` for an example of +customized Python always running in isolated mode using +:c:func:`Py_RunMain`. + + +Py_GetArgcArgv() +================ + +.. c:function:: void Py_GetArgcArgv(int *argc, wchar_t ***argv) + + Get the original command line arguments, before Python modified them. + + See also :c:member:`PyConfig.orig_argv` member. + + +Multi-Phase Initialization Private Provisional API +================================================== + +This section is a private provisional API introducing multi-phase +initialization, the core feature of :pep:`432`: + +* "Core" initialization phase, "bare minimum Python": + + * Builtin types; + * Builtin exceptions; + * Builtin and frozen modules; + * The :mod:`sys` module is only partially initialized + (ex: :data:`sys.path` doesn't exist yet). + +* "Main" initialization phase, Python is fully initialized: + + * Install and configure :mod:`importlib`; + * Apply the :ref:`Path Configuration <init-path-config>`; + * Install signal handlers; + * Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` + and :data:`sys.path`); + * Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`; + * Import the :mod:`site` module; + * etc. + +Private provisional API: + +* :c:member:`PyConfig._init_main`: if set to ``0``, + :c:func:`Py_InitializeFromConfig` stops at the "Core" initialization phase. +* :c:member:`PyConfig._isolated_interpreter`: if non-zero, + disallow threads, subprocesses and fork. + +.. c:function:: PyStatus _Py_InitializeMain(void) + + Move to the "Main" initialization phase, finish the Python initialization. + +No module is imported during the "Core" phase and the ``importlib`` module is +not configured: the :ref:`Path Configuration <init-path-config>` is only +applied during the "Main" phase. It may allow to customize Python in Python to +override or tune the :ref:`Path Configuration <init-path-config>`, maybe +install a custom :data:`sys.meta_path` importer or an import hook, etc. + +It may become possible to calculatin the :ref:`Path Configuration +<init-path-config>` in Python, after the Core phase and before the Main phase, +which is one of the :pep:`432` motivation. + +The "Core" phase is not properly defined: what should be and what should +not be available at this phase is not specified yet. The API is marked +as private and provisional: the API can be modified or even be removed +anytime until a proper public API is designed. + +Example running Python code between "Core" and "Main" initialization +phases:: + + void init_python(void) + { + PyStatus status; + + PyConfig config; + PyConfig_InitPythonConfig(&config); + config._init_main = 0; + + /* ... customize 'config' configuration ... */ + + status = Py_InitializeFromConfig(&config); + PyConfig_Clear(&config); + if (PyStatus_Exception(status)) { + Py_ExitStatusException(status); + } + + /* Use sys.stderr because sys.stdout is only created + by _Py_InitializeMain() */ + int res = PyRun_SimpleString( + "import sys; " + "print('Run Python code before _Py_InitializeMain', " + "file=sys.stderr)"); + if (res < 0) { + exit(1); + } + + /* ... put more configuration code here ... */ + + status = _Py_InitializeMain(); + if (PyStatus_Exception(status)) { + Py_ExitStatusException(status); + } + }
diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst new file mode 100644 index 0000000..17710b0 --- /dev/null +++ b/Doc/c-api/intro.rst
@@ -0,0 +1,804 @@ +.. highlight:: c + + +.. _api-intro: + +************ +Introduction +************ + +The Application Programmer's Interface to Python gives C and C++ programmers +access to the Python interpreter at a variety of levels. The API is equally +usable from C++, but for brevity it is generally referred to as the Python/C +API. There are two fundamentally different reasons for using the Python/C API. +The first reason is to write *extension modules* for specific purposes; these +are C modules that extend the Python interpreter. This is probably the most +common use. The second reason is to use Python as a component in a larger +application; this technique is generally referred to as :dfn:`embedding` Python +in an application. + +Writing an extension module is a relatively well-understood process, where a +"cookbook" approach works well. There are several tools that automate the +process to some extent. While people have embedded Python in other +applications since its early existence, the process of embedding Python is +less straightforward than writing an extension. + +Many API functions are useful independent of whether you're embedding or +extending Python; moreover, most applications that embed Python will need to +provide a custom extension as well, so it's probably a good idea to become +familiar with writing an extension before attempting to embed Python in a real +application. + + +Coding standards +================ + +If you're writing C code for inclusion in CPython, you **must** follow the +guidelines and standards defined in :PEP:`7`. These guidelines apply +regardless of the version of Python you are contributing to. Following these +conventions is not necessary for your own third party extension modules, +unless you eventually expect to contribute them to Python. + + +.. _api-includes: + +Include Files +============= + +All function, type and macro definitions needed to use the Python/C API are +included in your code by the following line:: + + #define PY_SSIZE_T_CLEAN + #include <Python.h> + +This implies inclusion of the following standard headers: ``<stdio.h>``, +``<string.h>``, ``<errno.h>``, ``<limits.h>``, ``<assert.h>`` and ``<stdlib.h>`` +(if available). + +.. note:: + + Since Python may define some pre-processor definitions which affect the standard + headers on some systems, you *must* include :file:`Python.h` before any standard + headers are included. + + It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including + ``Python.h``. See :ref:`arg-parsing` for a description of this macro. + +All user visible names defined by Python.h (except those defined by the included +standard headers) have one of the prefixes ``Py`` or ``_Py``. Names beginning +with ``_Py`` are for internal use by the Python implementation and should not be +used by extension writers. Structure member names do not have a reserved prefix. + +.. note:: + + User code should never define names that begin with ``Py`` or ``_Py``. This + confuses the reader, and jeopardizes the portability of the user code to + future Python versions, which may define additional names beginning with one + of these prefixes. + +The header files are typically installed with Python. On Unix, these are +located in the directories :file:`{prefix}/include/pythonversion/` and +:file:`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--prefix>` and +:option:`exec_prefix <--exec-prefix>` are defined by the corresponding parameters to Python's +:program:`configure` script and *version* is +``'%d.%d' % sys.version_info[:2]``. On Windows, the headers are installed +in :file:`{prefix}/include`, where ``prefix`` is the installation +directory specified to the installer. + +To include the headers, place both directories (if different) on your compiler's +search path for includes. Do *not* place the parent directories on the search +path and then use ``#include <pythonX.Y/Python.h>``; this will break on +multi-platform builds since the platform independent headers under +:option:`prefix <--prefix>` include the platform specific headers from +:option:`exec_prefix <--exec-prefix>`. + +C++ users should note that although the API is defined entirely using C, the +header files properly declare the entry points to be ``extern "C"``. As a result, +there is no need to do anything special to use the API from C++. + + +Useful macros +============= + +Several useful macros are defined in the Python header files. Many are +defined closer to where they are useful (e.g. :c:macro:`Py_RETURN_NONE`). +Others of a more general utility are defined here. This is not necessarily a +complete listing. + +.. c:macro:: Py_ABS(x) + + Return the absolute value of ``x``. + + .. versionadded:: 3.3 + +.. c:macro:: Py_ALWAYS_INLINE + + Ask the compiler to always inline a static inline function. The compiler can + ignore it and decides to not inline the function. + + It can be used to inline performance critical static inline functions when + building Python in debug mode with function inlining disabled. For example, + MSC disables function inlining when building in debug mode. + + Marking blindly a static inline function with Py_ALWAYS_INLINE can result in + worse performances (due to increased code size for example). The compiler is + usually smarter than the developer for the cost/benefit analysis. + + If Python is :ref:`built in debug mode <debug-build>` (if the ``Py_DEBUG`` + macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does nothing. + + It must be specified before the function return type. Usage:: + + static inline Py_ALWAYS_INLINE int random(void) { return 4; } + + .. versionadded:: 3.11 + +.. c:macro:: Py_CHARMASK(c) + + Argument must be a character or an integer in the range [-128, 127] or [0, + 255]. This macro returns ``c`` cast to an ``unsigned char``. + +.. c:macro:: Py_DEPRECATED(version) + + Use this for deprecated declarations. The macro must be placed before the + symbol name. + + Example:: + + Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void); + + .. versionchanged:: 3.8 + MSVC support was added. + +.. c:macro:: Py_GETENV(s) + + Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the + command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set). + +.. c:macro:: Py_MAX(x, y) + + Return the maximum value between ``x`` and ``y``. + + .. versionadded:: 3.3 + +.. c:macro:: Py_MEMBER_SIZE(type, member) + + Return the size of a structure (``type``) ``member`` in bytes. + + .. versionadded:: 3.6 + +.. c:macro:: Py_MIN(x, y) + + Return the minimum value between ``x`` and ``y``. + + .. versionadded:: 3.3 + +.. c:macro:: Py_NO_INLINE + + Disable inlining on a function. For example, it reduces the C stack + consumption: useful on LTO+PGO builds which heavily inline code (see + :issue:`33720`). + + Usage:: + + Py_NO_INLINE static int random(void) { return 4; } + + .. versionadded:: 3.11 + +.. c:macro:: Py_STRINGIFY(x) + + Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns + ``"123"``. + + .. versionadded:: 3.4 + +.. c:macro:: Py_UNREACHABLE() + + Use this when you have a code path that cannot be reached by design. + For example, in the ``default:`` clause in a ``switch`` statement for which + all possible values are covered in ``case`` statements. Use this in places + where you might be tempted to put an ``assert(0)`` or ``abort()`` call. + + In release mode, the macro helps the compiler to optimize the code, and + avoids a warning about unreachable code. For example, the macro is + implemented with ``__builtin_unreachable()`` on GCC in release mode. + + A use for ``Py_UNREACHABLE()`` is following a call a function that + never returns but that is not declared :c:macro:`_Py_NO_RETURN`. + + If a code path is very unlikely code but can be reached under exceptional + case, this macro must not be used. For example, under low memory condition + or if a system call returns a value out of the expected range. In this + case, it's better to report the error to the caller. If the error cannot + be reported to caller, :c:func:`Py_FatalError` can be used. + + .. versionadded:: 3.7 + +.. c:macro:: Py_UNUSED(arg) + + Use this for unused arguments in a function definition to silence compiler + warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``. + + .. versionadded:: 3.4 + +.. c:macro:: PyDoc_STRVAR(name, str) + + Creates a variable with name ``name`` that can be used in docstrings. + If Python is built without docstrings, the value will be empty. + + Use :c:macro:`PyDoc_STRVAR` for docstrings to support building + Python without docstrings, as specified in :pep:`7`. + + Example:: + + PyDoc_STRVAR(pop_doc, "Remove and return the rightmost element."); + + static PyMethodDef deque_methods[] = { + // ... + {"pop", (PyCFunction)deque_pop, METH_NOARGS, pop_doc}, + // ... + } + +.. c:macro:: PyDoc_STR(str) + + Creates a docstring for the given input string or an empty string + if docstrings are disabled. + + Use :c:macro:`PyDoc_STR` in specifying docstrings to support + building Python without docstrings, as specified in :pep:`7`. + + Example:: + + static PyMethodDef pysqlite_row_methods[] = { + {"keys", (PyCFunction)pysqlite_row_keys, METH_NOARGS, + PyDoc_STR("Returns the keys of the row.")}, + {NULL, NULL} + }; + + +.. _api-objects: + +Objects, Types and Reference Counts +=================================== + +.. index:: pair: object; type + +Most Python/C API functions have one or more arguments as well as a return value +of type :c:expr:`PyObject*`. This type is a pointer to an opaque data type +representing an arbitrary Python object. Since all Python object types are +treated the same way by the Python language in most situations (e.g., +assignments, scope rules, and argument passing), it is only fitting that they +should be represented by a single C type. Almost all Python objects live on the +heap: you never declare an automatic or static variable of type +:c:type:`PyObject`, only pointer variables of type :c:expr:`PyObject*` can be +declared. The sole exception are the type objects; since these must never be +deallocated, they are typically static :c:type:`PyTypeObject` objects. + +All Python objects (even Python integers) have a :dfn:`type` and a +:dfn:`reference count`. An object's type determines what kind of object it is +(e.g., an integer, a list, or a user-defined function; there are many more as +explained in :ref:`types`). For each of the well-known types there is a macro +to check whether an object is of that type; for instance, ``PyList_Check(a)`` is +true if (and only if) the object pointed to by *a* is a Python list. + + +.. _api-refcounts: + +Reference Counts +---------------- + +The reference count is important because today's computers have a finite (and +often severely limited) memory size; it counts how many different places there +are that have a reference to an object. Such a place could be another object, +or a global (or static) C variable, or a local variable in some C function. +When an object's reference count becomes zero, the object is deallocated. If +it contains references to other objects, their reference count is decremented. +Those other objects may be deallocated in turn, if this decrement makes their +reference count become zero, and so on. (There's an obvious problem with +objects that reference each other here; for now, the solution is "don't do +that.") + +.. index:: + single: Py_INCREF() + single: Py_DECREF() + +Reference counts are always manipulated explicitly. The normal way is to use +the macro :c:func:`Py_INCREF` to increment an object's reference count by one, +and :c:func:`Py_DECREF` to decrement it by one. The :c:func:`Py_DECREF` macro +is considerably more complex than the incref one, since it must check whether +the reference count becomes zero and then cause the object's deallocator to be +called. The deallocator is a function pointer contained in the object's type +structure. The type-specific deallocator takes care of decrementing the +reference counts for other objects contained in the object if this is a compound +object type, such as a list, as well as performing any additional finalization +that's needed. There's no chance that the reference count can overflow; at +least as many bits are used to hold the reference count as there are distinct +memory locations in virtual memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). +Thus, the reference count increment is a simple operation. + +It is not necessary to increment an object's reference count for every local +variable that contains a pointer to an object. In theory, the object's +reference count goes up by one when the variable is made to point to it and it +goes down by one when the variable goes out of scope. However, these two +cancel each other out, so at the end the reference count hasn't changed. The +only real reason to use the reference count is to prevent the object from being +deallocated as long as our variable is pointing to it. If we know that there +is at least one other reference to the object that lives at least as long as +our variable, there is no need to increment the reference count temporarily. +An important situation where this arises is in objects that are passed as +arguments to C functions in an extension module that are called from Python; +the call mechanism guarantees to hold a reference to every argument for the +duration of the call. + +However, a common pitfall is to extract an object from a list and hold on to it +for a while without incrementing its reference count. Some other operation might +conceivably remove the object from the list, decrementing its reference count +and possibly deallocating it. The real danger is that innocent-looking +operations may invoke arbitrary Python code which could do this; there is a code +path which allows control to flow back to the user from a :c:func:`Py_DECREF`, so +almost any operation is potentially dangerous. + +A safe approach is to always use the generic operations (functions whose name +begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or ``PyMapping_``). +These operations always increment the reference count of the object they return. +This leaves the caller with the responsibility to call :c:func:`Py_DECREF` when +they are done with the result; this soon becomes second nature. + + +.. _api-refcountdetails: + +Reference Count Details +^^^^^^^^^^^^^^^^^^^^^^^ + +The reference count behavior of functions in the Python/C API is best explained +in terms of *ownership of references*. Ownership pertains to references, never +to objects (objects are not owned: they are always shared). "Owning a +reference" means being responsible for calling Py_DECREF on it when the +reference is no longer needed. Ownership can also be transferred, meaning that +the code that receives ownership of the reference then becomes responsible for +eventually decref'ing it by calling :c:func:`Py_DECREF` or :c:func:`Py_XDECREF` +when it's no longer needed---or passing on this responsibility (usually to its +caller). When a function passes ownership of a reference on to its caller, the +caller is said to receive a *new* reference. When no ownership is transferred, +the caller is said to *borrow* the reference. Nothing needs to be done for a +:term:`borrowed reference`. + +Conversely, when a calling function passes in a reference to an object, there +are two possibilities: the function *steals* a reference to the object, or it +does not. *Stealing a reference* means that when you pass a reference to a +function, that function assumes that it now owns that reference, and you are not +responsible for it any longer. + +.. index:: + single: PyList_SetItem() + single: PyTuple_SetItem() + +Few functions steal references; the two notable exceptions are +:c:func:`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference +to the item (but not to the tuple or list into which the item is put!). These +functions were designed to steal a reference because of a common idiom for +populating a tuple or list with newly created objects; for example, the code to +create the tuple ``(1, 2, "three")`` could look like this (forgetting about +error handling for the moment; a better way to code this is shown below):: + + PyObject *t; + + t = PyTuple_New(3); + PyTuple_SetItem(t, 0, PyLong_FromLong(1L)); + PyTuple_SetItem(t, 1, PyLong_FromLong(2L)); + PyTuple_SetItem(t, 2, PyUnicode_FromString("three")); + +Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately +stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object +although the reference to it will be stolen, use :c:func:`Py_INCREF` to grab +another reference before calling the reference-stealing function. + +Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple items; +:c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to do this +since tuples are an immutable data type. You should only use +:c:func:`PyTuple_SetItem` for tuples that you are creating yourself. + +Equivalent code for populating a list can be written using :c:func:`PyList_New` +and :c:func:`PyList_SetItem`. + +However, in practice, you will rarely use these ways of creating and populating +a tuple or list. There's a generic function, :c:func:`Py_BuildValue`, that can +create most common objects from C values, directed by a :dfn:`format string`. +For example, the above two blocks of code could be replaced by the following +(which also takes care of the error checking):: + + PyObject *tuple, *list; + + tuple = Py_BuildValue("(iis)", 1, 2, "three"); + list = Py_BuildValue("[iis]", 1, 2, "three"); + +It is much more common to use :c:func:`PyObject_SetItem` and friends with items +whose references you are only borrowing, like arguments that were passed in to +the function you are writing. In that case, their behaviour regarding reference +counts is much saner, since you don't have to increment a reference count so you +can give a reference away ("have it be stolen"). For example, this function +sets all items of a list (actually, any mutable sequence) to a given item:: + + int + set_all(PyObject *target, PyObject *item) + { + Py_ssize_t i, n; + + n = PyObject_Length(target); + if (n < 0) + return -1; + for (i = 0; i < n; i++) { + PyObject *index = PyLong_FromSsize_t(i); + if (!index) + return -1; + if (PyObject_SetItem(target, index, item) < 0) { + Py_DECREF(index); + return -1; + } + Py_DECREF(index); + } + return 0; + } + +.. index:: single: set_all() + +The situation is slightly different for function return values. While passing +a reference to most functions does not change your ownership responsibilities +for that reference, many functions that return a reference to an object give +you ownership of the reference. The reason is simple: in many cases, the +returned object is created on the fly, and the reference you get is the only +reference to the object. Therefore, the generic functions that return object +references, like :c:func:`PyObject_GetItem` and :c:func:`PySequence_GetItem`, +always return a new reference (the caller becomes the owner of the reference). + +It is important to realize that whether you own a reference returned by a +function depends on which function you call only --- *the plumage* (the type of +the object passed as an argument to the function) *doesn't enter into it!* +Thus, if you extract an item from a list using :c:func:`PyList_GetItem`, you +don't own the reference --- but if you obtain the same item from the same list +using :c:func:`PySequence_GetItem` (which happens to take exactly the same +arguments), you do own a reference to the returned object. + +.. index:: + single: PyList_GetItem() + single: PySequence_GetItem() + +Here is an example of how you could write a function that computes the sum of +the items in a list of integers; once using :c:func:`PyList_GetItem`, and once +using :c:func:`PySequence_GetItem`. :: + + long + sum_list(PyObject *list) + { + Py_ssize_t i, n; + long total = 0, value; + PyObject *item; + + n = PyList_Size(list); + if (n < 0) + return -1; /* Not a list */ + for (i = 0; i < n; i++) { + item = PyList_GetItem(list, i); /* Can't fail */ + if (!PyLong_Check(item)) continue; /* Skip non-integers */ + value = PyLong_AsLong(item); + if (value == -1 && PyErr_Occurred()) + /* Integer too big to fit in a C long, bail out */ + return -1; + total += value; + } + return total; + } + +.. index:: single: sum_list() + +:: + + long + sum_sequence(PyObject *sequence) + { + Py_ssize_t i, n; + long total = 0, value; + PyObject *item; + n = PySequence_Length(sequence); + if (n < 0) + return -1; /* Has no length */ + for (i = 0; i < n; i++) { + item = PySequence_GetItem(sequence, i); + if (item == NULL) + return -1; /* Not a sequence, or other failure */ + if (PyLong_Check(item)) { + value = PyLong_AsLong(item); + Py_DECREF(item); + if (value == -1 && PyErr_Occurred()) + /* Integer too big to fit in a C long, bail out */ + return -1; + total += value; + } + else { + Py_DECREF(item); /* Discard reference ownership */ + } + } + return total; + } + +.. index:: single: sum_sequence() + + +.. _api-types: + +Types +----- + +There are few other data types that play a significant role in the Python/C +API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, +:c:expr:`double` and :c:expr:`char*`. A few structure types are used to +describe static tables used to list the functions exported by a module or the +data attributes of a new object type, and another is used to describe the value +of a complex number. These will be discussed together with the functions that +use them. + +.. c:type:: Py_ssize_t + + A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. + C99 doesn't define such a thing directly (size_t is an unsigned integral type). + See :pep:`353` for details. ``PY_SSIZE_T_MAX`` is the largest positive value + of type :c:type:`Py_ssize_t`. + + +.. _api-exceptions: + +Exceptions +========== + +The Python programmer only needs to deal with exceptions if specific error +handling is required; unhandled exceptions are automatically propagated to the +caller, then to the caller's caller, and so on, until they reach the top-level +interpreter, where they are reported to the user accompanied by a stack +traceback. + +.. index:: single: PyErr_Occurred() + +For C programmers, however, error checking always has to be explicit. All +functions in the Python/C API can raise exceptions, unless an explicit claim is +made otherwise in a function's documentation. In general, when a function +encounters an error, it sets an exception, discards any object references that +it owns, and returns an error indicator. If not documented otherwise, this +indicator is either ``NULL`` or ``-1``, depending on the function's return type. +A few functions return a Boolean true/false result, with false indicating an +error. Very few functions return no explicit error indicator or have an +ambiguous return value, and require explicit testing for errors with +:c:func:`PyErr_Occurred`. These exceptions are always explicitly documented. + +.. index:: + single: PyErr_SetString() + single: PyErr_Clear() + +Exception state is maintained in per-thread storage (this is equivalent to +using global storage in an unthreaded application). A thread can be in one of +two states: an exception has occurred, or not. The function +:c:func:`PyErr_Occurred` can be used to check for this: it returns a borrowed +reference to the exception type object when an exception has occurred, and +``NULL`` otherwise. There are a number of functions to set the exception state: +:c:func:`PyErr_SetString` is the most common (though not the most general) +function to set the exception state, and :c:func:`PyErr_Clear` clears the +exception state. + +The full exception state consists of three objects (all of which can be +``NULL``): the exception type, the corresponding exception value, and the +traceback. These have the same meanings as the Python result of +``sys.exc_info()``; however, they are not the same: the Python objects represent +the last exception being handled by a Python :keyword:`try` ... +:keyword:`except` statement, while the C level exception state only exists while +an exception is being passed on between C functions until it reaches the Python +bytecode interpreter's main loop, which takes care of transferring it to +``sys.exc_info()`` and friends. + +.. index:: single: exc_info() (in module sys) + +Note that starting with Python 1.5, the preferred, thread-safe way to access the +exception state from Python code is to call the function :func:`sys.exc_info`, +which returns the per-thread exception state for Python code. Also, the +semantics of both ways to access the exception state have changed so that a +function which catches an exception will save and restore its thread's exception +state so as to preserve the exception state of its caller. This prevents common +bugs in exception handling code caused by an innocent-looking function +overwriting the exception being handled; it also reduces the often unwanted +lifetime extension for objects that are referenced by the stack frames in the +traceback. + +As a general principle, a function that calls another function to perform some +task should check whether the called function raised an exception, and if so, +pass the exception state on to its caller. It should discard any object +references that it owns, and return an error indicator, but it should *not* set +another exception --- that would overwrite the exception that was just raised, +and lose important information about the exact cause of the error. + +.. index:: single: sum_sequence() + +A simple example of detecting exceptions and passing them on is shown in the +:c:func:`sum_sequence` example above. It so happens that this example doesn't +need to clean up any owned references when it detects an error. The following +example function shows some error cleanup. First, to remind you why you like +Python, we show the equivalent Python code:: + + def incr_item(dict, key): + try: + item = dict[key] + except KeyError: + item = 0 + dict[key] = item + 1 + +.. index:: single: incr_item() + +Here is the corresponding C code, in all its glory:: + + int + incr_item(PyObject *dict, PyObject *key) + { + /* Objects all initialized to NULL for Py_XDECREF */ + PyObject *item = NULL, *const_one = NULL, *incremented_item = NULL; + int rv = -1; /* Return value initialized to -1 (failure) */ + + item = PyObject_GetItem(dict, key); + if (item == NULL) { + /* Handle KeyError only: */ + if (!PyErr_ExceptionMatches(PyExc_KeyError)) + goto error; + + /* Clear the error and use zero: */ + PyErr_Clear(); + item = PyLong_FromLong(0L); + if (item == NULL) + goto error; + } + const_one = PyLong_FromLong(1L); + if (const_one == NULL) + goto error; + + incremented_item = PyNumber_Add(item, const_one); + if (incremented_item == NULL) + goto error; + + if (PyObject_SetItem(dict, key, incremented_item) < 0) + goto error; + rv = 0; /* Success */ + /* Continue with cleanup code */ + + error: + /* Cleanup code, shared by success and failure path */ + + /* Use Py_XDECREF() to ignore NULL references */ + Py_XDECREF(item); + Py_XDECREF(const_one); + Py_XDECREF(incremented_item); + + return rv; /* -1 for error, 0 for success */ + } + +.. index:: single: incr_item() + +.. index:: + single: PyErr_ExceptionMatches() + single: PyErr_Clear() + single: Py_XDECREF() + +This example represents an endorsed use of the ``goto`` statement in C! +It illustrates the use of :c:func:`PyErr_ExceptionMatches` and +:c:func:`PyErr_Clear` to handle specific exceptions, and the use of +:c:func:`Py_XDECREF` to dispose of owned references that may be ``NULL`` (note the +``'X'`` in the name; :c:func:`Py_DECREF` would crash when confronted with a +``NULL`` reference). It is important that the variables used to hold owned +references are initialized to ``NULL`` for this to work; likewise, the proposed +return value is initialized to ``-1`` (failure) and only set to success after +the final call made is successful. + + +.. _api-embedding: + +Embedding Python +================ + +The one important task that only embedders (as opposed to extension writers) of +the Python interpreter have to worry about is the initialization, and possibly +the finalization, of the Python interpreter. Most functionality of the +interpreter can only be used after the interpreter has been initialized. + +.. index:: + single: Py_Initialize() + pair: module; builtins + pair: module; __main__ + pair: module; sys + triple: module; search; path + single: path (in module sys) + +The basic initialization function is :c:func:`Py_Initialize`. This initializes +the table of loaded modules, and creates the fundamental modules +:mod:`builtins`, :mod:`__main__`, and :mod:`sys`. It also +initializes the module search path (``sys.path``). + +:c:func:`Py_Initialize` does not set the "script argument list" (``sys.argv``). +If this variable is needed by Python code that will be executed later, setting +:c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` must be set: see +:ref:`Python Initialization Configuration <init-config>`. + +On most systems (in particular, on Unix and Windows, although the details are +slightly different), :c:func:`Py_Initialize` calculates the module search path +based upon its best guess for the location of the standard Python interpreter +executable, assuming that the Python library is found in a fixed location +relative to the Python interpreter executable. In particular, it looks for a +directory named :file:`lib/python{X.Y}` relative to the parent directory +where the executable named :file:`python` is found on the shell command search +path (the environment variable :envvar:`PATH`). + +For instance, if the Python executable is found in +:file:`/usr/local/bin/python`, it will assume that the libraries are in +:file:`/usr/local/lib/python{X.Y}`. (In fact, this particular path is also +the "fallback" location, used when no executable file named :file:`python` is +found along :envvar:`PATH`.) The user can override this behavior by setting the +environment variable :envvar:`PYTHONHOME`, or insert additional directories in +front of the standard path by setting :envvar:`PYTHONPATH`. + +.. index:: + single: Py_SetProgramName() + single: Py_GetPath() + single: Py_GetPrefix() + single: Py_GetExecPrefix() + single: Py_GetProgramFullPath() + +The embedding application can steer the search by calling +``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. Note that +:envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` is still +inserted in front of the standard path. An application that requires total +control has to provide its own implementation of :c:func:`Py_GetPath`, +:c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and +:c:func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`). + +.. index:: single: Py_IsInitialized() + +Sometimes, it is desirable to "uninitialize" Python. For instance, the +application may want to start over (make another call to +:c:func:`Py_Initialize`) or the application is simply done with its use of +Python and wants to free memory allocated by Python. This can be accomplished +by calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` returns +true if Python is currently in the initialized state. More information about +these functions is given in a later chapter. Notice that :c:func:`Py_FinalizeEx` +does *not* free all memory allocated by the Python interpreter, e.g. memory +allocated by extension modules currently cannot be released. + + +.. _api-debugging: + +Debugging Builds +================ + +Python can be built with several macros to enable extra checks of the +interpreter and extension modules. These checks tend to add a large amount of +overhead to the runtime so they are not enabled by default. + +A full list of the various types of debugging builds is in the file +:file:`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are +available that support tracing of reference counts, debugging the memory +allocator, or low-level profiling of the main interpreter loop. Only the most +frequently used builds will be described in the remainder of this section. + +Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces +what is generally meant by :ref:`a debug build of Python <debug-build>`. +:c:macro:`Py_DEBUG` is enabled in the Unix build by adding +:option:`--with-pydebug` to the :file:`./configure` command. +It is also implied by the presence of the +not-Python-specific :c:macro:`_DEBUG` macro. When :c:macro:`Py_DEBUG` is enabled +in the Unix build, compiler optimization is disabled. + +In addition to the reference count debugging described below, extra checks are +performed, see :ref:`Python Debug Build <debug-build>`. + +Defining :c:macro:`Py_TRACE_REFS` enables reference tracing +(see the :option:`configure --with-trace-refs option <--with-trace-refs>`). +When defined, a circular doubly linked list of active objects is maintained by adding two extra +fields to every :c:type:`PyObject`. Total allocations are tracked as well. Upon +exit, all existing references are printed. (In interactive mode this happens +after every statement run by the interpreter.) + +Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source distribution +for more detailed information. +
diff --git a/Doc/c-api/iter.rst b/Doc/c-api/iter.rst new file mode 100644 index 0000000..434d202 --- /dev/null +++ b/Doc/c-api/iter.rst
@@ -0,0 +1,72 @@ +.. highlight:: c + +.. _iterator: + +Iterator Protocol +================= + +There are two functions specifically for working with iterators. + +.. c:function:: int PyIter_Check(PyObject *o) + + Return non-zero if the object *o* can be safely passed to + :c:func:`PyIter_Next`, and ``0`` otherwise. This function always succeeds. + +.. c:function:: int PyAIter_Check(PyObject *o) + + Return non-zero if the object *o* provides the :class:`AsyncIterator` + protocol, and ``0`` otherwise. This function always succeeds. + + .. versionadded:: 3.10 + +.. c:function:: PyObject* PyIter_Next(PyObject *o) + + Return the next value from the iterator *o*. The object must be an iterator + according to :c:func:`PyIter_Check` (it is up to the caller to check this). + If there are no remaining values, returns ``NULL`` with no exception set. + If an error occurs while retrieving the item, returns ``NULL`` and passes + along the exception. + +To write a loop which iterates over an iterator, the C code should look +something like this:: + + PyObject *iterator = PyObject_GetIter(obj); + PyObject *item; + + if (iterator == NULL) { + /* propagate error */ + } + + while ((item = PyIter_Next(iterator))) { + /* do something with item */ + ... + /* release reference when done */ + Py_DECREF(item); + } + + Py_DECREF(iterator); + + if (PyErr_Occurred()) { + /* propagate error */ + } + else { + /* continue doing useful work */ + } + + +.. c:type:: PySendResult + + The enum value used to represent different results of :c:func:`PyIter_Send`. + + .. versionadded:: 3.10 + + +.. c:function:: PySendResult PyIter_Send(PyObject *iter, PyObject *arg, PyObject **presult) + + Sends the *arg* value into the iterator *iter*. Returns: + + - ``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*. + - ``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*. + - ``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to ``NULL``. + + .. versionadded:: 3.10
diff --git a/Doc/c-api/iterator.rst b/Doc/c-api/iterator.rst new file mode 100644 index 0000000..3fcf099 --- /dev/null +++ b/Doc/c-api/iterator.rst
@@ -0,0 +1,52 @@ +.. highlight:: c + +.. _iterator-objects: + +Iterator Objects +---------------- + +Python provides two general-purpose iterator objects. The first, a sequence +iterator, works with an arbitrary sequence supporting the :meth:`__getitem__` +method. The second works with a callable object and a sentinel value, calling +the callable for each item in the sequence, and ending the iteration when the +sentinel value is returned. + + +.. c:var:: PyTypeObject PySeqIter_Type + + Type object for iterator objects returned by :c:func:`PySeqIter_New` and the + one-argument form of the :func:`iter` built-in function for built-in sequence + types. + + +.. c:function:: int PySeqIter_Check(op) + + Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function + always succeeds. + + +.. c:function:: PyObject* PySeqIter_New(PyObject *seq) + + Return an iterator that works with a general sequence object, *seq*. The + iteration ends when the sequence raises :exc:`IndexError` for the subscripting + operation. + + +.. c:var:: PyTypeObject PyCallIter_Type + + Type object for iterator objects returned by :c:func:`PyCallIter_New` and the + two-argument form of the :func:`iter` built-in function. + + +.. c:function:: int PyCallIter_Check(op) + + Return true if the type of *op* is :c:data:`PyCallIter_Type`. This + function always succeeds. + + +.. c:function:: PyObject* PyCallIter_New(PyObject *callable, PyObject *sentinel) + + Return a new iterator. The first parameter, *callable*, can be any Python + callable object that can be called with no parameters; each call to it should + return the next item in the iteration. When *callable* returns a value equal to + *sentinel*, the iteration will be terminated.
diff --git a/Doc/c-api/list.rst b/Doc/c-api/list.rst new file mode 100644 index 0000000..dbf3561 --- /dev/null +++ b/Doc/c-api/list.rst
@@ -0,0 +1,144 @@ +.. highlight:: c + +.. _listobjects: + +List Objects +------------ + +.. index:: pair: object; list + + +.. c:type:: PyListObject + + This subtype of :c:type:`PyObject` represents a Python list object. + + +.. c:var:: PyTypeObject PyList_Type + + This instance of :c:type:`PyTypeObject` represents the Python list type. + This is the same object as :class:`list` in the Python layer. + + +.. c:function:: int PyList_Check(PyObject *p) + + Return true if *p* is a list object or an instance of a subtype of the list + type. This function always succeeds. + + +.. c:function:: int PyList_CheckExact(PyObject *p) + + Return true if *p* is a list object, but not an instance of a subtype of + the list type. This function always succeeds. + + +.. c:function:: PyObject* PyList_New(Py_ssize_t len) + + Return a new list of length *len* on success, or ``NULL`` on failure. + + .. note:: + + If *len* is greater than zero, the returned list object's items are + set to ``NULL``. Thus you cannot use abstract API functions such as + :c:func:`PySequence_SetItem` or expose the object to Python code before + setting all items to a real object with :c:func:`PyList_SetItem`. + + +.. c:function:: Py_ssize_t PyList_Size(PyObject *list) + + .. index:: pair: built-in function; len + + Return the length of the list object in *list*; this is equivalent to + ``len(list)`` on a list object. + + +.. c:function:: Py_ssize_t PyList_GET_SIZE(PyObject *list) + + Similar to :c:func:`PyList_Size`, but without error checking. + + +.. c:function:: PyObject* PyList_GetItem(PyObject *list, Py_ssize_t index) + + Return the object at position *index* in the list pointed to by *list*. The + position must be non-negative; indexing from the end of the list is not + supported. If *index* is out of bounds (<0 or >=len(list)), + return ``NULL`` and set an :exc:`IndexError` exception. + + +.. c:function:: PyObject* PyList_GET_ITEM(PyObject *list, Py_ssize_t i) + + Similar to :c:func:`PyList_GetItem`, but without error checking. + + +.. c:function:: int PyList_SetItem(PyObject *list, Py_ssize_t index, PyObject *item) + + Set the item at index *index* in list to *item*. Return ``0`` on success. + If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` + exception. + + .. note:: + + This function "steals" a reference to *item* and discards a reference to + an item already in the list at the affected position. + + +.. c:function:: void PyList_SET_ITEM(PyObject *list, Py_ssize_t i, PyObject *o) + + Macro form of :c:func:`PyList_SetItem` without error checking. This is + normally only used to fill in new lists where there is no previous content. + + .. note:: + + This macro "steals" a reference to *item*, and, unlike + :c:func:`PyList_SetItem`, does *not* discard a reference to any item that + is being replaced; any reference in *list* at position *i* will be + leaked. + + +.. c:function:: int PyList_Insert(PyObject *list, Py_ssize_t index, PyObject *item) + + Insert the item *item* into list *list* in front of index *index*. Return + ``0`` if successful; return ``-1`` and set an exception if unsuccessful. + Analogous to ``list.insert(index, item)``. + + +.. c:function:: int PyList_Append(PyObject *list, PyObject *item) + + Append the object *item* at the end of list *list*. Return ``0`` if + successful; return ``-1`` and set an exception if unsuccessful. Analogous + to ``list.append(item)``. + + +.. c:function:: PyObject* PyList_GetSlice(PyObject *list, Py_ssize_t low, Py_ssize_t high) + + Return a list of the objects in *list* containing the objects *between* *low* + and *high*. Return ``NULL`` and set an exception if unsuccessful. Analogous + to ``list[low:high]``. Indexing from the end of the list is not supported. + + +.. c:function:: int PyList_SetSlice(PyObject *list, Py_ssize_t low, Py_ssize_t high, PyObject *itemlist) + + Set the slice of *list* between *low* and *high* to the contents of + *itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may + be ``NULL``, indicating the assignment of an empty list (slice deletion). + Return ``0`` on success, ``-1`` on failure. Indexing from the end of the + list is not supported. + + +.. c:function:: int PyList_Sort(PyObject *list) + + Sort the items of *list* in place. Return ``0`` on success, ``-1`` on + failure. This is equivalent to ``list.sort()``. + + +.. c:function:: int PyList_Reverse(PyObject *list) + + Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on + failure. This is the equivalent of ``list.reverse()``. + + +.. c:function:: PyObject* PyList_AsTuple(PyObject *list) + + .. index:: pair: built-in function; tuple + + Return a new tuple object containing the contents of *list*; equivalent to + ``tuple(list)``.
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst new file mode 100644 index 0000000..7b0d55d --- /dev/null +++ b/Doc/c-api/long.rst
@@ -0,0 +1,323 @@ +.. highlight:: c + +.. _longobjects: + +Integer Objects +--------------- + +.. index:: pair: object; long integer + pair: object; integer + +All integers are implemented as "long" integer objects of arbitrary size. + +On error, most ``PyLong_As*`` APIs return ``(return type)-1`` which cannot be +distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. + +.. c:type:: PyLongObject + + This subtype of :c:type:`PyObject` represents a Python integer object. + + +.. c:var:: PyTypeObject PyLong_Type + + This instance of :c:type:`PyTypeObject` represents the Python integer type. + This is the same object as :class:`int` in the Python layer. + + +.. c:function:: int PyLong_Check(PyObject *p) + + Return true if its argument is a :c:type:`PyLongObject` or a subtype of + :c:type:`PyLongObject`. This function always succeeds. + + +.. c:function:: int PyLong_CheckExact(PyObject *p) + + Return true if its argument is a :c:type:`PyLongObject`, but not a subtype of + :c:type:`PyLongObject`. This function always succeeds. + + +.. c:function:: PyObject* PyLong_FromLong(long v) + + Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure. + + The current implementation keeps an array of integer objects for all integers + between ``-5`` and ``256``. When you create an int in that range you actually + just get back a reference to the existing object. + + +.. c:function:: PyObject* PyLong_FromUnsignedLong(unsigned long v) + + Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, or + ``NULL`` on failure. + + +.. c:function:: PyObject* PyLong_FromSsize_t(Py_ssize_t v) + + Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or + ``NULL`` on failure. + + +.. c:function:: PyObject* PyLong_FromSize_t(size_t v) + + Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or + ``NULL`` on failure. + + +.. c:function:: PyObject* PyLong_FromLongLong(long long v) + + Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or ``NULL`` + on failure. + + +.. c:function:: PyObject* PyLong_FromUnsignedLongLong(unsigned long long v) + + Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long long`, + or ``NULL`` on failure. + + +.. c:function:: PyObject* PyLong_FromDouble(double v) + + Return a new :c:type:`PyLongObject` object from the integer part of *v*, or + ``NULL`` on failure. + + +.. c:function:: PyObject* PyLong_FromString(const char *str, char **pend, int base) + + Return a new :c:type:`PyLongObject` based on the string value in *str*, which + is interpreted according to the radix in *base*. If *pend* is non-``NULL``, + *\*pend* will point to the first character in *str* which follows the + representation of the number. If *base* is ``0``, *str* is interpreted using + the :ref:`integers` definition; in this case, leading zeros in a + non-zero decimal number raises a :exc:`ValueError`. If *base* is not ``0``, + it must be between ``2`` and ``36``, inclusive. Leading spaces and single + underscores after a base specifier and between digits are ignored. If there + are no digits, :exc:`ValueError` will be raised. + + .. seealso:: Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` + to convert a :c:type:`PyLongObject` to/from an array of bytes in base + ``256``. You can call those from C using :c:func:`PyObject_CallMethod`. + + +.. c:function:: PyObject* PyLong_FromUnicodeObject(PyObject *u, int base) + + Convert a sequence of Unicode digits in the string *u* to a Python integer + value. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyLong_FromVoidPtr(void *p) + + Create a Python integer from the pointer *p*. The pointer value can be + retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`. + + +.. XXX alias PyLong_AS_LONG (for now) +.. c:function:: long PyLong_AsLong(PyObject *obj) + + .. index:: + single: LONG_MAX + single: OverflowError (built-in exception) + + Return a C :c:expr:`long` representation of *obj*. If *obj* is not an + instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method + (if present) to convert it to a :c:type:`PyLongObject`. + + Raise :exc:`OverflowError` if the value of *obj* is out of range for a + :c:expr:`long`. + + Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate. + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available. + + .. versionchanged:: 3.10 + This function will no longer use :meth:`__int__`. + + +.. c:function:: long PyLong_AsLongAndOverflow(PyObject *obj, int *overflow) + + Return a C :c:expr:`long` representation of *obj*. If *obj* is not an + instance of :c:type:`PyLongObject`, first call its :meth:`__index__` + method (if present) to convert it to a :c:type:`PyLongObject`. + + If the value of *obj* is greater than :const:`LONG_MAX` or less than + :const:`LONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, and + return ``-1``; otherwise, set *\*overflow* to ``0``. If any other exception + occurs set *\*overflow* to ``0`` and return ``-1`` as usual. + + Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate. + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available. + + .. versionchanged:: 3.10 + This function will no longer use :meth:`__int__`. + + +.. c:function:: long long PyLong_AsLongLong(PyObject *obj) + + .. index:: + single: OverflowError (built-in exception) + + Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an + instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method + (if present) to convert it to a :c:type:`PyLongObject`. + + Raise :exc:`OverflowError` if the value of *obj* is out of range for a + :c:expr:`long long`. + + Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate. + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available. + + .. versionchanged:: 3.10 + This function will no longer use :meth:`__int__`. + + +.. c:function:: long long PyLong_AsLongLongAndOverflow(PyObject *obj, int *overflow) + + Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an + instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method + (if present) to convert it to a :c:type:`PyLongObject`. + + If the value of *obj* is greater than :const:`LLONG_MAX` or less than + :const:`LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, + and return ``-1``; otherwise, set *\*overflow* to ``0``. If any other + exception occurs set *\*overflow* to ``0`` and return ``-1`` as usual. + + Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate. + + .. versionadded:: 3.2 + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available. + + .. versionchanged:: 3.10 + This function will no longer use :meth:`__int__`. + + +.. c:function:: Py_ssize_t PyLong_AsSsize_t(PyObject *pylong) + + .. index:: + single: PY_SSIZE_T_MAX + single: OverflowError (built-in exception) + + Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must + be an instance of :c:type:`PyLongObject`. + + Raise :exc:`OverflowError` if the value of *pylong* is out of range for a + :c:type:`Py_ssize_t`. + + Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate. + + +.. c:function:: unsigned long PyLong_AsUnsignedLong(PyObject *pylong) + + .. index:: + single: ULONG_MAX + single: OverflowError (built-in exception) + + Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* + must be an instance of :c:type:`PyLongObject`. + + Raise :exc:`OverflowError` if the value of *pylong* is out of range for a + :c:expr:`unsigned long`. + + Returns ``(unsigned long)-1`` on error. + Use :c:func:`PyErr_Occurred` to disambiguate. + + +.. c:function:: size_t PyLong_AsSize_t(PyObject *pylong) + + .. index:: + single: SIZE_MAX + single: OverflowError (built-in exception) + + Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be + an instance of :c:type:`PyLongObject`. + + Raise :exc:`OverflowError` if the value of *pylong* is out of range for a + :c:type:`size_t`. + + Returns ``(size_t)-1`` on error. + Use :c:func:`PyErr_Occurred` to disambiguate. + + +.. c:function:: unsigned long long PyLong_AsUnsignedLongLong(PyObject *pylong) + + .. index:: + single: OverflowError (built-in exception) + + Return a C :c:expr:`unsigned long long` representation of *pylong*. *pylong* + must be an instance of :c:type:`PyLongObject`. + + Raise :exc:`OverflowError` if the value of *pylong* is out of range for an + :c:expr:`unsigned long long`. + + Returns ``(unsigned long long)-1`` on error. + Use :c:func:`PyErr_Occurred` to disambiguate. + + .. versionchanged:: 3.1 + A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`. + + +.. c:function:: unsigned long PyLong_AsUnsignedLongMask(PyObject *obj) + + Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not + an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` + method (if present) to convert it to a :c:type:`PyLongObject`. + + If the value of *obj* is out of range for an :c:expr:`unsigned long`, + return the reduction of that value modulo ``ULONG_MAX + 1``. + + Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to + disambiguate. + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available. + + .. versionchanged:: 3.10 + This function will no longer use :meth:`__int__`. + + +.. c:function:: unsigned long long PyLong_AsUnsignedLongLongMask(PyObject *obj) + + Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* + is not an instance of :c:type:`PyLongObject`, first call its + :meth:`__index__` method (if present) to convert it to a + :c:type:`PyLongObject`. + + If the value of *obj* is out of range for an :c:expr:`unsigned long long`, + return the reduction of that value modulo ``ULLONG_MAX + 1``. + + Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` + to disambiguate. + + .. versionchanged:: 3.8 + Use :meth:`__index__` if available. + + .. versionchanged:: 3.10 + This function will no longer use :meth:`__int__`. + + +.. c:function:: double PyLong_AsDouble(PyObject *pylong) + + Return a C :c:expr:`double` representation of *pylong*. *pylong* must be + an instance of :c:type:`PyLongObject`. + + Raise :exc:`OverflowError` if the value of *pylong* is out of range for a + :c:expr:`double`. + + Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate. + + +.. c:function:: void* PyLong_AsVoidPtr(PyObject *pylong) + + Convert a Python integer *pylong* to a C :c:expr:`void` pointer. + If *pylong* cannot be converted, an :exc:`OverflowError` will be raised. This + is only assured to produce a usable :c:expr:`void` pointer for values created + with :c:func:`PyLong_FromVoidPtr`. + + Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate.
diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst new file mode 100644 index 0000000..cffb0ed --- /dev/null +++ b/Doc/c-api/mapping.rst
@@ -0,0 +1,103 @@ +.. highlight:: c + +.. _mapping: + +Mapping Protocol +================ + +See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and +:c:func:`PyObject_DelItem`. + + +.. c:function:: int PyMapping_Check(PyObject *o) + + Return ``1`` if the object provides the mapping protocol or supports slicing, + and ``0`` otherwise. Note that it returns ``1`` for Python classes with + a :meth:`__getitem__` method, since in general it is impossible to + determine what type of keys the class supports. This function always succeeds. + + +.. c:function:: Py_ssize_t PyMapping_Size(PyObject *o) + Py_ssize_t PyMapping_Length(PyObject *o) + + .. index:: pair: built-in function; len + + Returns the number of keys in object *o* on success, and ``-1`` on failure. + This is equivalent to the Python expression ``len(o)``. + + +.. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key) + + Return element of *o* corresponding to the string *key* or ``NULL`` on failure. + This is the equivalent of the Python expression ``o[key]``. + See also :c:func:`PyObject_GetItem`. + + +.. c:function:: int PyMapping_SetItemString(PyObject *o, const char *key, PyObject *v) + + Map the string *key* to the value *v* in object *o*. Returns ``-1`` on + failure. This is the equivalent of the Python statement ``o[key] = v``. + See also :c:func:`PyObject_SetItem`. This function *does not* steal a + reference to *v*. + + +.. c:function:: int PyMapping_DelItem(PyObject *o, PyObject *key) + + Remove the mapping for the object *key* from the object *o*. Return ``-1`` + on failure. This is equivalent to the Python statement ``del o[key]``. + This is an alias of :c:func:`PyObject_DelItem`. + + +.. c:function:: int PyMapping_DelItemString(PyObject *o, const char *key) + + Remove the mapping for the string *key* from the object *o*. Return ``-1`` + on failure. This is equivalent to the Python statement ``del o[key]``. + + +.. c:function:: int PyMapping_HasKey(PyObject *o, PyObject *key) + + Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. + This is equivalent to the Python expression ``key in o``. + This function always succeeds. + + Note that exceptions which occur while calling the :meth:`__getitem__` + method will get suppressed. + To get error reporting use :c:func:`PyObject_GetItem()` instead. + + +.. c:function:: int PyMapping_HasKeyString(PyObject *o, const char *key) + + Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. + This is equivalent to the Python expression ``key in o``. + This function always succeeds. + + Note that exceptions which occur while calling the :meth:`__getitem__` + method and creating a temporary string object will get suppressed. + To get error reporting use :c:func:`PyMapping_GetItemString()` instead. + + +.. c:function:: PyObject* PyMapping_Keys(PyObject *o) + + On success, return a list of the keys in object *o*. On failure, return + ``NULL``. + + .. versionchanged:: 3.7 + Previously, the function returned a list or a tuple. + + +.. c:function:: PyObject* PyMapping_Values(PyObject *o) + + On success, return a list of the values in object *o*. On failure, return + ``NULL``. + + .. versionchanged:: 3.7 + Previously, the function returned a list or a tuple. + + +.. c:function:: PyObject* PyMapping_Items(PyObject *o) + + On success, return a list of the items in object *o*, where each item is a + tuple containing a key-value pair. On failure, return ``NULL``. + + .. versionchanged:: 3.7 + Previously, the function returned a list or a tuple.
diff --git a/Doc/c-api/marshal.rst b/Doc/c-api/marshal.rst new file mode 100644 index 0000000..489f158 --- /dev/null +++ b/Doc/c-api/marshal.rst
@@ -0,0 +1,98 @@ +.. highlight:: c + +.. _marshalling-utils: + +Data marshalling support +======================== + +These routines allow C code to work with serialized objects using the same +data format as the :mod:`marshal` module. There are functions to write data +into the serialization format, and additional functions that can be used to +read the data back. Files used to store marshalled data must be opened in +binary mode. + +Numeric values are stored with the least significant byte first. + +The module supports two versions of the data format: version 0 is the +historical version, version 1 shares interned strings in the file, and upon +unmarshalling. Version 2 uses a binary format for floating point numbers. +``Py_MARSHAL_VERSION`` indicates the current file format (currently 2). + + +.. c:function:: void PyMarshal_WriteLongToFile(long value, FILE *file, int version) + + Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write + the least-significant 32 bits of *value*; regardless of the size of the + native :c:expr:`long` type. *version* indicates the file format. + + This function can fail, in which case it sets the error indicator. + Use :c:func:`PyErr_Occurred` to check for that. + +.. c:function:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version) + + Marshal a Python object, *value*, to *file*. + *version* indicates the file format. + + This function can fail, in which case it sets the error indicator. + Use :c:func:`PyErr_Occurred` to check for that. + +.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version) + + Return a bytes object containing the marshalled representation of *value*. + *version* indicates the file format. + + +The following functions allow marshalled values to be read back in. + + +.. c:function:: long PyMarshal_ReadLongFromFile(FILE *file) + + Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened + for reading. Only a 32-bit value can be read in using this function, + regardless of the native size of :c:expr:`long`. + + On error, sets the appropriate exception (:exc:`EOFError`) and returns + ``-1``. + + +.. c:function:: int PyMarshal_ReadShortFromFile(FILE *file) + + Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened + for reading. Only a 16-bit value can be read in using this function, + regardless of the native size of :c:expr:`short`. + + On error, sets the appropriate exception (:exc:`EOFError`) and returns + ``-1``. + + +.. c:function:: PyObject* PyMarshal_ReadObjectFromFile(FILE *file) + + Return a Python object from the data stream in a :c:expr:`FILE*` opened for + reading. + + On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` + or :exc:`TypeError`) and returns ``NULL``. + + +.. c:function:: PyObject* PyMarshal_ReadLastObjectFromFile(FILE *file) + + Return a Python object from the data stream in a :c:expr:`FILE*` opened for + reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function + assumes that no further objects will be read from the file, allowing it to + aggressively load file data into memory so that the de-serialization can + operate from data in memory rather than reading a byte at a time from the + file. Only use these variant if you are certain that you won't be reading + anything else from the file. + + On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` + or :exc:`TypeError`) and returns ``NULL``. + + +.. c:function:: PyObject* PyMarshal_ReadObjectFromString(const char *data, Py_ssize_t len) + + Return a Python object from the data stream in a byte buffer + containing *len* bytes pointed to by *data*. + + On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` + or :exc:`TypeError`) and returns ``NULL``. +
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst new file mode 100644 index 0000000..7041c15 --- /dev/null +++ b/Doc/c-api/memory.rst
@@ -0,0 +1,739 @@ +.. highlight:: c + + +.. _memory: + +***************** +Memory Management +***************** + +.. sectionauthor:: Vladimir Marangozov <Vladimir.Marangozov@inrialpes.fr> + + + +.. _memoryoverview: + +Overview +======== + +Memory management in Python involves a private heap containing all Python +objects and data structures. The management of this private heap is ensured +internally by the *Python memory manager*. The Python memory manager has +different components which deal with various dynamic storage management aspects, +like sharing, segmentation, preallocation or caching. + +At the lowest level, a raw memory allocator ensures that there is enough room in +the private heap for storing all Python-related data by interacting with the +memory manager of the operating system. On top of the raw memory allocator, +several object-specific allocators operate on the same heap and implement +distinct memory management policies adapted to the peculiarities of every object +type. For example, integer objects are managed differently within the heap than +strings, tuples or dictionaries because integers imply different storage +requirements and speed/space tradeoffs. The Python memory manager thus delegates +some of the work to the object-specific allocators, but ensures that the latter +operate within the bounds of the private heap. + +It is important to understand that the management of the Python heap is +performed by the interpreter itself and that the user has no control over it, +even if they regularly manipulate object pointers to memory blocks inside that +heap. The allocation of heap space for Python objects and other internal +buffers is performed on demand by the Python memory manager through the Python/C +API functions listed in this document. + +.. index:: + single: malloc() + single: calloc() + single: realloc() + single: free() + +To avoid memory corruption, extension writers should never try to operate on +Python objects with the functions exported by the C library: :c:func:`malloc`, +:c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will result in mixed +calls between the C allocator and the Python memory manager with fatal +consequences, because they implement different algorithms and operate on +different heaps. However, one may safely allocate and release memory blocks +with the C library allocator for individual purposes, as shown in the following +example:: + + PyObject *res; + char *buf = (char *) malloc(BUFSIZ); /* for I/O */ + + if (buf == NULL) + return PyErr_NoMemory(); + ...Do some I/O operation involving buf... + res = PyBytes_FromString(buf); + free(buf); /* malloc'ed */ + return res; + +In this example, the memory request for the I/O buffer is handled by the C +library allocator. The Python memory manager is involved only in the allocation +of the bytes object returned as a result. + +In most situations, however, it is recommended to allocate memory from the +Python heap specifically because the latter is under control of the Python +memory manager. For example, this is required when the interpreter is extended +with new object types written in C. Another reason for using the Python heap is +the desire to *inform* the Python memory manager about the memory needs of the +extension module. Even when the requested memory is used exclusively for +internal, highly specific purposes, delegating all memory requests to the Python +memory manager causes the interpreter to have a more accurate image of its +memory footprint as a whole. Consequently, under certain circumstances, the +Python memory manager may or may not trigger appropriate actions, like garbage +collection, memory compaction or other preventive procedures. Note that by using +the C library allocator as shown in the previous example, the allocated memory +for the I/O buffer escapes completely the Python memory manager. + +.. seealso:: + + The :envvar:`PYTHONMALLOC` environment variable can be used to configure + the memory allocators used by Python. + + The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print + statistics of the :ref:`pymalloc memory allocator <pymalloc>` every time a + new pymalloc object arena is created, and on shutdown. + +Allocator Domains +================= + +.. _allocator-domains: + +All allocating functions belong to one of three different "domains" (see also +:c:type:`PyMemAllocatorDomain`). These domains represent different allocation +strategies and are optimized for different purposes. The specific details on +how every domain allocates memory or what internal functions each domain calls +is considered an implementation detail, but for debugging purposes a simplified +table can be found at :ref:`here <default-memory-allocators>`. There is no hard +requirement to use the memory returned by the allocation functions belonging to +a given domain for only the purposes hinted by that domain (although this is the +recommended practice). For example, one could use the memory returned by +:c:func:`PyMem_RawMalloc` for allocating Python objects or the memory returned +by :c:func:`PyObject_Malloc` for allocating memory for buffers. + +The three allocation domains are: + +* Raw domain: intended for allocating memory for general-purpose memory + buffers where the allocation *must* go to the system allocator or where the + allocator can operate without the :term:`GIL`. The memory is requested directly + to the system. + +* "Mem" domain: intended for allocating memory for Python buffers and + general-purpose memory buffers where the allocation must be performed with + the :term:`GIL` held. The memory is taken from the Python private heap. + +* Object domain: intended for allocating memory belonging to Python objects. The + memory is taken from the Python private heap. + +When freeing memory previously allocated by the allocating functions belonging to a +given domain,the matching specific deallocating functions must be used. For example, +:c:func:`PyMem_Free` must be used to free memory allocated using :c:func:`PyMem_Malloc`. + +Raw Memory Interface +==================== + +The following function sets are wrappers to the system allocator. These +functions are thread-safe, the :term:`GIL <global interpreter lock>` does not +need to be held. + +The :ref:`default raw memory allocator <default-memory-allocators>` uses +the following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` +and :c:func:`free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when requesting +zero bytes. + +.. versionadded:: 3.4 + +.. c:function:: void* PyMem_RawMalloc(size_t n) + + Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the + allocated memory, or ``NULL`` if the request fails. + + Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, as + if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not have + been initialized in any way. + + +.. c:function:: void* PyMem_RawCalloc(size_t nelem, size_t elsize) + + Allocates *nelem* elements each whose size in bytes is *elsize* and returns + a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if the + request fails. The memory is initialized to zeros. + + Requesting zero elements or elements of size zero bytes returns a distinct + non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been + called instead. + + .. versionadded:: 3.5 + + +.. c:function:: void* PyMem_RawRealloc(void *p, size_t n) + + Resizes the memory block pointed to by *p* to *n* bytes. The contents will + be unchanged to the minimum of the old and the new sizes. + + If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else if + *n* is equal to zero, the memory block is resized but is not freed, and the + returned pointer is non-``NULL``. + + Unless *p* is ``NULL``, it must have been returned by a previous call to + :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or + :c:func:`PyMem_RawCalloc`. + + If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* + remains a valid pointer to the previous memory area. + + +.. c:function:: void PyMem_RawFree(void *p) + + Frees the memory block pointed to by *p*, which must have been returned by a + previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or + :c:func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_RawFree(p)`` has been + called before, undefined behavior occurs. + + If *p* is ``NULL``, no operation is performed. + + +.. _memoryinterface: + +Memory Interface +================ + +The following function sets, modeled after the ANSI C standard, but specifying +behavior when requesting zero bytes, are available for allocating and releasing +memory from the Python heap. + +The :ref:`default memory allocator <default-memory-allocators>` uses the +:ref:`pymalloc memory allocator <pymalloc>`. + +.. warning:: + + The :term:`GIL <global interpreter lock>` must be held when using these + functions. + +.. versionchanged:: 3.6 + + The default allocator is now pymalloc instead of system :c:func:`malloc`. + +.. c:function:: void* PyMem_Malloc(size_t n) + + Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the + allocated memory, or ``NULL`` if the request fails. + + Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, as + if ``PyMem_Malloc(1)`` had been called instead. The memory will not have + been initialized in any way. + + +.. c:function:: void* PyMem_Calloc(size_t nelem, size_t elsize) + + Allocates *nelem* elements each whose size in bytes is *elsize* and returns + a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if the + request fails. The memory is initialized to zeros. + + Requesting zero elements or elements of size zero bytes returns a distinct + non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been called + instead. + + .. versionadded:: 3.5 + + +.. c:function:: void* PyMem_Realloc(void *p, size_t n) + + Resizes the memory block pointed to by *p* to *n* bytes. The contents will be + unchanged to the minimum of the old and the new sizes. + + If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if *n* + is equal to zero, the memory block is resized but is not freed, and the + returned pointer is non-``NULL``. + + Unless *p* is ``NULL``, it must have been returned by a previous call to + :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`. + + If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* remains + a valid pointer to the previous memory area. + + +.. c:function:: void PyMem_Free(void *p) + + Frees the memory block pointed to by *p*, which must have been returned by a + previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or + :c:func:`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called + before, undefined behavior occurs. + + If *p* is ``NULL``, no operation is performed. + +The following type-oriented macros are provided for convenience. Note that +*TYPE* refers to any C type. + + +.. c:function:: TYPE* PyMem_New(TYPE, size_t n) + + Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes of + memory. Returns a pointer cast to :c:expr:`TYPE*`. The memory will not have + been initialized in any way. + + +.. c:function:: TYPE* PyMem_Resize(void *p, TYPE, size_t n) + + Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * + sizeof(TYPE))`` bytes. Returns a pointer cast to :c:expr:`TYPE*`. On return, + *p* will be a pointer to the new memory area, or ``NULL`` in the event of + failure. + + This is a C preprocessor macro; *p* is always reassigned. Save the original + value of *p* to avoid losing memory when handling errors. + + +.. c:function:: void PyMem_Del(void *p) + + Same as :c:func:`PyMem_Free`. + +In addition, the following macro sets are provided for calling the Python memory +allocator directly, without involving the C API functions listed above. However, +note that their use does not preserve binary compatibility across Python +versions and is therefore deprecated in extension modules. + +* ``PyMem_MALLOC(size)`` +* ``PyMem_NEW(type, size)`` +* ``PyMem_REALLOC(ptr, size)`` +* ``PyMem_RESIZE(ptr, type, size)`` +* ``PyMem_FREE(ptr)`` +* ``PyMem_DEL(ptr)`` + + +Object allocators +================= + +The following function sets, modeled after the ANSI C standard, but specifying +behavior when requesting zero bytes, are available for allocating and releasing +memory from the Python heap. + +.. note:: + There is no guarantee that the memory returned by these allocators can be + successfully cast to a Python object when intercepting the allocating + functions in this domain by the methods described in + the :ref:`Customize Memory Allocators <customize-memory-allocators>` section. + +The :ref:`default object allocator <default-memory-allocators>` uses the +:ref:`pymalloc memory allocator <pymalloc>`. + +.. warning:: + + The :term:`GIL <global interpreter lock>` must be held when using these + functions. + +.. c:function:: void* PyObject_Malloc(size_t n) + + Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the + allocated memory, or ``NULL`` if the request fails. + + Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, as + if ``PyObject_Malloc(1)`` had been called instead. The memory will not have + been initialized in any way. + + +.. c:function:: void* PyObject_Calloc(size_t nelem, size_t elsize) + + Allocates *nelem* elements each whose size in bytes is *elsize* and returns + a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if the + request fails. The memory is initialized to zeros. + + Requesting zero elements or elements of size zero bytes returns a distinct + non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been called + instead. + + .. versionadded:: 3.5 + + +.. c:function:: void* PyObject_Realloc(void *p, size_t n) + + Resizes the memory block pointed to by *p* to *n* bytes. The contents will be + unchanged to the minimum of the old and the new sizes. + + If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else if *n* + is equal to zero, the memory block is resized but is not freed, and the + returned pointer is non-``NULL``. + + Unless *p* is ``NULL``, it must have been returned by a previous call to + :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:`PyObject_Calloc`. + + If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* remains + a valid pointer to the previous memory area. + + +.. c:function:: void PyObject_Free(void *p) + + Frees the memory block pointed to by *p*, which must have been returned by a + previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or + :c:func:`PyObject_Calloc`. Otherwise, or if ``PyObject_Free(p)`` has been called + before, undefined behavior occurs. + + If *p* is ``NULL``, no operation is performed. + + +.. _default-memory-allocators: + +Default Memory Allocators +========================= + +Default memory allocators: + +=============================== ==================== ================== ===================== ==================== +Configuration Name PyMem_RawMalloc PyMem_Malloc PyObject_Malloc +=============================== ==================== ================== ===================== ==================== +Release build ``"pymalloc"`` ``malloc`` ``pymalloc`` ``pymalloc`` +Debug build ``"pymalloc_debug"`` ``malloc`` + debug ``pymalloc`` + debug ``pymalloc`` + debug +Release build, without pymalloc ``"malloc"`` ``malloc`` ``malloc`` ``malloc`` +Debug build, without pymalloc ``"malloc_debug"`` ``malloc`` + debug ``malloc`` + debug ``malloc`` + debug +=============================== ==================== ================== ===================== ==================== + +Legend: + +* Name: value for :envvar:`PYTHONMALLOC` environment variable. +* ``malloc``: system allocators from the standard C library, C functions: + :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. +* ``pymalloc``: :ref:`pymalloc memory allocator <pymalloc>`. +* "+ debug": with :ref:`debug hooks on the Python memory allocators + <pymem-debug-hooks>`. +* "Debug build": :ref:`Python build in debug mode <debug-build>`. + +.. _customize-memory-allocators: + +Customize Memory Allocators +=========================== + +.. versionadded:: 3.4 + +.. c:type:: PyMemAllocatorEx + + Structure used to describe a memory block allocator. The structure has + the following fields: + + +----------------------------------------------------------+---------------------------------------+ + | Field | Meaning | + +==========================================================+=======================================+ + | ``void *ctx`` | user context passed as first argument | + +----------------------------------------------------------+---------------------------------------+ + | ``void* malloc(void *ctx, size_t size)`` | allocate a memory block | + +----------------------------------------------------------+---------------------------------------+ + | ``void* calloc(void *ctx, size_t nelem, size_t elsize)`` | allocate a memory block initialized | + | | with zeros | + +----------------------------------------------------------+---------------------------------------+ + | ``void* realloc(void *ctx, void *ptr, size_t new_size)`` | allocate or resize a memory block | + +----------------------------------------------------------+---------------------------------------+ + | ``void free(void *ctx, void *ptr)`` | free a memory block | + +----------------------------------------------------------+---------------------------------------+ + + .. versionchanged:: 3.5 + The :c:type:`PyMemAllocator` structure was renamed to + :c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added. + + +.. c:type:: PyMemAllocatorDomain + + Enum used to identify an allocator domain. Domains: + + .. c:macro:: PYMEM_DOMAIN_RAW + + Functions: + + * :c:func:`PyMem_RawMalloc` + * :c:func:`PyMem_RawRealloc` + * :c:func:`PyMem_RawCalloc` + * :c:func:`PyMem_RawFree` + + .. c:macro:: PYMEM_DOMAIN_MEM + + Functions: + + * :c:func:`PyMem_Malloc`, + * :c:func:`PyMem_Realloc` + * :c:func:`PyMem_Calloc` + * :c:func:`PyMem_Free` + + .. c:macro:: PYMEM_DOMAIN_OBJ + + Functions: + + * :c:func:`PyObject_Malloc` + * :c:func:`PyObject_Realloc` + * :c:func:`PyObject_Calloc` + * :c:func:`PyObject_Free` + +.. c:function:: void PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator) + + Get the memory block allocator of the specified domain. + + +.. c:function:: void PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator) + + Set the memory block allocator of the specified domain. + + The new allocator must return a distinct non-``NULL`` pointer when requesting + zero bytes. + + For the :c:data:`PYMEM_DOMAIN_RAW` domain, the allocator must be + thread-safe: the :term:`GIL <global interpreter lock>` is not held when the + allocator is called. + + If the new allocator is not a hook (does not call the previous allocator), + the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the + debug hooks on top on the new allocator. + + See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python + with PyPreConfig <c-preinit>`. + + .. warning:: + + :c:func:`PyMem_SetAllocator` does have the following contract: + + * It can be called after :c:func:`Py_PreInitialize` and before + :c:func:`Py_InitializeFromConfig` to install a custom memory + allocator. There are no restrictions over the installed allocator + other than the ones imposed by the domain (for instance, the Raw + Domain allows the allocator to be called without the GIL held). See + :ref:`the section on allocator domains <allocator-domains>` for more + information. + + * If called after Python has finish initializing (after + :c:func:`Py_InitializeFromConfig` has been called) the allocator + **must** wrap the existing allocator. Substituting the current + allocator for some other arbitrary one is **not supported**. + + + +.. c:function:: void PyMem_SetupDebugHooks(void) + + Setup :ref:`debug hooks in the Python memory allocators <pymem-debug-hooks>` + to detect memory errors. + + +.. _pymem-debug-hooks: + +Debug hooks on the Python memory allocators +=========================================== + +When :ref:`Python is built in debug mode <debug-build>`, the +:c:func:`PyMem_SetupDebugHooks` function is called at the :ref:`Python +preinitialization <c-preinit>` to setup debug hooks on Python memory allocators +to detect memory errors. + +The :envvar:`PYTHONMALLOC` environment variable can be used to install debug +hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``). + +The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks +after calling :c:func:`PyMem_SetAllocator`. + +These debug hooks fill dynamically allocated memory blocks with special, +recognizable bit patterns. Newly allocated memory is filled with the byte +``0xCD`` (``PYMEM_CLEANBYTE``), freed memory is filled with the byte ``0xDD`` +(``PYMEM_DEADBYTE``). Memory blocks are surrounded by "forbidden bytes" +filled with the byte ``0xFD`` (``PYMEM_FORBIDDENBYTE``). Strings of these bytes +are unlikely to be valid addresses, floats, or ASCII strings. + +Runtime checks: + +- Detect API violations. For example, detect if :c:func:`PyObject_Free` is + called on a memory block allocated by :c:func:`PyMem_Malloc`. +- Detect write before the start of the buffer (buffer underflow). +- Detect write after the end of the buffer (buffer overflow). +- Check that the :term:`GIL <global interpreter lock>` is held when + allocator functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: + :c:func:`PyObject_Malloc`) and :c:data:`PYMEM_DOMAIN_MEM` (ex: + :c:func:`PyMem_Malloc`) domains are called. + +On error, the debug hooks use the :mod:`tracemalloc` module to get the +traceback where a memory block was allocated. The traceback is only displayed +if :mod:`tracemalloc` is tracing Python memory allocations and the memory block +was traced. + +Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each block +of *N* bytes requested. The memory layout is like so, where p represents the +address returned by a malloc-like or realloc-like function (``p[i:j]`` means +the slice of bytes from ``*(p+i)`` inclusive up to ``*(p+j)`` exclusive; note +that the treatment of negative indices differs from a Python slice): + +``p[-2*S:-S]`` + Number of bytes originally asked for. This is a size_t, big-endian (easier + to read in a memory dump). +``p[-S]`` + API identifier (ASCII character): + + * ``'r'`` for :c:data:`PYMEM_DOMAIN_RAW`. + * ``'m'`` for :c:data:`PYMEM_DOMAIN_MEM`. + * ``'o'`` for :c:data:`PYMEM_DOMAIN_OBJ`. + +``p[-S+1:0]`` + Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads. + +``p[0:N]`` + The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch + reference to uninitialized memory. When a realloc-like function is called + requesting a larger memory block, the new excess bytes are also filled with + PYMEM_CLEANBYTE. When a free-like function is called, these are + overwritten with PYMEM_DEADBYTE, to catch reference to freed memory. When + a realloc- like function is called requesting a smaller memory block, the + excess old bytes are also filled with PYMEM_DEADBYTE. + +``p[N:N+S]`` + Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads. + +``p[N+S:N+2*S]`` + Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by + default). + + A serial number, incremented by 1 on each call to a malloc-like or + realloc-like function. Big-endian ``size_t``. If "bad memory" is detected + later, the serial number gives an excellent way to set a breakpoint on the + next run, to capture the instant at which this block was passed out. The + static function bumpserialno() in obmalloc.c is the only place the serial + number is incremented, and exists so you can set such a breakpoint easily. + +A realloc-like or free-like function first checks that the PYMEM_FORBIDDENBYTE +bytes at each end are intact. If they've been altered, diagnostic output is +written to stderr, and the program is aborted via Py_FatalError(). The other +main failure mode is provoking a memory error when a program reads up one of +the special bit patterns and tries to use it as an address. If you get in a +debugger then and look at the object, you're likely to see that it's entirely +filled with PYMEM_DEADBYTE (meaning freed memory is getting used) or +PYMEM_CLEANBYTE (meaning uninitialized memory is getting used). + +.. versionchanged:: 3.6 + The :c:func:`PyMem_SetupDebugHooks` function now also works on Python + compiled in release mode. On error, the debug hooks now use + :mod:`tracemalloc` to get the traceback where a memory block was allocated. + The debug hooks now also check if the GIL is held when functions of + :c:data:`PYMEM_DOMAIN_OBJ` and :c:data:`PYMEM_DOMAIN_MEM` domains are + called. + +.. versionchanged:: 3.8 + Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) + and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, + ``0xDD`` and ``0xFD`` to use the same values than Windows CRT debug + ``malloc()`` and ``free()``. + + +.. _pymalloc: + +The pymalloc allocator +====================== + +Python has a *pymalloc* allocator optimized for small objects (smaller or equal +to 512 bytes) with a short lifetime. It uses memory mappings called "arenas" +with a fixed size of 256 KiB. It falls back to :c:func:`PyMem_RawMalloc` and +:c:func:`PyMem_RawRealloc` for allocations larger than 512 bytes. + +*pymalloc* is the :ref:`default allocator <default-memory-allocators>` of the +:c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and +:c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains. + +The arena allocator uses the following functions: + +* :c:func:`VirtualAlloc` and :c:func:`VirtualFree` on Windows, +* :c:func:`mmap` and :c:func:`munmap` if available, +* :c:func:`malloc` and :c:func:`free` otherwise. + +This allocator is disabled if Python is configured with the +:option:`--without-pymalloc` option. It can also be disabled at runtime using +the :envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``). + +Customize pymalloc Arena Allocator +---------------------------------- + +.. versionadded:: 3.4 + +.. c:type:: PyObjectArenaAllocator + + Structure used to describe an arena allocator. The structure has + three fields: + + +--------------------------------------------------+---------------------------------------+ + | Field | Meaning | + +==================================================+=======================================+ + | ``void *ctx`` | user context passed as first argument | + +--------------------------------------------------+---------------------------------------+ + | ``void* alloc(void *ctx, size_t size)`` | allocate an arena of size bytes | + +--------------------------------------------------+---------------------------------------+ + | ``void free(void *ctx, void *ptr, size_t size)`` | free an arena | + +--------------------------------------------------+---------------------------------------+ + +.. c:function:: void PyObject_GetArenaAllocator(PyObjectArenaAllocator *allocator) + + Get the arena allocator. + +.. c:function:: void PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator) + + Set the arena allocator. + + +tracemalloc C API +================= + +.. versionadded:: 3.7 + +.. c:function:: int PyTraceMalloc_Track(unsigned int domain, uintptr_t ptr, size_t size) + + Track an allocated memory block in the :mod:`tracemalloc` module. + + Return ``0`` on success, return ``-1`` on error (failed to allocate memory to + store the trace). Return ``-2`` if tracemalloc is disabled. + + If memory block is already tracked, update the existing trace. + +.. c:function:: int PyTraceMalloc_Untrack(unsigned int domain, uintptr_t ptr) + + Untrack an allocated memory block in the :mod:`tracemalloc` module. + Do nothing if the block was not tracked. + + Return ``-2`` if tracemalloc is disabled, otherwise return ``0``. + + +.. _memoryexamples: + +Examples +======== + +Here is the example from section :ref:`memoryoverview`, rewritten so that the +I/O buffer is allocated from the Python heap by using the first function set:: + + PyObject *res; + char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */ + + if (buf == NULL) + return PyErr_NoMemory(); + /* ...Do some I/O operation involving buf... */ + res = PyBytes_FromString(buf); + PyMem_Free(buf); /* allocated with PyMem_Malloc */ + return res; + +The same code using the type-oriented function set:: + + PyObject *res; + char *buf = PyMem_New(char, BUFSIZ); /* for I/O */ + + if (buf == NULL) + return PyErr_NoMemory(); + /* ...Do some I/O operation involving buf... */ + res = PyBytes_FromString(buf); + PyMem_Del(buf); /* allocated with PyMem_New */ + return res; + +Note that in the two examples above, the buffer is always manipulated via +functions belonging to the same set. Indeed, it is required to use the same +memory API family for a given memory block, so that the risk of mixing different +allocators is reduced to a minimum. The following code sequence contains two +errors, one of which is labeled as *fatal* because it mixes two different +allocators operating on different heaps. :: + + char *buf1 = PyMem_New(char, BUFSIZ); + char *buf2 = (char *) malloc(BUFSIZ); + char *buf3 = (char *) PyMem_Malloc(BUFSIZ); + ... + PyMem_Del(buf3); /* Wrong -- should be PyMem_Free() */ + free(buf2); /* Right -- allocated via malloc() */ + free(buf1); /* Fatal -- should be PyMem_Del() */ + +In addition to the functions aimed at handling raw memory blocks from the Python +heap, objects in Python are allocated and released with :c:func:`PyObject_New`, +:c:func:`PyObject_NewVar` and :c:func:`PyObject_Del`. + +These will be explained in the next chapter on defining and implementing new +object types in C.
diff --git a/Doc/c-api/memoryview.rst b/Doc/c-api/memoryview.rst new file mode 100644 index 0000000..2aa4331 --- /dev/null +++ b/Doc/c-api/memoryview.rst
@@ -0,0 +1,63 @@ +.. highlight:: c + +.. _memoryview-objects: + +.. index:: + pair: object; memoryview + +MemoryView objects +------------------ + +A :class:`memoryview` object exposes the C level :ref:`buffer interface +<bufferobjects>` as a Python object which can then be passed around like +any other object. + + +.. c:function:: PyObject *PyMemoryView_FromObject(PyObject *obj) + + Create a memoryview object from an object that provides the buffer interface. + If *obj* supports writable buffer exports, the memoryview object will be + read/write, otherwise it may be either read-only or read/write at the + discretion of the exporter. + +.. c:function:: PyObject *PyMemoryView_FromMemory(char *mem, Py_ssize_t size, int flags) + + Create a memoryview object using *mem* as the underlying buffer. + *flags* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`. + + .. versionadded:: 3.3 + +.. c:function:: PyObject *PyMemoryView_FromBuffer(const Py_buffer *view) + + Create a memoryview object wrapping the given buffer structure *view*. + For simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred + function. + +.. c:function:: PyObject *PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char order) + + Create a memoryview object to a :term:`contiguous` chunk of memory (in either + 'C' or 'F'ortran *order*) from an object that defines the buffer + interface. If memory is contiguous, the memoryview object points to the + original memory. Otherwise, a copy is made and the memoryview points to a + new bytes object. + + +.. c:function:: int PyMemoryView_Check(PyObject *obj) + + Return true if the object *obj* is a memoryview object. It is not + currently allowed to create subclasses of :class:`memoryview`. This + function always succeeds. + + +.. c:function:: Py_buffer *PyMemoryView_GET_BUFFER(PyObject *mview) + + Return a pointer to the memoryview's private copy of the exporter's buffer. + *mview* **must** be a memoryview instance; this macro doesn't check its type, + you must do it yourself or you will risk crashes. + +.. c:function:: PyObject *PyMemoryView_GET_BASE(PyObject *mview) + + Return either a pointer to the exporting object that the memoryview is based + on or ``NULL`` if the memoryview has been created by one of the functions + :c:func:`PyMemoryView_FromMemory` or :c:func:`PyMemoryView_FromBuffer`. + *mview* **must** be a memoryview instance.
diff --git a/Doc/c-api/method.rst b/Doc/c-api/method.rst new file mode 100644 index 0000000..93ad30c --- /dev/null +++ b/Doc/c-api/method.rst
@@ -0,0 +1,95 @@ +.. highlight:: c + +.. _instancemethod-objects: + +Instance Method Objects +----------------------- + +.. index:: pair: object; instancemethod + +An instance method is a wrapper for a :c:data:`PyCFunction` and the new way +to bind a :c:data:`PyCFunction` to a class object. It replaces the former call +``PyMethod_New(func, NULL, class)``. + + +.. c:var:: PyTypeObject PyInstanceMethod_Type + + This instance of :c:type:`PyTypeObject` represents the Python instance + method type. It is not exposed to Python programs. + + +.. c:function:: int PyInstanceMethod_Check(PyObject *o) + + Return true if *o* is an instance method object (has type + :c:data:`PyInstanceMethod_Type`). The parameter must not be ``NULL``. + This function always succeeds. + + +.. c:function:: PyObject* PyInstanceMethod_New(PyObject *func) + + Return a new instance method object, with *func* being any callable object. + *func* is the function that will be called when the instance method is + called. + + +.. c:function:: PyObject* PyInstanceMethod_Function(PyObject *im) + + Return the function object associated with the instance method *im*. + + +.. c:function:: PyObject* PyInstanceMethod_GET_FUNCTION(PyObject *im) + + Macro version of :c:func:`PyInstanceMethod_Function` which avoids error checking. + + +.. _method-objects: + +Method Objects +-------------- + +.. index:: pair: object; method + +Methods are bound function objects. Methods are always bound to an instance of +a user-defined class. Unbound methods (methods bound to a class object) are +no longer available. + + +.. c:var:: PyTypeObject PyMethod_Type + + .. index:: single: MethodType (in module types) + + This instance of :c:type:`PyTypeObject` represents the Python method type. This + is exposed to Python programs as ``types.MethodType``. + + +.. c:function:: int PyMethod_Check(PyObject *o) + + Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). The + parameter must not be ``NULL``. This function always succeeds. + + +.. c:function:: PyObject* PyMethod_New(PyObject *func, PyObject *self) + + Return a new method object, with *func* being any callable object and *self* + the instance the method should be bound. *func* is the function that will + be called when the method is called. *self* must not be ``NULL``. + + +.. c:function:: PyObject* PyMethod_Function(PyObject *meth) + + Return the function object associated with the method *meth*. + + +.. c:function:: PyObject* PyMethod_GET_FUNCTION(PyObject *meth) + + Macro version of :c:func:`PyMethod_Function` which avoids error checking. + + +.. c:function:: PyObject* PyMethod_Self(PyObject *meth) + + Return the instance associated with the method *meth*. + + +.. c:function:: PyObject* PyMethod_GET_SELF(PyObject *meth) + + Macro version of :c:func:`PyMethod_Self` which avoids error checking.
diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst new file mode 100644 index 0000000..230b471 --- /dev/null +++ b/Doc/c-api/module.rst
@@ -0,0 +1,626 @@ +.. highlight:: c + +.. _moduleobjects: + +Module Objects +-------------- + +.. index:: pair: object; module + + +.. c:var:: PyTypeObject PyModule_Type + + .. index:: single: ModuleType (in module types) + + This instance of :c:type:`PyTypeObject` represents the Python module type. This + is exposed to Python programs as ``types.ModuleType``. + + +.. c:function:: int PyModule_Check(PyObject *p) + + Return true if *p* is a module object, or a subtype of a module object. + This function always succeeds. + + +.. c:function:: int PyModule_CheckExact(PyObject *p) + + Return true if *p* is a module object, but not a subtype of + :c:data:`PyModule_Type`. This function always succeeds. + + +.. c:function:: PyObject* PyModule_NewObject(PyObject *name) + + .. index:: + single: __name__ (module attribute) + single: __doc__ (module attribute) + single: __file__ (module attribute) + single: __package__ (module attribute) + single: __loader__ (module attribute) + + Return a new module object with the :attr:`__name__` attribute set to *name*. + The module's :attr:`__name__`, :attr:`__doc__`, :attr:`__package__`, and + :attr:`__loader__` attributes are filled in (all but :attr:`__name__` are set + to ``None``); the caller is responsible for providing a :attr:`__file__` + attribute. + + .. versionadded:: 3.3 + + .. versionchanged:: 3.4 + :attr:`__package__` and :attr:`__loader__` are set to ``None``. + + +.. c:function:: PyObject* PyModule_New(const char *name) + + Similar to :c:func:`PyModule_NewObject`, but the name is a UTF-8 encoded + string instead of a Unicode object. + + +.. c:function:: PyObject* PyModule_GetDict(PyObject *module) + + .. index:: single: __dict__ (module attribute) + + Return the dictionary object that implements *module*'s namespace; this object + is the same as the :attr:`~object.__dict__` attribute of the module object. + If *module* is not a module object (or a subtype of a module object), + :exc:`SystemError` is raised and ``NULL`` is returned. + + It is recommended extensions use other ``PyModule_*`` and + ``PyObject_*`` functions rather than directly manipulate a module's + :attr:`~object.__dict__`. + + +.. c:function:: PyObject* PyModule_GetNameObject(PyObject *module) + + .. index:: + single: __name__ (module attribute) + single: SystemError (built-in exception) + + Return *module*'s :attr:`__name__` value. If the module does not provide one, + or if it is not a string, :exc:`SystemError` is raised and ``NULL`` is returned. + + .. versionadded:: 3.3 + + +.. c:function:: const char* PyModule_GetName(PyObject *module) + + Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to + ``'utf-8'``. + +.. c:function:: void* PyModule_GetState(PyObject *module) + + Return the "state" of the module, that is, a pointer to the block of memory + allocated at module creation time, or ``NULL``. See + :c:member:`PyModuleDef.m_size`. + + +.. c:function:: PyModuleDef* PyModule_GetDef(PyObject *module) + + Return a pointer to the :c:type:`PyModuleDef` struct from which the module was + created, or ``NULL`` if the module wasn't created from a definition. + + +.. c:function:: PyObject* PyModule_GetFilenameObject(PyObject *module) + + .. index:: + single: __file__ (module attribute) + single: SystemError (built-in exception) + + Return the name of the file from which *module* was loaded using *module*'s + :attr:`__file__` attribute. If this is not defined, or if it is not a + unicode string, raise :exc:`SystemError` and return ``NULL``; otherwise return + a reference to a Unicode object. + + .. versionadded:: 3.2 + + +.. c:function:: const char* PyModule_GetFilename(PyObject *module) + + Similar to :c:func:`PyModule_GetFilenameObject` but return the filename + encoded to 'utf-8'. + + .. deprecated:: 3.2 + :c:func:`PyModule_GetFilename` raises :c:type:`UnicodeEncodeError` on + unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead. + + +.. _initializing-modules: + +Initializing C modules +^^^^^^^^^^^^^^^^^^^^^^ + +Modules objects are usually created from extension modules (shared libraries +which export an initialization function), or compiled-in modules +(where the initialization function is added using :c:func:`PyImport_AppendInittab`). +See :ref:`building` or :ref:`extending-with-embedding` for details. + +The initialization function can either pass a module definition instance +to :c:func:`PyModule_Create`, and return the resulting module object, +or request "multi-phase initialization" by returning the definition struct itself. + +.. c:type:: PyModuleDef + + The module definition struct, which holds all information needed to create + a module object. There is usually only one statically initialized variable + of this type for each module. + + .. c:member:: PyModuleDef_Base m_base + + Always initialize this member to :const:`PyModuleDef_HEAD_INIT`. + + .. c:member:: const char *m_name + + Name for the new module. + + .. c:member:: const char *m_doc + + Docstring for the module; usually a docstring variable created with + :c:macro:`PyDoc_STRVAR` is used. + + .. c:member:: Py_ssize_t m_size + + Module state may be kept in a per-module memory area that can be + retrieved with :c:func:`PyModule_GetState`, rather than in static globals. + This makes modules safe for use in multiple sub-interpreters. + + This memory area is allocated based on *m_size* on module creation, + and freed when the module object is deallocated, after the + :c:member:`m_free` function has been called, if present. + + Setting ``m_size`` to ``-1`` means that the module does not support + sub-interpreters, because it has global state. + + Setting it to a non-negative value means that the module can be + re-initialized and specifies the additional amount of memory it requires + for its state. Non-negative ``m_size`` is required for multi-phase + initialization. + + See :PEP:`3121` for more details. + + .. c:member:: PyMethodDef* m_methods + + A pointer to a table of module-level functions, described by + :c:type:`PyMethodDef` values. Can be ``NULL`` if no functions are present. + + .. c:member:: PyModuleDef_Slot* m_slots + + An array of slot definitions for multi-phase initialization, terminated by + a ``{0, NULL}`` entry. + When using single-phase initialization, *m_slots* must be ``NULL``. + + .. versionchanged:: 3.5 + + Prior to version 3.5, this member was always set to ``NULL``, + and was defined as: + + .. c:member:: inquiry m_reload + + .. c:member:: traverseproc m_traverse + + A traversal function to call during GC traversal of the module object, or + ``NULL`` if not needed. + + This function is not called if the module state was requested but is not + allocated yet. This is the case immediately after the module is created + and before the module is executed (:c:data:`Py_mod_exec` function). More + precisely, this function is not called if :c:member:`m_size` is greater + than 0 and the module state (as returned by :c:func:`PyModule_GetState`) + is ``NULL``. + + .. versionchanged:: 3.9 + No longer called before the module state is allocated. + + .. c:member:: inquiry m_clear + + A clear function to call during GC clearing of the module object, or + ``NULL`` if not needed. + + This function is not called if the module state was requested but is not + allocated yet. This is the case immediately after the module is created + and before the module is executed (:c:data:`Py_mod_exec` function). More + precisely, this function is not called if :c:member:`m_size` is greater + than 0 and the module state (as returned by :c:func:`PyModule_GetState`) + is ``NULL``. + + Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* + called before a module is deallocated. For example, when reference + counting is enough to determine that an object is no longer used, + the cyclic garbage collector is not involved and + :c:member:`~PyModuleDef.m_free` is called directly. + + .. versionchanged:: 3.9 + No longer called before the module state is allocated. + + .. c:member:: freefunc m_free + + A function to call during deallocation of the module object, or ``NULL`` + if not needed. + + This function is not called if the module state was requested but is not + allocated yet. This is the case immediately after the module is created + and before the module is executed (:c:data:`Py_mod_exec` function). More + precisely, this function is not called if :c:member:`m_size` is greater + than 0 and the module state (as returned by :c:func:`PyModule_GetState`) + is ``NULL``. + + .. versionchanged:: 3.9 + No longer called before the module state is allocated. + +Single-phase initialization +........................... + +The module initialization function may create and return the module object +directly. This is referred to as "single-phase initialization", and uses one +of the following two module creation functions: + +.. c:function:: PyObject* PyModule_Create(PyModuleDef *def) + + Create a new module object, given the definition in *def*. This behaves + like :c:func:`PyModule_Create2` with *module_api_version* set to + :const:`PYTHON_API_VERSION`. + + +.. c:function:: PyObject* PyModule_Create2(PyModuleDef *def, int module_api_version) + + Create a new module object, given the definition in *def*, assuming the + API version *module_api_version*. If that version does not match the version + of the running interpreter, a :exc:`RuntimeWarning` is emitted. + + .. note:: + + Most uses of this function should be using :c:func:`PyModule_Create` + instead; only use this if you are sure you need it. + +Before it is returned from in the initialization function, the resulting module +object is typically populated using functions like :c:func:`PyModule_AddObjectRef`. + +.. _multi-phase-initialization: + +Multi-phase initialization +.......................... + +An alternate way to specify extensions is to request "multi-phase initialization". +Extension modules created this way behave more like Python modules: the +initialization is split between the *creation phase*, when the module object +is created, and the *execution phase*, when it is populated. +The distinction is similar to the :py:meth:`__new__` and :py:meth:`__init__` methods +of classes. + +Unlike modules created using single-phase initialization, these modules are not +singletons: if the *sys.modules* entry is removed and the module is re-imported, +a new module object is created, and the old module is subject to normal garbage +collection -- as with Python modules. +By default, multiple modules created from the same definition should be +independent: changes to one should not affect the others. +This means that all state should be specific to the module object (using e.g. +using :c:func:`PyModule_GetState`), or its contents (such as the module's +:attr:`__dict__` or individual classes created with :c:func:`PyType_FromSpec`). + +All modules created using multi-phase initialization are expected to support +:ref:`sub-interpreters <sub-interpreter-support>`. Making sure multiple modules +are independent is typically enough to achieve this. + +To request multi-phase initialization, the initialization function +(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty +:c:member:`~PyModuleDef.m_slots`. Before it is returned, the ``PyModuleDef`` +instance must be initialized with the following function: + +.. c:function:: PyObject* PyModuleDef_Init(PyModuleDef *def) + + Ensures a module definition is a properly initialized Python object that + correctly reports its type and reference count. + + Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred. + + .. versionadded:: 3.5 + +The *m_slots* member of the module definition must point to an array of +``PyModuleDef_Slot`` structures: + +.. c:type:: PyModuleDef_Slot + + .. c:member:: int slot + + A slot ID, chosen from the available values explained below. + + .. c:member:: void* value + + Value of the slot, whose meaning depends on the slot ID. + + .. versionadded:: 3.5 + +The *m_slots* array must be terminated by a slot with id 0. + +The available slot types are: + +.. c:macro:: Py_mod_create + + Specifies a function that is called to create the module object itself. + The *value* pointer of this slot must point to a function of the signature: + + .. c:function:: PyObject* create_module(PyObject *spec, PyModuleDef *def) + + The function receives a :py:class:`~importlib.machinery.ModuleSpec` + instance, as defined in :PEP:`451`, and the module definition. + It should return a new module object, or set an error + and return ``NULL``. + + This function should be kept minimal. In particular, it should not + call arbitrary Python code, as trying to import the same module again may + result in an infinite loop. + + Multiple ``Py_mod_create`` slots may not be specified in one module + definition. + + If ``Py_mod_create`` is not specified, the import machinery will create + a normal module object using :c:func:`PyModule_New`. The name is taken from + *spec*, not the definition, to allow extension modules to dynamically adjust + to their place in the module hierarchy and be imported under different + names through symlinks, all while sharing a single module definition. + + There is no requirement for the returned object to be an instance of + :c:type:`PyModule_Type`. Any type can be used, as long as it supports + setting and getting import-related attributes. + However, only ``PyModule_Type`` instances may be returned if the + ``PyModuleDef`` has non-``NULL`` ``m_traverse``, ``m_clear``, + ``m_free``; non-zero ``m_size``; or slots other than ``Py_mod_create``. + +.. c:macro:: Py_mod_exec + + Specifies a function that is called to *execute* the module. + This is equivalent to executing the code of a Python module: typically, + this function adds classes and constants to the module. + The signature of the function is: + + .. c:function:: int exec_module(PyObject* module) + + If multiple ``Py_mod_exec`` slots are specified, they are processed in the + order they appear in the *m_slots* array. + +See :PEP:`489` for more details on multi-phase initialization. + +Low-level module creation functions +................................... + +The following functions are called under the hood when using multi-phase +initialization. They can be used directly, for example when creating module +objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and +``PyModule_ExecDef`` must be called to fully initialize a module. + +.. c:function:: PyObject * PyModule_FromDefAndSpec(PyModuleDef *def, PyObject *spec) + + Create a new module object, given the definition in *def* and the + ModuleSpec *spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` + with *module_api_version* set to :const:`PYTHON_API_VERSION`. + + .. versionadded:: 3.5 + +.. c:function:: PyObject * PyModule_FromDefAndSpec2(PyModuleDef *def, PyObject *spec, int module_api_version) + + Create a new module object, given the definition in *def* and the + ModuleSpec *spec*, assuming the API version *module_api_version*. + If that version does not match the version of the running interpreter, + a :exc:`RuntimeWarning` is emitted. + + .. note:: + + Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` + instead; only use this if you are sure you need it. + + .. versionadded:: 3.5 + +.. c:function:: int PyModule_ExecDef(PyObject *module, PyModuleDef *def) + + Process any execution slots (:c:data:`Py_mod_exec`) given in *def*. + + .. versionadded:: 3.5 + +.. c:function:: int PyModule_SetDocString(PyObject *module, const char *docstring) + + Set the docstring for *module* to *docstring*. + This function is called automatically when creating a module from + ``PyModuleDef``, using either ``PyModule_Create`` or + ``PyModule_FromDefAndSpec``. + + .. versionadded:: 3.5 + +.. c:function:: int PyModule_AddFunctions(PyObject *module, PyMethodDef *functions) + + Add the functions from the ``NULL`` terminated *functions* array to *module*. + Refer to the :c:type:`PyMethodDef` documentation for details on individual + entries (due to the lack of a shared module namespace, module level + "functions" implemented in C typically receive the module as their first + parameter, making them similar to instance methods on Python classes). + This function is called automatically when creating a module from + ``PyModuleDef``, using either ``PyModule_Create`` or + ``PyModule_FromDefAndSpec``. + + .. versionadded:: 3.5 + +Support functions +................. + +The module initialization function (if using single phase initialization) or +a function called from a module execution slot (if using multi-phase +initialization), can use the following functions to help initialize the module +state: + +.. c:function:: int PyModule_AddObjectRef(PyObject *module, const char *name, PyObject *value) + + Add an object to *module* as *name*. This is a convenience function which + can be used from the module's initialization function. + + On success, return ``0``. On error, raise an exception and return ``-1``. + + Return ``NULL`` if *value* is ``NULL``. It must be called with an exception + raised in this case. + + Example usage:: + + static int + add_spam(PyObject *module, int value) + { + PyObject *obj = PyLong_FromLong(value); + if (obj == NULL) { + return -1; + } + int res = PyModule_AddObjectRef(module, "spam", obj); + Py_DECREF(obj); + return res; + } + + The example can also be written without checking explicitly if *obj* is + ``NULL``:: + + static int + add_spam(PyObject *module, int value) + { + PyObject *obj = PyLong_FromLong(value); + int res = PyModule_AddObjectRef(module, "spam", obj); + Py_XDECREF(obj); + return res; + } + + Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in + this case, since *obj* can be ``NULL``. + + .. versionadded:: 3.10 + + +.. c:function:: int PyModule_AddObject(PyObject *module, const char *name, PyObject *value) + + Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to + *value* on success (if it returns ``0``). + + The new :c:func:`PyModule_AddObjectRef` function is recommended, since it is + easy to introduce reference leaks by misusing the + :c:func:`PyModule_AddObject` function. + + .. note:: + + Unlike other functions that steal references, ``PyModule_AddObject()`` + only decrements the reference count of *value* **on success**. + + This means that its return value must be checked, and calling code must + :c:func:`Py_DECREF` *value* manually on error. + + Example usage:: + + static int + add_spam(PyObject *module, int value) + { + PyObject *obj = PyLong_FromLong(value); + if (obj == NULL) { + return -1; + } + if (PyModule_AddObject(module, "spam", obj) < 0) { + Py_DECREF(obj); + return -1; + } + // PyModule_AddObject() stole a reference to obj: + // Py_DECREF(obj) is not needed here + return 0; + } + + The example can also be written without checking explicitly if *obj* is + ``NULL``:: + + static int + add_spam(PyObject *module, int value) + { + PyObject *obj = PyLong_FromLong(value); + if (PyModule_AddObject(module, "spam", obj) < 0) { + Py_XDECREF(obj); + return -1; + } + // PyModule_AddObject() stole a reference to obj: + // Py_DECREF(obj) is not needed here + return 0; + } + + Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in + this case, since *obj* can be ``NULL``. + + +.. c:function:: int PyModule_AddIntConstant(PyObject *module, const char *name, long value) + + Add an integer constant to *module* as *name*. This convenience function can be + used from the module's initialization function. Return ``-1`` on error, ``0`` on + success. + + +.. c:function:: int PyModule_AddStringConstant(PyObject *module, const char *name, const char *value) + + Add a string constant to *module* as *name*. This convenience function can be + used from the module's initialization function. The string *value* must be + ``NULL``-terminated. Return ``-1`` on error, ``0`` on success. + + +.. c:function:: int PyModule_AddIntMacro(PyObject *module, macro) + + Add an int constant to *module*. The name and the value are taken from + *macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int + constant *AF_INET* with the value of *AF_INET* to *module*. + Return ``-1`` on error, ``0`` on success. + + +.. c:function:: int PyModule_AddStringMacro(PyObject *module, macro) + + Add a string constant to *module*. + +.. c:function:: int PyModule_AddType(PyObject *module, PyTypeObject *type) + + Add a type object to *module*. + The type object is finalized by calling internally :c:func:`PyType_Ready`. + The name of the type object is taken from the last component of + :c:member:`~PyTypeObject.tp_name` after dot. + Return ``-1`` on error, ``0`` on success. + + .. versionadded:: 3.9 + + +Module lookup +^^^^^^^^^^^^^ + +Single-phase initialization creates singleton modules that can be looked up +in the context of the current interpreter. This allows the module object to be +retrieved later with only a reference to the module definition. + +These functions will not work on modules created using multi-phase initialization, +since multiple such modules can be created from a single definition. + +.. c:function:: PyObject* PyState_FindModule(PyModuleDef *def) + + Returns the module object that was created from *def* for the current interpreter. + This method requires that the module object has been attached to the interpreter state with + :c:func:`PyState_AddModule` beforehand. In case the corresponding module object is not + found or has not been attached to the interpreter state yet, it returns ``NULL``. + +.. c:function:: int PyState_AddModule(PyObject *module, PyModuleDef *def) + + Attaches the module object passed to the function to the interpreter state. This allows + the module object to be accessible via :c:func:`PyState_FindModule`. + + Only effective on modules created using single-phase initialization. + + Python calls ``PyState_AddModule`` automatically after importing a module, + so it is unnecessary (but harmless) to call it from module initialization + code. An explicit call is needed only if the module's own init code + subsequently calls ``PyState_FindModule``. + The function is mainly intended for implementing alternative import + mechanisms (either by calling it directly, or by referring to its + implementation for details of the required state updates). + + The caller must hold the GIL. + + Return 0 on success or -1 on failure. + + .. versionadded:: 3.3 + +.. c:function:: int PyState_RemoveModule(PyModuleDef *def) + + Removes the module object created from *def* from the interpreter state. + Return 0 on success or -1 on failure. + + The caller must hold the GIL. + + .. versionadded:: 3.3
diff --git a/Doc/c-api/none.rst b/Doc/c-api/none.rst new file mode 100644 index 0000000..b84a16a --- /dev/null +++ b/Doc/c-api/none.rst
@@ -0,0 +1,26 @@ +.. highlight:: c + +.. _noneobject: + +The ``None`` Object +------------------- + +.. index:: pair: object; None + +Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in the +Python/C API. Since ``None`` is a singleton, testing for object identity (using +``==`` in C) is sufficient. There is no :c:func:`PyNone_Check` function for the +same reason. + + +.. c:var:: PyObject* Py_None + + The Python ``None`` object, denoting lack of value. This object has no methods. + It needs to be treated just like any other object with respect to reference + counts. + + +.. c:macro:: Py_RETURN_NONE + + Properly handle returning :c:data:`Py_None` from within a C function (that is, + increment the reference count of ``None`` and return it.)
diff --git a/Doc/c-api/number.rst b/Doc/c-api/number.rst new file mode 100644 index 0000000..13d3c5a --- /dev/null +++ b/Doc/c-api/number.rst
@@ -0,0 +1,291 @@ +.. highlight:: c + +.. _number: + +Number Protocol +=============== + + +.. c:function:: int PyNumber_Check(PyObject *o) + + Returns ``1`` if the object *o* provides numeric protocols, and false otherwise. + This function always succeeds. + + .. versionchanged:: 3.8 + Returns ``1`` if *o* is an index integer. + + +.. c:function:: PyObject* PyNumber_Add(PyObject *o1, PyObject *o2) + + Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. This is the + equivalent of the Python expression ``o1 + o2``. + + +.. c:function:: PyObject* PyNumber_Subtract(PyObject *o1, PyObject *o2) + + Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. This is + the equivalent of the Python expression ``o1 - o2``. + + +.. c:function:: PyObject* PyNumber_Multiply(PyObject *o1, PyObject *o2) + + Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. This is + the equivalent of the Python expression ``o1 * o2``. + + +.. c:function:: PyObject* PyNumber_MatrixMultiply(PyObject *o1, PyObject *o2) + + Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on + failure. This is the equivalent of the Python expression ``o1 @ o2``. + + .. versionadded:: 3.5 + + +.. c:function:: PyObject* PyNumber_FloorDivide(PyObject *o1, PyObject *o2) + + Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is + the equivalent of the Python expression ``o1 // o2``. + + +.. c:function:: PyObject* PyNumber_TrueDivide(PyObject *o1, PyObject *o2) + + Return a reasonable approximation for the mathematical value of *o1* divided by + *o2*, or ``NULL`` on failure. The return value is "approximate" because binary + floating point numbers are approximate; it is not possible to represent all real + numbers in base two. This function can return a floating point value when + passed two integers. This is the equivalent of the Python expression ``o1 / o2``. + + +.. c:function:: PyObject* PyNumber_Remainder(PyObject *o1, PyObject *o2) + + Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. This is + the equivalent of the Python expression ``o1 % o2``. + + +.. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2) + + .. index:: pair: built-in function; divmod + + See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This is + the equivalent of the Python expression ``divmod(o1, o2)``. + + +.. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3) + + .. index:: pair: built-in function; pow + + See the built-in function :func:`pow`. Returns ``NULL`` on failure. This is the + equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional. + If *o3* is to be ignored, pass :c:data:`Py_None` in its place (passing ``NULL`` for + *o3* would cause an illegal memory access). + + +.. c:function:: PyObject* PyNumber_Negative(PyObject *o) + + Returns the negation of *o* on success, or ``NULL`` on failure. This is the + equivalent of the Python expression ``-o``. + + +.. c:function:: PyObject* PyNumber_Positive(PyObject *o) + + Returns *o* on success, or ``NULL`` on failure. This is the equivalent of the + Python expression ``+o``. + + +.. c:function:: PyObject* PyNumber_Absolute(PyObject *o) + + .. index:: pair: built-in function; abs + + Returns the absolute value of *o*, or ``NULL`` on failure. This is the equivalent + of the Python expression ``abs(o)``. + + +.. c:function:: PyObject* PyNumber_Invert(PyObject *o) + + Returns the bitwise negation of *o* on success, or ``NULL`` on failure. This is + the equivalent of the Python expression ``~o``. + + +.. c:function:: PyObject* PyNumber_Lshift(PyObject *o1, PyObject *o2) + + Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on + failure. This is the equivalent of the Python expression ``o1 << o2``. + + +.. c:function:: PyObject* PyNumber_Rshift(PyObject *o1, PyObject *o2) + + Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on + failure. This is the equivalent of the Python expression ``o1 >> o2``. + + +.. c:function:: PyObject* PyNumber_And(PyObject *o1, PyObject *o2) + + Returns the "bitwise and" of *o1* and *o2* on success and ``NULL`` on failure. + This is the equivalent of the Python expression ``o1 & o2``. + + +.. c:function:: PyObject* PyNumber_Xor(PyObject *o1, PyObject *o2) + + Returns the "bitwise exclusive or" of *o1* by *o2* on success, or ``NULL`` on + failure. This is the equivalent of the Python expression ``o1 ^ o2``. + + +.. c:function:: PyObject* PyNumber_Or(PyObject *o1, PyObject *o2) + + Returns the "bitwise or" of *o1* and *o2* on success, or ``NULL`` on failure. + This is the equivalent of the Python expression ``o1 | o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2) + + Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. The operation + is done *in-place* when *o1* supports it. This is the equivalent of the Python + statement ``o1 += o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2) + + Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. The + operation is done *in-place* when *o1* supports it. This is the equivalent of + the Python statement ``o1 -= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2) + + Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. The + operation is done *in-place* when *o1* supports it. This is the equivalent of + the Python statement ``o1 *= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceMatrixMultiply(PyObject *o1, PyObject *o2) + + Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on + failure. The operation is done *in-place* when *o1* supports it. This is + the equivalent of the Python statement ``o1 @= o2``. + + .. versionadded:: 3.5 + + +.. c:function:: PyObject* PyNumber_InPlaceFloorDivide(PyObject *o1, PyObject *o2) + + Returns the mathematical floor of dividing *o1* by *o2*, or ``NULL`` on failure. + The operation is done *in-place* when *o1* supports it. This is the equivalent + of the Python statement ``o1 //= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceTrueDivide(PyObject *o1, PyObject *o2) + + Return a reasonable approximation for the mathematical value of *o1* divided by + *o2*, or ``NULL`` on failure. The return value is "approximate" because binary + floating point numbers are approximate; it is not possible to represent all real + numbers in base two. This function can return a floating point value when + passed two integers. The operation is done *in-place* when *o1* supports it. + This is the equivalent of the Python statement ``o1 /= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2) + + Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The + operation is done *in-place* when *o1* supports it. This is the equivalent of + the Python statement ``o1 %= o2``. + + +.. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3) + + .. index:: pair: built-in function; pow + + See the built-in function :func:`pow`. Returns ``NULL`` on failure. The operation + is done *in-place* when *o1* supports it. This is the equivalent of the Python + statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-place variant of + ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, pass :c:data:`Py_None` + in its place (passing ``NULL`` for *o3* would cause an illegal memory access). + + +.. c:function:: PyObject* PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2) + + Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on + failure. The operation is done *in-place* when *o1* supports it. This is the + equivalent of the Python statement ``o1 <<= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2) + + Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on + failure. The operation is done *in-place* when *o1* supports it. This is the + equivalent of the Python statement ``o1 >>= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2) + + Returns the "bitwise and" of *o1* and *o2* on success and ``NULL`` on failure. The + operation is done *in-place* when *o1* supports it. This is the equivalent of + the Python statement ``o1 &= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceXor(PyObject *o1, PyObject *o2) + + Returns the "bitwise exclusive or" of *o1* by *o2* on success, or ``NULL`` on + failure. The operation is done *in-place* when *o1* supports it. This is the + equivalent of the Python statement ``o1 ^= o2``. + + +.. c:function:: PyObject* PyNumber_InPlaceOr(PyObject *o1, PyObject *o2) + + Returns the "bitwise or" of *o1* and *o2* on success, or ``NULL`` on failure. The + operation is done *in-place* when *o1* supports it. This is the equivalent of + the Python statement ``o1 |= o2``. + + +.. c:function:: PyObject* PyNumber_Long(PyObject *o) + + .. index:: pair: built-in function; int + + Returns the *o* converted to an integer object on success, or ``NULL`` on + failure. This is the equivalent of the Python expression ``int(o)``. + + +.. c:function:: PyObject* PyNumber_Float(PyObject *o) + + .. index:: pair: built-in function; float + + Returns the *o* converted to a float object on success, or ``NULL`` on failure. + This is the equivalent of the Python expression ``float(o)``. + + +.. c:function:: PyObject* PyNumber_Index(PyObject *o) + + Returns the *o* converted to a Python int on success or ``NULL`` with a + :exc:`TypeError` exception raised on failure. + + .. versionchanged:: 3.10 + The result always has exact type :class:`int`. Previously, the result + could have been an instance of a subclass of ``int``. + + +.. c:function:: PyObject* PyNumber_ToBase(PyObject *n, int base) + + Returns the integer *n* converted to base *base* as a string. The *base* + argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the + returned string is prefixed with a base marker of ``'0b'``, ``'0o'``, or + ``'0x'``, respectively. If *n* is not a Python int, it is converted with + :c:func:`PyNumber_Index` first. + + +.. c:function:: Py_ssize_t PyNumber_AsSsize_t(PyObject *o, PyObject *exc) + + Returns *o* converted to a :c:type:`Py_ssize_t` value if *o* can be interpreted as an + integer. If the call fails, an exception is raised and ``-1`` is returned. + + If *o* can be converted to a Python int but the attempt to + convert to a :c:type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the + *exc* argument is the type of exception that will be raised (usually + :exc:`IndexError` or :exc:`OverflowError`). If *exc* is ``NULL``, then the + exception is cleared and the value is clipped to ``PY_SSIZE_T_MIN`` for a negative + integer or ``PY_SSIZE_T_MAX`` for a positive integer. + + +.. c:function:: int PyIndex_Check(PyObject *o) + + Returns ``1`` if *o* is an index integer (has the ``nb_index`` slot of the + ``tp_as_number`` structure filled in), and ``0`` otherwise. + This function always succeeds.
diff --git a/Doc/c-api/objbuffer.rst b/Doc/c-api/objbuffer.rst new file mode 100644 index 0000000..6b82a64 --- /dev/null +++ b/Doc/c-api/objbuffer.rst
@@ -0,0 +1,55 @@ +.. highlight:: c + +Old Buffer Protocol +------------------- + +.. deprecated:: 3.0 + +These functions were part of the "old buffer protocol" API in Python 2. +In Python 3, this protocol doesn't exist anymore but the functions are still +exposed to ease porting 2.x code. They act as a compatibility wrapper +around the :ref:`new buffer protocol <bufferobjects>`, but they don't give +you control over the lifetime of the resources acquired when a buffer is +exported. + +Therefore, it is recommended that you call :c:func:`PyObject_GetBuffer` +(or the ``y*`` or ``w*`` :ref:`format codes <arg-parsing>` with the +:c:func:`PyArg_ParseTuple` family of functions) to get a buffer view over +an object, and :c:func:`PyBuffer_Release` when the buffer view can be released. + + +.. c:function:: int PyObject_AsCharBuffer(PyObject *obj, const char **buffer, Py_ssize_t *buffer_len) + + Returns a pointer to a read-only memory location usable as character-based + input. The *obj* argument must support the single-segment character buffer + interface. On success, returns ``0``, sets *buffer* to the memory location + and *buffer_len* to the buffer length. Returns ``-1`` and sets a + :exc:`TypeError` on error. + + +.. c:function:: int PyObject_AsReadBuffer(PyObject *obj, const void **buffer, Py_ssize_t *buffer_len) + + Returns a pointer to a read-only memory location containing arbitrary data. + The *obj* argument must support the single-segment readable buffer + interface. On success, returns ``0``, sets *buffer* to the memory location + and *buffer_len* to the buffer length. Returns ``-1`` and sets a + :exc:`TypeError` on error. + + +.. c:function:: int PyObject_CheckReadBuffer(PyObject *o) + + Returns ``1`` if *o* supports the single-segment readable buffer interface. + Otherwise returns ``0``. This function always succeeds. + + Note that this function tries to get and release a buffer, and exceptions + which occur while calling corresponding functions will get suppressed. + To get error reporting use :c:func:`PyObject_GetBuffer()` instead. + + +.. c:function:: int PyObject_AsWriteBuffer(PyObject *obj, void **buffer, Py_ssize_t *buffer_len) + + Returns a pointer to a writable memory location. The *obj* argument must + support the single-segment, character buffer interface. On success, + returns ``0``, sets *buffer* to the memory location and *buffer_len* to the + buffer length. Returns ``-1`` and sets a :exc:`TypeError` on error. +
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst new file mode 100644 index 0000000..1a0fe33 --- /dev/null +++ b/Doc/c-api/object.rst
@@ -0,0 +1,397 @@ +.. highlight:: c + +.. _object: + +Object Protocol +=============== + + +.. c:var:: PyObject* Py_NotImplemented + + The ``NotImplemented`` singleton, used to signal that an operation is + not implemented for the given type combination. + + +.. c:macro:: Py_RETURN_NOTIMPLEMENTED + + Properly handle returning :c:data:`Py_NotImplemented` from within a C + function (that is, increment the reference count of NotImplemented and + return it). + + +.. c:function:: int PyObject_Print(PyObject *o, FILE *fp, int flags) + + Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags argument + is used to enable certain printing options. The only option currently supported + is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written + instead of the :func:`repr`. + + +.. c:function:: int PyObject_HasAttr(PyObject *o, PyObject *attr_name) + + Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. This + is equivalent to the Python expression ``hasattr(o, attr_name)``. This function + always succeeds. + + Note that exceptions which occur while calling :meth:`__getattr__` and + :meth:`__getattribute__` methods will get suppressed. + To get error reporting use :c:func:`PyObject_GetAttr()` instead. + + +.. c:function:: int PyObject_HasAttrString(PyObject *o, const char *attr_name) + + Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. This + is equivalent to the Python expression ``hasattr(o, attr_name)``. This function + always succeeds. + + Note that exceptions which occur while calling :meth:`__getattr__` and + :meth:`__getattribute__` methods and creating a temporary string object + will get suppressed. + To get error reporting use :c:func:`PyObject_GetAttrString()` instead. + + +.. c:function:: PyObject* PyObject_GetAttr(PyObject *o, PyObject *attr_name) + + Retrieve an attribute named *attr_name* from object *o*. Returns the attribute + value on success, or ``NULL`` on failure. This is the equivalent of the Python + expression ``o.attr_name``. + + +.. c:function:: PyObject* PyObject_GetAttrString(PyObject *o, const char *attr_name) + + Retrieve an attribute named *attr_name* from object *o*. Returns the attribute + value on success, or ``NULL`` on failure. This is the equivalent of the Python + expression ``o.attr_name``. + + +.. c:function:: PyObject* PyObject_GenericGetAttr(PyObject *o, PyObject *name) + + Generic attribute getter function that is meant to be put into a type + object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary + of classes in the object's MRO as well as an attribute in the object's + :attr:`~object.__dict__` (if present). As outlined in :ref:`descriptors`, + data descriptors take preference over instance attributes, while non-data + descriptors don't. Otherwise, an :exc:`AttributeError` is raised. + + +.. c:function:: int PyObject_SetAttr(PyObject *o, PyObject *attr_name, PyObject *v) + + Set the value of the attribute named *attr_name*, for object *o*, to the value + *v*. Raise an exception and return ``-1`` on failure; + return ``0`` on success. This is the equivalent of the Python statement + ``o.attr_name = v``. + + If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated + in favour of using :c:func:`PyObject_DelAttr`, but there are currently no + plans to remove it. + + +.. c:function:: int PyObject_SetAttrString(PyObject *o, const char *attr_name, PyObject *v) + + Set the value of the attribute named *attr_name*, for object *o*, to the value + *v*. Raise an exception and return ``-1`` on failure; + return ``0`` on success. This is the equivalent of the Python statement + ``o.attr_name = v``. + + If *v* is ``NULL``, the attribute is deleted, but this feature is + deprecated in favour of using :c:func:`PyObject_DelAttrString`. + + +.. c:function:: int PyObject_GenericSetAttr(PyObject *o, PyObject *name, PyObject *value) + + Generic attribute setter and deleter function that is meant + to be put into a type object's :c:member:`~PyTypeObject.tp_setattro` + slot. It looks for a data descriptor in the + dictionary of classes in the object's MRO, and if found it takes preference + over setting or deleting the attribute in the instance dictionary. Otherwise, the + attribute is set or deleted in the object's :attr:`~object.__dict__` (if present). + On success, ``0`` is returned, otherwise an :exc:`AttributeError` + is raised and ``-1`` is returned. + + +.. c:function:: int PyObject_DelAttr(PyObject *o, PyObject *attr_name) + + Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on failure. + This is the equivalent of the Python statement ``del o.attr_name``. + + +.. c:function:: int PyObject_DelAttrString(PyObject *o, const char *attr_name) + + Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on failure. + This is the equivalent of the Python statement ``del o.attr_name``. + + +.. c:function:: PyObject* PyObject_GenericGetDict(PyObject *o, void *context) + + A generic implementation for the getter of a ``__dict__`` descriptor. It + creates the dictionary if necessary. + + This function may also be called to get the :py:attr:`~object.__dict__` + of the object *o*. Pass ``NULL`` for *context* when calling it. + Since this function may need to allocate memory for the + dictionary, it may be more efficient to call :c:func:`PyObject_GetAttr` + when accessing an attribute on the object. + + On failure, returns ``NULL`` with an exception set. + + .. versionadded:: 3.3 + + +.. c:function:: int PyObject_GenericSetDict(PyObject *o, PyObject *value, void *context) + + A generic implementation for the setter of a ``__dict__`` descriptor. This + implementation does not allow the dictionary to be deleted. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject** _PyObject_GetDictPtr(PyObject *obj) + + Return a pointer to :py:attr:`~object.__dict__` of the object *obj*. + If there is no ``__dict__``, return ``NULL`` without setting an exception. + + This function may need to allocate memory for the + dictionary, so it may be more efficient to call :c:func:`PyObject_GetAttr` + when accessing an attribute on the object. + + +.. c:function:: PyObject* PyObject_RichCompare(PyObject *o1, PyObject *o2, int opid) + + Compare the values of *o1* and *o2* using the operation specified by *opid*, + which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, + :const:`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, + ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. This is the equivalent of + the Python expression ``o1 op o2``, where ``op`` is the operator corresponding + to *opid*. Returns the value of the comparison on success, or ``NULL`` on failure. + + +.. c:function:: int PyObject_RichCompareBool(PyObject *o1, PyObject *o2, int opid) + + Compare the values of *o1* and *o2* using the operation specified by *opid*, + which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, + :const:`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, + ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error, + ``0`` if the result is false, ``1`` otherwise. This is the equivalent of the + Python expression ``o1 op o2``, where ``op`` is the operator corresponding to + *opid*. + +.. note:: + If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` + will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`. + +.. c:function:: PyObject* PyObject_Format(PyObject *obj, PyObject *format_spec) + + Format *obj* using *format_spec*. This is equivalent to the Python + expression ``format(obj, format_spec)``. + + *format_spec* may be ``NULL``. In this case the call is equivalent + to ``format(obj)``. + Returns the formatted string on success, ``NULL`` on failure. + +.. c:function:: PyObject* PyObject_Repr(PyObject *o) + + .. index:: pair: built-in function; repr + + Compute a string representation of object *o*. Returns the string + representation on success, ``NULL`` on failure. This is the equivalent of the + Python expression ``repr(o)``. Called by the :func:`repr` built-in function. + + .. versionchanged:: 3.4 + This function now includes a debug assertion to help ensure that it + does not silently discard an active exception. + +.. c:function:: PyObject* PyObject_ASCII(PyObject *o) + + .. index:: pair: built-in function; ascii + + As :c:func:`PyObject_Repr`, compute a string representation of object *o*, but + escape the non-ASCII characters in the string returned by + :c:func:`PyObject_Repr` with ``\x``, ``\u`` or ``\U`` escapes. This generates + a string similar to that returned by :c:func:`PyObject_Repr` in Python 2. + Called by the :func:`ascii` built-in function. + + .. index:: string; PyObject_Str (C function) + + +.. c:function:: PyObject* PyObject_Str(PyObject *o) + + Compute a string representation of object *o*. Returns the string + representation on success, ``NULL`` on failure. This is the equivalent of the + Python expression ``str(o)``. Called by the :func:`str` built-in function + and, therefore, by the :func:`print` function. + + .. versionchanged:: 3.4 + This function now includes a debug assertion to help ensure that it + does not silently discard an active exception. + + +.. c:function:: PyObject* PyObject_Bytes(PyObject *o) + + .. index:: pair: built-in function; bytes + + Compute a bytes representation of object *o*. ``NULL`` is returned on + failure and a bytes object on success. This is equivalent to the Python + expression ``bytes(o)``, when *o* is not an integer. Unlike ``bytes(o)``, + a TypeError is raised when *o* is an integer instead of a zero-initialized + bytes object. + + +.. c:function:: int PyObject_IsSubclass(PyObject *derived, PyObject *cls) + + Return ``1`` if the class *derived* is identical to or derived from the class + *cls*, otherwise return ``0``. In case of an error, return ``-1``. + + If *cls* is a tuple, the check will be done against every entry in *cls*. + The result will be ``1`` when at least one of the checks returns ``1``, + otherwise it will be ``0``. + + If *cls* has a :meth:`~class.__subclasscheck__` method, it will be called to + determine the subclass status as described in :pep:`3119`. Otherwise, + *derived* is a subclass of *cls* if it is a direct or indirect subclass, + i.e. contained in ``cls.__mro__``. + + Normally only class objects, i.e. instances of :class:`type` or a derived + class, are considered classes. However, objects can override this by having + a :attr:`__bases__` attribute (which must be a tuple of base classes). + + +.. c:function:: int PyObject_IsInstance(PyObject *inst, PyObject *cls) + + Return ``1`` if *inst* is an instance of the class *cls* or a subclass of + *cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception. + + If *cls* is a tuple, the check will be done against every entry in *cls*. + The result will be ``1`` when at least one of the checks returns ``1``, + otherwise it will be ``0``. + + If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to + determine the subclass status as described in :pep:`3119`. Otherwise, *inst* + is an instance of *cls* if its class is a subclass of *cls*. + + An instance *inst* can override what is considered its class by having a + :attr:`__class__` attribute. + + An object *cls* can override if it is considered a class, and what its base + classes are, by having a :attr:`__bases__` attribute (which must be a tuple + of base classes). + + +.. c:function:: Py_hash_t PyObject_Hash(PyObject *o) + + .. index:: pair: built-in function; hash + + Compute and return the hash value of an object *o*. On failure, return ``-1``. + This is the equivalent of the Python expression ``hash(o)``. + + .. versionchanged:: 3.2 + The return type is now Py_hash_t. This is a signed integer the same size + as :c:type:`Py_ssize_t`. + + +.. c:function:: Py_hash_t PyObject_HashNotImplemented(PyObject *o) + + Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` and return ``-1``. + This function receives special treatment when stored in a ``tp_hash`` slot, + allowing a type to explicitly indicate to the interpreter that it is not + hashable. + + +.. c:function:: int PyObject_IsTrue(PyObject *o) + + Returns ``1`` if the object *o* is considered to be true, and ``0`` otherwise. + This is equivalent to the Python expression ``not not o``. On failure, return + ``-1``. + + +.. c:function:: int PyObject_Not(PyObject *o) + + Returns ``0`` if the object *o* is considered to be true, and ``1`` otherwise. + This is equivalent to the Python expression ``not o``. On failure, return + ``-1``. + + +.. c:function:: PyObject* PyObject_Type(PyObject *o) + + .. index:: pair: built-in function; type + + When *o* is non-``NULL``, returns a type object corresponding to the object type + of object *o*. On failure, raises :exc:`SystemError` and returns ``NULL``. This + is equivalent to the Python expression ``type(o)``. This function increments the + reference count of the return value. There's really no reason to use this + function instead of the :c:func:`Py_TYPE()` function, which returns a + pointer of type :c:expr:`PyTypeObject*`, except when the incremented reference + count is needed. + + +.. c:function:: int PyObject_TypeCheck(PyObject *o, PyTypeObject *type) + + Return non-zero if the object *o* is of type *type* or a subtype of *type*, and + ``0`` otherwise. Both parameters must be non-``NULL``. + + +.. c:function:: Py_ssize_t PyObject_Size(PyObject *o) + Py_ssize_t PyObject_Length(PyObject *o) + + .. index:: pair: built-in function; len + + Return the length of object *o*. If the object *o* provides either the sequence + and mapping protocols, the sequence length is returned. On error, ``-1`` is + returned. This is the equivalent to the Python expression ``len(o)``. + + +.. c:function:: Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) + + Return an estimated length for the object *o*. First try to return its + actual length, then an estimate using :meth:`~object.__length_hint__`, and + finally return the default value. On error return ``-1``. This is the + equivalent to the Python expression ``operator.length_hint(o, defaultvalue)``. + + .. versionadded:: 3.4 + + +.. c:function:: PyObject* PyObject_GetItem(PyObject *o, PyObject *key) + + Return element of *o* corresponding to the object *key* or ``NULL`` on failure. + This is the equivalent of the Python expression ``o[key]``. + + +.. c:function:: int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v) + + Map the object *key* to the value *v*. Raise an exception and + return ``-1`` on failure; return ``0`` on success. This is the + equivalent of the Python statement ``o[key] = v``. This function *does + not* steal a reference to *v*. + + +.. c:function:: int PyObject_DelItem(PyObject *o, PyObject *key) + + Remove the mapping for the object *key* from the object *o*. Return ``-1`` + on failure. This is equivalent to the Python statement ``del o[key]``. + + +.. c:function:: PyObject* PyObject_Dir(PyObject *o) + + This is equivalent to the Python expression ``dir(o)``, returning a (possibly + empty) list of strings appropriate for the object argument, or ``NULL`` if there + was an error. If the argument is ``NULL``, this is like the Python ``dir()``, + returning the names of the current locals; in this case, if no execution frame + is active then ``NULL`` is returned but :c:func:`PyErr_Occurred` will return false. + + +.. c:function:: PyObject* PyObject_GetIter(PyObject *o) + + This is equivalent to the Python expression ``iter(o)``. It returns a new + iterator for the object argument, or the object itself if the object is already + an iterator. Raises :exc:`TypeError` and returns ``NULL`` if the object cannot be + iterated. + + +.. c:function:: PyObject* PyObject_GetAIter(PyObject *o) + + This is the equivalent to the Python expression ``aiter(o)``. Takes an + :class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. + This is typically a new iterator but if the argument is an + :class:`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and + returns ``NULL`` if the object cannot be iterated. + + .. versionadded:: 3.10
diff --git a/Doc/c-api/objimpl.rst b/Doc/c-api/objimpl.rst new file mode 100644 index 0000000..8bd8c10 --- /dev/null +++ b/Doc/c-api/objimpl.rst
@@ -0,0 +1,17 @@ +.. highlight:: c + +.. _newtypes: + +***************************** +Object Implementation Support +***************************** + +This chapter describes the functions, types, and macros used when defining new +object types. + +.. toctree:: + + allocation.rst + structures.rst + typeobj.rst + gcsupport.rst
diff --git a/Doc/c-api/refcounting.rst b/Doc/c-api/refcounting.rst new file mode 100644 index 0000000..738bd77 --- /dev/null +++ b/Doc/c-api/refcounting.rst
@@ -0,0 +1,127 @@ +.. highlight:: c + + +.. _countingrefs: + +****************** +Reference Counting +****************** + +The macros in this section are used for managing reference counts of Python +objects. + + +.. c:function:: void Py_INCREF(PyObject *o) + + Increment the reference count for object *o*. + + This function is usually used to convert a :term:`borrowed reference` to a + :term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be + used to create a new :term:`strong reference`. + + The object must not be ``NULL``; if you aren't sure that it isn't + ``NULL``, use :c:func:`Py_XINCREF`. + + +.. c:function:: void Py_XINCREF(PyObject *o) + + Increment the reference count for object *o*. The object may be ``NULL``, in + which case the macro has no effect. + + See also :c:func:`Py_XNewRef`. + + +.. c:function:: PyObject* Py_NewRef(PyObject *o) + + Create a new :term:`strong reference` to an object: increment the reference + count of the object *o* and return the object *o*. + + When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` + should be called on it to decrement the object reference count. + + The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be + ``NULL``. + + For example:: + + Py_INCREF(obj); + self->attr = obj; + + can be written as:: + + self->attr = Py_NewRef(obj); + + See also :c:func:`Py_INCREF`. + + .. versionadded:: 3.10 + + +.. c:function:: PyObject* Py_XNewRef(PyObject *o) + + Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL. + + If the object *o* is ``NULL``, the function just returns ``NULL``. + + .. versionadded:: 3.10 + + +.. c:function:: void Py_DECREF(PyObject *o) + + Decrement the reference count for object *o*. + + If the reference count reaches zero, the object's type's deallocation + function (which must not be ``NULL``) is invoked. + + This function is usually used to delete a :term:`strong reference` before + exiting its scope. + + The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, + use :c:func:`Py_XDECREF`. + + .. warning:: + + The deallocation function can cause arbitrary Python code to be invoked (e.g. + when a class instance with a :meth:`__del__` method is deallocated). While + exceptions in such code are not propagated, the executed code has free access to + all Python global variables. This means that any object that is reachable from + a global variable should be in a consistent state before :c:func:`Py_DECREF` is + invoked. For example, code to delete an object from a list should copy a + reference to the deleted object in a temporary variable, update the list data + structure, and then call :c:func:`Py_DECREF` for the temporary variable. + + +.. c:function:: void Py_XDECREF(PyObject *o) + + Decrement the reference count for object *o*. The object may be ``NULL``, in + which case the macro has no effect; otherwise the effect is the same as for + :c:func:`Py_DECREF`, and the same warning applies. + + +.. c:function:: void Py_CLEAR(PyObject *o) + + Decrement the reference count for object *o*. The object may be ``NULL``, in + which case the macro has no effect; otherwise the effect is the same as for + :c:func:`Py_DECREF`, except that the argument is also set to ``NULL``. The warning + for :c:func:`Py_DECREF` does not apply with respect to the object passed because + the macro carefully uses a temporary variable and sets the argument to ``NULL`` + before decrementing its reference count. + + It is a good idea to use this macro whenever decrementing the reference + count of an object that might be traversed during garbage collection. + +.. c:function:: void Py_IncRef(PyObject *o) + + Increment the reference count for object *o*. A function version of :c:func:`Py_XINCREF`. + It can be used for runtime dynamic embedding of Python. + + +.. c:function:: void Py_DecRef(PyObject *o) + + Decrement the reference count for object *o*. A function version of :c:func:`Py_XDECREF`. + It can be used for runtime dynamic embedding of Python. + + +The following functions or macros are only for use within the interpreter core: +:c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`, +as well as the global variable :c:data:`_Py_RefTotal`. +
diff --git a/Doc/c-api/reflection.rst b/Doc/c-api/reflection.rst new file mode 100644 index 0000000..4b1c477 --- /dev/null +++ b/Doc/c-api/reflection.rst
@@ -0,0 +1,46 @@ +.. highlight:: c + +.. _reflection: + +Reflection +========== + +.. c:function:: PyObject* PyEval_GetBuiltins(void) + + Return a dictionary of the builtins in the current execution frame, + or the interpreter of the thread state if no frame is currently executing. + + +.. c:function:: PyObject* PyEval_GetLocals(void) + + Return a dictionary of the local variables in the current execution frame, + or ``NULL`` if no frame is currently executing. + + +.. c:function:: PyObject* PyEval_GetGlobals(void) + + Return a dictionary of the global variables in the current execution frame, + or ``NULL`` if no frame is currently executing. + + +.. c:function:: PyFrameObject* PyEval_GetFrame(void) + + Return the current thread state's frame, which is ``NULL`` if no frame is + currently executing. + + See also :c:func:`PyThreadState_GetFrame`. + + +.. c:function:: const char* PyEval_GetFuncName(PyObject *func) + + Return the name of *func* if it is a function, class or instance object, else the + name of *func*\s type. + + +.. c:function:: const char* PyEval_GetFuncDesc(PyObject *func) + + Return a description string, depending on the type of *func*. + Return values include "()" for functions and methods, " constructor", + " instance", and " object". Concatenated with the result of + :c:func:`PyEval_GetFuncName`, the result will be a description of + *func*.
diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst new file mode 100644 index 0000000..402a3e5 --- /dev/null +++ b/Doc/c-api/sequence.rst
@@ -0,0 +1,176 @@ +.. highlight:: c + +.. _sequence: + +Sequence Protocol +================= + + +.. c:function:: int PySequence_Check(PyObject *o) + + Return ``1`` if the object provides the sequence protocol, and ``0`` otherwise. + Note that it returns ``1`` for Python classes with a :meth:`__getitem__` + method, unless they are :class:`dict` subclasses, since in general it + is impossible to determine what type of keys the class supports. This + function always succeeds. + + +.. c:function:: Py_ssize_t PySequence_Size(PyObject *o) + Py_ssize_t PySequence_Length(PyObject *o) + + .. index:: pair: built-in function; len + + Returns the number of objects in sequence *o* on success, and ``-1`` on + failure. This is equivalent to the Python expression ``len(o)``. + + +.. c:function:: PyObject* PySequence_Concat(PyObject *o1, PyObject *o2) + + Return the concatenation of *o1* and *o2* on success, and ``NULL`` on failure. + This is the equivalent of the Python expression ``o1 + o2``. + + +.. c:function:: PyObject* PySequence_Repeat(PyObject *o, Py_ssize_t count) + + Return the result of repeating sequence object *o* *count* times, or ``NULL`` on + failure. This is the equivalent of the Python expression ``o * count``. + + +.. c:function:: PyObject* PySequence_InPlaceConcat(PyObject *o1, PyObject *o2) + + Return the concatenation of *o1* and *o2* on success, and ``NULL`` on failure. + The operation is done *in-place* when *o1* supports it. This is the equivalent + of the Python expression ``o1 += o2``. + + +.. c:function:: PyObject* PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count) + + Return the result of repeating sequence object *o* *count* times, or ``NULL`` on + failure. The operation is done *in-place* when *o* supports it. This is the + equivalent of the Python expression ``o *= count``. + + +.. c:function:: PyObject* PySequence_GetItem(PyObject *o, Py_ssize_t i) + + Return the *i*\ th element of *o*, or ``NULL`` on failure. This is the equivalent of + the Python expression ``o[i]``. + + +.. c:function:: PyObject* PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2) + + Return the slice of sequence object *o* between *i1* and *i2*, or ``NULL`` on + failure. This is the equivalent of the Python expression ``o[i1:i2]``. + + +.. c:function:: int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v) + + Assign object *v* to the *i*\ th element of *o*. Raise an exception + and return ``-1`` on failure; return ``0`` on success. This + is the equivalent of the Python statement ``o[i] = v``. This function *does + not* steal a reference to *v*. + + If *v* is ``NULL``, the element is deleted, but this feature is + deprecated in favour of using :c:func:`PySequence_DelItem`. + + +.. c:function:: int PySequence_DelItem(PyObject *o, Py_ssize_t i) + + Delete the *i*\ th element of object *o*. Returns ``-1`` on failure. This is the + equivalent of the Python statement ``del o[i]``. + + +.. c:function:: int PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, PyObject *v) + + Assign the sequence object *v* to the slice in sequence object *o* from *i1* to + *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``. + + +.. c:function:: int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2) + + Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` on + failure. This is the equivalent of the Python statement ``del o[i1:i2]``. + + +.. c:function:: Py_ssize_t PySequence_Count(PyObject *o, PyObject *value) + + Return the number of occurrences of *value* in *o*, that is, return the number + of keys for which ``o[key] == value``. On failure, return ``-1``. This is + equivalent to the Python expression ``o.count(value)``. + + +.. c:function:: int PySequence_Contains(PyObject *o, PyObject *value) + + Determine if *o* contains *value*. If an item in *o* is equal to *value*, + return ``1``, otherwise return ``0``. On error, return ``-1``. This is + equivalent to the Python expression ``value in o``. + + +.. c:function:: Py_ssize_t PySequence_Index(PyObject *o, PyObject *value) + + Return the first index *i* for which ``o[i] == value``. On error, return + ``-1``. This is equivalent to the Python expression ``o.index(value)``. + + +.. c:function:: PyObject* PySequence_List(PyObject *o) + + Return a list object with the same contents as the sequence or iterable *o*, + or ``NULL`` on failure. The returned list is guaranteed to be new. This is + equivalent to the Python expression ``list(o)``. + + +.. c:function:: PyObject* PySequence_Tuple(PyObject *o) + + .. index:: pair: built-in function; tuple + + Return a tuple object with the same contents as the sequence or iterable *o*, + or ``NULL`` on failure. If *o* is a tuple, a new reference will be returned, + otherwise a tuple will be constructed with the appropriate contents. This is + equivalent to the Python expression ``tuple(o)``. + + +.. c:function:: PyObject* PySequence_Fast(PyObject *o, const char *m) + + Return the sequence or iterable *o* as an object usable by the other + ``PySequence_Fast*`` family of functions. If the object is not a sequence or + iterable, raises :exc:`TypeError` with *m* as the message text. Returns + ``NULL`` on failure. + + The ``PySequence_Fast*`` functions are thus named because they assume + *o* is a :c:type:`PyTupleObject` or a :c:type:`PyListObject` and access + the data fields of *o* directly. + + As a CPython implementation detail, if *o* is already a sequence or list, it + will be returned. + + +.. c:function:: Py_ssize_t PySequence_Fast_GET_SIZE(PyObject *o) + + Returns the length of *o*, assuming that *o* was returned by + :c:func:`PySequence_Fast` and that *o* is not ``NULL``. The size can also be + retrieved by calling :c:func:`PySequence_Size` on *o*, but + :c:func:`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a + list or tuple. + + +.. c:function:: PyObject* PySequence_Fast_GET_ITEM(PyObject *o, Py_ssize_t i) + + Return the *i*\ th element of *o*, assuming that *o* was returned by + :c:func:`PySequence_Fast`, *o* is not ``NULL``, and that *i* is within bounds. + + +.. c:function:: PyObject** PySequence_Fast_ITEMS(PyObject *o) + + Return the underlying array of PyObject pointers. Assumes that *o* was returned + by :c:func:`PySequence_Fast` and *o* is not ``NULL``. + + Note, if a list gets resized, the reallocation may relocate the items array. + So, only use the underlying array pointer in contexts where the sequence + cannot change. + + +.. c:function:: PyObject* PySequence_ITEM(PyObject *o, Py_ssize_t i) + + Return the *i*\ th element of *o* or ``NULL`` on failure. Faster form of + :c:func:`PySequence_GetItem` but without checking that + :c:func:`PySequence_Check` on *o* is true and without adjustment for negative + indices.
diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst new file mode 100644 index 0000000..d642a5f --- /dev/null +++ b/Doc/c-api/set.rst
@@ -0,0 +1,166 @@ +.. highlight:: c + +.. _setobjects: + +Set Objects +----------- + +.. sectionauthor:: Raymond D. Hettinger <python@rcn.com> + + +.. index:: + pair: object; set + pair: object; frozenset + +This section details the public API for :class:`set` and :class:`frozenset` +objects. Any functionality not listed below is best accessed using either +the abstract object protocol (including :c:func:`PyObject_CallMethod`, +:c:func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, +:c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and +:c:func:`PyObject_GetIter`) or the abstract number protocol (including +:c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, +:c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, +:c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and +:c:func:`PyNumber_InPlaceXor`). + + +.. c:type:: PySetObject + + This subtype of :c:type:`PyObject` is used to hold the internal data for both + :class:`set` and :class:`frozenset` objects. It is like a :c:type:`PyDictObject` + in that it is a fixed size for small sets (much like tuple storage) and will + point to a separate, variable sized block of memory for medium and large sized + sets (much like list storage). None of the fields of this structure should be + considered public and all are subject to change. All access should be done through + the documented API rather than by manipulating the values in the structure. + + +.. c:var:: PyTypeObject PySet_Type + + This is an instance of :c:type:`PyTypeObject` representing the Python + :class:`set` type. + + +.. c:var:: PyTypeObject PyFrozenSet_Type + + This is an instance of :c:type:`PyTypeObject` representing the Python + :class:`frozenset` type. + +The following type check macros work on pointers to any Python object. Likewise, +the constructor functions work with any iterable Python object. + + +.. c:function:: int PySet_Check(PyObject *p) + + Return true if *p* is a :class:`set` object or an instance of a subtype. + This function always succeeds. + +.. c:function:: int PyFrozenSet_Check(PyObject *p) + + Return true if *p* is a :class:`frozenset` object or an instance of a + subtype. This function always succeeds. + +.. c:function:: int PyAnySet_Check(PyObject *p) + + Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or an + instance of a subtype. This function always succeeds. + +.. c:function:: int PySet_CheckExact(PyObject *p) + + Return true if *p* is a :class:`set` object but not an instance of a + subtype. This function always succeeds. + + .. versionadded:: 3.10 + +.. c:function:: int PyAnySet_CheckExact(PyObject *p) + + Return true if *p* is a :class:`set` object or a :class:`frozenset` object but + not an instance of a subtype. This function always succeeds. + + +.. c:function:: int PyFrozenSet_CheckExact(PyObject *p) + + Return true if *p* is a :class:`frozenset` object but not an instance of a + subtype. This function always succeeds. + + +.. c:function:: PyObject* PySet_New(PyObject *iterable) + + Return a new :class:`set` containing objects returned by the *iterable*. The + *iterable* may be ``NULL`` to create a new empty set. Return the new set on + success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* is not + actually iterable. The constructor is also useful for copying a set + (``c=set(s)``). + + +.. c:function:: PyObject* PyFrozenSet_New(PyObject *iterable) + + Return a new :class:`frozenset` containing objects returned by the *iterable*. + The *iterable* may be ``NULL`` to create a new empty frozenset. Return the new + set on success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* is + not actually iterable. + + +The following functions and macros are available for instances of :class:`set` +or :class:`frozenset` or instances of their subtypes. + + +.. c:function:: Py_ssize_t PySet_Size(PyObject *anyset) + + .. index:: pair: built-in function; len + + Return the length of a :class:`set` or :class:`frozenset` object. Equivalent to + ``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a + :class:`set`, :class:`frozenset`, or an instance of a subtype. + + +.. c:function:: Py_ssize_t PySet_GET_SIZE(PyObject *anyset) + + Macro form of :c:func:`PySet_Size` without error checking. + + +.. c:function:: int PySet_Contains(PyObject *anyset, PyObject *key) + + Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is encountered. Unlike + the Python :meth:`__contains__` method, this function does not automatically + convert unhashable sets into temporary frozensets. Raise a :exc:`TypeError` if + the *key* is unhashable. Raise :exc:`PyExc_SystemError` if *anyset* is not a + :class:`set`, :class:`frozenset`, or an instance of a subtype. + + +.. c:function:: int PySet_Add(PyObject *set, PyObject *key) + + Add *key* to a :class:`set` instance. Also works with :class:`frozenset` + instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the values + of brand new frozensets before they are exposed to other code). Return ``0`` on + success or ``-1`` on failure. Raise a :exc:`TypeError` if the *key* is + unhashable. Raise a :exc:`MemoryError` if there is no room to grow. Raise a + :exc:`SystemError` if *set* is not an instance of :class:`set` or its + subtype. + + +The following functions are available for instances of :class:`set` or its +subtypes but not for instances of :class:`frozenset` or its subtypes. + + +.. c:function:: int PySet_Discard(PyObject *set, PyObject *key) + + Return ``1`` if found and removed, ``0`` if not found (no action taken), and ``-1`` if an + error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a + :exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard` + method, this function does not automatically convert unhashable sets into + temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is not an + instance of :class:`set` or its subtype. + + +.. c:function:: PyObject* PySet_Pop(PyObject *set) + + Return a new reference to an arbitrary object in the *set*, and removes the + object from the *set*. Return ``NULL`` on failure. Raise :exc:`KeyError` if the + set is empty. Raise a :exc:`SystemError` if *set* is not an instance of + :class:`set` or its subtype. + + +.. c:function:: int PySet_Clear(PyObject *set) + + Empty an existing set of all elements.
diff --git a/Doc/c-api/slice.rst b/Doc/c-api/slice.rst new file mode 100644 index 0000000..8271d9a --- /dev/null +++ b/Doc/c-api/slice.rst
@@ -0,0 +1,123 @@ +.. highlight:: c + +.. _slice-objects: + +Slice Objects +------------- + + +.. c:var:: PyTypeObject PySlice_Type + + The type object for slice objects. This is the same as :class:`slice` in the + Python layer. + + +.. c:function:: int PySlice_Check(PyObject *ob) + + Return true if *ob* is a slice object; *ob* must not be ``NULL``. This + function always succeeds. + + +.. c:function:: PyObject* PySlice_New(PyObject *start, PyObject *stop, PyObject *step) + + Return a new slice object with the given values. The *start*, *stop*, and + *step* parameters are used as the values of the slice object attributes of + the same names. Any of the values may be ``NULL``, in which case the + ``None`` will be used for the corresponding attribute. Return ``NULL`` if + the new object could not be allocated. + + +.. c:function:: int PySlice_GetIndices(PyObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step) + + Retrieve the start, stop and step indices from the slice object *slice*, + assuming a sequence of length *length*. Treats indices greater than + *length* as errors. + + Returns ``0`` on success and ``-1`` on error with no exception set (unless one of + the indices was not :const:`None` and failed to be converted to an integer, + in which case ``-1`` is returned with an exception set). + + You probably do not want to use this function. + + .. versionchanged:: 3.2 + The parameter type for the *slice* parameter was ``PySliceObject*`` + before. + + +.. c:function:: int PySlice_GetIndicesEx(PyObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength) + + Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, + stop, and step indices from the slice object *slice* assuming a sequence of + length *length*, and store the length of the slice in *slicelength*. Out + of bounds indices are clipped in a manner consistent with the handling of + normal slices. + + Returns ``0`` on success and ``-1`` on error with exception set. + + .. note:: + This function is considered not safe for resizable sequences. + Its invocation should be replaced by a combination of + :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices` where :: + + if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) < 0) { + // return error + } + + is replaced by :: + + if (PySlice_Unpack(slice, &start, &stop, &step) < 0) { + // return error + } + slicelength = PySlice_AdjustIndices(length, &start, &stop, step); + + .. versionchanged:: 3.2 + The parameter type for the *slice* parameter was ``PySliceObject*`` + before. + + .. versionchanged:: 3.6.1 + If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` + and ``0x03060000`` (not including) or ``0x03060100`` or higher + :c:func:`!PySlice_GetIndicesEx` is implemented as a macro using + :c:func:`!PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. + Arguments *start*, *stop* and *step* are evaluated more than once. + + .. deprecated:: 3.6.1 + If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or + between ``0x03060000`` and ``0x03060100`` (not including) + :c:func:`!PySlice_GetIndicesEx` is a deprecated function. + + +.. c:function:: int PySlice_Unpack(PyObject *slice, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step) + + Extract the start, stop and step data members from a slice object as + C integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to + ``PY_SSIZE_T_MAX``, silently boost the start and stop values less than + ``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step + values less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``. + + Return ``-1`` on error, ``0`` on success. + + .. versionadded:: 3.6.1 + + +.. c:function:: Py_ssize_t PySlice_AdjustIndices(Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t step) + + Adjust start/end slice indices assuming a sequence of the specified length. + Out of bounds indices are clipped in a manner consistent with the handling + of normal slices. + + Return the length of the slice. Always successful. Doesn't call Python + code. + + .. versionadded:: 3.6.1 + + +Ellipsis Object +--------------- + + +.. c:var:: PyObject *Py_Ellipsis + + The Python ``Ellipsis`` object. This object has no methods. It needs to be + treated just like any other object with respect to reference counts. Like + :c:data:`Py_None` it is a singleton object.
diff --git a/Doc/c-api/stable.rst b/Doc/c-api/stable.rst new file mode 100644 index 0000000..4ae20e9 --- /dev/null +++ b/Doc/c-api/stable.rst
@@ -0,0 +1,158 @@ +.. highlight:: c + +.. _stable: + +*************** +C API Stability +*************** + +Python's C API is covered by the Backwards Compatibility Policy, :pep:`387`. +While the C API will change with every minor release (e.g. from 3.9 to 3.10), +most changes will be source-compatible, typically by only adding new API. +Changing existing API or removing API is only done after a deprecation period +or to fix serious issues. + +CPython's Application Binary Interface (ABI) is forward- and +backwards-compatible across a minor release (if these are compiled the same +way; see :ref:`stable-abi-platform` below). +So, code compiled for Python 3.10.0 will work on 3.10.8 and vice versa, +but will need to be compiled separately for 3.9.x and 3.10.x. + +Names prefixed by an underscore, such as ``_Py_InternalState``, +are private API that can change without notice even in patch releases. + + +Stable Application Binary Interface +=================================== + +Python 3.2 introduced the *Limited API*, a subset of Python's C API. +Extensions that only use the Limited API can be +compiled once and work with multiple versions of Python. +Contents of the Limited API are :ref:`listed below <stable-abi-list>`. + +To enable this, Python provides a *Stable ABI*: a set of symbols that will +remain compatible across Python 3.x versions. The Stable ABI contains symbols +exposed in the Limited API, but also other ones – for example, functions +necessary to support older versions of the Limited API. + +(For simplicity, this document talks about *extensions*, but the Limited API +and Stable ABI work the same way for all uses of the API – for example, +embedding Python.) + +.. c:macro:: Py_LIMITED_API + + Define this macro before including ``Python.h`` to opt in to only use + the Limited API, and to select the Limited API version. + + Define ``Py_LIMITED_API`` to the value of :c:data:`PY_VERSION_HEX` + corresponding to the lowest Python version your extension supports. + The extension will work without recompilation with all Python 3 releases + from the specified one onward, and can use Limited API introduced up to that + version. + + Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum + minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when + compiling with future Python versions. + + You can also define ``Py_LIMITED_API`` to ``3``. This works the same as + ``0x03020000`` (Python 3.2, the version that introduced Limited API). + +On Windows, extensions that use the Stable ABI should be linked against +``python3.dll`` rather than a version-specific library such as +``python39.dll``. + +On some platforms, Python will look for and load shared library files named +with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). +It does not check if such extensions conform to a Stable ABI. +The user (or their packaging tools) need to ensure that, for example, +extensions built with the 3.10+ Limited API are not installed for lower +versions of Python. + +All functions in the Stable ABI are present as functions in Python's shared +library, not solely as macros. This makes them usable from languages that don't +use the C preprocessor. + + +Limited API Scope and Performance +--------------------------------- + +The goal for the Limited API is to allow everything that is possible with the +full C API, but possibly with a performance penalty. + +For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro +variant :c:func:`PyList_GET_ITEM` is not. +The macro can be faster because it can rely on version-specific implementation +details of the list object. + +Without ``Py_LIMITED_API`` defined, some C API functions are inlined or +replaced by macros. +Defining ``Py_LIMITED_API`` disables this inlining, allowing stability as +Python's data structures are improved, but possibly reducing performance. + +By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile +a Limited API extension with a version-specific ABI. This can improve +performance for that Python version, but will limit compatibility. +Compiling with ``Py_LIMITED_API`` will then yield an extension that can be +distributed where a version-specific one is not available – for example, +for prereleases of an upcoming Python version. + + +Limited API Caveats +------------------- + +Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee that +code conforms to the Limited API or the Stable ABI. ``Py_LIMITED_API`` only +covers definitions, but an API also includes other issues, such as expected +semantics. + +One issue that ``Py_LIMITED_API`` does not guard against is calling a function +with arguments that are invalid in a lower Python version. +For example, consider a function that starts accepting ``NULL`` for an +argument. In Python 3.9, ``NULL`` now selects a default behavior, but in +Python 3.8, the argument will be used directly, causing a ``NULL`` dereference +and crash. A similar argument works for fields of structs. + +Another issue is that some struct fields are currently not hidden when +``Py_LIMITED_API`` is defined, even though they're part of the Limited API. + +For these reasons, we recommend testing an extension with *all* minor Python +versions it supports, and preferably to build with the *lowest* such version. + +We also recommend reviewing documentation of all used API to check +if it is explicitly part of the Limited API. Even with ``Py_LIMITED_API`` +defined, a few private declarations are exposed for technical reasons (or +even unintentionally, as bugs). + +Also note that the Limited API is not necessarily stable: compiling with +``Py_LIMITED_API`` with Python 3.8 means that the extension will +run with Python 3.12, but it will not necessarily *compile* with Python 3.12. +In particular, parts of the Limited API may be deprecated and removed, +provided that the Stable ABI stays stable. + + +.. _stable-abi-platform: + +Platform Considerations +======================= + +ABI stability depends not only on Python, but also on the compiler used, +lower-level libraries and compiler options. For the purposes of the Stable ABI, +these details define a “platform”. They usually depend on the OS +type and processor architecture + +It is the responsibility of each particular distributor of Python +to ensure that all Python versions on a particular platform are built +in a way that does not break the Stable ABI. +This is the case with Windows and macOS releases from ``python.org`` and many +third-party distributors. + + +.. _stable-abi-list: + +Contents of Limited API +======================= + + +Currently, the Limited API includes the following items: + +.. limited-api-list::
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst new file mode 100644 index 0000000..cfd6d20 --- /dev/null +++ b/Doc/c-api/structures.rst
@@ -0,0 +1,538 @@ +.. highlight:: c + +.. _common-structs: + +Common Object Structures +======================== + +There are a large number of structures which are used in the definition of +object types for Python. This section describes these structures and how they +are used. + + +Base object types and macros +---------------------------- + +All Python objects ultimately share a small number of fields at the beginning +of the object's representation in memory. These are represented by the +:c:type:`PyObject` and :c:type:`PyVarObject` types, which are defined, in turn, +by the expansions of some macros also used, whether directly or indirectly, in +the definition of all other Python objects. + + +.. c:type:: PyObject + + All object types are extensions of this type. This is a type which + contains the information Python needs to treat a pointer to an object as an + object. In a normal "release" build, it contains only the object's + reference count and a pointer to the corresponding type object. + Nothing is actually declared to be a :c:type:`PyObject`, but every pointer + to a Python object can be cast to a :c:expr:`PyObject*`. Access to the + members must be done by using the macros :c:macro:`Py_REFCNT` and + :c:macro:`Py_TYPE`. + + +.. c:type:: PyVarObject + + This is an extension of :c:type:`PyObject` that adds the :attr:`ob_size` + field. This is only used for objects that have some notion of *length*. + This type does not often appear in the Python/C API. + Access to the members must be done by using the macros + :c:macro:`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`. + + +.. c:macro:: PyObject_HEAD + + This is a macro used when declaring new types which represent objects + without a varying length. The PyObject_HEAD macro expands to:: + + PyObject ob_base; + + See documentation of :c:type:`PyObject` above. + + +.. c:macro:: PyObject_VAR_HEAD + + This is a macro used when declaring new types which represent objects + with a length that varies from instance to instance. + The PyObject_VAR_HEAD macro expands to:: + + PyVarObject ob_base; + + See documentation of :c:type:`PyVarObject` above. + + +.. c:function:: int Py_Is(PyObject *x, PyObject *y) + + Test if the *x* object is the *y* object, the same as ``x is y`` in Python. + + .. versionadded:: 3.10 + + +.. c:function:: int Py_IsNone(PyObject *x) + + Test if an object is the ``None`` singleton, + the same as ``x is None`` in Python. + + .. versionadded:: 3.10 + + +.. c:function:: int Py_IsTrue(PyObject *x) + + Test if an object is the ``True`` singleton, + the same as ``x is True`` in Python. + + .. versionadded:: 3.10 + + +.. c:function:: int Py_IsFalse(PyObject *x) + + Test if an object is the ``False`` singleton, + the same as ``x is False`` in Python. + + .. versionadded:: 3.10 + + +.. c:function:: PyTypeObject* Py_TYPE(PyObject *o) + + Get the type of the Python object *o*. + + Return a :term:`borrowed reference`. + + Use the :c:func:`Py_SET_TYPE` function to set an object type. + + .. versionchanged:: 3.11 + :c:func:`Py_TYPE()` is changed to an inline static function. + The parameter type is no longer :c:expr:`const PyObject*`. + + +.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type) + + Return non-zero if the object *o* type is *type*. Return zero otherwise. + Equivalent to: ``Py_TYPE(o) == type``. + + .. versionadded:: 3.9 + + +.. c:function:: void Py_SET_TYPE(PyObject *o, PyTypeObject *type) + + Set the object *o* type to *type*. + + .. versionadded:: 3.9 + + +.. c:function:: Py_ssize_t Py_REFCNT(PyObject *o) + + Get the reference count of the Python object *o*. + + Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count. + + .. versionchanged:: 3.11 + The parameter type is no longer :c:expr:`const PyObject*`. + + .. versionchanged:: 3.10 + :c:func:`Py_REFCNT()` is changed to the inline static function. + + +.. c:function:: void Py_SET_REFCNT(PyObject *o, Py_ssize_t refcnt) + + Set the object *o* reference counter to *refcnt*. + + .. versionadded:: 3.9 + + +.. c:function:: Py_ssize_t Py_SIZE(PyVarObject *o) + + Get the size of the Python object *o*. + + Use the :c:func:`Py_SET_SIZE` function to set an object size. + + .. versionchanged:: 3.11 + :c:func:`Py_SIZE()` is changed to an inline static function. + The parameter type is no longer :c:expr:`const PyVarObject*`. + + +.. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size) + + Set the object *o* size to *size*. + + .. versionadded:: 3.9 + + +.. c:macro:: PyObject_HEAD_INIT(type) + + This is a macro which expands to initialization values for a new + :c:type:`PyObject` type. This macro expands to:: + + _PyObject_EXTRA_INIT + 1, type, + + +.. c:macro:: PyVarObject_HEAD_INIT(type, size) + + This is a macro which expands to initialization values for a new + :c:type:`PyVarObject` type, including the :attr:`ob_size` field. + This macro expands to:: + + _PyObject_EXTRA_INIT + 1, type, size, + + +Implementing functions and methods +---------------------------------- + +.. c:type:: PyCFunction + + Type of the functions used to implement most Python callables in C. + Functions of this type take two :c:expr:`PyObject*` parameters and return + one such value. If the return value is ``NULL``, an exception shall have + been set. If not ``NULL``, the return value is interpreted as the return + value of the function as exposed in Python. The function must return a new + reference. + + The function signature is:: + + PyObject *PyCFunction(PyObject *self, + PyObject *args); + +.. c:type:: PyCFunctionWithKeywords + + Type of the functions used to implement Python callables in C + with signature :const:`METH_VARARGS | METH_KEYWORDS`. + The function signature is:: + + PyObject *PyCFunctionWithKeywords(PyObject *self, + PyObject *args, + PyObject *kwargs); + + +.. c:type:: _PyCFunctionFast + + Type of the functions used to implement Python callables in C + with signature :const:`METH_FASTCALL`. + The function signature is:: + + PyObject *_PyCFunctionFast(PyObject *self, + PyObject *const *args, + Py_ssize_t nargs); + +.. c:type:: _PyCFunctionFastWithKeywords + + Type of the functions used to implement Python callables in C + with signature :const:`METH_FASTCALL | METH_KEYWORDS`. + The function signature is:: + + PyObject *_PyCFunctionFastWithKeywords(PyObject *self, + PyObject *const *args, + Py_ssize_t nargs, + PyObject *kwnames); + +.. c:type:: PyCMethod + + Type of the functions used to implement Python callables in C + with signature :const:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`. + The function signature is:: + + PyObject *PyCMethod(PyObject *self, + PyTypeObject *defining_class, + PyObject *const *args, + Py_ssize_t nargs, + PyObject *kwnames) + + .. versionadded:: 3.9 + + +.. c:type:: PyMethodDef + + Structure used to describe a method of an extension type. This structure has + four fields: + + .. c:member:: const char* ml_name + + name of the method + + .. c:member:: PyCFunction ml_meth + + pointer to the C implementation + + .. c:member:: int ml_flags + + flags bits indicating how the call should be constructed + + .. c:member:: const char* ml_doc + + points to the contents of the docstring + +The :c:member:`ml_meth` is a C function pointer. The functions may be of different +types, but they always return :c:expr:`PyObject*`. If the function is not of +the :c:type:`PyCFunction`, the compiler will require a cast in the method table. +Even though :c:type:`PyCFunction` defines the first parameter as +:c:expr:`PyObject*`, it is common that the method implementation uses the +specific C type of the *self* object. + +The :c:member:`ml_flags` field is a bitfield which can include the following flags. +The individual flags indicate either a calling convention or a binding +convention. + +There are these calling conventions: + +.. data:: METH_VARARGS + + This is the typical calling convention, where the methods have the type + :c:type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. + The first one is the *self* object for methods; for module functions, it is + the module object. The second parameter (often called *args*) is a tuple + object representing all arguments. This parameter is typically processed + using :c:func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`. + + +.. data:: METH_VARARGS | METH_KEYWORDS + + Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. + The function expects three parameters: *self*, *args*, *kwargs* where + *kwargs* is a dictionary of all the keyword arguments or possibly ``NULL`` + if there are no keyword arguments. The parameters are typically processed + using :c:func:`PyArg_ParseTupleAndKeywords`. + + +.. data:: METH_FASTCALL + + Fast calling convention supporting only positional arguments. + The methods have the type :c:type:`_PyCFunctionFast`. + The first parameter is *self*, the second parameter is a C array + of :c:expr:`PyObject*` values indicating the arguments and the third + parameter is the number of arguments (the length of the array). + + .. versionadded:: 3.7 + + .. versionchanged:: 3.10 + + ``METH_FASTCALL`` is now part of the stable ABI. + + +.. data:: METH_FASTCALL | METH_KEYWORDS + + Extension of :const:`METH_FASTCALL` supporting also keyword arguments, + with methods of type :c:type:`_PyCFunctionFastWithKeywords`. + Keyword arguments are passed the same way as in the + :ref:`vectorcall protocol <vectorcall>`: + there is an additional fourth :c:expr:`PyObject*` parameter + which is a tuple representing the names of the keyword arguments + (which are guaranteed to be strings) + or possibly ``NULL`` if there are no keywords. The values of the keyword + arguments are stored in the *args* array, after the positional arguments. + + .. versionadded:: 3.7 + + +.. data:: METH_METHOD | METH_FASTCALL | METH_KEYWORDS + + Extension of :const:`METH_FASTCALL | METH_KEYWORDS` supporting the *defining + class*, that is, the class that contains the method in question. + The defining class might be a superclass of ``Py_TYPE(self)``. + + The method needs to be of type :c:type:`PyCMethod`, the same as for + ``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added after + ``self``. + + .. versionadded:: 3.9 + + +.. data:: METH_NOARGS + + Methods without parameters don't need to check whether arguments are given if + they are listed with the :const:`METH_NOARGS` flag. They need to be of type + :c:type:`PyCFunction`. The first parameter is typically named *self* and will + hold a reference to the module or object instance. In all cases the second + parameter will be ``NULL``. + + The function must have 2 parameters. Since the second parameter is unused, + :c:macro:`Py_UNUSED` can be used to prevent a compiler warning. + + +.. data:: METH_O + + Methods with a single object argument can be listed with the :const:`METH_O` + flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``"O"`` argument. + They have the type :c:type:`PyCFunction`, with the *self* parameter, and a + :c:expr:`PyObject*` parameter representing the single argument. + + +These two constants are not used to indicate the calling convention but the +binding when use with methods of classes. These may not be used for functions +defined for modules. At most one of these flags may be set for any given +method. + + +.. data:: METH_CLASS + + .. index:: pair: built-in function; classmethod + + The method will be passed the type object as the first parameter rather + than an instance of the type. This is used to create *class methods*, + similar to what is created when using the :func:`classmethod` built-in + function. + + +.. data:: METH_STATIC + + .. index:: pair: built-in function; staticmethod + + The method will be passed ``NULL`` as the first parameter rather than an + instance of the type. This is used to create *static methods*, similar to + what is created when using the :func:`staticmethod` built-in function. + +One other constant controls whether a method is loaded in place of another +definition with the same method name. + + +.. data:: METH_COEXIST + + The method will be loaded in place of existing definitions. Without + *METH_COEXIST*, the default is to skip repeated definitions. Since slot + wrappers are loaded before the method table, the existence of a + *sq_contains* slot, for example, would generate a wrapped method named + :meth:`__contains__` and preclude the loading of a corresponding + PyCFunction with the same name. With the flag defined, the PyCFunction + will be loaded in place of the wrapper object and will co-exist with the + slot. This is helpful because calls to PyCFunctions are optimized more + than wrapper object calls. + + +Accessing attributes of extension types +--------------------------------------- + +.. c:type:: PyMemberDef + + Structure which describes an attribute of a type which corresponds to a C + struct member. Its fields are: + + +------------------+---------------+-------------------------------+ + | Field | C Type | Meaning | + +==================+===============+===============================+ + | :attr:`name` | const char \* | name of the member | + +------------------+---------------+-------------------------------+ + | :attr:`!type` | int | the type of the member in the | + | | | C struct | + +------------------+---------------+-------------------------------+ + | :attr:`offset` | Py_ssize_t | the offset in bytes that the | + | | | member is located on the | + | | | type's object struct | + +------------------+---------------+-------------------------------+ + | :attr:`flags` | int | flag bits indicating if the | + | | | field should be read-only or | + | | | writable | + +------------------+---------------+-------------------------------+ + | :attr:`doc` | const char \* | points to the contents of the | + | | | docstring | + +------------------+---------------+-------------------------------+ + + :attr:`!type` can be one of many ``T_`` macros corresponding to various C + types. When the member is accessed in Python, it will be converted to the + equivalent Python type. + + =============== ================== + Macro name C type + =============== ================== + T_SHORT short + T_INT int + T_LONG long + T_FLOAT float + T_DOUBLE double + T_STRING const char \* + T_OBJECT PyObject \* + T_OBJECT_EX PyObject \* + T_CHAR char + T_BYTE char + T_UBYTE unsigned char + T_UINT unsigned int + T_USHORT unsigned short + T_ULONG unsigned long + T_BOOL char + T_LONGLONG long long + T_ULONGLONG unsigned long long + T_PYSSIZET Py_ssize_t + =============== ================== + + :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` differ in that + :c:macro:`T_OBJECT` returns ``None`` if the member is ``NULL`` and + :c:macro:`T_OBJECT_EX` raises an :exc:`AttributeError`. Try to use + :c:macro:`T_OBJECT_EX` over :c:macro:`T_OBJECT` because :c:macro:`T_OBJECT_EX` + handles use of the :keyword:`del` statement on that attribute more correctly + than :c:macro:`T_OBJECT`. + + :attr:`flags` can be ``0`` for write and read access or :c:macro:`READONLY` for + read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies + :c:macro:`READONLY`. :c:macro:`T_STRING` data is interpreted as UTF-8. + Only :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` + members can be deleted. (They are set to ``NULL``). + + .. _pymemberdef-offsets: + + Heap allocated types (created using :c:func:`PyType_FromSpec` or similar), + ``PyMemberDef`` may contain definitions for the special members + ``__dictoffset__``, ``__weaklistoffset__`` and ``__vectorcalloffset__``, + corresponding to + :c:member:`~PyTypeObject.tp_dictoffset`, + :c:member:`~PyTypeObject.tp_weaklistoffset` and + :c:member:`~PyTypeObject.tp_vectorcall_offset` in type objects. + These must be defined with ``T_PYSSIZET`` and ``READONLY``, for example:: + + static PyMemberDef spam_type_members[] = { + {"__dictoffset__", T_PYSSIZET, offsetof(Spam_object, dict), READONLY}, + {NULL} /* Sentinel */ + }; + + +.. c:function:: PyObject* PyMember_GetOne(const char *obj_addr, struct PyMemberDef *m) + + Get an attribute belonging to the object at address *obj_addr*. The + attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` + on error. + + +.. c:function:: int PyMember_SetOne(char *obj_addr, struct PyMemberDef *m, PyObject *o) + + Set an attribute belonging to the object at address *obj_addr* to object *o*. + The attribute to set is described by ``PyMemberDef`` *m*. Returns ``0`` + if successful and a negative value on failure. + + +.. c:type:: PyGetSetDef + + Structure to define property-like access for a type. See also description of + the :c:member:`PyTypeObject.tp_getset` slot. + + +-------------+------------------+-----------------------------------+ + | Field | C Type | Meaning | + +=============+==================+===================================+ + | name | const char \* | attribute name | + +-------------+------------------+-----------------------------------+ + | get | getter | C function to get the attribute | + +-------------+------------------+-----------------------------------+ + | set | setter | optional C function to set or | + | | | delete the attribute, if omitted | + | | | the attribute is readonly | + +-------------+------------------+-----------------------------------+ + | doc | const char \* | optional docstring | + +-------------+------------------+-----------------------------------+ + | closure | void \* | optional function pointer, | + | | | providing additional data for | + | | | getter and setter | + +-------------+------------------+-----------------------------------+ + + The ``get`` function takes one :c:expr:`PyObject*` parameter (the + instance) and a function pointer (the associated ``closure``):: + + typedef PyObject *(*getter)(PyObject *, void *); + + It should return a new reference on success or ``NULL`` with a set exception + on failure. + + ``set`` functions take two :c:expr:`PyObject*` parameters (the instance and + the value to be set) and a function pointer (the associated ``closure``):: + + typedef int (*setter)(PyObject *, PyObject *, void *); + + In case the attribute should be deleted the second parameter is ``NULL``. + Should return ``0`` on success or ``-1`` with a set exception on failure.
diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst new file mode 100644 index 0000000..517b57b --- /dev/null +++ b/Doc/c-api/sys.rst
@@ -0,0 +1,452 @@ +.. highlight:: c + +.. _os: + +Operating System Utilities +========================== + +.. c:function:: PyObject* PyOS_FSPath(PyObject *path) + + Return the file system representation for *path*. If the object is a + :class:`str` or :class:`bytes` object, then its reference count is + incremented. If the object implements the :class:`os.PathLike` interface, + then :meth:`~os.PathLike.__fspath__` is returned as long as it is a + :class:`str` or :class:`bytes` object. Otherwise :exc:`TypeError` is raised + and ``NULL`` is returned. + + .. versionadded:: 3.6 + + +.. c:function:: int Py_FdIsInteractive(FILE *fp, const char *filename) + + Return true (nonzero) if the standard I/O file *fp* with name *filename* is + deemed interactive. This is the case for files for which ``isatty(fileno(fp))`` + is true. If the global flag :c:data:`Py_InteractiveFlag` is true, this function + also returns true if the *filename* pointer is ``NULL`` or if the name is equal to + one of the strings ``'<stdin>'`` or ``'???'``. + + +.. c:function:: void PyOS_BeforeFork() + + Function to prepare some internal state before a process fork. This + should be called before calling :c:func:`fork` or any similar function + that clones the current process. + Only available on systems where :c:func:`fork` is defined. + + .. warning:: + The C :c:func:`fork` call should only be made from the + :ref:`"main" thread <fork-and-threads>` (of the + :ref:`"main" interpreter <sub-interpreter-support>`). The same is + true for ``PyOS_BeforeFork()``. + + .. versionadded:: 3.7 + + +.. c:function:: void PyOS_AfterFork_Parent() + + Function to update some internal state after a process fork. This + should be called from the parent process after calling :c:func:`fork` + or any similar function that clones the current process, regardless + of whether process cloning was successful. + Only available on systems where :c:func:`fork` is defined. + + .. warning:: + The C :c:func:`fork` call should only be made from the + :ref:`"main" thread <fork-and-threads>` (of the + :ref:`"main" interpreter <sub-interpreter-support>`). The same is + true for ``PyOS_AfterFork_Parent()``. + + .. versionadded:: 3.7 + + +.. c:function:: void PyOS_AfterFork_Child() + + Function to update internal interpreter state after a process fork. + This must be called from the child process after calling :c:func:`fork`, + or any similar function that clones the current process, if there is + any chance the process will call back into the Python interpreter. + Only available on systems where :c:func:`fork` is defined. + + .. warning:: + The C :c:func:`fork` call should only be made from the + :ref:`"main" thread <fork-and-threads>` (of the + :ref:`"main" interpreter <sub-interpreter-support>`). The same is + true for ``PyOS_AfterFork_Child()``. + + .. versionadded:: 3.7 + + .. seealso:: + :func:`os.register_at_fork` allows registering custom Python functions + to be called by :c:func:`PyOS_BeforeFork()`, + :c:func:`PyOS_AfterFork_Parent` and :c:func:`PyOS_AfterFork_Child`. + + +.. c:function:: void PyOS_AfterFork() + + Function to update some internal state after a process fork; this should be + called in the new process if the Python interpreter will continue to be used. + If a new executable is loaded into the new process, this function does not need + to be called. + + .. deprecated:: 3.7 + This function is superseded by :c:func:`PyOS_AfterFork_Child()`. + + +.. c:function:: int PyOS_CheckStack() + + Return true when the interpreter runs out of stack space. This is a reliable + check, but is only available when :const:`USE_STACKCHECK` is defined (currently + on certain versions of Windows using the Microsoft Visual C++ compiler). + :const:`USE_STACKCHECK` will be defined automatically; you should never + change the definition in your own code. + + +.. c:function:: PyOS_sighandler_t PyOS_getsig(int i) + + Return the current signal handler for signal *i*. This is a thin wrapper around + either :c:func:`sigaction` or :c:func:`signal`. Do not call those functions + directly! :c:type:`PyOS_sighandler_t` is a typedef alias for :c:expr:`void + (\*)(int)`. + + +.. c:function:: PyOS_sighandler_t PyOS_setsig(int i, PyOS_sighandler_t h) + + Set the signal handler for signal *i* to be *h*; return the old signal handler. + This is a thin wrapper around either :c:func:`sigaction` or :c:func:`signal`. Do + not call those functions directly! :c:type:`PyOS_sighandler_t` is a typedef + alias for :c:expr:`void (\*)(int)`. + +.. c:function:: wchar_t* Py_DecodeLocale(const char* arg, size_t *size) + + .. warning:: + This function should not be called directly: use the :c:type:`PyConfig` + API with the :c:func:`PyConfig_SetBytesString` function which ensures + that :ref:`Python is preinitialized <c-preinit>`. + + This function must not be called before :ref:`Python is preinitialized + <c-preinit>` and so that the LC_CTYPE locale is properly configured: see + the :c:func:`Py_PreInitialize` function. + + Decode a byte string from the :term:`filesystem encoding and error handler`. + If the error handler is :ref:`surrogateescape error handler + <surrogateescape>`, undecodable bytes are decoded as characters in range + U+DC80..U+DCFF; and if a byte sequence can be decoded as a surrogate + character, the bytes are escaped using the surrogateescape error handler + instead of decoding them. + + Return a pointer to a newly allocated wide character string, use + :c:func:`PyMem_RawFree` to free the memory. If size is not ``NULL``, write + the number of wide characters excluding the null character into ``*size`` + + Return ``NULL`` on decoding error or memory allocation error. If *size* is + not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to + ``(size_t)-2`` on decoding error. + + The :term:`filesystem encoding and error handler` are selected by + :c:func:`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and + :c:member:`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`. + + Decoding errors should never happen, unless there is a bug in the C + library. + + Use the :c:func:`Py_EncodeLocale` function to encode the character string + back to a byte string. + + .. seealso:: + + The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and + :c:func:`PyUnicode_DecodeLocaleAndSize` functions. + + .. versionadded:: 3.5 + + .. versionchanged:: 3.7 + The function now uses the UTF-8 encoding in the :ref:`Python UTF-8 Mode + <utf8-mode>`. + + .. versionchanged:: 3.8 + The function now uses the UTF-8 encoding on Windows if + :c:data:`Py_LegacyWindowsFSEncodingFlag` is zero; + + +.. c:function:: char* Py_EncodeLocale(const wchar_t *text, size_t *error_pos) + + Encode a wide character string to the :term:`filesystem encoding and error + handler`. If the error handler is :ref:`surrogateescape error handler + <surrogateescape>`, surrogate characters in the range U+DC80..U+DCFF are + converted to bytes 0x80..0xFF. + + Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` + to free the memory. Return ``NULL`` on encoding error or memory allocation + error. + + If error_pos is not ``NULL``, ``*error_pos`` is set to ``(size_t)-1`` on + success, or set to the index of the invalid character on encoding error. + + The :term:`filesystem encoding and error handler` are selected by + :c:func:`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and + :c:member:`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`. + + Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back + to a wide character string. + + .. warning:: + This function must not be called before :ref:`Python is preinitialized + <c-preinit>` and so that the LC_CTYPE locale is properly configured: see + the :c:func:`Py_PreInitialize` function. + + .. seealso:: + + The :c:func:`PyUnicode_EncodeFSDefault` and + :c:func:`PyUnicode_EncodeLocale` functions. + + .. versionadded:: 3.5 + + .. versionchanged:: 3.7 + The function now uses the UTF-8 encoding in the :ref:`Python UTF-8 Mode + <utf8-mode>`. + + .. versionchanged:: 3.8 + The function now uses the UTF-8 encoding on Windows if + :c:data:`Py_LegacyWindowsFSEncodingFlag` is zero. + + +.. _systemfunctions: + +System Functions +================ + +These are utility functions that make functionality from the :mod:`sys` module +accessible to C code. They all work with the current interpreter thread's +:mod:`sys` module's dict, which is contained in the internal thread state structure. + +.. c:function:: PyObject *PySys_GetObject(const char *name) + + Return the object *name* from the :mod:`sys` module or ``NULL`` if it does + not exist, without setting an exception. + +.. c:function:: int PySys_SetObject(const char *name, PyObject *v) + + Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which + case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` + on error. + +.. c:function:: void PySys_ResetWarnOptions() + + Reset :data:`sys.warnoptions` to an empty list. This function may be + called prior to :c:func:`Py_Initialize`. + +.. c:function:: void PySys_AddWarnOption(const wchar_t *s) + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.warnoptions` should be used instead, see :ref:`Python + Initialization Configuration <init-config>`. + + Append *s* to :data:`sys.warnoptions`. This function must be called prior + to :c:func:`Py_Initialize` in order to affect the warnings filter list. + + .. deprecated:: 3.11 + +.. c:function:: void PySys_AddWarnOptionUnicode(PyObject *unicode) + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.warnoptions` should be used instead, see :ref:`Python + Initialization Configuration <init-config>`. + + Append *unicode* to :data:`sys.warnoptions`. + + Note: this function is not currently usable from outside the CPython + implementation, as it must be called prior to the implicit import of + :mod:`warnings` in :c:func:`Py_Initialize` to be effective, but can't be + called until enough of the runtime has been initialized to permit the + creation of Unicode objects. + + .. deprecated:: 3.11 + +.. c:function:: void PySys_SetPath(const wchar_t *path) + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.module_search_paths` and + :c:member:`PyConfig.module_search_paths_set` should be used instead, see + :ref:`Python Initialization Configuration <init-config>`. + + Set :data:`sys.path` to a list object of paths found in *path* which should + be a list of paths separated with the platform's search path delimiter + (``:`` on Unix, ``;`` on Windows). + + .. deprecated:: 3.11 + +.. c:function:: void PySys_WriteStdout(const char *format, ...) + + Write the output string described by *format* to :data:`sys.stdout`. No + exceptions are raised, even if truncation occurs (see below). + + *format* should limit the total size of the formatted output string to + 1000 bytes or less -- after 1000 bytes, the output string is truncated. + In particular, this means that no unrestricted "%s" formats should occur; + these should be limited using "%.<N>s" where <N> is a decimal number + calculated so that <N> plus the maximum size of other formatted text does not + exceed 1000 bytes. Also watch out for "%f", which can print hundreds of + digits for very large numbers. + + If a problem occurs, or :data:`sys.stdout` is unset, the formatted message + is written to the real (C level) *stdout*. + +.. c:function:: void PySys_WriteStderr(const char *format, ...) + + As :c:func:`PySys_WriteStdout`, but write to :data:`sys.stderr` or *stderr* + instead. + +.. c:function:: void PySys_FormatStdout(const char *format, ...) + + Function similar to PySys_WriteStdout() but format the message using + :c:func:`PyUnicode_FromFormatV` and don't truncate the message to an + arbitrary length. + + .. versionadded:: 3.2 + +.. c:function:: void PySys_FormatStderr(const char *format, ...) + + As :c:func:`PySys_FormatStdout`, but write to :data:`sys.stderr` or *stderr* + instead. + + .. versionadded:: 3.2 + +.. c:function:: void PySys_AddXOption(const wchar_t *s) + + This API is kept for backward compatibility: setting + :c:member:`PyConfig.xoptions` should be used instead, see :ref:`Python + Initialization Configuration <init-config>`. + + Parse *s* as a set of :option:`-X` options and add them to the current + options mapping as returned by :c:func:`PySys_GetXOptions`. This function + may be called prior to :c:func:`Py_Initialize`. + + .. versionadded:: 3.2 + + .. deprecated:: 3.11 + +.. c:function:: PyObject *PySys_GetXOptions() + + Return the current dictionary of :option:`-X` options, similarly to + :data:`sys._xoptions`. On error, ``NULL`` is returned and an exception is + set. + + .. versionadded:: 3.2 + + +.. c:function:: int PySys_Audit(const char *event, const char *format, ...) + + Raise an auditing event with any active hooks. Return zero for success + and non-zero with an exception set on failure. + + If any hooks have been added, *format* and other arguments will be used + to construct a tuple to pass. Apart from ``N``, the same format characters + as used in :c:func:`Py_BuildValue` are available. If the built value is not + a tuple, it will be added into a single-element tuple. (The ``N`` format + option consumes a reference, but since there is no way to know whether + arguments to this function will be consumed, using it may cause reference + leaks.) + + Note that ``#`` format characters should always be treated as + :c:type:`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined. + + :func:`sys.audit` performs the same function from Python code. + + .. versionadded:: 3.8 + + .. versionchanged:: 3.8.2 + + Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an + unavoidable deprecation warning was raised. + + +.. c:function:: int PySys_AddAuditHook(Py_AuditHookFunction hook, void *userData) + + Append the callable *hook* to the list of active auditing hooks. + Return zero on success + and non-zero on failure. If the runtime has been initialized, also set an + error on failure. Hooks added through this API are called for all + interpreters created by the runtime. + + The *userData* pointer is passed into the hook function. Since hook + functions may be called from different runtimes, this pointer should not + refer directly to Python state. + + This function is safe to call before :c:func:`Py_Initialize`. When called + after runtime initialization, existing audit hooks are notified and may + silently abort the operation by raising an error subclassed from + :class:`Exception` (other errors will not be silenced). + + The hook function is of type :c:expr:`int (*)(const char *event, PyObject + *args, void *userData)`, where *args* is guaranteed to be a + :c:type:`PyTupleObject`. The hook function is always called with the GIL + held by the Python interpreter that raised the event. + + See :pep:`578` for a detailed description of auditing. Functions in the + runtime and standard library that raise events are listed in the + :ref:`audit events table <audit-events>`. + Details are in each function's documentation. + + .. audit-event:: sys.addaudithook "" c.PySys_AddAuditHook + + If the interpreter is initialized, this function raises a auditing event + ``sys.addaudithook`` with no arguments. If any existing hooks raise an + exception derived from :class:`Exception`, the new hook will not be + added and the exception is cleared. As a result, callers cannot assume + that their hook has been added unless they control all existing hooks. + + .. versionadded:: 3.8 + + +.. _processcontrol: + +Process Control +=============== + + +.. c:function:: void Py_FatalError(const char *message) + + .. index:: single: abort() + + Print a fatal error message and kill the process. No cleanup is performed. + This function should only be invoked when a condition is detected that would + make it dangerous to continue using the Python interpreter; e.g., when the + object administration appears to be corrupted. On Unix, the standard C library + function :c:func:`abort` is called which will attempt to produce a :file:`core` + file. + + The ``Py_FatalError()`` function is replaced with a macro which logs + automatically the name of the current function, unless the + ``Py_LIMITED_API`` macro is defined. + + .. versionchanged:: 3.9 + Log the function name automatically. + + +.. c:function:: void Py_Exit(int status) + + .. index:: + single: Py_FinalizeEx() + single: exit() + + Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls the + standard C library function ``exit(status)``. If :c:func:`Py_FinalizeEx` + indicates an error, the exit status is set to 120. + + .. versionchanged:: 3.6 + Errors from finalization no longer ignored. + + +.. c:function:: int Py_AtExit(void (*func) ()) + + .. index:: + single: Py_FinalizeEx() + single: cleanup functions + + Register a cleanup function to be called by :c:func:`Py_FinalizeEx`. The cleanup + function will be called with no arguments and should return no value. At most + 32 cleanup functions can be registered. When the registration is successful, + :c:func:`Py_AtExit` returns ``0``; on failure, it returns ``-1``. The cleanup + function registered last is called first. Each cleanup function will be called + at most once. Since Python's internal finalization will have completed before + the cleanup function, no Python APIs should be called by *func*.
diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst new file mode 100644 index 0000000..0982d29 --- /dev/null +++ b/Doc/c-api/tuple.rst
@@ -0,0 +1,223 @@ +.. highlight:: c + +.. _tupleobjects: + +Tuple Objects +------------- + +.. index:: pair: object; tuple + + +.. c:type:: PyTupleObject + + This subtype of :c:type:`PyObject` represents a Python tuple object. + + +.. c:var:: PyTypeObject PyTuple_Type + + This instance of :c:type:`PyTypeObject` represents the Python tuple type; it + is the same object as :class:`tuple` in the Python layer. + + +.. c:function:: int PyTuple_Check(PyObject *p) + + Return true if *p* is a tuple object or an instance of a subtype of the + tuple type. This function always succeeds. + + +.. c:function:: int PyTuple_CheckExact(PyObject *p) + + Return true if *p* is a tuple object, but not an instance of a subtype of the + tuple type. This function always succeeds. + + +.. c:function:: PyObject* PyTuple_New(Py_ssize_t len) + + Return a new tuple object of size *len*, or ``NULL`` on failure. + + +.. c:function:: PyObject* PyTuple_Pack(Py_ssize_t n, ...) + + Return a new tuple object of size *n*, or ``NULL`` on failure. The tuple values + are initialized to the subsequent *n* C arguments pointing to Python objects. + ``PyTuple_Pack(2, a, b)`` is equivalent to ``Py_BuildValue("(OO)", a, b)``. + + +.. c:function:: Py_ssize_t PyTuple_Size(PyObject *p) + + Take a pointer to a tuple object, and return the size of that tuple. + + +.. c:function:: Py_ssize_t PyTuple_GET_SIZE(PyObject *p) + + Return the size of the tuple *p*, which must be non-``NULL`` and point to a tuple; + no error checking is performed. + + +.. c:function:: PyObject* PyTuple_GetItem(PyObject *p, Py_ssize_t pos) + + Return the object at position *pos* in the tuple pointed to by *p*. If *pos* is + negative or out of bounds, return ``NULL`` and set an :exc:`IndexError` exception. + + +.. c:function:: PyObject* PyTuple_GET_ITEM(PyObject *p, Py_ssize_t pos) + + Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments. + + +.. c:function:: PyObject* PyTuple_GetSlice(PyObject *p, Py_ssize_t low, Py_ssize_t high) + + Return the slice of the tuple pointed to by *p* between *low* and *high*, + or ``NULL`` on failure. This is the equivalent of the Python expression + ``p[low:high]``. Indexing from the end of the list is not supported. + + +.. c:function:: int PyTuple_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o) + + Insert a reference to object *o* at position *pos* of the tuple pointed to by + *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` + and set an :exc:`IndexError` exception. + + .. note:: + + This function "steals" a reference to *o* and discards a reference to + an item already in the tuple at the affected position. + + +.. c:function:: void PyTuple_SET_ITEM(PyObject *p, Py_ssize_t pos, PyObject *o) + + Like :c:func:`PyTuple_SetItem`, but does no error checking, and should *only* be + used to fill in brand new tuples. + + .. note:: + + This function "steals" a reference to *o*, and, unlike + :c:func:`PyTuple_SetItem`, does *not* discard a reference to any item that + is being replaced; any reference in the tuple at position *pos* will be + leaked. + + +.. c:function:: int _PyTuple_Resize(PyObject **p, Py_ssize_t newsize) + + Can be used to resize a tuple. *newsize* will be the new length of the tuple. + Because tuples are *supposed* to be immutable, this should only be used if there + is only one reference to the object. Do *not* use this if the tuple may already + be known to some other part of the code. The tuple will always grow or shrink + at the end. Think of this as destroying the old tuple and creating a new one, + only more efficiently. Returns ``0`` on success. Client code should never + assume that the resulting value of ``*p`` will be the same as before calling + this function. If the object referenced by ``*p`` is replaced, the original + ``*p`` is destroyed. On failure, returns ``-1`` and sets ``*p`` to ``NULL``, and + raises :exc:`MemoryError` or :exc:`SystemError`. + + +Struct Sequence Objects +----------------------- + +Struct sequence objects are the C equivalent of :func:`~collections.namedtuple` +objects, i.e. a sequence whose items can also be accessed through attributes. +To create a struct sequence, you first have to create a specific struct sequence +type. + +.. c:function:: PyTypeObject* PyStructSequence_NewType(PyStructSequence_Desc *desc) + + Create a new struct sequence type from the data in *desc*, described below. Instances + of the resulting type can be created with :c:func:`PyStructSequence_New`. + + +.. c:function:: void PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc) + + Initializes a struct sequence type *type* from *desc* in place. + + +.. c:function:: int PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc) + + The same as ``PyStructSequence_InitType``, but returns ``0`` on success and ``-1`` on + failure. + + .. versionadded:: 3.4 + + +.. c:type:: PyStructSequence_Desc + + Contains the meta information of a struct sequence type to create. + + +-------------------+------------------------------+--------------------------------------+ + | Field | C Type | Meaning | + +===================+==============================+======================================+ + | ``name`` | ``const char *`` | name of the struct sequence type | + +-------------------+------------------------------+--------------------------------------+ + | ``doc`` | ``const char *`` | pointer to docstring for the type | + | | | or ``NULL`` to omit | + +-------------------+------------------------------+--------------------------------------+ + | ``fields`` | ``PyStructSequence_Field *`` | pointer to ``NULL``-terminated array | + | | | with field names of the new type | + +-------------------+------------------------------+--------------------------------------+ + | ``n_in_sequence`` | ``int`` | number of fields visible to the | + | | | Python side (if used as tuple) | + +-------------------+------------------------------+--------------------------------------+ + + +.. c:type:: PyStructSequence_Field + + Describes a field of a struct sequence. As a struct sequence is modeled as a + tuple, all fields are typed as :c:expr:`PyObject*`. The index in the + :attr:`fields` array of the :c:type:`PyStructSequence_Desc` determines which + field of the struct sequence is described. + + +-----------+------------------+-----------------------------------------+ + | Field | C Type | Meaning | + +===========+==================+=========================================+ + | ``name`` | ``const char *`` | name for the field or ``NULL`` to end | + | | | the list of named fields, set to | + | | | :c:data:`PyStructSequence_UnnamedField` | + | | | to leave unnamed | + +-----------+------------------+-----------------------------------------+ + | ``doc`` | ``const char *`` | field docstring or ``NULL`` to omit | + +-----------+------------------+-----------------------------------------+ + + +.. c:var:: const char * const PyStructSequence_UnnamedField + + Special value for a field name to leave it unnamed. + + .. versionchanged:: 3.9 + The type was changed from ``char *``. + + +.. c:function:: PyObject* PyStructSequence_New(PyTypeObject *type) + + Creates an instance of *type*, which must have been created with + :c:func:`PyStructSequence_NewType`. + + +.. c:function:: PyObject* PyStructSequence_GetItem(PyObject *p, Py_ssize_t pos) + + Return the object at position *pos* in the struct sequence pointed to by *p*. + No bounds checking is performed. + + +.. c:function:: PyObject* PyStructSequence_GET_ITEM(PyObject *p, Py_ssize_t pos) + + Macro equivalent of :c:func:`PyStructSequence_GetItem`. + + +.. c:function:: void PyStructSequence_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o) + + Sets the field at index *pos* of the struct sequence *p* to value *o*. Like + :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand new + instances. + + .. note:: + + This function "steals" a reference to *o*. + + +.. c:function:: void PyStructSequence_SET_ITEM(PyObject *p, Py_ssize_t *pos, PyObject *o) + + Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static + inlined function. + + .. note:: + + This function "steals" a reference to *o*.
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst new file mode 100644 index 0000000..52eeef0 --- /dev/null +++ b/Doc/c-api/type.rst
@@ -0,0 +1,311 @@ +.. highlight:: c + +.. _typeobjects: + +Type Objects +------------ + +.. index:: pair: object; type + + +.. c:type:: PyTypeObject + + The C structure of the objects used to describe built-in types. + + +.. c:var:: PyTypeObject PyType_Type + + This is the type object for type objects; it is the same object as + :class:`type` in the Python layer. + + +.. c:function:: int PyType_Check(PyObject *o) + + Return non-zero if the object *o* is a type object, including instances of + types derived from the standard type object. Return 0 in all other cases. + This function always succeeds. + + +.. c:function:: int PyType_CheckExact(PyObject *o) + + Return non-zero if the object *o* is a type object, but not a subtype of + the standard type object. Return 0 in all other cases. This function + always succeeds. + + +.. c:function:: unsigned int PyType_ClearCache() + + Clear the internal lookup cache. Return the current version tag. + +.. c:function:: unsigned long PyType_GetFlags(PyTypeObject* type) + + Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This function is primarily + meant for use with ``Py_LIMITED_API``; the individual flag bits are + guaranteed to be stable across Python releases, but access to + :c:member:`~PyTypeObject.tp_flags` itself is not part of the limited API. + + .. versionadded:: 3.2 + + .. versionchanged:: 3.4 + The return type is now ``unsigned long`` rather than ``long``. + + +.. c:function:: void PyType_Modified(PyTypeObject *type) + + Invalidate the internal lookup cache for the type and all of its + subtypes. This function must be called after any manual + modification of the attributes or base classes of the type. + + +.. c:function:: int PyType_HasFeature(PyTypeObject *o, int feature) + + Return non-zero if the type object *o* sets the feature *feature*. + Type features are denoted by single bit flags. + + +.. c:function:: int PyType_IS_GC(PyTypeObject *o) + + Return true if the type object includes support for the cycle detector; this + tests the type flag :const:`Py_TPFLAGS_HAVE_GC`. + + +.. c:function:: int PyType_IsSubtype(PyTypeObject *a, PyTypeObject *b) + + Return true if *a* is a subtype of *b*. + + This function only checks for actual subtypes, which means that + :meth:`~class.__subclasscheck__` is not called on *b*. Call + :c:func:`PyObject_IsSubclass` to do the same check that :func:`issubclass` + would do. + + +.. c:function:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems) + + Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type object. Use + Python's default memory allocation mechanism to allocate a new instance and + initialize all its contents to ``NULL``. + +.. c:function:: PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject *kwds) + + Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type object. Create a + new instance using the type's :c:member:`~PyTypeObject.tp_alloc` slot. + +.. c:function:: int PyType_Ready(PyTypeObject *type) + + Finalize a type object. This should be called on all type objects to finish + their initialization. This function is responsible for adding inherited slots + from a type's base class. Return ``0`` on success, or return ``-1`` and sets an + exception on error. + + .. note:: + If some of the base classes implements the GC protocol and the provided + type does not include the :const:`Py_TPFLAGS_HAVE_GC` in its flags, then + the GC protocol will be automatically implemented from its parents. On + the contrary, if the type being created does include + :const:`Py_TPFLAGS_HAVE_GC` in its flags then it **must** implement the + GC protocol itself by at least implementing the + :c:member:`~PyTypeObject.tp_traverse` handle. + +.. c:function:: PyObject* PyType_GetName(PyTypeObject *type) + + Return the type's name. Equivalent to getting the type's ``__name__`` attribute. + + .. versionadded:: 3.11 + +.. c:function:: PyObject* PyType_GetQualName(PyTypeObject *type) + + Return the type's qualified name. Equivalent to getting the + type's ``__qualname__`` attribute. + + .. versionadded:: 3.11 + +.. c:function:: void* PyType_GetSlot(PyTypeObject *type, int slot) + + Return the function pointer stored in the given slot. If the + result is ``NULL``, this indicates that either the slot is ``NULL``, + or that the function was called with invalid parameters. + Callers will typically cast the result pointer into the appropriate + function type. + + See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument. + + .. versionadded:: 3.4 + + .. versionchanged:: 3.10 + :c:func:`PyType_GetSlot` can now accept all types. + Previously, it was limited to :ref:`heap types <heap-types>`. + +.. c:function:: PyObject* PyType_GetModule(PyTypeObject *type) + + Return the module object associated with the given type when the type was + created using :c:func:`PyType_FromModuleAndSpec`. + + If no module is associated with the given type, sets :py:class:`TypeError` + and returns ``NULL``. + + This function is usually used to get the module in which a method is defined. + Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` + may not return the intended result. + ``Py_TYPE(self)`` may be a *subclass* of the intended class, and subclasses + are not necessarily defined in the same module as their superclass. + See :c:type:`PyCMethod` to get the class that defines the method. + See :c:func:`PyType_GetModuleByDef` for cases when ``PyCMethod`` cannot + be used. + + .. versionadded:: 3.9 + +.. c:function:: void* PyType_GetModuleState(PyTypeObject *type) + + Return the state of the module object associated with the given type. + This is a shortcut for calling :c:func:`PyModule_GetState()` on the result + of :c:func:`PyType_GetModule`. + + If no module is associated with the given type, sets :py:class:`TypeError` + and returns ``NULL``. + + If the *type* has an associated module but its state is ``NULL``, + returns ``NULL`` without setting an exception. + + .. versionadded:: 3.9 + +.. c:function:: PyObject* PyType_GetModuleByDef(PyTypeObject *type, struct PyModuleDef *def) + + Find the first superclass whose module was created from + the given :c:type:`PyModuleDef` *def*, and return that module. + + If no module is found, raises a :py:class:`TypeError` and returns ``NULL``. + + This function is intended to be used together with + :c:func:`PyModule_GetState()` to get module state from slot methods (such as + :c:member:`~PyTypeObject.tp_init` or :c:member:`~PyNumberMethods.nb_add`) + and other places where a method's defining class cannot be passed using the + :c:type:`PyCMethod` calling convention. + + .. versionadded:: 3.11 + + +Creating Heap-Allocated Types +............................. + +The following functions and structs are used to create +:ref:`heap types <heap-types>`. + +.. c:function:: PyObject* PyType_FromModuleAndSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) + + Creates and returns a :ref:`heap type <heap-types>` from the *spec* + (:const:`Py_TPFLAGS_HEAPTYPE`). + + The *bases* argument can be used to specify base classes; it can either + be only one class or a tuple of classes. + If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead. + If that also is ``NULL``, the *Py_tp_base* slot is used instead. + If that also is ``NULL``, the new type derives from :class:`object`. + + The *module* argument can be used to record the module in which the new + class is defined. It must be a module object or ``NULL``. + If not ``NULL``, the module is associated with the new type and can later be + retrieved with :c:func:`PyType_GetModule`. + The associated module is not inherited by subclasses; it must be specified + for each class individually. + + This function calls :c:func:`PyType_Ready` on the new type. + + .. versionadded:: 3.9 + + .. versionchanged:: 3.10 + + The function now accepts a single class as the *bases* argument and + ``NULL`` as the ``tp_doc`` slot. + +.. c:function:: PyObject* PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases) + + Equivalent to ``PyType_FromModuleAndSpec(NULL, spec, bases)``. + + .. versionadded:: 3.3 + +.. c:function:: PyObject* PyType_FromSpec(PyType_Spec *spec) + + Equivalent to ``PyType_FromSpecWithBases(spec, NULL)``. + +.. c:type:: PyType_Spec + + Structure defining a type's behavior. + + .. c:member:: const char* PyType_Spec.name + + Name of the type, used to set :c:member:`PyTypeObject.tp_name`. + + .. c:member:: int PyType_Spec.basicsize + .. c:member:: int PyType_Spec.itemsize + + Size of the instance in bytes, used to set + :c:member:`PyTypeObject.tp_basicsize` and + :c:member:`PyTypeObject.tp_itemsize`. + + .. c:member:: int PyType_Spec.flags + + Type flags, used to set :c:member:`PyTypeObject.tp_flags`. + + If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, + :c:func:`PyType_FromSpecWithBases` sets it automatically. + + .. c:member:: PyType_Slot *PyType_Spec.slots + + Array of :c:type:`PyType_Slot` structures. + Terminated by the special slot value ``{0, NULL}``. + +.. c:type:: PyType_Slot + + Structure defining optional functionality of a type, containing a slot ID + and a value pointer. + + .. c:member:: int PyType_Slot.slot + + A slot ID. + + Slot IDs are named like the field names of the structures + :c:type:`PyTypeObject`, :c:type:`PyNumberMethods`, + :c:type:`PySequenceMethods`, :c:type:`PyMappingMethods` and + :c:type:`PyAsyncMethods` with an added ``Py_`` prefix. + For example, use: + + * ``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc` + * ``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add` + * ``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length` + + The following fields cannot be set at all using :c:type:`PyType_Spec` and + :c:type:`PyType_Slot`: + + * :c:member:`~PyTypeObject.tp_dict` + * :c:member:`~PyTypeObject.tp_mro` + * :c:member:`~PyTypeObject.tp_cache` + * :c:member:`~PyTypeObject.tp_subclasses` + * :c:member:`~PyTypeObject.tp_weaklist` + * :c:member:`~PyTypeObject.tp_vectorcall` + * :c:member:`~PyTypeObject.tp_weaklistoffset` + (see :ref:`PyMemberDef <pymemberdef-offsets>`) + * :c:member:`~PyTypeObject.tp_dictoffset` + (see :ref:`PyMemberDef <pymemberdef-offsets>`) + * :c:member:`~PyTypeObject.tp_vectorcall_offset` + (see :ref:`PyMemberDef <pymemberdef-offsets>`) + + Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be + problematic on some platforms. + To avoid issues, use the *bases* argument of + :py:func:`PyType_FromSpecWithBases` instead. + + .. versionchanged:: 3.9 + + Slots in :c:type:`PyBufferProcs` may be set in the unlimited API. + + .. versionchanged:: 3.11 + :c:member:`~PyBufferProcs.bf_getbuffer` and + :c:member:`~PyBufferProcs.bf_releasebuffer` are now available + under the limited API. + + .. c:member:: void *PyType_Slot.pfunc + + The desired value of the slot. In most cases, this is a pointer + to a function. + + Slots other than ``Py_tp_doc`` may not be ``NULL``.
diff --git a/Doc/c-api/typehints.rst b/Doc/c-api/typehints.rst new file mode 100644 index 0000000..4c1957a --- /dev/null +++ b/Doc/c-api/typehints.rst
@@ -0,0 +1,47 @@ +.. highlight:: c + +.. _typehintobjects: + +Objects for Type Hinting +------------------------ + +Various built-in types for type hinting are provided. Currently, +two types exist -- :ref:`GenericAlias <types-genericalias>` and +:ref:`Union <types-union>`. Only ``GenericAlias`` is exposed to C. + +.. c:function:: PyObject* Py_GenericAlias(PyObject *origin, PyObject *args) + + Create a :ref:`GenericAlias <types-genericalias>` object. + Equivalent to calling the Python class + :class:`types.GenericAlias`. The *origin* and *args* arguments set the + ``GenericAlias``\ 's ``__origin__`` and ``__args__`` attributes respectively. + *origin* should be a :c:expr:`PyTypeObject*`, and *args* can be a + :c:expr:`PyTupleObject*` or any ``PyObject*``. If *args* passed is + not a tuple, a 1-tuple is automatically constructed and ``__args__`` is set + to ``(args,)``. + Minimal checking is done for the arguments, so the function will succeed even + if *origin* is not a type. + The ``GenericAlias``\ 's ``__parameters__`` attribute is constructed lazily + from ``__args__``. On failure, an exception is raised and ``NULL`` is + returned. + + Here's an example of how to make an extension type generic:: + + ... + static PyMethodDef my_obj_methods[] = { + // Other methods. + ... + {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"} + ... + } + + .. seealso:: The data model method :meth:`__class_getitem__`. + + .. versionadded:: 3.9 + +.. c:var:: PyTypeObject Py_GenericAliasType + + The C type of the object returned by :c:func:`Py_GenericAlias`. Equivalent to + :class:`types.GenericAlias` in Python. + + .. versionadded:: 3.9
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst new file mode 100644 index 0000000..ce32716 --- /dev/null +++ b/Doc/c-api/typeobj.rst
@@ -0,0 +1,2740 @@ +.. highlight:: c + +.. _type-structs: + +Type Objects +============ + +Perhaps one of the most important structures of the Python object system is the +structure that defines a new type: the :c:type:`PyTypeObject` structure. Type +objects can be handled using any of the ``PyObject_*`` or +``PyType_*`` functions, but do not offer much that's interesting to most +Python applications. These objects are fundamental to how objects behave, so +they are very important to the interpreter itself and to any extension module +that implements new types. + +Type objects are fairly large compared to most of the standard types. The reason +for the size is that each type object stores a large number of values, mostly C +function pointers, each of which implements a small part of the type's +functionality. The fields of the type object are examined in detail in this +section. The fields will be described in the order in which they occur in the +structure. + +In addition to the following quick reference, the :ref:`typedef-examples` +section provides at-a-glance insight into the meaning and use of +:c:type:`PyTypeObject`. + + +Quick Reference +--------------- + +.. _tp-slots-table: + +"tp slots" +^^^^^^^^^^ + +.. table:: + :widths: 18,18,18,1,1,1,1 + + +------------------------------------------------+-----------------------------------+-------------------+---------------+ + | PyTypeObject Slot [#slots]_ | :ref:`Type <slot-typedefs-table>` | special | Info [#cols]_ | + | | | methods/attrs +---+---+---+---+ + | | | | O | T | D | I | + +================================================+===================================+===================+===+===+===+===+ + | <R> :c:member:`~PyTypeObject.tp_name` | const char * | __name__ | X | X | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_basicsize` | :c:type:`Py_ssize_t` | | X | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_itemsize` | :c:type:`Py_ssize_t` | | | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_dealloc` | :c:type:`destructor` | | X | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_vectorcall_offset` | :c:type:`Py_ssize_t` | | | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | (:c:member:`~PyTypeObject.tp_getattr`) | :c:type:`getattrfunc` | __getattribute__, | | | | G | + | | | __getattr__ | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | (:c:member:`~PyTypeObject.tp_setattr`) | :c:type:`setattrfunc` | __setattr__, | | | | G | + | | | __delattr__ | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_as_async` | :c:type:`PyAsyncMethods` * | :ref:`sub-slots` | | | | % | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_repr` | :c:type:`reprfunc` | __repr__ | X | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_as_number` | :c:type:`PyNumberMethods` * | :ref:`sub-slots` | | | | % | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_as_sequence` | :c:type:`PySequenceMethods` * | :ref:`sub-slots` | | | | % | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_as_mapping` | :c:type:`PyMappingMethods` * | :ref:`sub-slots` | | | | % | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_hash` | :c:type:`hashfunc` | __hash__ | X | | | G | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_call` | :c:type:`ternaryfunc` | __call__ | | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_str` | :c:type:`reprfunc` | __str__ | X | | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_getattro` | :c:type:`getattrofunc` | __getattribute__, | X | X | | G | + | | | __getattr__ | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_setattro` | :c:type:`setattrofunc` | __setattr__, | X | X | | G | + | | | __delattr__ | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_as_buffer` | :c:type:`PyBufferProcs` * | | | | | % | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_flags` | unsigned long | | X | X | | ? | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_doc` | const char * | __doc__ | X | X | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_traverse` | :c:type:`traverseproc` | | | X | | G | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_clear` | :c:type:`inquiry` | | | X | | G | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_richcompare` | :c:type:`richcmpfunc` | __lt__, | X | | | G | + | | | __le__, | | | | | + | | | __eq__, | | | | | + | | | __ne__, | | | | | + | | | __gt__, | | | | | + | | | __ge__ | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_weaklistoffset` | :c:type:`Py_ssize_t` | | | X | | ? | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_iter` | :c:type:`getiterfunc` | __iter__ | | | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_iternext` | :c:type:`iternextfunc` | __next__ | | | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_methods` | :c:type:`PyMethodDef` [] | | X | X | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_members` | :c:type:`PyMemberDef` [] | | | X | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_getset` | :c:type:`PyGetSetDef` [] | | X | X | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_base` | :c:type:`PyTypeObject` * | __base__ | | | X | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_dict` | :c:type:`PyObject` * | __dict__ | | | ? | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_descr_get` | :c:type:`descrgetfunc` | __get__ | | | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_descr_set` | :c:type:`descrsetfunc` | __set__, | | | | X | + | | | __delete__ | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_dictoffset` | :c:type:`Py_ssize_t` | | | X | | ? | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_init` | :c:type:`initproc` | __init__ | X | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_alloc` | :c:type:`allocfunc` | | X | | ? | ? | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_new` | :c:type:`newfunc` | __new__ | X | X | ? | ? | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_free` | :c:type:`freefunc` | | X | X | ? | ? | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_is_gc` | :c:type:`inquiry` | | | X | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | <:c:member:`~PyTypeObject.tp_bases`> | :c:type:`PyObject` * | __bases__ | | | ~ | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | <:c:member:`~PyTypeObject.tp_mro`> | :c:type:`PyObject` * | __mro__ | | | ~ | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | [:c:member:`~PyTypeObject.tp_cache`] | :c:type:`PyObject` * | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | [:c:member:`~PyTypeObject.tp_subclasses`] | :c:type:`PyObject` * | __subclasses__ | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | [:c:member:`~PyTypeObject.tp_weaklist`] | :c:type:`PyObject` * | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | (:c:member:`~PyTypeObject.tp_del`) | :c:type:`destructor` | | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | [:c:member:`~PyTypeObject.tp_version_tag`] | unsigned int | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_finalize` | :c:type:`destructor` | __del__ | | | | X | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + | :c:member:`~PyTypeObject.tp_vectorcall` | :c:type:`vectorcallfunc` | | | | | | + +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ + +.. [#slots] + + **()**: A slot name in parentheses indicates it is (effectively) deprecated. + + **<>**: Names in angle brackets should be initially set to ``NULL`` and + treated as read-only. + + **[]**: Names in square brackets are for internal use only. + + **<R>** (as a prefix) means the field is required (must be non-``NULL``). + +.. [#cols] Columns: + + **"O"**: set on :c:type:`PyBaseObject_Type` + + **"T"**: set on :c:type:`PyType_Type` + + **"D"**: default (if slot is set to ``NULL``) + + .. code-block:: none + + X - PyType_Ready sets this value if it is NULL + ~ - PyType_Ready always sets this value (it should be NULL) + ? - PyType_Ready may set this value depending on other slots + + Also see the inheritance column ("I"). + + **"I"**: inheritance + + .. code-block:: none + + X - type slot is inherited via *PyType_Ready* if defined with a *NULL* value + % - the slots of the sub-struct are inherited individually + G - inherited, but only in combination with other slots; see the slot's description + ? - it's complicated; see the slot's description + + Note that some slots are effectively inherited through the normal + attribute lookup chain. + +.. _sub-slots: + +sub-slots +^^^^^^^^^ + +.. table:: + :widths: 26,17,12 + + +---------------------------------------------------------+-----------------------------------+---------------+ + | Slot | :ref:`Type <slot-typedefs-table>` | special | + | | | methods | + +=========================================================+===================================+===============+ + | :c:member:`~PyAsyncMethods.am_await` | :c:type:`unaryfunc` | __await__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyAsyncMethods.am_aiter` | :c:type:`unaryfunc` | __aiter__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyAsyncMethods.am_anext` | :c:type:`unaryfunc` | __anext__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyAsyncMethods.am_send` | :c:type:`sendfunc` | | + +---------------------------------------------------------+-----------------------------------+---------------+ + | | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_add` | :c:type:`binaryfunc` | __add__ | + | | | __radd__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_add` | :c:type:`binaryfunc` | __iadd__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_subtract` | :c:type:`binaryfunc` | __sub__ | + | | | __rsub__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_subtract` | :c:type:`binaryfunc` | __isub__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_multiply` | :c:type:`binaryfunc` | __mul__ | + | | | __rmul__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_multiply` | :c:type:`binaryfunc` | __imul__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_remainder` | :c:type:`binaryfunc` | __mod__ | + | | | __rmod__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_remainder` | :c:type:`binaryfunc` | __imod__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_divmod` | :c:type:`binaryfunc` | __divmod__ | + | | | __rdivmod__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_power` | :c:type:`ternaryfunc` | __pow__ | + | | | __rpow__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_power` | :c:type:`ternaryfunc` | __ipow__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_negative` | :c:type:`unaryfunc` | __neg__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_positive` | :c:type:`unaryfunc` | __pos__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_absolute` | :c:type:`unaryfunc` | __abs__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_bool` | :c:type:`inquiry` | __bool__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_invert` | :c:type:`unaryfunc` | __invert__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_lshift` | :c:type:`binaryfunc` | __lshift__ | + | | | __rlshift__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_lshift` | :c:type:`binaryfunc` | __ilshift__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_rshift` | :c:type:`binaryfunc` | __rshift__ | + | | | __rrshift__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_rshift` | :c:type:`binaryfunc` | __irshift__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_and` | :c:type:`binaryfunc` | __and__ | + | | | __rand__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_and` | :c:type:`binaryfunc` | __iand__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_xor` | :c:type:`binaryfunc` | __xor__ | + | | | __rxor__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_xor` | :c:type:`binaryfunc` | __ixor__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_or` | :c:type:`binaryfunc` | __or__ | + | | | __ror__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_or` | :c:type:`binaryfunc` | __ior__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_int` | :c:type:`unaryfunc` | __int__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_reserved` | void * | | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_float` | :c:type:`unaryfunc` | __float__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_floor_divide` | :c:type:`binaryfunc` | __floordiv__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_floor_divide` | :c:type:`binaryfunc` | __ifloordiv__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_true_divide` | :c:type:`binaryfunc` | __truediv__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_true_divide` | :c:type:`binaryfunc` | __itruediv__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_index` | :c:type:`unaryfunc` | __index__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_matrix_multiply` | :c:type:`binaryfunc` | __matmul__ | + | | | __rmatmul__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyNumberMethods.nb_inplace_matrix_multiply` | :c:type:`binaryfunc` | __imatmul__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyMappingMethods.mp_length` | :c:type:`lenfunc` | __len__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyMappingMethods.mp_subscript` | :c:type:`binaryfunc` | __getitem__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyMappingMethods.mp_ass_subscript` | :c:type:`objobjargproc` | __setitem__, | + | | | __delitem__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_length` | :c:type:`lenfunc` | __len__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_concat` | :c:type:`binaryfunc` | __add__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_repeat` | :c:type:`ssizeargfunc` | __mul__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_item` | :c:type:`ssizeargfunc` | __getitem__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_ass_item` | :c:type:`ssizeobjargproc` | __setitem__ | + | | | __delitem__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_contains` | :c:type:`objobjproc` | __contains__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_inplace_concat` | :c:type:`binaryfunc` | __iadd__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PySequenceMethods.sq_inplace_repeat` | :c:type:`ssizeargfunc` | __imul__ | + +---------------------------------------------------------+-----------------------------------+---------------+ + | | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyBufferProcs.bf_getbuffer` | :c:func:`getbufferproc` | | + +---------------------------------------------------------+-----------------------------------+---------------+ + | :c:member:`~PyBufferProcs.bf_releasebuffer` | :c:func:`releasebufferproc` | | + +---------------------------------------------------------+-----------------------------------+---------------+ + +.. _slot-typedefs-table: + +slot typedefs +^^^^^^^^^^^^^ + ++-----------------------------+-----------------------------+----------------------+ +| typedef | Parameter Types | Return Type | ++=============================+=============================+======================+ +| :c:type:`allocfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyTypeObject` * | | +| | :c:type:`Py_ssize_t` | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`destructor` | void * | void | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`freefunc` | void * | void | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`traverseproc` | .. line-block:: | int | +| | | | +| | void * | | +| | :c:type:`visitproc` | | +| | void * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`newfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`initproc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`reprfunc` | :c:type:`PyObject` * | :c:type:`PyObject` * | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`getattrfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | const char * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`setattrfunc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | const char * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`getattrofunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`setattrofunc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`descrgetfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`descrsetfunc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`hashfunc` | :c:type:`PyObject` * | Py_hash_t | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`richcmpfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | int | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`getiterfunc` | :c:type:`PyObject` * | :c:type:`PyObject` * | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`iternextfunc` | :c:type:`PyObject` * | :c:type:`PyObject` * | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`lenfunc` | :c:type:`PyObject` * | :c:type:`Py_ssize_t` | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`getbufferproc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`Py_buffer` * | | +| | int | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`releasebufferproc` | .. line-block:: | void | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`Py_buffer` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`inquiry` | void * | int | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`unaryfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`binaryfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`ternaryfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`ssizeargfunc` | .. line-block:: | :c:type:`PyObject` * | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`Py_ssize_t` | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`ssizeobjargproc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`Py_ssize_t` | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`objobjproc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ +| :c:type:`objobjargproc` | .. line-block:: | int | +| | | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | +| | :c:type:`PyObject` * | | ++-----------------------------+-----------------------------+----------------------+ + +See :ref:`slot-typedefs` below for more detail. + + +PyTypeObject Definition +----------------------- + +The structure definition for :c:type:`PyTypeObject` can be found in +:file:`Include/object.h`. For convenience of reference, this repeats the +definition found there: + +.. XXX Drop this? + +.. literalinclude:: ../includes/typestruct.h + + +PyObject Slots +-------------- + +The type object structure extends the :c:type:`PyVarObject` structure. The +:attr:`ob_size` field is used for dynamic types (created by :func:`type_new`, +usually called from a class statement). Note that :c:data:`PyType_Type` (the +metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means that its instances (i.e. +type objects) *must* have the :attr:`ob_size` field. + + +.. c:member:: Py_ssize_t PyObject.ob_refcnt + + This is the type object's reference count, initialized to ``1`` by the + ``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type + objects <static-types>`, the type's instances (objects whose :attr:`ob_type` + points back to the type) do *not* count as references. But for + :ref:`dynamically allocated type objects <heap-types>`, the instances *do* + count as references. + + **Inheritance:** + + This field is not inherited by subtypes. + + +.. c:member:: PyTypeObject* PyObject.ob_type + + This is the type's type, in other words its metatype. It is initialized by the + argument to the ``PyObject_HEAD_INIT`` macro, and its value should normally be + ``&PyType_Type``. However, for dynamically loadable extension modules that must + be usable on Windows (at least), the compiler complains that this is not a valid + initializer. Therefore, the convention is to pass ``NULL`` to the + ``PyObject_HEAD_INIT`` macro and to initialize this field explicitly at the + start of the module's initialization function, before doing anything else. This + is typically done like this:: + + Foo_Type.ob_type = &PyType_Type; + + This should be done before any instances of the type are created. + :c:func:`PyType_Ready` checks if :attr:`ob_type` is ``NULL``, and if so, + initializes it to the :attr:`ob_type` field of the base class. + :c:func:`PyType_Ready` will not change this field if it is non-zero. + + **Inheritance:** + + This field is inherited by subtypes. + + +.. c:member:: PyObject* PyObject._ob_next + PyObject* PyObject._ob_prev + + These fields are only present when the macro ``Py_TRACE_REFS`` is defined + (see the :option:`configure --with-trace-refs option <--with-trace-refs>`). + + Their initialization to ``NULL`` is taken care of by the + ``PyObject_HEAD_INIT`` macro. For :ref:`statically allocated objects + <static-types>`, these fields always remain ``NULL``. For :ref:`dynamically + allocated objects <heap-types>`, these two fields are used to link the + object into a doubly linked list of *all* live objects on the heap. + + This could be used for various debugging purposes; currently the only uses + are the :func:`sys.getobjects` function and to print the objects that are + still alive at the end of a run when the environment variable + :envvar:`PYTHONDUMPREFS` is set. + + **Inheritance:** + + These fields are not inherited by subtypes. + + +PyVarObject Slots +----------------- + +.. c:member:: Py_ssize_t PyVarObject.ob_size + + For :ref:`statically allocated type objects <static-types>`, this should be + initialized to zero. For :ref:`dynamically allocated type objects + <heap-types>`, this field has a special internal meaning. + + **Inheritance:** + + This field is not inherited by subtypes. + + +PyTypeObject Slots +------------------ + +Each slot has a section describing inheritance. If :c:func:`PyType_Ready` +may set a value when the field is set to ``NULL`` then there will also be +a "Default" section. (Note that many fields set on :c:type:`PyBaseObject_Type` +and :c:type:`PyType_Type` effectively act as defaults.) + +.. c:member:: const char* PyTypeObject.tp_name + + Pointer to a NUL-terminated string containing the name of the type. For types + that are accessible as module globals, the string should be the full module + name, followed by a dot, followed by the type name; for built-in types, it + should be just the type name. If the module is a submodule of a package, the + full package name is part of the full module name. For example, a type named + :class:`T` defined in module :mod:`M` in subpackage :mod:`Q` in package :mod:`P` + should have the :c:member:`~PyTypeObject.tp_name` initializer ``"P.Q.M.T"``. + + For :ref:`dynamically allocated type objects <heap-types>`, + this should just be the type name, and + the module name explicitly stored in the type dict as the value for key + ``'__module__'``. + + For :ref:`statically allocated type objects <static-types>`, + the *tp_name* field should contain a dot. + Everything before the last dot is made accessible as the :attr:`__module__` + attribute, and everything after the last dot is made accessible as the + :attr:`~definition.__name__` attribute. + + If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is made accessible as the + :attr:`~definition.__name__` attribute, and the :attr:`__module__` attribute is undefined + (unless explicitly set in the dictionary, as explained above). This means your + type will be impossible to pickle. Additionally, it will not be listed in + module documentations created with pydoc. + + This field must not be ``NULL``. It is the only required field + in :c:func:`PyTypeObject` (other than potentially + :c:member:`~PyTypeObject.tp_itemsize`). + + **Inheritance:** + + This field is not inherited by subtypes. + + +.. c:member:: Py_ssize_t PyTypeObject.tp_basicsize + Py_ssize_t PyTypeObject.tp_itemsize + + These fields allow calculating the size in bytes of instances of the type. + + There are two kinds of types: types with fixed-length instances have a zero + :c:member:`~PyTypeObject.tp_itemsize` field, types with variable-length instances have a non-zero + :c:member:`~PyTypeObject.tp_itemsize` field. For a type with fixed-length instances, all + instances have the same size, given in :c:member:`~PyTypeObject.tp_basicsize`. + + For a type with variable-length instances, the instances must have an + :attr:`ob_size` field, and the instance size is :c:member:`~PyTypeObject.tp_basicsize` plus N + times :c:member:`~PyTypeObject.tp_itemsize`, where N is the "length" of the object. The value of + N is typically stored in the instance's :attr:`ob_size` field. There are + exceptions: for example, ints use a negative :attr:`ob_size` to indicate a + negative number, and N is ``abs(ob_size)`` there. Also, the presence of an + :attr:`ob_size` field in the instance layout doesn't mean that the instance + structure is variable-length (for example, the structure for the list type has + fixed-length instances, yet those instances have a meaningful :attr:`ob_size` + field). + + The basic size includes the fields in the instance declared by the macro + :c:macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD` (whichever is used to + declare the instance struct) and this in turn includes the :attr:`_ob_prev` and + :attr:`_ob_next` fields if they are present. This means that the only correct + way to get an initializer for the :c:member:`~PyTypeObject.tp_basicsize` is to use the + ``sizeof`` operator on the struct used to declare the instance layout. + The basic size does not include the GC header size. + + A note about alignment: if the variable items require a particular alignment, + this should be taken care of by the value of :c:member:`~PyTypeObject.tp_basicsize`. Example: + suppose a type implements an array of ``double``. :c:member:`~PyTypeObject.tp_itemsize` is + ``sizeof(double)``. It is the programmer's responsibility that + :c:member:`~PyTypeObject.tp_basicsize` is a multiple of ``sizeof(double)`` (assuming this is the + alignment requirement for ``double``). + + For any type with variable-length instances, this field must not be ``NULL``. + + **Inheritance:** + + These fields are inherited separately by subtypes. If the base type has a + non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is generally not safe to set + :c:member:`~PyTypeObject.tp_itemsize` to a different non-zero value in a subtype (though this + depends on the implementation of the base type). + + +.. c:member:: destructor PyTypeObject.tp_dealloc + + A pointer to the instance destructor function. This function must be defined + unless the type guarantees that its instances will never be deallocated (as is + the case for the singletons ``None`` and ``Ellipsis``). The function signature is:: + + void tp_dealloc(PyObject *self); + + The destructor function is called by the :c:func:`Py_DECREF` and + :c:func:`Py_XDECREF` macros when the new reference count is zero. At this point, + the instance is still in existence, but there are no references to it. The + destructor function should free all references which the instance owns, free all + memory buffers owned by the instance (using the freeing function corresponding + to the allocation function used to allocate the buffer), and call the type's + :c:member:`~PyTypeObject.tp_free` function. If the type is not subtypable + (doesn't have the :const:`Py_TPFLAGS_BASETYPE` flag bit set), it is + permissible to call the object deallocator directly instead of via + :c:member:`~PyTypeObject.tp_free`. The object deallocator should be the one used to allocate the + instance; this is normally :c:func:`PyObject_Del` if the instance was allocated + using :c:func:`PyObject_New` or :c:func:`PyObject_VarNew`, or + :c:func:`PyObject_GC_Del` if the instance was allocated using + :c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`. + + If the type supports garbage collection (has the :const:`Py_TPFLAGS_HAVE_GC` + flag bit set), the destructor should call :c:func:`PyObject_GC_UnTrack` + before clearing any member fields. + + .. code-block:: c + + static void foo_dealloc(foo_object *self) { + PyObject_GC_UnTrack(self); + Py_CLEAR(self->ref); + Py_TYPE(self)->tp_free((PyObject *)self); + } + + Finally, if the type is heap allocated (:const:`Py_TPFLAGS_HEAPTYPE`), the + deallocator should decrement the reference count for its type object after + calling the type deallocator. In order to avoid dangling pointers, the + recommended way to achieve this is: + + .. code-block:: c + + static void foo_dealloc(foo_object *self) { + PyTypeObject *tp = Py_TYPE(self); + // free references and buffers here + tp->tp_free(self); + Py_DECREF(tp); + } + + + **Inheritance:** + + This field is inherited by subtypes. + + +.. c:member:: Py_ssize_t PyTypeObject.tp_vectorcall_offset + + An optional offset to a per-instance function that implements calling + the object using the :ref:`vectorcall protocol <vectorcall>`, + a more efficient alternative + of the simpler :c:member:`~PyTypeObject.tp_call`. + + This field is only used if the flag :const:`Py_TPFLAGS_HAVE_VECTORCALL` + is set. If so, this must be a positive integer containing the offset in the + instance of a :c:type:`vectorcallfunc` pointer. + + The *vectorcallfunc* pointer may be ``NULL``, in which case the instance behaves + as if :const:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the instance + falls back to :c:member:`~PyTypeObject.tp_call`. + + Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set + :c:member:`~PyTypeObject.tp_call` and make sure its behaviour is consistent + with the *vectorcallfunc* function. + This can be done by setting *tp_call* to :c:func:`PyVectorcall_Call`. + + .. warning:: + + It is not recommended for :ref:`mutable heap types <heap-types>` to implement + the vectorcall protocol. + When a user sets :attr:`__call__` in Python code, only *tp_call* is updated, + likely making it inconsistent with the vectorcall function. + + .. versionchanged:: 3.8 + + Before version 3.8, this slot was named ``tp_print``. + In Python 2.x, it was used for printing to a file. + In Python 3.0 to 3.7, it was unused. + + **Inheritance:** + + This field is always inherited. + However, the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag is not + always inherited. If it's not, then the subclass won't use + :ref:`vectorcall <vectorcall>`, except when + :c:func:`PyVectorcall_Call` is explicitly called. + This is in particular the case for types without the + :const:`Py_TPFLAGS_IMMUTABLETYPE` flag set (including subclasses defined in + Python). + + +.. c:member:: getattrfunc PyTypeObject.tp_getattr + + An optional pointer to the get-attribute-string function. + + This field is deprecated. When it is defined, it should point to a function + that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, but taking a C string + instead of a Python string object to give the attribute name. + + **Inheritance:** + + Group: :attr:`tp_getattr`, :attr:`tp_getattro` + + This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_getattro`: a subtype + inherits both :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject.tp_getattro` from its base type when + the subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject.tp_getattro` are both ``NULL``. + + +.. c:member:: setattrfunc PyTypeObject.tp_setattr + + An optional pointer to the function for setting and deleting attributes. + + This field is deprecated. When it is defined, it should point to a function + that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, but taking a C string + instead of a Python string object to give the attribute name. + + **Inheritance:** + + Group: :attr:`tp_setattr`, :attr:`tp_setattro` + + This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_setattro`: a subtype + inherits both :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` from its base type when + the subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` are both ``NULL``. + + +.. c:member:: PyAsyncMethods* PyTypeObject.tp_as_async + + Pointer to an additional structure that contains fields relevant only to + objects which implement :term:`awaitable` and :term:`asynchronous iterator` + protocols at the C-level. See :ref:`async-structs` for details. + + .. versionadded:: 3.5 + Formerly known as ``tp_compare`` and ``tp_reserved``. + + **Inheritance:** + + The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, + but the contained fields are inherited individually. + + +.. c:member:: reprfunc PyTypeObject.tp_repr + + .. index:: pair: built-in function; repr + + An optional pointer to a function that implements the built-in function + :func:`repr`. + + The signature is the same as for :c:func:`PyObject_Repr`:: + + PyObject *tp_repr(PyObject *self); + + The function must return a string or a Unicode object. Ideally, + this function should return a string that, when passed to + :func:`eval`, given a suitable environment, returns an object with the + same value. If this is not feasible, it should return a string starting with + ``'<'`` and ending with ``'>'`` from which both the type and the value of the + object can be deduced. + + **Inheritance:** + + This field is inherited by subtypes. + + **Default:** + + When this field is not set, a string of the form ``<%s object at %p>`` is + returned, where ``%s`` is replaced by the type name, and ``%p`` by the object's + memory address. + + +.. c:member:: PyNumberMethods* PyTypeObject.tp_as_number + + Pointer to an additional structure that contains fields relevant only to + objects which implement the number protocol. These fields are documented in + :ref:`number-structs`. + + **Inheritance:** + + The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the contained fields are + inherited individually. + + +.. c:member:: PySequenceMethods* PyTypeObject.tp_as_sequence + + Pointer to an additional structure that contains fields relevant only to + objects which implement the sequence protocol. These fields are documented + in :ref:`sequence-structs`. + + **Inheritance:** + + The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the contained fields + are inherited individually. + + +.. c:member:: PyMappingMethods* PyTypeObject.tp_as_mapping + + Pointer to an additional structure that contains fields relevant only to + objects which implement the mapping protocol. These fields are documented in + :ref:`mapping-structs`. + + **Inheritance:** + + The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the contained fields + are inherited individually. + + +.. c:member:: hashfunc PyTypeObject.tp_hash + + .. index:: pair: built-in function; hash + + An optional pointer to a function that implements the built-in function + :func:`hash`. + + The signature is the same as for :c:func:`PyObject_Hash`:: + + Py_hash_t tp_hash(PyObject *); + + The value ``-1`` should not be returned as a + normal return value; when an error occurs during the computation of the hash + value, the function should set an exception and return ``-1``. + + When this field is not set (*and* :attr:`tp_richcompare` is not set), + an attempt to take the hash of the object raises :exc:`TypeError`. + This is the same as setting it to :c:func:`PyObject_HashNotImplemented`. + + This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to + block inheritance of the hash method from a parent type. This is interpreted + as the equivalent of ``__hash__ = None`` at the Python level, causing + ``isinstance(o, collections.Hashable)`` to correctly return ``False``. Note + that the converse is also true - setting ``__hash__ = None`` on a class at + the Python level will result in the ``tp_hash`` slot being set to + :c:func:`PyObject_HashNotImplemented`. + + **Inheritance:** + + Group: :attr:`tp_hash`, :attr:`tp_richcompare` + + This field is inherited by subtypes together with + :c:member:`~PyTypeObject.tp_richcompare`: a subtype inherits both of + :c:member:`~PyTypeObject.tp_richcompare` and :c:member:`~PyTypeObject.tp_hash`, when the subtype's + :c:member:`~PyTypeObject.tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``. + + +.. c:member:: ternaryfunc PyTypeObject.tp_call + + An optional pointer to a function that implements calling the object. This + should be ``NULL`` if the object is not callable. The signature is the same as + for :c:func:`PyObject_Call`:: + + PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwargs); + + **Inheritance:** + + This field is inherited by subtypes. + + +.. c:member:: reprfunc PyTypeObject.tp_str + + An optional pointer to a function that implements the built-in operation + :func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls the + constructor for that type. This constructor calls :c:func:`PyObject_Str` to do + the actual work, and :c:func:`PyObject_Str` will call this handler.) + + The signature is the same as for :c:func:`PyObject_Str`:: + + PyObject *tp_str(PyObject *self); + + The function must return a string or a Unicode object. It should be a "friendly" string + representation of the object, as this is the representation that will be used, + among other things, by the :func:`print` function. + + **Inheritance:** + + This field is inherited by subtypes. + + **Default:** + + When this field is not set, :c:func:`PyObject_Repr` is called to return a string + representation. + + +.. c:member:: getattrofunc PyTypeObject.tp_getattro + + An optional pointer to the get-attribute function. + + The signature is the same as for :c:func:`PyObject_GetAttr`:: + + PyObject *tp_getattro(PyObject *self, PyObject *attr); + + It is usually convenient to set this field to :c:func:`PyObject_GenericGetAttr`, + which implements the normal way of looking for object attributes. + + **Inheritance:** + + Group: :attr:`tp_getattr`, :attr:`tp_getattro` + + This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_getattr`: a subtype + inherits both :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject.tp_getattro` from its base type when + the subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject.tp_getattro` are both ``NULL``. + + **Default:** + + :c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`. + + +.. c:member:: setattrofunc PyTypeObject.tp_setattro + + An optional pointer to the function for setting and deleting attributes. + + The signature is the same as for :c:func:`PyObject_SetAttr`:: + + int tp_setattro(PyObject *self, PyObject *attr, PyObject *value); + + In addition, setting *value* to ``NULL`` to delete an attribute must be + supported. It is usually convenient to set this field to + :c:func:`PyObject_GenericSetAttr`, which implements the normal + way of setting object attributes. + + **Inheritance:** + + Group: :attr:`tp_setattr`, :attr:`tp_setattro` + + This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_setattr`: a subtype + inherits both :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` from its base type when + the subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` are both ``NULL``. + + **Default:** + + :c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`. + + +.. c:member:: PyBufferProcs* PyTypeObject.tp_as_buffer + + Pointer to an additional structure that contains fields relevant only to objects + which implement the buffer interface. These fields are documented in + :ref:`buffer-structs`. + + **Inheritance:** + + The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, + but the contained fields are inherited individually. + + +.. c:member:: unsigned long PyTypeObject.tp_flags + + This field is a bit mask of various flags. Some flags indicate variant + semantics for certain situations; others are used to indicate that certain + fields in the type object (or in the extension structures referenced via + :c:member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject.tp_as_sequence`, :c:member:`~PyTypeObject.tp_as_mapping`, and + :c:member:`~PyTypeObject.tp_as_buffer`) that were historically not always present are valid; if + such a flag bit is clear, the type fields it guards must not be accessed and + must be considered to have a zero or ``NULL`` value instead. + + **Inheritance:** + + Inheritance of this field is complicated. Most flag bits are inherited + individually, i.e. if the base type has a flag bit set, the subtype inherits + this flag bit. The flag bits that pertain to extension structures are strictly + inherited if the extension structure is inherited, i.e. the base type's value of + the flag bit is copied into the subtype together with a pointer to the extension + structure. The :const:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with + the :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if the + :const:`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the + :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields in the subtype exist and have + ``NULL`` values. + + .. XXX are most flag bits *really* inherited individually? + + **Default:** + + :c:type:`PyBaseObject_Type` uses + ``Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE``. + + **Bit Masks:** + + The following bit masks are currently defined; these can be ORed together using + the ``|`` operator to form the value of the :c:member:`~PyTypeObject.tp_flags` field. The macro + :c:func:`PyType_HasFeature` takes a type and a flags value, *tp* and *f*, and + checks whether ``tp->tp_flags & f`` is non-zero. + + .. data:: Py_TPFLAGS_HEAPTYPE + + This bit is set when the type object itself is allocated on the heap, for + example, types created dynamically using :c:func:`PyType_FromSpec`. In this + case, the :attr:`ob_type` field of its instances is considered a reference to + the type, and the type object is INCREF'ed when a new instance is created, and + DECREF'ed when an instance is destroyed (this does not apply to instances of + subtypes; only the type referenced by the instance's ob_type gets INCREF'ed or + DECREF'ed). + + **Inheritance:** + + ??? + + + .. data:: Py_TPFLAGS_BASETYPE + + This bit is set when the type can be used as the base type of another type. If + this bit is clear, the type cannot be subtyped (similar to a "final" class in + Java). + + **Inheritance:** + + ??? + + + .. data:: Py_TPFLAGS_READY + + This bit is set when the type object has been fully initialized by + :c:func:`PyType_Ready`. + + **Inheritance:** + + ??? + + + .. data:: Py_TPFLAGS_READYING + + This bit is set while :c:func:`PyType_Ready` is in the process of initializing + the type object. + + **Inheritance:** + + ??? + + + .. data:: Py_TPFLAGS_HAVE_GC + + This bit is set when the object supports garbage collection. If this bit + is set, instances must be created using :c:func:`PyObject_GC_New` and + destroyed using :c:func:`PyObject_GC_Del`. More information in section + :ref:`supporting-cycle-detection`. This bit also implies that the + GC-related fields :c:member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` are present in + the type object. + + **Inheritance:** + + Group: :const:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear` + + The :const:`Py_TPFLAGS_HAVE_GC` flag bit is inherited + together with the :attr:`tp_traverse` and :attr:`tp_clear` + fields, i.e. if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is + clear in the subtype and the :attr:`tp_traverse` and + :attr:`tp_clear` fields in the subtype exist and have ``NULL`` + values. + + + .. data:: Py_TPFLAGS_DEFAULT + + This is a bitmask of all the bits that pertain to the existence of certain + fields in the type object and its extension structures. Currently, it includes + the following bits: :const:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`. + + **Inheritance:** + + ??? + + + .. data:: Py_TPFLAGS_METHOD_DESCRIPTOR + + This bit indicates that objects behave like unbound methods. + + If this flag is set for ``type(meth)``, then: + + - ``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) + must be equivalent to ``meth(obj, *args, **kwds)``. + + - ``meth.__get__(None, cls)(*args, **kwds)`` + must be equivalent to ``meth(*args, **kwds)``. + + This flag enables an optimization for typical method calls like + ``obj.meth()``: it avoids creating a temporary "bound method" object for + ``obj.meth``. + + .. versionadded:: 3.8 + + **Inheritance:** + + This flag is never inherited by types without the + :const:`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is + inherited whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited. + + + .. XXX Document more flags here? + + + .. data:: Py_TPFLAGS_LONG_SUBCLASS + .. data:: Py_TPFLAGS_LIST_SUBCLASS + .. data:: Py_TPFLAGS_TUPLE_SUBCLASS + .. data:: Py_TPFLAGS_BYTES_SUBCLASS + .. data:: Py_TPFLAGS_UNICODE_SUBCLASS + .. data:: Py_TPFLAGS_DICT_SUBCLASS + .. data:: Py_TPFLAGS_BASE_EXC_SUBCLASS + .. data:: Py_TPFLAGS_TYPE_SUBCLASS + + These flags are used by functions such as + :c:func:`PyLong_Check` to quickly determine if a type is a subclass + of a built-in type; such specific checks are faster than a generic + check, like :c:func:`PyObject_IsInstance`. Custom types that inherit + from built-ins should have their :c:member:`~PyTypeObject.tp_flags` + set appropriately, or the code that interacts with such types + will behave differently depending on what kind of check is used. + + + .. data:: Py_TPFLAGS_HAVE_FINALIZE + + This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is present in the + type structure. + + .. versionadded:: 3.4 + + .. deprecated:: 3.8 + This flag isn't necessary anymore, as the interpreter assumes the + :c:member:`~PyTypeObject.tp_finalize` slot is always present in the + type structure. + + + .. data:: Py_TPFLAGS_HAVE_VECTORCALL + + This bit is set when the class implements + the :ref:`vectorcall protocol <vectorcall>`. + See :c:member:`~PyTypeObject.tp_vectorcall_offset` for details. + + **Inheritance:** + + This bit is inherited for types with the + :const:`Py_TPFLAGS_IMMUTABLETYPE` flag set, if + :c:member:`~PyTypeObject.tp_call` is also inherited. + + .. versionadded:: 3.9 + + .. data:: Py_TPFLAGS_IMMUTABLETYPE + + This bit is set for type objects that are immutable: type attributes cannot be set nor deleted. + + :c:func:`PyType_Ready` automatically applies this flag to + :ref:`static types <static-types>`. + + **Inheritance:** + + This flag is not inherited. + + .. versionadded:: 3.10 + + .. data:: Py_TPFLAGS_DISALLOW_INSTANTIATION + + Disallow creating instances of the type: set + :c:member:`~PyTypeObject.tp_new` to NULL and don't create the ``__new__`` + key in the type dictionary. + + The flag must be set before creating the type, not after. For example, it + must be set before :c:func:`PyType_Ready` is called on the type. + + The flag is set automatically on :ref:`static types <static-types>` if + :c:member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and + :c:member:`~PyTypeObject.tp_new` is NULL. + + **Inheritance:** + + This flag is not inherited. + However, subclasses will not be instantiable unless they provide a + non-NULL :c:member:`~PyTypeObject.tp_new` (which is only possible + via the C API). + + .. note:: + + To disallow instantiating a class directly but allow instantiating + its subclasses (e.g. for an :term:`abstract base class`), + do not use this flag. + Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for + subclasses. + + .. versionadded:: 3.10 + + + .. data:: Py_TPFLAGS_MAPPING + + This bit indicates that instances of the class may match mapping patterns + when used as the subject of a :keyword:`match` block. It is automatically + set when registering or subclassing :class:`collections.abc.Mapping`, and + unset when registering :class:`collections.abc.Sequence`. + + .. note:: + + :const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are + mutually exclusive; it is an error to enable both flags simultaneously. + + **Inheritance:** + + This flag is inherited by types that do not already set + :const:`Py_TPFLAGS_SEQUENCE`. + + .. seealso:: :pep:`634` -- Structural Pattern Matching: Specification + + .. versionadded:: 3.10 + + + .. data:: Py_TPFLAGS_SEQUENCE + + This bit indicates that instances of the class may match sequence patterns + when used as the subject of a :keyword:`match` block. It is automatically + set when registering or subclassing :class:`collections.abc.Sequence`, and + unset when registering :class:`collections.abc.Mapping`. + + .. note:: + + :const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE` are + mutually exclusive; it is an error to enable both flags simultaneously. + + **Inheritance:** + + This flag is inherited by types that do not already set + :const:`Py_TPFLAGS_MAPPING`. + + .. seealso:: :pep:`634` -- Structural Pattern Matching: Specification + + .. versionadded:: 3.10 + + +.. c:member:: const char* PyTypeObject.tp_doc + + An optional pointer to a NUL-terminated C string giving the docstring for this + type object. This is exposed as the :attr:`__doc__` attribute on the type and + instances of the type. + + **Inheritance:** + + This field is *not* inherited by subtypes. + + +.. c:member:: traverseproc PyTypeObject.tp_traverse + + An optional pointer to a traversal function for the garbage collector. This is + only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The signature is:: + + int tp_traverse(PyObject *self, visitproc visit, void *arg); + + More information about Python's garbage collection scheme can be found + in section :ref:`supporting-cycle-detection`. + + The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage collector to detect + reference cycles. A typical implementation of a :c:member:`~PyTypeObject.tp_traverse` function + simply calls :c:func:`Py_VISIT` on each of the instance's members that are Python + objects that the instance owns. For example, this is function :c:func:`local_traverse` from the + :mod:`_thread` extension module:: + + static int + local_traverse(localobject *self, visitproc visit, void *arg) + { + Py_VISIT(self->args); + Py_VISIT(self->kw); + Py_VISIT(self->dict); + return 0; + } + + Note that :c:func:`Py_VISIT` is called only on those members that can participate + in reference cycles. Although there is also a ``self->key`` member, it can only + be ``NULL`` or a Python string and therefore cannot be part of a reference cycle. + + On the other hand, even if you know a member can never be part of a cycle, as a + debugging aid you may want to visit it anyway just so the :mod:`gc` module's + :func:`~gc.get_referents` function will include it. + + .. warning:: + When implementing :c:member:`~PyTypeObject.tp_traverse`, only the + members that the instance *owns* (by having :term:`strong references + <strong reference>` to them) must be + visited. For instance, if an object supports weak references via the + :c:member:`~PyTypeObject.tp_weaklist` slot, the pointer supporting + the linked list (what *tp_weaklist* points to) must **not** be + visited as the instance does not directly own the weak references to itself + (the weakreference list is there to support the weak reference machinery, + but the instance has no strong reference to the elements inside it, as they + are allowed to be removed even if the instance is still alive). + + Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to + :c:func:`local_traverse` to have these specific names; don't name them just + anything. + + Instances of :ref:`heap-allocated types <heap-types>` hold a reference to + their type. Their traversal function must therefore either visit + :c:func:`Py_TYPE(self) <Py_TYPE>`, or delegate this responsibility by + calling ``tp_traverse`` of another heap-allocated type (such as a + heap-allocated superclass). + If they do not, the type object may not be garbage-collected. + + .. versionchanged:: 3.9 + + Heap-allocated types are expected to visit ``Py_TYPE(self)`` in + ``tp_traverse``. In earlier versions of Python, due to + `bug 40217 <https://bugs.python.org/issue40217>`_, doing this + may lead to crashes in subclasses. + + **Inheritance:** + + Group: :const:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear` + + This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_clear` and the + :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:member:`~PyTypeObject.tp_traverse`, and + :c:member:`~PyTypeObject.tp_clear` are all inherited from the base type if they are all zero in + the subtype. + + +.. c:member:: inquiry PyTypeObject.tp_clear + + An optional pointer to a clear function for the garbage collector. This is only + used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The signature is:: + + int tp_clear(PyObject *); + + The :c:member:`~PyTypeObject.tp_clear` member function is used to break reference cycles in cyclic + garbage detected by the garbage collector. Taken together, all :c:member:`~PyTypeObject.tp_clear` + functions in the system must combine to break all reference cycles. This is + subtle, and if in any doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For example, + the tuple type does not implement a :c:member:`~PyTypeObject.tp_clear` function, because it's + possible to prove that no reference cycle can be composed entirely of tuples. + Therefore the :c:member:`~PyTypeObject.tp_clear` functions of other types must be sufficient to + break any cycle containing a tuple. This isn't immediately obvious, and there's + rarely a good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`. + + Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the instance's references to + those of its members that may be Python objects, and set its pointers to those + members to ``NULL``, as in the following example:: + + static int + local_clear(localobject *self) + { + Py_CLEAR(self->key); + Py_CLEAR(self->args); + Py_CLEAR(self->kw); + Py_CLEAR(self->dict); + return 0; + } + + The :c:func:`Py_CLEAR` macro should be used, because clearing references is + delicate: the reference to the contained object must not be decremented until + after the pointer to the contained object is set to ``NULL``. This is because + decrementing the reference count may cause the contained object to become trash, + triggering a chain of reclamation activity that may include invoking arbitrary + Python code (due to finalizers, or weakref callbacks, associated with the + contained object). If it's possible for such code to reference *self* again, + it's important that the pointer to the contained object be ``NULL`` at that time, + so that *self* knows the contained object can no longer be used. The + :c:func:`Py_CLEAR` macro performs the operations in a safe order. + + Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called + before an instance is deallocated. For example, when reference counting + is enough to determine that an object is no longer used, the cyclic garbage + collector is not involved and :c:member:`~PyTypeObject.tp_dealloc` is + called directly. + + Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break reference cycles, + it's not necessary to clear contained objects like Python strings or Python + integers, which can't participate in reference cycles. On the other hand, it may + be convenient to clear all contained Python objects, and write the type's + :c:member:`~PyTypeObject.tp_dealloc` function to invoke :c:member:`~PyTypeObject.tp_clear`. + + More information about Python's garbage collection scheme can be found in + section :ref:`supporting-cycle-detection`. + + **Inheritance:** + + Group: :const:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear` + + This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_traverse` and the + :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:member:`~PyTypeObject.tp_traverse`, and + :c:member:`~PyTypeObject.tp_clear` are all inherited from the base type if they are all zero in + the subtype. + + +.. c:member:: richcmpfunc PyTypeObject.tp_richcompare + + An optional pointer to the rich comparison function, whose signature is:: + + PyObject *tp_richcompare(PyObject *self, PyObject *other, int op); + + The first parameter is guaranteed to be an instance of the type + that is defined by :c:type:`PyTypeObject`. + + The function should return the result of the comparison (usually ``Py_True`` + or ``Py_False``). If the comparison is undefined, it must return + ``Py_NotImplemented``, if another error occurred it must return ``NULL`` and + set an exception condition. + + The following constants are defined to be used as the third argument for + :c:member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`: + + +----------------+------------+ + | Constant | Comparison | + +================+============+ + | :const:`Py_LT` | ``<`` | + +----------------+------------+ + | :const:`Py_LE` | ``<=`` | + +----------------+------------+ + | :const:`Py_EQ` | ``==`` | + +----------------+------------+ + | :const:`Py_NE` | ``!=`` | + +----------------+------------+ + | :const:`Py_GT` | ``>`` | + +----------------+------------+ + | :const:`Py_GE` | ``>=`` | + +----------------+------------+ + + The following macro is defined to ease writing rich comparison functions: + + .. c:macro:: Py_RETURN_RICHCOMPARE(VAL_A, VAL_B, op) + + Return ``Py_True`` or ``Py_False`` from the function, depending on the + result of a comparison. + VAL_A and VAL_B must be orderable by C comparison operators (for example, + they may be C ints or floats). The third argument specifies the requested + operation, as for :c:func:`PyObject_RichCompare`. + + The return value's reference count is properly incremented. + + On error, sets an exception and returns ``NULL`` from the function. + + .. versionadded:: 3.7 + + **Inheritance:** + + Group: :attr:`tp_hash`, :attr:`tp_richcompare` + + This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_hash`: + a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` when + the subtype's :c:member:`~PyTypeObject.tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both + ``NULL``. + + **Default:** + + :c:type:`PyBaseObject_Type` provides a :attr:`tp_richcompare` + implementation, which may be inherited. However, if only + :attr:`tp_hash` is defined, not even the inherited function is used + and instances of the type will not be able to participate in any + comparisons. + + +.. c:member:: Py_ssize_t PyTypeObject.tp_weaklistoffset + + If the instances of this type are weakly referenceable, this field is greater + than zero and contains the offset in the instance structure of the weak + reference list head (ignoring the GC header, if present); this offset is used by + :c:func:`PyObject_ClearWeakRefs` and the ``PyWeakref_*`` functions. The + instance structure needs to include a field of type :c:expr:`PyObject*` which is + initialized to ``NULL``. + + Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that is the list head for + weak references to the type object itself. + + **Inheritance:** + + This field is inherited by subtypes, but see the rules listed below. A subtype + may override this offset; this means that the subtype uses a different weak + reference list head than the base type. Since the list head is always found via + :c:member:`~PyTypeObject.tp_weaklistoffset`, this should not be a problem. + + When a type defined by a class statement has no :attr:`~object.__slots__` declaration, + and none of its base types are weakly referenceable, the type is made weakly + referenceable by adding a weak reference list head slot to the instance layout + and setting the :c:member:`~PyTypeObject.tp_weaklistoffset` of that slot's offset. + + When a type's :attr:`__slots__` declaration contains a slot named + :attr:`__weakref__`, that slot becomes the weak reference list head for + instances of the type, and the slot's offset is stored in the type's + :c:member:`~PyTypeObject.tp_weaklistoffset`. + + When a type's :attr:`__slots__` declaration does not contain a slot named + :attr:`__weakref__`, the type inherits its :c:member:`~PyTypeObject.tp_weaklistoffset` from its + base type. + + +.. c:member:: getiterfunc PyTypeObject.tp_iter + + An optional pointer to a function that returns an :term:`iterator` for the + object. Its presence normally signals that the instances of this type are + :term:`iterable` (although sequences may be iterable without this function). + + This function has the same signature as :c:func:`PyObject_GetIter`:: + + PyObject *tp_iter(PyObject *self); + + **Inheritance:** + + This field is inherited by subtypes. + + +.. c:member:: iternextfunc PyTypeObject.tp_iternext + + An optional pointer to a function that returns the next item in an + :term:`iterator`. The signature is:: + + PyObject *tp_iternext(PyObject *self); + + When the iterator is exhausted, it must return ``NULL``; a :exc:`StopIteration` + exception may or may not be set. When another error occurs, it must return + ``NULL`` too. Its presence signals that the instances of this type are + iterators. + + Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` function, and that + function should return the iterator instance itself (not a new iterator + instance). + + This function has the same signature as :c:func:`PyIter_Next`. + + **Inheritance:** + + This field is inherited by subtypes. + + +.. c:member:: struct PyMethodDef* PyTypeObject.tp_methods + + An optional pointer to a static ``NULL``-terminated array of :c:type:`PyMethodDef` + structures, declaring regular methods of this type. + + For each entry in the array, an entry is added to the type's dictionary (see + :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor. + + **Inheritance:** + + This field is not inherited by subtypes (methods are inherited through a + different mechanism). + + +.. c:member:: struct PyMemberDef* PyTypeObject.tp_members + + An optional pointer to a static ``NULL``-terminated array of :c:type:`PyMemberDef` + structures, declaring regular data members (fields or slots) of instances of + this type. + + For each entry in the array, an entry is added to the type's dictionary (see + :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor. + + **Inheritance:** + + This field is not inherited by subtypes (members are inherited through a + different mechanism). + + +.. c:member:: struct PyGetSetDef* PyTypeObject.tp_getset + + An optional pointer to a static ``NULL``-terminated array of :c:type:`PyGetSetDef` + structures, declaring computed attributes of instances of this type. + + For each entry in the array, an entry is added to the type's dictionary (see + :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor. + + **Inheritance:** + + This field is not inherited by subtypes (computed attributes are inherited + through a different mechanism). + + +.. c:member:: PyTypeObject* PyTypeObject.tp_base + + An optional pointer to a base type from which type properties are inherited. At + this level, only single inheritance is supported; multiple inheritance require + dynamically creating a type object by calling the metatype. + + .. note:: + + .. from Modules/xxmodule.c + + Slot initialization is subject to the rules of initializing globals. + C99 requires the initializers to be "address constants". Function + designators like :c:func:`PyType_GenericNew`, with implicit conversion + to a pointer, are valid C99 address constants. + + However, the unary '&' operator applied to a non-static variable + like :c:func:`PyBaseObject_Type` is not required to produce an address + constant. Compilers may support this (gcc does), MSVC does not. + Both compilers are strictly standard conforming in this particular + behavior. + + Consequently, :c:member:`~PyTypeObject.tp_base` should be set in + the extension module's init function. + + **Inheritance:** + + This field is not inherited by subtypes (obviously). + + **Default:** + + This field defaults to ``&PyBaseObject_Type`` (which to Python + programmers is known as the type :class:`object`). + + +.. c:member:: PyObject* PyTypeObject.tp_dict + + The type's dictionary is stored here by :c:func:`PyType_Ready`. + + This field should normally be initialized to ``NULL`` before PyType_Ready is + called; it may also be initialized to a dictionary containing initial attributes + for the type. Once :c:func:`PyType_Ready` has initialized the type, extra + attributes for the type may be added to this dictionary only if they don't + correspond to overloaded operations (like :meth:`__add__`). + + **Inheritance:** + + This field is not inherited by subtypes (though the attributes defined in here + are inherited through a different mechanism). + + **Default:** + + If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new + dictionary to it. + + .. warning:: + + It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify + :c:member:`~PyTypeObject.tp_dict` with the dictionary C-API. + + +.. c:member:: descrgetfunc PyTypeObject.tp_descr_get + + An optional pointer to a "descriptor get" function. + + The function signature is:: + + PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type); + + .. XXX explain more? + + **Inheritance:** + + This field is inherited by subtypes. + + +.. c:member:: descrsetfunc PyTypeObject.tp_descr_set + + An optional pointer to a function for setting and deleting + a descriptor's value. + + The function signature is:: + + int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value); + + The *value* argument is set to ``NULL`` to delete the value. + + .. XXX explain more? + + **Inheritance:** + + This field is inherited by subtypes. + + +.. c:member:: Py_ssize_t PyTypeObject.tp_dictoffset + + If the instances of this type have a dictionary containing instance variables, + this field is non-zero and contains the offset in the instances of the type of + the instance variable dictionary; this offset is used by + :c:func:`PyObject_GenericGetAttr`. + + Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is the dictionary for + attributes of the type object itself. + + If the value of this field is greater than zero, it specifies the offset from + the start of the instance structure. If the value is less than zero, it + specifies the offset from the *end* of the instance structure. A negative + offset is more expensive to use, and should only be used when the instance + structure contains a variable-length part. This is used for example to add an + instance variable dictionary to subtypes of :class:`str` or :class:`tuple`. Note + that the :c:member:`~PyTypeObject.tp_basicsize` field should account for the dictionary added to + the end in that case, even though the dictionary is not included in the basic + object layout. On a system with a pointer size of 4 bytes, + :c:member:`~PyTypeObject.tp_dictoffset` should be set to ``-4`` to indicate that the dictionary is + at the very end of the structure. + + The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-only. + To get the pointer to the dictionary call :c:func:`PyObject_GenericGetDict`. + Calling :c:func:`PyObject_GenericGetDict` may need to allocate memory for the + dictionary, so it is may be more efficient to call :c:func:`PyObject_GetAttr` + when accessing an attribute on the object. + + **Inheritance:** + + This field is inherited by subtypes, but see the rules listed below. A subtype + may override this offset; this means that the subtype instances store the + dictionary at a difference offset than the base type. Since the dictionary is + always found via :c:member:`~PyTypeObject.tp_dictoffset`, this should not be a problem. + + When a type defined by a class statement has no :attr:`~object.__slots__` declaration, + and none of its base types has an instance variable dictionary, a dictionary + slot is added to the instance layout and the :c:member:`~PyTypeObject.tp_dictoffset` is set to + that slot's offset. + + When a type defined by a class statement has a :attr:`__slots__` declaration, + the type inherits its :c:member:`~PyTypeObject.tp_dictoffset` from its base type. + + (Adding a slot named :attr:`~object.__dict__` to the :attr:`__slots__` declaration does + not have the expected effect, it just causes confusion. Maybe this should be + added as a feature just like :attr:`__weakref__` though.) + + **Default:** + + This slot has no default. For :ref:`static types <static-types>`, if the + field is ``NULL`` then no :attr:`__dict__` gets created for instances. + + +.. c:member:: initproc PyTypeObject.tp_init + + An optional pointer to an instance initialization function. + + This function corresponds to the :meth:`__init__` method of classes. Like + :meth:`__init__`, it is possible to create an instance without calling + :meth:`__init__`, and it is possible to reinitialize an instance by calling its + :meth:`__init__` method again. + + The function signature is:: + + int tp_init(PyObject *self, PyObject *args, PyObject *kwds); + + The self argument is the instance to be initialized; the *args* and *kwds* + arguments represent positional and keyword arguments of the call to + :meth:`__init__`. + + The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called when an instance is + created normally by calling its type, after the type's :c:member:`~PyTypeObject.tp_new` function + has returned an instance of the type. If the :c:member:`~PyTypeObject.tp_new` function returns an + instance of some other type that is not a subtype of the original type, no + :c:member:`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject.tp_new` returns an instance of a + subtype of the original type, the subtype's :c:member:`~PyTypeObject.tp_init` is called. + + Returns ``0`` on success, ``-1`` and sets an exception on error. + + **Inheritance:** + + This field is inherited by subtypes. + + **Default:** + + For :ref:`static types <static-types>` this field does not have a default. + + +.. c:member:: allocfunc PyTypeObject.tp_alloc + + An optional pointer to an instance allocation function. + + The function signature is:: + + PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems); + + **Inheritance:** + + This field is inherited by static subtypes, but not by dynamic + subtypes (subtypes created by a class statement). + + **Default:** + + For dynamic subtypes, this field is always set to + :c:func:`PyType_GenericAlloc`, to force a standard heap + allocation strategy. + + For static subtypes, :c:type:`PyBaseObject_Type` uses + :c:func:`PyType_GenericAlloc`. That is the recommended value + for all statically defined types. + + +.. c:member:: newfunc PyTypeObject.tp_new + + An optional pointer to an instance creation function. + + The function signature is:: + + PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds); + + The *subtype* argument is the type of the object being created; the *args* and + *kwds* arguments represent positional and keyword arguments of the call to the + type. Note that *subtype* doesn't have to equal the type whose :c:member:`~PyTypeObject.tp_new` + function is called; it may be a subtype of that type (but not an unrelated + type). + + The :c:member:`~PyTypeObject.tp_new` function should call ``subtype->tp_alloc(subtype, nitems)`` + to allocate space for the object, and then do only as much further + initialization as is absolutely necessary. Initialization that can safely be + ignored or repeated should be placed in the :c:member:`~PyTypeObject.tp_init` handler. A good + rule of thumb is that for immutable types, all initialization should take place + in :c:member:`~PyTypeObject.tp_new`, while for mutable types, most initialization should be + deferred to :c:member:`~PyTypeObject.tp_init`. + + Set the :const:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow creating + instances of the type in Python. + + **Inheritance:** + + This field is inherited by subtypes, except it is not inherited by + :ref:`static types <static-types>` whose :c:member:`~PyTypeObject.tp_base` + is ``NULL`` or ``&PyBaseObject_Type``. + + **Default:** + + For :ref:`static types <static-types>` this field has no default. + This means if the slot is defined as ``NULL``, the type cannot be called + to create new instances; presumably there is some other way to create + instances, like a factory function. + + +.. c:member:: freefunc PyTypeObject.tp_free + + An optional pointer to an instance deallocation function. Its signature is:: + + void tp_free(void *self); + + An initializer that is compatible with this signature is :c:func:`PyObject_Free`. + + **Inheritance:** + + This field is inherited by static subtypes, but not by dynamic + subtypes (subtypes created by a class statement) + + **Default:** + + In dynamic subtypes, this field is set to a deallocator suitable to + match :c:func:`PyType_GenericAlloc` and the value of the + :const:`Py_TPFLAGS_HAVE_GC` flag bit. + + For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del. + + +.. c:member:: inquiry PyTypeObject.tp_is_gc + + An optional pointer to a function called by the garbage collector. + + The garbage collector needs to know whether a particular object is collectible + or not. Normally, it is sufficient to look at the object's type's + :c:member:`~PyTypeObject.tp_flags` field, and check the :const:`Py_TPFLAGS_HAVE_GC` flag bit. But + some types have a mixture of statically and dynamically allocated instances, and + the statically allocated instances are not collectible. Such types should + define this function; it should return ``1`` for a collectible instance, and + ``0`` for a non-collectible instance. The signature is:: + + int tp_is_gc(PyObject *self); + + (The only example of this are types themselves. The metatype, + :c:data:`PyType_Type`, defines this function to distinguish between statically + and :ref:`dynamically allocated types <heap-types>`.) + + **Inheritance:** + + This field is inherited by subtypes. + + **Default:** + + This slot has no default. If this field is ``NULL``, + :const:`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent. + + +.. c:member:: PyObject* PyTypeObject.tp_bases + + Tuple of base types. + + This field should be set to ``NULL`` and treated as read-only. + Python will fill it in when the type is :c:func:`initialized <PyType_Ready>`. + + For dynamically created classes, the ``Py_tp_bases`` + :c:type:`slot <PyType_Slot>` can be used instead of the *bases* argument + of :c:func:`PyType_FromSpecWithBases`. + The argument form is preferred. + + .. warning:: + + Multiple inheritance does not work well for statically defined types. + If you set ``tp_bases`` to a tuple, Python will not raise an error, + but some slots will only be inherited from the first base. + + **Inheritance:** + + This field is not inherited. + + +.. c:member:: PyObject* PyTypeObject.tp_mro + + Tuple containing the expanded set of base types, starting with the type itself + and ending with :class:`object`, in Method Resolution Order. + + This field should be set to ``NULL`` and treated as read-only. + Python will fill it in when the type is :c:func:`initialized <PyType_Ready>`. + + **Inheritance:** + + This field is not inherited; it is calculated fresh by + :c:func:`PyType_Ready`. + + +.. c:member:: PyObject* PyTypeObject.tp_cache + + Unused. Internal use only. + + **Inheritance:** + + This field is not inherited. + + +.. c:member:: PyObject* PyTypeObject.tp_subclasses + + List of weak references to subclasses. Internal use only. + + **Inheritance:** + + This field is not inherited. + + +.. c:member:: PyObject* PyTypeObject.tp_weaklist + + Weak reference list head, for weak references to this type object. Not + inherited. Internal use only. + + **Inheritance:** + + This field is not inherited. + + +.. c:member:: destructor PyTypeObject.tp_del + + This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead. + + +.. c:member:: unsigned int PyTypeObject.tp_version_tag + + Used to index into the method cache. Internal use only. + + **Inheritance:** + + This field is not inherited. + + +.. c:member:: destructor PyTypeObject.tp_finalize + + An optional pointer to an instance finalization function. Its signature is:: + + void tp_finalize(PyObject *self); + + If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it once when + finalizing an instance. It is called either from the garbage + collector (if the instance is part of an isolated reference cycle) or + just before the object is deallocated. Either way, it is guaranteed + to be called before attempting to break reference cycles, ensuring + that it finds the object in a sane state. + + :c:member:`~PyTypeObject.tp_finalize` should not mutate the current exception status; + therefore, a recommended way to write a non-trivial finalizer is:: + + static void + local_finalize(PyObject *self) + { + PyObject *error_type, *error_value, *error_traceback; + + /* Save the current exception, if any. */ + PyErr_Fetch(&error_type, &error_value, &error_traceback); + + /* ... */ + + /* Restore the saved exception. */ + PyErr_Restore(error_type, error_value, error_traceback); + } + + Also, note that, in a garbage collected Python, + :c:member:`~PyTypeObject.tp_dealloc` may be called from + any Python thread, not just the thread which created the object (if the object + becomes part of a refcount cycle, that cycle might be collected by a garbage + collection on any thread). This is not a problem for Python API calls, since + the thread on which tp_dealloc is called will own the Global Interpreter Lock + (GIL). However, if the object being destroyed in turn destroys objects from some + other C or C++ library, care should be taken to ensure that destroying those + objects on the thread which called tp_dealloc will not violate any assumptions + of the library. + + **Inheritance:** + + This field is inherited by subtypes. + + .. versionadded:: 3.4 + + .. versionchanged:: 3.8 + + Before version 3.8 it was necessary to set the + :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be + used. This is no longer required. + + .. seealso:: "Safe object finalization" (:pep:`442`) + + +.. c:member:: vectorcallfunc PyTypeObject.tp_vectorcall + + Vectorcall function to use for calls of this type object. + In other words, it is used to implement + :ref:`vectorcall <vectorcall>` for ``type.__call__``. + If ``tp_vectorcall`` is ``NULL``, the default call implementation + using :attr:`__new__` and :attr:`__init__` is used. + + **Inheritance:** + + This field is never inherited. + + .. versionadded:: 3.9 (the field exists since 3.8 but it's only used since 3.9) + + +.. _static-types: + +Static Types +------------ + +Traditionally, types defined in C code are *static*, that is, +a static :c:type:`PyTypeObject` structure is defined directly in code +and initialized using :c:func:`PyType_Ready`. + +This results in types that are limited relative to types defined in Python: + +* Static types are limited to one base, i.e. they cannot use multiple + inheritance. +* Static type objects (but not necessarily their instances) are immutable. + It is not possible to add or modify the type object's attributes from Python. +* Static type objects are shared across + :ref:`sub-interpreters <sub-interpreter-support>`, so they should not + include any subinterpreter-specific state. + +Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API +<stable>` as an opaque struct, any extension modules using static types must be +compiled for a specific Python minor version. + + +.. _heap-types: + +Heap Types +---------- + +An alternative to :ref:`static types <static-types>` is *heap-allocated types*, +or *heap types* for short, which correspond closely to classes created by +Python's ``class`` statement. Heap types have the :const:`Py_TPFLAGS_HEAPTYPE` +flag set. + +This is done by filling a :c:type:`PyType_Spec` structure and calling +:c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, +or :c:func:`PyType_FromModuleAndSpec`. + + +.. _number-structs: + +Number Object Structures +======================== + +.. sectionauthor:: Amaury Forgeot d'Arc + + +.. c:type:: PyNumberMethods + + This structure holds pointers to the functions which an object uses to + implement the number protocol. Each function is used by the function of + similar name documented in the :ref:`number` section. + + .. XXX Drop the definition? + + Here is the structure definition:: + + typedef struct { + binaryfunc nb_add; + binaryfunc nb_subtract; + binaryfunc nb_multiply; + binaryfunc nb_remainder; + binaryfunc nb_divmod; + ternaryfunc nb_power; + unaryfunc nb_negative; + unaryfunc nb_positive; + unaryfunc nb_absolute; + inquiry nb_bool; + unaryfunc nb_invert; + binaryfunc nb_lshift; + binaryfunc nb_rshift; + binaryfunc nb_and; + binaryfunc nb_xor; + binaryfunc nb_or; + unaryfunc nb_int; + void *nb_reserved; + unaryfunc nb_float; + + binaryfunc nb_inplace_add; + binaryfunc nb_inplace_subtract; + binaryfunc nb_inplace_multiply; + binaryfunc nb_inplace_remainder; + ternaryfunc nb_inplace_power; + binaryfunc nb_inplace_lshift; + binaryfunc nb_inplace_rshift; + binaryfunc nb_inplace_and; + binaryfunc nb_inplace_xor; + binaryfunc nb_inplace_or; + + binaryfunc nb_floor_divide; + binaryfunc nb_true_divide; + binaryfunc nb_inplace_floor_divide; + binaryfunc nb_inplace_true_divide; + + unaryfunc nb_index; + + binaryfunc nb_matrix_multiply; + binaryfunc nb_inplace_matrix_multiply; + } PyNumberMethods; + + .. note:: + + Binary and ternary functions must check the type of all their operands, + and implement the necessary conversions (at least one of the operands is + an instance of the defined type). If the operation is not defined for the + given operands, binary and ternary functions must return + ``Py_NotImplemented``, if another error occurred they must return ``NULL`` + and set an exception. + + .. note:: + + The :c:data:`nb_reserved` field should always be ``NULL``. It + was previously called :c:data:`nb_long`, and was renamed in + Python 3.0.1. + +.. c:member:: binaryfunc PyNumberMethods.nb_add +.. c:member:: binaryfunc PyNumberMethods.nb_subtract +.. c:member:: binaryfunc PyNumberMethods.nb_multiply +.. c:member:: binaryfunc PyNumberMethods.nb_remainder +.. c:member:: binaryfunc PyNumberMethods.nb_divmod +.. c:member:: ternaryfunc PyNumberMethods.nb_power +.. c:member:: unaryfunc PyNumberMethods.nb_negative +.. c:member:: unaryfunc PyNumberMethods.nb_positive +.. c:member:: unaryfunc PyNumberMethods.nb_absolute +.. c:member:: inquiry PyNumberMethods.nb_bool +.. c:member:: unaryfunc PyNumberMethods.nb_invert +.. c:member:: binaryfunc PyNumberMethods.nb_lshift +.. c:member:: binaryfunc PyNumberMethods.nb_rshift +.. c:member:: binaryfunc PyNumberMethods.nb_and +.. c:member:: binaryfunc PyNumberMethods.nb_xor +.. c:member:: binaryfunc PyNumberMethods.nb_or +.. c:member:: unaryfunc PyNumberMethods.nb_int +.. c:member:: void *PyNumberMethods.nb_reserved +.. c:member:: unaryfunc PyNumberMethods.nb_float +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_add +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_subtract +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_multiply +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_remainder +.. c:member:: ternaryfunc PyNumberMethods.nb_inplace_power +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_lshift +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_rshift +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_and +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_xor +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_or +.. c:member:: binaryfunc PyNumberMethods.nb_floor_divide +.. c:member:: binaryfunc PyNumberMethods.nb_true_divide +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_floor_divide +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_true_divide +.. c:member:: unaryfunc PyNumberMethods.nb_index +.. c:member:: binaryfunc PyNumberMethods.nb_matrix_multiply +.. c:member:: binaryfunc PyNumberMethods.nb_inplace_matrix_multiply + + +.. _mapping-structs: + +Mapping Object Structures +========================= + +.. sectionauthor:: Amaury Forgeot d'Arc + + +.. c:type:: PyMappingMethods + + This structure holds pointers to the functions which an object uses to + implement the mapping protocol. It has three members: + +.. c:member:: lenfunc PyMappingMethods.mp_length + + This function is used by :c:func:`PyMapping_Size` and + :c:func:`PyObject_Size`, and has the same signature. This slot may be set to + ``NULL`` if the object has no defined length. + +.. c:member:: binaryfunc PyMappingMethods.mp_subscript + + This function is used by :c:func:`PyObject_GetItem` and + :c:func:`PySequence_GetSlice`, and has the same signature as + :c:func:`!PyObject_GetItem`. This slot must be filled for the + :c:func:`PyMapping_Check` function to return ``1``, it can be ``NULL`` + otherwise. + +.. c:member:: objobjargproc PyMappingMethods.mp_ass_subscript + + This function is used by :c:func:`PyObject_SetItem`, + :c:func:`PyObject_DelItem`, :c:func:`PyObject_SetSlice` and + :c:func:`PyObject_DelSlice`. It has the same signature as + :c:func:`!PyObject_SetItem`, but *v* can also be set to ``NULL`` to delete + an item. If this slot is ``NULL``, the object does not support item + assignment and deletion. + + +.. _sequence-structs: + +Sequence Object Structures +========================== + +.. sectionauthor:: Amaury Forgeot d'Arc + + +.. c:type:: PySequenceMethods + + This structure holds pointers to the functions which an object uses to + implement the sequence protocol. + +.. c:member:: lenfunc PySequenceMethods.sq_length + + This function is used by :c:func:`PySequence_Size` and + :c:func:`PyObject_Size`, and has the same signature. It is also used for + handling negative indices via the :c:member:`~PySequenceMethods.sq_item` + and the :c:member:`~PySequenceMethods.sq_ass_item` slots. + +.. c:member:: binaryfunc PySequenceMethods.sq_concat + + This function is used by :c:func:`PySequence_Concat` and has the same + signature. It is also used by the ``+`` operator, after trying the numeric + addition via the :c:member:`~PyNumberMethods.nb_add` slot. + +.. c:member:: ssizeargfunc PySequenceMethods.sq_repeat + + This function is used by :c:func:`PySequence_Repeat` and has the same + signature. It is also used by the ``*`` operator, after trying numeric + multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot. + +.. c:member:: ssizeargfunc PySequenceMethods.sq_item + + This function is used by :c:func:`PySequence_GetItem` and has the same + signature. It is also used by :c:func:`PyObject_GetItem`, after trying + the subscription via the :c:member:`~PyMappingMethods.mp_subscript` slot. + This slot must be filled for the :c:func:`PySequence_Check` + function to return ``1``, it can be ``NULL`` otherwise. + + Negative indexes are handled as follows: if the :attr:`sq_length` slot is + filled, it is called and the sequence length is used to compute a positive + index which is passed to :attr:`sq_item`. If :attr:`sq_length` is ``NULL``, + the index is passed as is to the function. + +.. c:member:: ssizeobjargproc PySequenceMethods.sq_ass_item + + This function is used by :c:func:`PySequence_SetItem` and has the same + signature. It is also used by :c:func:`PyObject_SetItem` and + :c:func:`PyObject_DelItem`, after trying the item assignment and deletion + via the :c:member:`~PyMappingMethods.mp_ass_subscript` slot. + This slot may be left to ``NULL`` if the object does not support + item assignment and deletion. + +.. c:member:: objobjproc PySequenceMethods.sq_contains + + This function may be used by :c:func:`PySequence_Contains` and has the same + signature. This slot may be left to ``NULL``, in this case + :c:func:`!PySequence_Contains` simply traverses the sequence until it + finds a match. + +.. c:member:: binaryfunc PySequenceMethods.sq_inplace_concat + + This function is used by :c:func:`PySequence_InPlaceConcat` and has the same + signature. It should modify its first operand, and return it. This slot + may be left to ``NULL``, in this case :c:func:`!PySequence_InPlaceConcat` + will fall back to :c:func:`PySequence_Concat`. It is also used by the + augmented assignment ``+=``, after trying numeric in-place addition + via the :c:member:`~PyNumberMethods.nb_inplace_add` slot. + +.. c:member:: ssizeargfunc PySequenceMethods.sq_inplace_repeat + + This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same + signature. It should modify its first operand, and return it. This slot + may be left to ``NULL``, in this case :c:func:`!PySequence_InPlaceRepeat` + will fall back to :c:func:`PySequence_Repeat`. It is also used by the + augmented assignment ``*=``, after trying numeric in-place multiplication + via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot. + + +.. _buffer-structs: + +Buffer Object Structures +======================== + +.. sectionauthor:: Greg J. Stein <greg@lyra.org> +.. sectionauthor:: Benjamin Peterson +.. sectionauthor:: Stefan Krah + +.. c:type:: PyBufferProcs + + This structure holds pointers to the functions required by the + :ref:`Buffer protocol <bufferobjects>`. The protocol defines how + an exporter object can expose its internal data to consumer objects. + +.. c:member:: getbufferproc PyBufferProcs.bf_getbuffer + + The signature of this function is:: + + int (PyObject *exporter, Py_buffer *view, int flags); + + Handle a request to *exporter* to fill in *view* as specified by *flags*. + Except for point (3), an implementation of this function MUST take these + steps: + + (1) Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`, + set :c:expr:`view->obj` to ``NULL`` and return ``-1``. + + (2) Fill in the requested fields. + + (3) Increment an internal counter for the number of exports. + + (4) Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`. + + (5) Return ``0``. + + If *exporter* is part of a chain or tree of buffer providers, two main + schemes can be used: + + * Re-export: Each member of the tree acts as the exporting object and + sets :c:expr:`view->obj` to a new reference to itself. + + * Redirect: The buffer request is redirected to the root object of the + tree. Here, :c:expr:`view->obj` will be a new reference to the root + object. + + The individual fields of *view* are described in section + :ref:`Buffer structure <buffer-structure>`, the rules how an exporter + must react to specific requests are in section + :ref:`Buffer request types <buffer-request-types>`. + + All memory pointed to in the :c:type:`Py_buffer` structure belongs to + the exporter and must remain valid until there are no consumers left. + :c:member:`~Py_buffer.format`, :c:member:`~Py_buffer.shape`, + :c:member:`~Py_buffer.strides`, :c:member:`~Py_buffer.suboffsets` + and :c:member:`~Py_buffer.internal` + are read-only for the consumer. + + :c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple + bytes buffer while dealing correctly with all request types. + + :c:func:`PyObject_GetBuffer` is the interface for the consumer that + wraps this function. + +.. c:member:: releasebufferproc PyBufferProcs.bf_releasebuffer + + The signature of this function is:: + + void (PyObject *exporter, Py_buffer *view); + + Handle a request to release the resources of the buffer. If no resources + need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be + ``NULL``. Otherwise, a standard implementation of this function will take + these optional steps: + + (1) Decrement an internal counter for the number of exports. + + (2) If the counter is ``0``, free all memory associated with *view*. + + The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep + track of buffer-specific resources. This field is guaranteed to remain + constant, while a consumer MAY pass a copy of the original buffer as the + *view* argument. + + + This function MUST NOT decrement :c:expr:`view->obj`, since that is + done automatically in :c:func:`PyBuffer_Release` (this scheme is + useful for breaking reference cycles). + + + :c:func:`PyBuffer_Release` is the interface for the consumer that + wraps this function. + + +.. _async-structs: + + +Async Object Structures +======================= + +.. sectionauthor:: Yury Selivanov <yselivanov@sprymix.com> + +.. versionadded:: 3.5 + +.. c:type:: PyAsyncMethods + + This structure holds pointers to the functions required to implement + :term:`awaitable` and :term:`asynchronous iterator` objects. + + Here is the structure definition:: + + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + sendfunc am_send; + } PyAsyncMethods; + +.. c:member:: unaryfunc PyAsyncMethods.am_await + + The signature of this function is:: + + PyObject *am_await(PyObject *self); + + The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` + must return ``1`` for it. + + This slot may be set to ``NULL`` if an object is not an :term:`awaitable`. + +.. c:member:: unaryfunc PyAsyncMethods.am_aiter + + The signature of this function is:: + + PyObject *am_aiter(PyObject *self); + + Must return an :term:`asynchronous iterator` object. + See :meth:`__anext__` for details. + + This slot may be set to ``NULL`` if an object does not implement + asynchronous iteration protocol. + +.. c:member:: unaryfunc PyAsyncMethods.am_anext + + The signature of this function is:: + + PyObject *am_anext(PyObject *self); + + Must return an :term:`awaitable` object. See :meth:`__anext__` for details. + This slot may be set to ``NULL``. + +.. c:member:: sendfunc PyAsyncMethods.am_send + + The signature of this function is:: + + PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result); + + See :c:func:`PyIter_Send` for details. + This slot may be set to ``NULL``. + + .. versionadded:: 3.10 + + +.. _slot-typedefs: + +Slot Type typedefs +================== + +.. c:type:: PyObject *(*allocfunc)(PyTypeObject *cls, Py_ssize_t nitems) + + The purpose of this function is to separate memory allocation from memory + initialization. It should return a pointer to a block of memory of adequate + length for the instance, suitably aligned, and initialized to zeros, but with + :attr:`ob_refcnt` set to ``1`` and :attr:`ob_type` set to the type argument. If + the type's :c:member:`~PyTypeObject.tp_itemsize` is non-zero, the object's :attr:`ob_size` field + should be initialized to *nitems* and the length of the allocated memory block + should be ``tp_basicsize + nitems*tp_itemsize``, rounded up to a multiple of + ``sizeof(void*)``; otherwise, *nitems* is not used and the length of the block + should be :c:member:`~PyTypeObject.tp_basicsize`. + + This function should not do any other instance initialization, not even to + allocate additional memory; that should be done by :c:member:`~PyTypeObject.tp_new`. + +.. c:type:: void (*destructor)(PyObject *) + +.. c:type:: void (*freefunc)(void *) + + See :c:member:`~PyTypeObject.tp_free`. + +.. c:type:: PyObject *(*newfunc)(PyObject *, PyObject *, PyObject *) + + See :c:member:`~PyTypeObject.tp_new`. + +.. c:type:: int (*initproc)(PyObject *, PyObject *, PyObject *) + + See :c:member:`~PyTypeObject.tp_init`. + +.. c:type:: PyObject *(*reprfunc)(PyObject *) + + See :c:member:`~PyTypeObject.tp_repr`. + +.. c:type:: PyObject *(*getattrfunc)(PyObject *self, char *attr) + + Return the value of the named attribute for the object. + +.. c:type:: int (*setattrfunc)(PyObject *self, char *attr, PyObject *value) + + Set the value of the named attribute for the object. + The value argument is set to ``NULL`` to delete the attribute. + +.. c:type:: PyObject *(*getattrofunc)(PyObject *self, PyObject *attr) + + Return the value of the named attribute for the object. + + See :c:member:`~PyTypeObject.tp_getattro`. + +.. c:type:: int (*setattrofunc)(PyObject *self, PyObject *attr, PyObject *value) + + Set the value of the named attribute for the object. + The value argument is set to ``NULL`` to delete the attribute. + + See :c:member:`~PyTypeObject.tp_setattro`. + +.. c:type:: PyObject *(*descrgetfunc)(PyObject *, PyObject *, PyObject *) + + See :c:member:`~PyTypeObject.tp_descr_get`. + +.. c:type:: int (*descrsetfunc)(PyObject *, PyObject *, PyObject *) + + See :c:member:`~PyTypeObject.tp_descr_set`. + +.. c:type:: Py_hash_t (*hashfunc)(PyObject *) + + See :c:member:`~PyTypeObject.tp_hash`. + +.. c:type:: PyObject *(*richcmpfunc)(PyObject *, PyObject *, int) + + See :c:member:`~PyTypeObject.tp_richcompare`. + +.. c:type:: PyObject *(*getiterfunc)(PyObject *) + + See :c:member:`~PyTypeObject.tp_iter`. + +.. c:type:: PyObject *(*iternextfunc)(PyObject *) + + See :c:member:`~PyTypeObject.tp_iternext`. + +.. c:type:: Py_ssize_t (*lenfunc)(PyObject *) + +.. c:type:: int (*getbufferproc)(PyObject *, Py_buffer *, int) + +.. c:type:: void (*releasebufferproc)(PyObject *, Py_buffer *) + +.. c:type:: PyObject *(*unaryfunc)(PyObject *) + +.. c:type:: PyObject *(*binaryfunc)(PyObject *, PyObject *) + +.. c:type:: PySendResult (*sendfunc)(PyObject *, PyObject *, PyObject **) + + See :c:member:`~PyAsyncMethods.am_send`. + +.. c:type:: PyObject *(*ternaryfunc)(PyObject *, PyObject *, PyObject *) + +.. c:type:: PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t) + +.. c:type:: int (*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *) + +.. c:type:: int (*objobjproc)(PyObject *, PyObject *) + +.. c:type:: int (*objobjargproc)(PyObject *, PyObject *, PyObject *) + + +.. _typedef-examples: + +Examples +======== + +The following are simple examples of Python type definitions. They +include common usage you may encounter. Some demonstrate tricky corner +cases. For more examples, practical info, and a tutorial, see +:ref:`defining-new-types` and :ref:`new-types-topics`. + +A basic :ref:`static type <static-types>`:: + + typedef struct { + PyObject_HEAD + const char *data; + } MyObject; + + static PyTypeObject MyObject_Type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "mymod.MyObject", + .tp_basicsize = sizeof(MyObject), + .tp_doc = PyDoc_STR("My objects"), + .tp_new = myobj_new, + .tp_dealloc = (destructor)myobj_dealloc, + .tp_repr = (reprfunc)myobj_repr, + }; + +You may also find older code (especially in the CPython code base) +with a more verbose initializer:: + + static PyTypeObject MyObject_Type = { + PyVarObject_HEAD_INIT(NULL, 0) + "mymod.MyObject", /* tp_name */ + sizeof(MyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)myobj_dealloc, /* tp_dealloc */ + 0, /* tp_vectorcall_offset */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_as_async */ + (reprfunc)myobj_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + PyDoc_STR("My objects"), /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + myobj_new, /* tp_new */ + }; + +A type that supports weakrefs, instance dicts, and hashing:: + + typedef struct { + PyObject_HEAD + const char *data; + PyObject *inst_dict; + PyObject *weakreflist; + } MyObject; + + static PyTypeObject MyObject_Type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "mymod.MyObject", + .tp_basicsize = sizeof(MyObject), + .tp_doc = PyDoc_STR("My objects"), + .tp_weaklistoffset = offsetof(MyObject, weakreflist), + .tp_dictoffset = offsetof(MyObject, inst_dict), + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + .tp_new = myobj_new, + .tp_traverse = (traverseproc)myobj_traverse, + .tp_clear = (inquiry)myobj_clear, + .tp_alloc = PyType_GenericNew, + .tp_dealloc = (destructor)myobj_dealloc, + .tp_repr = (reprfunc)myobj_repr, + .tp_hash = (hashfunc)myobj_hash, + .tp_richcompare = PyBaseObject_Type.tp_richcompare, + }; + +A str subclass that cannot be subclassed and cannot be called +to create instances (e.g. uses a separate factory func) using +:c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag:: + + typedef struct { + PyUnicodeObject raw; + char *extra; + } MyStr; + + static PyTypeObject MyStr_Type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "mymod.MyStr", + .tp_basicsize = sizeof(MyStr), + .tp_base = NULL, // set to &PyUnicode_Type in module init + .tp_doc = PyDoc_STR("my custom str"), + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION, + .tp_repr = (reprfunc)myobj_repr, + }; + +The simplest :ref:`static type <static-types>` with fixed-length instances:: + + typedef struct { + PyObject_HEAD + } MyObject; + + static PyTypeObject MyObject_Type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "mymod.MyObject", + }; + +The simplest :ref:`static type <static-types>` with variable-length instances:: + + typedef struct { + PyObject_VAR_HEAD + const char *data[1]; + } MyObject; + + static PyTypeObject MyObject_Type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "mymod.MyObject", + .tp_basicsize = sizeof(MyObject) - sizeof(char *), + .tp_itemsize = sizeof(char *), + };
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst new file mode 100644 index 0000000..12f95a2 --- /dev/null +++ b/Doc/c-api/unicode.rst
@@ -0,0 +1,1553 @@ +.. highlight:: c + +.. _unicodeobjects: + +Unicode Objects and Codecs +-------------------------- + +.. sectionauthor:: Marc-André Lemburg <mal@lemburg.com> +.. sectionauthor:: Georg Brandl <georg@python.org> + +Unicode Objects +^^^^^^^^^^^^^^^ + +Since the implementation of :pep:`393` in Python 3.3, Unicode objects internally +use a variety of representations, in order to allow handling the complete range +of Unicode characters while staying memory efficient. There are special cases +for strings where all code points are below 128, 256, or 65536; otherwise, code +points must be below 1114112 (which is the full Unicode range). + +:c:expr:`Py_UNICODE*` and UTF-8 representations are created on demand and cached +in the Unicode object. The :c:expr:`Py_UNICODE*` representation is deprecated +and inefficient. + +Due to the transition between the old APIs and the new APIs, Unicode objects +can internally be in two states depending on how they were created: + +* "canonical" Unicode objects are all objects created by a non-deprecated + Unicode API. They use the most efficient representation allowed by the + implementation. + +* "legacy" Unicode objects have been created through one of the deprecated + APIs (typically :c:func:`PyUnicode_FromUnicode`) and only bear the + :c:expr:`Py_UNICODE*` representation; you will have to call + :c:func:`PyUnicode_READY` on them before calling any other API. + +.. note:: + The "legacy" Unicode object will be removed in Python 3.12 with deprecated + APIs. All Unicode objects will be "canonical" since then. See :pep:`623` + for more information. + + +Unicode Type +"""""""""""" + +These are the basic Unicode object types used for the Unicode implementation in +Python: + +.. c:type:: Py_UCS4 + Py_UCS2 + Py_UCS1 + + These types are typedefs for unsigned integer types wide enough to contain + characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with + single Unicode characters, use :c:type:`Py_UCS4`. + + .. versionadded:: 3.3 + + +.. c:type:: Py_UNICODE + + This is a typedef of :c:expr:`wchar_t`, which is a 16-bit type or 32-bit type + depending on the platform. + + .. versionchanged:: 3.3 + In previous versions, this was a 16-bit type or a 32-bit type depending on + whether you selected a "narrow" or "wide" Unicode version of Python at + build time. + + +.. c:type:: PyASCIIObject + PyCompactUnicodeObject + PyUnicodeObject + + These subtypes of :c:type:`PyObject` represent a Python Unicode object. In + almost all cases, they shouldn't be used directly, since all API functions + that deal with Unicode objects take and return :c:type:`PyObject` pointers. + + .. versionadded:: 3.3 + + +.. c:var:: PyTypeObject PyUnicode_Type + + This instance of :c:type:`PyTypeObject` represents the Python Unicode type. It + is exposed to Python code as ``str``. + + +The following APIs are C macros and static inlined functions for fast checks and +access to internal read-only data of Unicode objects: + +.. c:function:: int PyUnicode_Check(PyObject *o) + + Return true if the object *o* is a Unicode object or an instance of a Unicode + subtype. This function always succeeds. + + +.. c:function:: int PyUnicode_CheckExact(PyObject *o) + + Return true if the object *o* is a Unicode object, but not an instance of a + subtype. This function always succeeds. + + +.. c:function:: int PyUnicode_READY(PyObject *o) + + Ensure the string object *o* is in the "canonical" representation. This is + required before using any of the access macros described below. + + .. XXX expand on when it is not required + + Returns ``0`` on success and ``-1`` with an exception set on failure, which in + particular happens if memory allocation fails. + + .. versionadded:: 3.3 + + .. deprecated-removed:: 3.10 3.12 + This API will be removed with :c:func:`PyUnicode_FromUnicode`. + + +.. c:function:: Py_ssize_t PyUnicode_GET_LENGTH(PyObject *o) + + Return the length of the Unicode string, in code points. *o* has to be a + Unicode object in the "canonical" representation (not checked). + + .. versionadded:: 3.3 + + +.. c:function:: Py_UCS1* PyUnicode_1BYTE_DATA(PyObject *o) + Py_UCS2* PyUnicode_2BYTE_DATA(PyObject *o) + Py_UCS4* PyUnicode_4BYTE_DATA(PyObject *o) + + Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 + integer types for direct character access. No checks are performed if the + canonical representation has the correct character size; use + :c:func:`PyUnicode_KIND` to select the right macro. Make sure + :c:func:`PyUnicode_READY` has been called before accessing this. + + .. versionadded:: 3.3 + + +.. c:macro:: PyUnicode_WCHAR_KIND + PyUnicode_1BYTE_KIND + PyUnicode_2BYTE_KIND + PyUnicode_4BYTE_KIND + + Return values of the :c:func:`PyUnicode_KIND` macro. + + .. versionadded:: 3.3 + + .. deprecated-removed:: 3.10 3.12 + ``PyUnicode_WCHAR_KIND`` is deprecated. + + +.. c:function:: int PyUnicode_KIND(PyObject *o) + + Return one of the PyUnicode kind constants (see above) that indicate how many + bytes per character this Unicode object uses to store its data. *o* has to + be a Unicode object in the "canonical" representation (not checked). + + .. XXX document "0" return value? + + .. versionadded:: 3.3 + + +.. c:function:: void* PyUnicode_DATA(PyObject *o) + + Return a void pointer to the raw Unicode buffer. *o* has to be a Unicode + object in the "canonical" representation (not checked). + + .. versionadded:: 3.3 + + +.. c:function:: void PyUnicode_WRITE(int kind, void *data, \ + Py_ssize_t index, Py_UCS4 value) + + Write into a canonical representation *data* (as obtained with + :c:func:`PyUnicode_DATA`). This function performs no sanity checks, and is + intended for usage in loops. The caller should cache the *kind* value and + *data* pointer as obtained from other calls. *index* is the index in + the string (starts at 0) and *value* is the new code point value which should + be written to that location. + + .. versionadded:: 3.3 + + +.. c:function:: Py_UCS4 PyUnicode_READ(int kind, void *data, \ + Py_ssize_t index) + + Read a code point from a canonical representation *data* (as obtained with + :c:func:`PyUnicode_DATA`). No checks or ready calls are performed. + + .. versionadded:: 3.3 + + +.. c:function:: Py_UCS4 PyUnicode_READ_CHAR(PyObject *o, Py_ssize_t index) + + Read a character from a Unicode object *o*, which must be in the "canonical" + representation. This is less efficient than :c:func:`PyUnicode_READ` if you + do multiple consecutive reads. + + .. versionadded:: 3.3 + + +.. c:function:: Py_UCS4 PyUnicode_MAX_CHAR_VALUE(PyObject *o) + + Return the maximum code point that is suitable for creating another string + based on *o*, which must be in the "canonical" representation. This is + always an approximation but more efficient than iterating over the string. + + .. versionadded:: 3.3 + + +.. c:function:: Py_ssize_t PyUnicode_GET_SIZE(PyObject *o) + + Return the size of the deprecated :c:type:`Py_UNICODE` representation, in + code units (this includes surrogate pairs as 2 units). *o* has to be a + Unicode object (not checked). + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_GET_LENGTH`. + + +.. c:function:: Py_ssize_t PyUnicode_GET_DATA_SIZE(PyObject *o) + + Return the size of the deprecated :c:type:`Py_UNICODE` representation in + bytes. *o* has to be a Unicode object (not checked). + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_GET_LENGTH`. + + +.. c:function:: Py_UNICODE* PyUnicode_AS_UNICODE(PyObject *o) + const char* PyUnicode_AS_DATA(PyObject *o) + + Return a pointer to a :c:type:`Py_UNICODE` representation of the object. The + returned buffer is always terminated with an extra null code point. It + may also contain embedded null code points, which would cause the string + to be truncated when used in most C functions. The ``AS_DATA`` form + casts the pointer to :c:expr:`const char *`. The *o* argument has to be + a Unicode object (not checked). + + .. versionchanged:: 3.3 + This function is now inefficient -- because in many cases the + :c:type:`Py_UNICODE` representation does not exist and needs to be created + -- and can fail (return ``NULL`` with an exception set). Try to port the + code to use the new :c:func:`PyUnicode_nBYTE_DATA` macros or use + :c:func:`PyUnicode_WRITE` or :c:func:`PyUnicode_READ`. + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using the + :c:func:`PyUnicode_nBYTE_DATA` family of macros. + + +.. c:function:: int PyUnicode_IsIdentifier(PyObject *o) + + Return ``1`` if the string is a valid identifier according to the language + definition, section :ref:`identifiers`. Return ``0`` otherwise. + + .. versionchanged:: 3.9 + The function does not call :c:func:`Py_FatalError` anymore if the string + is not ready. + + +Unicode Character Properties +"""""""""""""""""""""""""""" + +Unicode provides many different character properties. The most often needed ones +are available through these macros which are mapped to C functions depending on +the Python configuration. + + +.. c:function:: int Py_UNICODE_ISSPACE(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a whitespace character. + + +.. c:function:: int Py_UNICODE_ISLOWER(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a lowercase character. + + +.. c:function:: int Py_UNICODE_ISUPPER(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is an uppercase character. + + +.. c:function:: int Py_UNICODE_ISTITLE(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a titlecase character. + + +.. c:function:: int Py_UNICODE_ISLINEBREAK(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a linebreak character. + + +.. c:function:: int Py_UNICODE_ISDECIMAL(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a decimal character. + + +.. c:function:: int Py_UNICODE_ISDIGIT(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a digit character. + + +.. c:function:: int Py_UNICODE_ISNUMERIC(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a numeric character. + + +.. c:function:: int Py_UNICODE_ISALPHA(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character. + + +.. c:function:: int Py_UNICODE_ISALNUM(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character. + + +.. c:function:: int Py_UNICODE_ISPRINTABLE(Py_UCS4 ch) + + Return ``1`` or ``0`` depending on whether *ch* is a printable character. + Nonprintable characters are those characters defined in the Unicode character + database as "Other" or "Separator", excepting the ASCII space (0x20) which is + considered printable. (Note that printable characters in this context are + those which should not be escaped when :func:`repr` is invoked on a string. + It has no bearing on the handling of strings written to :data:`sys.stdout` or + :data:`sys.stderr`.) + + +These APIs can be used for fast direct character conversions: + + +.. c:function:: Py_UCS4 Py_UNICODE_TOLOWER(Py_UCS4 ch) + + Return the character *ch* converted to lower case. + + .. deprecated:: 3.3 + This function uses simple case mappings. + + +.. c:function:: Py_UCS4 Py_UNICODE_TOUPPER(Py_UCS4 ch) + + Return the character *ch* converted to upper case. + + .. deprecated:: 3.3 + This function uses simple case mappings. + + +.. c:function:: Py_UCS4 Py_UNICODE_TOTITLE(Py_UCS4 ch) + + Return the character *ch* converted to title case. + + .. deprecated:: 3.3 + This function uses simple case mappings. + + +.. c:function:: int Py_UNICODE_TODECIMAL(Py_UCS4 ch) + + Return the character *ch* converted to a decimal positive integer. Return + ``-1`` if this is not possible. This macro does not raise exceptions. + + +.. c:function:: int Py_UNICODE_TODIGIT(Py_UCS4 ch) + + Return the character *ch* converted to a single digit integer. Return ``-1`` if + this is not possible. This macro does not raise exceptions. + + +.. c:function:: double Py_UNICODE_TONUMERIC(Py_UCS4 ch) + + Return the character *ch* converted to a double. Return ``-1.0`` if this is not + possible. This macro does not raise exceptions. + + +These APIs can be used to work with surrogates: + +.. c:macro:: Py_UNICODE_IS_SURROGATE(ch) + + Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``). + +.. c:macro:: Py_UNICODE_IS_HIGH_SURROGATE(ch) + + Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``). + +.. c:macro:: Py_UNICODE_IS_LOW_SURROGATE(ch) + + Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``). + +.. c:macro:: Py_UNICODE_JOIN_SURROGATES(high, low) + + Join two surrogate characters and return a single Py_UCS4 value. + *high* and *low* are respectively the leading and trailing surrogates in a + surrogate pair. + + +Creating and accessing Unicode strings +"""""""""""""""""""""""""""""""""""""" + +To create Unicode objects and access their basic sequence properties, use these +APIs: + +.. c:function:: PyObject* PyUnicode_New(Py_ssize_t size, Py_UCS4 maxchar) + + Create a new Unicode object. *maxchar* should be the true maximum code point + to be placed in the string. As an approximation, it can be rounded up to the + nearest value in the sequence 127, 255, 65535, 1114111. + + This is the recommended way to allocate a new Unicode object. Objects + created using this function are not resizable. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyUnicode_FromKindAndData(int kind, const void *buffer, \ + Py_ssize_t size) + + Create a new Unicode object with the given *kind* (possible values are + :c:macro:`PyUnicode_1BYTE_KIND` etc., as returned by + :c:func:`PyUnicode_KIND`). The *buffer* must point to an array of *size* + units of 1, 2 or 4 bytes per character, as given by the kind. + + If necessary, the input *buffer* is copied and transformed into the + canonical representation. For example, if the *buffer* is a UCS4 string + (:c:macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in + the UCS1 range, it will be transformed into UCS1 + (:c:macro:`PyUnicode_1BYTE_KIND`). + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyUnicode_FromStringAndSize(const char *u, Py_ssize_t size) + + Create a Unicode object from the char buffer *u*. The bytes will be + interpreted as being UTF-8 encoded. The buffer is copied into the new + object. If the buffer is not ``NULL``, the return value might be a shared + object, i.e. modification of the data is not allowed. + + If *u* is ``NULL``, this function behaves like :c:func:`PyUnicode_FromUnicode` + with the buffer set to ``NULL``. This usage is deprecated in favor of + :c:func:`PyUnicode_New`, and will be removed in Python 3.12. + + +.. c:function:: PyObject *PyUnicode_FromString(const char *u) + + Create a Unicode object from a UTF-8 encoded null-terminated char buffer + *u*. + + +.. c:function:: PyObject* PyUnicode_FromFormat(const char *format, ...) + + Take a C :c:func:`printf`\ -style *format* string and a variable number of + arguments, calculate the size of the resulting Python Unicode string and return + a string with the values formatted into it. The variable arguments must be C + types and must correspond exactly to the format characters in the *format* + ASCII-encoded string. The following format characters are allowed: + + .. % This should be exactly the same as the table in PyErr_Format. + .. % The descriptions for %zd and %zu are wrong, but the truth is complicated + .. % because not all compilers support the %z width modifier -- we fake it + .. % when necessary via interpolating PY_FORMAT_SIZE_T. + .. % Similar comments apply to the %ll width modifier and + + .. tabularcolumns:: |l|l|L| + + +-------------------+---------------------+----------------------------------+ + | Format Characters | Type | Comment | + +===================+=====================+==================================+ + | :attr:`%%` | *n/a* | The literal % character. | + +-------------------+---------------------+----------------------------------+ + | :attr:`%c` | int | A single character, | + | | | represented as a C int. | + +-------------------+---------------------+----------------------------------+ + | :attr:`%d` | int | Equivalent to | + | | | ``printf("%d")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%u` | unsigned int | Equivalent to | + | | | ``printf("%u")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%ld` | long | Equivalent to | + | | | ``printf("%ld")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%li` | long | Equivalent to | + | | | ``printf("%li")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%lu` | unsigned long | Equivalent to | + | | | ``printf("%lu")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%lld` | long long | Equivalent to | + | | | ``printf("%lld")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%lli` | long long | Equivalent to | + | | | ``printf("%lli")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%llu` | unsigned long long | Equivalent to | + | | | ``printf("%llu")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%zd` | :c:type:`\ | Equivalent to | + | | Py_ssize_t` | ``printf("%zd")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%zi` | :c:type:`\ | Equivalent to | + | | Py_ssize_t` | ``printf("%zi")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%zu` | size_t | Equivalent to | + | | | ``printf("%zu")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%i` | int | Equivalent to | + | | | ``printf("%i")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%x` | int | Equivalent to | + | | | ``printf("%x")``. [1]_ | + +-------------------+---------------------+----------------------------------+ + | :attr:`%s` | const char\* | A null-terminated C character | + | | | array. | + +-------------------+---------------------+----------------------------------+ + | :attr:`%p` | const void\* | The hex representation of a C | + | | | pointer. Mostly equivalent to | + | | | ``printf("%p")`` except that | + | | | it is guaranteed to start with | + | | | the literal ``0x`` regardless | + | | | of what the platform's | + | | | ``printf`` yields. | + +-------------------+---------------------+----------------------------------+ + | :attr:`%A` | PyObject\* | The result of calling | + | | | :func:`ascii`. | + +-------------------+---------------------+----------------------------------+ + | :attr:`%U` | PyObject\* | A Unicode object. | + +-------------------+---------------------+----------------------------------+ + | :attr:`%V` | PyObject\*, | A Unicode object (which may be | + | | const char\* | ``NULL``) and a null-terminated | + | | | C character array as a second | + | | | parameter (which will be used, | + | | | if the first parameter is | + | | | ``NULL``). | + +-------------------+---------------------+----------------------------------+ + | :attr:`%S` | PyObject\* | The result of calling | + | | | :c:func:`PyObject_Str`. | + +-------------------+---------------------+----------------------------------+ + | :attr:`%R` | PyObject\* | The result of calling | + | | | :c:func:`PyObject_Repr`. | + +-------------------+---------------------+----------------------------------+ + + An unrecognized format character causes all the rest of the format string to be + copied as-is to the result string, and any extra arguments discarded. + + .. note:: + The width formatter unit is number of characters rather than bytes. + The precision formatter unit is number of bytes for ``"%s"`` and + ``"%V"`` (if the ``PyObject*`` argument is ``NULL``), and a number of + characters for ``"%A"``, ``"%U"``, ``"%S"``, ``"%R"`` and ``"%V"`` + (if the ``PyObject*`` argument is not ``NULL``). + + .. [1] For integer specifiers (d, u, ld, li, lu, lld, lli, llu, zd, zi, + zu, i, x): the 0-conversion flag has effect even when a precision is given. + + .. versionchanged:: 3.2 + Support for ``"%lld"`` and ``"%llu"`` added. + + .. versionchanged:: 3.3 + Support for ``"%li"``, ``"%lli"`` and ``"%zi"`` added. + + .. versionchanged:: 3.4 + Support width and precision formatter for ``"%s"``, ``"%A"``, ``"%U"``, + ``"%V"``, ``"%S"``, ``"%R"`` added. + + +.. c:function:: PyObject* PyUnicode_FromFormatV(const char *format, va_list vargs) + + Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two + arguments. + + +.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj) + + Copy an instance of a Unicode subtype to a new true Unicode object if + necessary. If *obj* is already a true Unicode object (not a subtype), + return the reference with incremented refcount. + + Objects other than Unicode or its subtypes will cause a :exc:`TypeError`. + + +.. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, \ + const char *encoding, const char *errors) + + Decode an encoded object *obj* to a Unicode object. + + :class:`bytes`, :class:`bytearray` and other + :term:`bytes-like objects <bytes-like object>` + are decoded according to the given *encoding* and using the error handling + defined by *errors*. Both can be ``NULL`` to have the interface use the default + values (see :ref:`builtincodecs` for details). + + All other objects, including Unicode objects, cause a :exc:`TypeError` to be + set. + + The API returns ``NULL`` if there was an error. The caller is responsible for + decref'ing the returned objects. + + +.. c:function:: Py_ssize_t PyUnicode_GetLength(PyObject *unicode) + + Return the length of the Unicode object, in code points. + + .. versionadded:: 3.3 + + +.. c:function:: Py_ssize_t PyUnicode_CopyCharacters(PyObject *to, \ + Py_ssize_t to_start, \ + PyObject *from, \ + Py_ssize_t from_start, \ + Py_ssize_t how_many) + + Copy characters from one Unicode object into another. This function performs + character conversion when necessary and falls back to :c:func:`memcpy` if + possible. Returns ``-1`` and sets an exception on error, otherwise returns + the number of copied characters. + + .. versionadded:: 3.3 + + +.. c:function:: Py_ssize_t PyUnicode_Fill(PyObject *unicode, Py_ssize_t start, \ + Py_ssize_t length, Py_UCS4 fill_char) + + Fill a string with a character: write *fill_char* into + ``unicode[start:start+length]``. + + Fail if *fill_char* is bigger than the string maximum character, or if the + string has more than 1 reference. + + Return the number of written character, or return ``-1`` and raise an + exception on error. + + .. versionadded:: 3.3 + + +.. c:function:: int PyUnicode_WriteChar(PyObject *unicode, Py_ssize_t index, \ + Py_UCS4 character) + + Write a character to a string. The string must have been created through + :c:func:`PyUnicode_New`. Since Unicode strings are supposed to be immutable, + the string must not be shared, or have been hashed yet. + + This function checks that *unicode* is a Unicode object, that the index is + not out of bounds, and that the object can be modified safely (i.e. that it + its reference count is one). + + .. versionadded:: 3.3 + + +.. c:function:: Py_UCS4 PyUnicode_ReadChar(PyObject *unicode, Py_ssize_t index) + + Read a character from a string. This function checks that *unicode* is a + Unicode object and the index is not out of bounds, in contrast to + :c:func:`PyUnicode_READ_CHAR`, which performs no error checking. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyUnicode_Substring(PyObject *str, Py_ssize_t start, \ + Py_ssize_t end) + + Return a substring of *str*, from character index *start* (included) to + character index *end* (excluded). Negative indices are not supported. + + .. versionadded:: 3.3 + + +.. c:function:: Py_UCS4* PyUnicode_AsUCS4(PyObject *u, Py_UCS4 *buffer, \ + Py_ssize_t buflen, int copy_null) + + Copy the string *u* into a UCS4 buffer, including a null character, if + *copy_null* is set. Returns ``NULL`` and sets an exception on error (in + particular, a :exc:`SystemError` if *buflen* is smaller than the length of + *u*). *buffer* is returned on success. + + .. versionadded:: 3.3 + + +.. c:function:: Py_UCS4* PyUnicode_AsUCS4Copy(PyObject *u) + + Copy the string *u* into a new UCS4 buffer that is allocated using + :c:func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with a + :exc:`MemoryError` set. The returned buffer always has an extra + null code point appended. + + .. versionadded:: 3.3 + + +Deprecated Py_UNICODE APIs +"""""""""""""""""""""""""" + +.. deprecated-removed:: 3.3 3.12 + +These API functions are deprecated with the implementation of :pep:`393`. +Extension modules can continue using them, as they will not be removed in Python +3.x, but need to be aware that their use can now cause performance and memory hits. + + +.. c:function:: PyObject* PyUnicode_FromUnicode(const Py_UNICODE *u, Py_ssize_t size) + + Create a Unicode object from the Py_UNICODE buffer *u* of the given size. *u* + may be ``NULL`` which causes the contents to be undefined. It is the user's + responsibility to fill in the needed data. The buffer is copied into the new + object. + + If the buffer is not ``NULL``, the return value might be a shared object. + Therefore, modification of the resulting Unicode object is only allowed when + *u* is ``NULL``. + + If the buffer is ``NULL``, :c:func:`PyUnicode_READY` must be called once the + string content has been filled before using any of the access macros such as + :c:func:`PyUnicode_KIND`. + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_FromKindAndData`, :c:func:`PyUnicode_FromWideChar`, or + :c:func:`PyUnicode_New`. + + +.. c:function:: Py_UNICODE* PyUnicode_AsUnicode(PyObject *unicode) + + Return a read-only pointer to the Unicode object's internal + :c:type:`Py_UNICODE` buffer, or ``NULL`` on error. This will create the + :c:expr:`Py_UNICODE*` representation of the object if it is not yet + available. The buffer is always terminated with an extra null code point. + Note that the resulting :c:type:`Py_UNICODE` string may also contain + embedded null code points, which would cause the string to be truncated when + used in most C functions. + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsWideChar`, + :c:func:`PyUnicode_ReadChar` or similar new APIs. + + +.. c:function:: Py_UNICODE* PyUnicode_AsUnicodeAndSize(PyObject *unicode, Py_ssize_t *size) + + Like :c:func:`PyUnicode_AsUnicode`, but also saves the :c:func:`Py_UNICODE` + array length (excluding the extra null terminator) in *size*. + Note that the resulting :c:expr:`Py_UNICODE*` string + may contain embedded null code points, which would cause the string to be + truncated when used in most C functions. + + .. versionadded:: 3.3 + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsWideChar`, + :c:func:`PyUnicode_ReadChar` or similar new APIs. + + +.. c:function:: Py_ssize_t PyUnicode_GetSize(PyObject *unicode) + + Return the size of the deprecated :c:type:`Py_UNICODE` representation, in + code units (this includes surrogate pairs as 2 units). + + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_GET_LENGTH`. + + +Locale Encoding +""""""""""""""" + +The current locale encoding can be used to decode text from the operating +system. + +.. c:function:: PyObject* PyUnicode_DecodeLocaleAndSize(const char *str, \ + Py_ssize_t len, \ + const char *errors) + + Decode a string from UTF-8 on Android and VxWorks, or from the current + locale encoding on other platforms. The supported + error handlers are ``"strict"`` and ``"surrogateescape"`` + (:pep:`383`). The decoder uses ``"strict"`` error handler if + *errors* is ``NULL``. *str* must end with a null character but + cannot contain embedded null characters. + + Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from + :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at + Python startup). + + This function ignores the :ref:`Python UTF-8 Mode <utf8-mode>`. + + .. seealso:: + + The :c:func:`Py_DecodeLocale` function. + + .. versionadded:: 3.3 + + .. versionchanged:: 3.7 + The function now also uses the current locale encoding for the + ``surrogateescape`` error handler, except on Android. Previously, :c:func:`Py_DecodeLocale` + was used for the ``surrogateescape``, and the current locale encoding was + used for ``strict``. + + +.. c:function:: PyObject* PyUnicode_DecodeLocale(const char *str, const char *errors) + + Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string + length using :c:func:`strlen`. + + .. versionadded:: 3.3 + + +.. c:function:: PyObject* PyUnicode_EncodeLocale(PyObject *unicode, const char *errors) + + Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current + locale encoding on other platforms. The + supported error handlers are ``"strict"`` and ``"surrogateescape"`` + (:pep:`383`). The encoder uses ``"strict"`` error handler if + *errors* is ``NULL``. Return a :class:`bytes` object. *unicode* cannot + contain embedded null characters. + + Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to + :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at + Python startup). + + This function ignores the :ref:`Python UTF-8 Mode <utf8-mode>`. + + .. seealso:: + + The :c:func:`Py_EncodeLocale` function. + + .. versionadded:: 3.3 + + .. versionchanged:: 3.7 + The function now also uses the current locale encoding for the + ``surrogateescape`` error handler, except on Android. Previously, + :c:func:`Py_EncodeLocale` + was used for the ``surrogateescape``, and the current locale encoding was + used for ``strict``. + + +File System Encoding +"""""""""""""""""""" + +To encode and decode file names and other environment strings, +:c:data:`Py_FileSystemDefaultEncoding` should be used as the encoding, and +:c:data:`Py_FileSystemDefaultEncodeErrors` should be used as the error handler +(:pep:`383` and :pep:`529`). To encode file names to :class:`bytes` during +argument parsing, the ``"O&"`` converter should be used, passing +:c:func:`PyUnicode_FSConverter` as the conversion function: + +.. c:function:: int PyUnicode_FSConverter(PyObject* obj, void* result) + + ParseTuple converter: encode :class:`str` objects -- obtained directly or + through the :class:`os.PathLike` interface -- to :class:`bytes` using + :c:func:`PyUnicode_EncodeFSDefault`; :class:`bytes` objects are output as-is. + *result* must be a :c:expr:`PyBytesObject*` which must be released when it is + no longer used. + + .. versionadded:: 3.1 + + .. versionchanged:: 3.6 + Accepts a :term:`path-like object`. + +To decode file names to :class:`str` during argument parsing, the ``"O&"`` +converter should be used, passing :c:func:`PyUnicode_FSDecoder` as the +conversion function: + +.. c:function:: int PyUnicode_FSDecoder(PyObject* obj, void* result) + + ParseTuple converter: decode :class:`bytes` objects -- obtained either + directly or indirectly through the :class:`os.PathLike` interface -- to + :class:`str` using :c:func:`PyUnicode_DecodeFSDefaultAndSize`; :class:`str` + objects are output as-is. *result* must be a :c:expr:`PyUnicodeObject*` which + must be released when it is no longer used. + + .. versionadded:: 3.2 + + .. versionchanged:: 3.6 + Accepts a :term:`path-like object`. + + +.. c:function:: PyObject* PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size) + + Decode a string from the :term:`filesystem encoding and error handler`. + + If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the + locale encoding. + + :c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the + locale encoding and cannot be modified later. If you need to decode a string + from the current locale encoding, use + :c:func:`PyUnicode_DecodeLocaleAndSize`. + + .. seealso:: + + The :c:func:`Py_DecodeLocale` function. + + .. versionchanged:: 3.6 + Use :c:data:`Py_FileSystemDefaultEncodeErrors` error handler. + + +.. c:function:: PyObject* PyUnicode_DecodeFSDefault(const char *s) + + Decode a null-terminated string from the :term:`filesystem encoding and + error handler`. + + If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the + locale encoding. + + Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length. + + .. versionchanged:: 3.6 + Use :c:data:`Py_FileSystemDefaultEncodeErrors` error handler. + + +.. c:function:: PyObject* PyUnicode_EncodeFSDefault(PyObject *unicode) + + Encode a Unicode object to :c:data:`Py_FileSystemDefaultEncoding` with the + :c:data:`Py_FileSystemDefaultEncodeErrors` error handler, and return + :class:`bytes`. Note that the resulting :class:`bytes` object may contain + null bytes. + + If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the + locale encoding. + + :c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the + locale encoding and cannot be modified later. If you need to encode a string + to the current locale encoding, use :c:func:`PyUnicode_EncodeLocale`. + + .. seealso:: + + The :c:func:`Py_EncodeLocale` function. + + .. versionadded:: 3.2 + + .. versionchanged:: 3.6 + Use :c:data:`Py_FileSystemDefaultEncodeErrors` error handler. + +wchar_t Support +""""""""""""""" + +:c:expr:`wchar_t` support for platforms which support it: + +.. c:function:: PyObject* PyUnicode_FromWideChar(const wchar_t *w, Py_ssize_t size) + + Create a Unicode object from the :c:expr:`wchar_t` buffer *w* of the given *size*. + Passing ``-1`` as the *size* indicates that the function must itself compute the length, + using wcslen. + Return ``NULL`` on failure. + + +.. c:function:: Py_ssize_t PyUnicode_AsWideChar(PyObject *unicode, wchar_t *w, Py_ssize_t size) + + Copy the Unicode object contents into the :c:expr:`wchar_t` buffer *w*. At most + *size* :c:expr:`wchar_t` characters are copied (excluding a possibly trailing + null termination character). Return the number of :c:expr:`wchar_t` characters + copied or ``-1`` in case of an error. Note that the resulting :c:expr:`wchar_t*` + string may or may not be null-terminated. It is the responsibility of the caller + to make sure that the :c:expr:`wchar_t*` string is null-terminated in case this is + required by the application. Also, note that the :c:expr:`wchar_t*` string + might contain null characters, which would cause the string to be truncated + when used with most C functions. + + +.. c:function:: wchar_t* PyUnicode_AsWideCharString(PyObject *unicode, Py_ssize_t *size) + + Convert the Unicode object to a wide character string. The output string + always ends with a null character. If *size* is not ``NULL``, write the number + of wide characters (excluding the trailing null termination character) into + *\*size*. Note that the resulting :c:expr:`wchar_t` string might contain + null characters, which would cause the string to be truncated when used with + most C functions. If *size* is ``NULL`` and the :c:expr:`wchar_t*` string + contains null characters a :exc:`ValueError` is raised. + + Returns a buffer allocated by :c:func:`PyMem_Alloc` (use + :c:func:`PyMem_Free` to free it) on success. On error, returns ``NULL`` + and *\*size* is undefined. Raises a :exc:`MemoryError` if memory allocation + is failed. + + .. versionadded:: 3.2 + + .. versionchanged:: 3.7 + Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` + string contains null characters. + + +.. _builtincodecs: + +Built-in Codecs +^^^^^^^^^^^^^^^ + +Python provides a set of built-in codecs which are written in C for speed. All of +these codecs are directly usable via the following functions. + +Many of the following APIs take two arguments encoding and errors, and they +have the same semantics as the ones of the built-in :func:`str` string object +constructor. + +Setting encoding to ``NULL`` causes the default encoding to be used +which is UTF-8. The file system calls should use +:c:func:`PyUnicode_FSConverter` for encoding file names. This uses the +variable :c:data:`Py_FileSystemDefaultEncoding` internally. This +variable should be treated as read-only: on some systems, it will be a +pointer to a static string, on others, it will change at run-time +(such as when the application invokes setlocale). + +Error handling is set by errors which may also be set to ``NULL`` meaning to use +the default handling defined for the codec. Default error handling for all +built-in codecs is "strict" (:exc:`ValueError` is raised). + +The codecs all use a similar interface. Only deviations from the following +generic ones are documented for simplicity. + + +Generic Codecs +"""""""""""""" + +These are the generic codec APIs: + + +.. c:function:: PyObject* PyUnicode_Decode(const char *s, Py_ssize_t size, \ + const char *encoding, const char *errors) + + Create a Unicode object by decoding *size* bytes of the encoded string *s*. + *encoding* and *errors* have the same meaning as the parameters of the same name + in the :func:`str` built-in function. The codec to be used is looked up + using the Python codec registry. Return ``NULL`` if an exception was raised by + the codec. + + +.. c:function:: PyObject* PyUnicode_AsEncodedString(PyObject *unicode, \ + const char *encoding, const char *errors) + + Encode a Unicode object and return the result as Python bytes object. + *encoding* and *errors* have the same meaning as the parameters of the same + name in the Unicode :meth:`~str.encode` method. The codec to be used is looked up + using the Python codec registry. Return ``NULL`` if an exception was raised by + the codec. + + +UTF-8 Codecs +"""""""""""" + +These are the UTF-8 codec APIs: + + +.. c:function:: PyObject* PyUnicode_DecodeUTF8(const char *s, Py_ssize_t size, const char *errors) + + Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string + *s*. Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_DecodeUTF8Stateful(const char *s, Py_ssize_t size, \ + const char *errors, Py_ssize_t *consumed) + + If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If + *consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will not be + treated as an error. Those bytes will not be decoded and the number of bytes + that have been decoded will be stored in *consumed*. + + +.. c:function:: PyObject* PyUnicode_AsUTF8String(PyObject *unicode) + + Encode a Unicode object using UTF-8 and return the result as Python bytes + object. Error handling is "strict". Return ``NULL`` if an exception was + raised by the codec. + + +.. c:function:: const char* PyUnicode_AsUTF8AndSize(PyObject *unicode, Py_ssize_t *size) + + Return a pointer to the UTF-8 encoding of the Unicode object, and + store the size of the encoded representation (in bytes) in *size*. The + *size* argument can be ``NULL``; in this case no size will be stored. The + returned buffer always has an extra null byte appended (not included in + *size*), regardless of whether there are any other null code points. + + In the case of an error, ``NULL`` is returned with an exception set and no + *size* is stored. + + This caches the UTF-8 representation of the string in the Unicode object, and + subsequent calls will return a pointer to the same buffer. The caller is not + responsible for deallocating the buffer. The buffer is deallocated and + pointers to it become invalid when the Unicode object is garbage collected. + + .. versionadded:: 3.3 + + .. versionchanged:: 3.7 + The return type is now ``const char *`` rather of ``char *``. + + .. versionchanged:: 3.10 + This function is a part of the :ref:`limited API <stable>`. + + +.. c:function:: const char* PyUnicode_AsUTF8(PyObject *unicode) + + As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size. + + .. versionadded:: 3.3 + + .. versionchanged:: 3.7 + The return type is now ``const char *`` rather of ``char *``. + + +UTF-32 Codecs +""""""""""""" + +These are the UTF-32 codec APIs: + + +.. c:function:: PyObject* PyUnicode_DecodeUTF32(const char *s, Py_ssize_t size, \ + const char *errors, int *byteorder) + + Decode *size* bytes from a UTF-32 encoded buffer string and return the + corresponding Unicode object. *errors* (if non-``NULL``) defines the error + handling. It defaults to "strict". + + If *byteorder* is non-``NULL``, the decoder starts decoding using the given byte + order:: + + *byteorder == -1: little endian + *byteorder == 0: native order + *byteorder == 1: big endian + + If ``*byteorder`` is zero, and the first four bytes of the input data are a + byte order mark (BOM), the decoder switches to this byte order and the BOM is + not copied into the resulting Unicode string. If ``*byteorder`` is ``-1`` or + ``1``, any byte order mark is copied to the output. + + After completion, *\*byteorder* is set to the current byte order at the end + of input data. + + If *byteorder* is ``NULL``, the codec starts in native order mode. + + Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_DecodeUTF32Stateful(const char *s, Py_ssize_t size, \ + const char *errors, int *byteorder, Py_ssize_t *consumed) + + If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If + *consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not treat + trailing incomplete UTF-32 byte sequences (such as a number of bytes not divisible + by four) as an error. Those bytes will not be decoded and the number of bytes + that have been decoded will be stored in *consumed*. + + +.. c:function:: PyObject* PyUnicode_AsUTF32String(PyObject *unicode) + + Return a Python byte string using the UTF-32 encoding in native byte + order. The string always starts with a BOM mark. Error handling is "strict". + Return ``NULL`` if an exception was raised by the codec. + + +UTF-16 Codecs +""""""""""""" + +These are the UTF-16 codec APIs: + + +.. c:function:: PyObject* PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, \ + const char *errors, int *byteorder) + + Decode *size* bytes from a UTF-16 encoded buffer string and return the + corresponding Unicode object. *errors* (if non-``NULL``) defines the error + handling. It defaults to "strict". + + If *byteorder* is non-``NULL``, the decoder starts decoding using the given byte + order:: + + *byteorder == -1: little endian + *byteorder == 0: native order + *byteorder == 1: big endian + + If ``*byteorder`` is zero, and the first two bytes of the input data are a + byte order mark (BOM), the decoder switches to this byte order and the BOM is + not copied into the resulting Unicode string. If ``*byteorder`` is ``-1`` or + ``1``, any byte order mark is copied to the output (where it will result in + either a ``\ufeff`` or a ``\ufffe`` character). + + After completion, ``*byteorder`` is set to the current byte order at the end + of input data. + + If *byteorder* is ``NULL``, the codec starts in native order mode. + + Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_DecodeUTF16Stateful(const char *s, Py_ssize_t size, \ + const char *errors, int *byteorder, Py_ssize_t *consumed) + + If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If + *consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not treat + trailing incomplete UTF-16 byte sequences (such as an odd number of bytes or a + split surrogate pair) as an error. Those bytes will not be decoded and the + number of bytes that have been decoded will be stored in *consumed*. + + +.. c:function:: PyObject* PyUnicode_AsUTF16String(PyObject *unicode) + + Return a Python byte string using the UTF-16 encoding in native byte + order. The string always starts with a BOM mark. Error handling is "strict". + Return ``NULL`` if an exception was raised by the codec. + + +UTF-7 Codecs +"""""""""""" + +These are the UTF-7 codec APIs: + + +.. c:function:: PyObject* PyUnicode_DecodeUTF7(const char *s, Py_ssize_t size, const char *errors) + + Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string + *s*. Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_DecodeUTF7Stateful(const char *s, Py_ssize_t size, \ + const char *errors, Py_ssize_t *consumed) + + If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If + *consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will not + be treated as an error. Those bytes will not be decoded and the number of + bytes that have been decoded will be stored in *consumed*. + + +Unicode-Escape Codecs +""""""""""""""""""""" + +These are the "Unicode Escape" codec APIs: + + +.. c:function:: PyObject* PyUnicode_DecodeUnicodeEscape(const char *s, \ + Py_ssize_t size, const char *errors) + + Create a Unicode object by decoding *size* bytes of the Unicode-Escape encoded + string *s*. Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_AsUnicodeEscapeString(PyObject *unicode) + + Encode a Unicode object using Unicode-Escape and return the result as a + bytes object. Error handling is "strict". Return ``NULL`` if an exception was + raised by the codec. + + +Raw-Unicode-Escape Codecs +""""""""""""""""""""""""" + +These are the "Raw Unicode Escape" codec APIs: + + +.. c:function:: PyObject* PyUnicode_DecodeRawUnicodeEscape(const char *s, \ + Py_ssize_t size, const char *errors) + + Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape + encoded string *s*. Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode) + + Encode a Unicode object using Raw-Unicode-Escape and return the result as + a bytes object. Error handling is "strict". Return ``NULL`` if an exception + was raised by the codec. + + +Latin-1 Codecs +"""""""""""""" + +These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 Unicode +ordinals and only these are accepted by the codecs during encoding. + + +.. c:function:: PyObject* PyUnicode_DecodeLatin1(const char *s, Py_ssize_t size, const char *errors) + + Create a Unicode object by decoding *size* bytes of the Latin-1 encoded string + *s*. Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_AsLatin1String(PyObject *unicode) + + Encode a Unicode object using Latin-1 and return the result as Python bytes + object. Error handling is "strict". Return ``NULL`` if an exception was + raised by the codec. + + +ASCII Codecs +"""""""""""" + +These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All other +codes generate errors. + + +.. c:function:: PyObject* PyUnicode_DecodeASCII(const char *s, Py_ssize_t size, const char *errors) + + Create a Unicode object by decoding *size* bytes of the ASCII encoded string + *s*. Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_AsASCIIString(PyObject *unicode) + + Encode a Unicode object using ASCII and return the result as Python bytes + object. Error handling is "strict". Return ``NULL`` if an exception was + raised by the codec. + + +Character Map Codecs +"""""""""""""""""""" + +This codec is special in that it can be used to implement many different codecs +(and this is in fact what was done to obtain most of the standard codecs +included in the :mod:`encodings` package). The codec uses mappings to encode and +decode characters. The mapping objects provided must support the +:meth:`__getitem__` mapping interface; dictionaries and sequences work well. + +These are the mapping codec APIs: + +.. c:function:: PyObject* PyUnicode_DecodeCharmap(const char *data, Py_ssize_t size, \ + PyObject *mapping, const char *errors) + + Create a Unicode object by decoding *size* bytes of the encoded string *s* + using the given *mapping* object. Return ``NULL`` if an exception was raised + by the codec. + + If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else + *mapping* must map bytes ordinals (integers in the range from 0 to 255) + to Unicode strings, integers (which are then interpreted as Unicode + ordinals) or ``None``. Unmapped data bytes -- ones which cause a + :exc:`LookupError`, as well as ones which get mapped to ``None``, + ``0xFFFE`` or ``'\ufffe'``, are treated as undefined mappings and cause + an error. + + +.. c:function:: PyObject* PyUnicode_AsCharmapString(PyObject *unicode, PyObject *mapping) + + Encode a Unicode object using the given *mapping* object and return the + result as a bytes object. Error handling is "strict". Return ``NULL`` if an + exception was raised by the codec. + + The *mapping* object must map Unicode ordinal integers to bytes objects, + integers in the range from 0 to 255 or ``None``. Unmapped character + ordinals (ones which cause a :exc:`LookupError`) as well as mapped to + ``None`` are treated as "undefined mapping" and cause an error. + + +The following codec API is special in that maps Unicode to Unicode. + +.. c:function:: PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors) + + Translate a string by applying a character mapping table to it and return the + resulting Unicode object. Return ``NULL`` if an exception was raised by the + codec. + + The mapping table must map Unicode ordinal integers to Unicode ordinal integers + or ``None`` (causing deletion of the character). + + Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries + and sequences work well. Unmapped character ordinals (ones which cause a + :exc:`LookupError`) are left untouched and are copied as-is. + + *errors* has the usual meaning for codecs. It may be ``NULL`` which indicates to + use the default error handling. + + +MBCS codecs for Windows +""""""""""""""""""""""" + +These are the MBCS codec APIs. They are currently only available on Windows and +use the Win32 MBCS converters to implement the conversions. Note that MBCS (or +DBCS) is a class of encodings, not just one. The target encoding is defined by +the user settings on the machine running the codec. + +.. c:function:: PyObject* PyUnicode_DecodeMBCS(const char *s, Py_ssize_t size, const char *errors) + + Create a Unicode object by decoding *size* bytes of the MBCS encoded string *s*. + Return ``NULL`` if an exception was raised by the codec. + + +.. c:function:: PyObject* PyUnicode_DecodeMBCSStateful(const char *s, Py_ssize_t size, \ + const char *errors, Py_ssize_t *consumed) + + If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If + *consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not decode + trailing lead byte and the number of bytes that have been decoded will be stored + in *consumed*. + + +.. c:function:: PyObject* PyUnicode_AsMBCSString(PyObject *unicode) + + Encode a Unicode object using MBCS and return the result as Python bytes + object. Error handling is "strict". Return ``NULL`` if an exception was + raised by the codec. + + +.. c:function:: PyObject* PyUnicode_EncodeCodePage(int code_page, PyObject *unicode, const char *errors) + + Encode the Unicode object using the specified code page and return a Python + bytes object. Return ``NULL`` if an exception was raised by the codec. Use + :c:data:`CP_ACP` code page to get the MBCS encoder. + + .. versionadded:: 3.3 + + +Methods & Slots +""""""""""""""" + + +.. _unicodemethodsandslots: + +Methods and Slot Functions +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following APIs are capable of handling Unicode objects and strings on input +(we refer to them as strings in the descriptions) and return Unicode objects or +integers as appropriate. + +They all return ``NULL`` or ``-1`` if an exception occurs. + + +.. c:function:: PyObject* PyUnicode_Concat(PyObject *left, PyObject *right) + + Concat two strings giving a new Unicode string. + + +.. c:function:: PyObject* PyUnicode_Split(PyObject *s, PyObject *sep, Py_ssize_t maxsplit) + + Split a string giving a list of Unicode strings. If *sep* is ``NULL``, splitting + will be done at all whitespace substrings. Otherwise, splits occur at the given + separator. At most *maxsplit* splits will be done. If negative, no limit is + set. Separators are not included in the resulting list. + + +.. c:function:: PyObject* PyUnicode_Splitlines(PyObject *s, int keepend) + + Split a Unicode string at line breaks, returning a list of Unicode strings. + CRLF is considered to be one line break. If *keepend* is ``0``, the line break + characters are not included in the resulting strings. + + +.. c:function:: PyObject* PyUnicode_Join(PyObject *separator, PyObject *seq) + + Join a sequence of strings using the given *separator* and return the resulting + Unicode string. + + +.. c:function:: Py_ssize_t PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \ + Py_ssize_t start, Py_ssize_t end, int direction) + + Return ``1`` if *substr* matches ``str[start:end]`` at the given tail end + (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` a suffix match), + ``0`` otherwise. Return ``-1`` if an error occurred. + + +.. c:function:: Py_ssize_t PyUnicode_Find(PyObject *str, PyObject *substr, \ + Py_ssize_t start, Py_ssize_t end, int direction) + + Return the first position of *substr* in ``str[start:end]`` using the given + *direction* (*direction* == ``1`` means to do a forward search, *direction* == ``-1`` a + backward search). The return value is the index of the first match; a value of + ``-1`` indicates that no match was found, and ``-2`` indicates that an error + occurred and an exception has been set. + + +.. c:function:: Py_ssize_t PyUnicode_FindChar(PyObject *str, Py_UCS4 ch, \ + Py_ssize_t start, Py_ssize_t end, int direction) + + Return the first position of the character *ch* in ``str[start:end]`` using + the given *direction* (*direction* == ``1`` means to do a forward search, + *direction* == ``-1`` a backward search). The return value is the index of the + first match; a value of ``-1`` indicates that no match was found, and ``-2`` + indicates that an error occurred and an exception has been set. + + .. versionadded:: 3.3 + + .. versionchanged:: 3.7 + *start* and *end* are now adjusted to behave like ``str[start:end]``. + + +.. c:function:: Py_ssize_t PyUnicode_Count(PyObject *str, PyObject *substr, \ + Py_ssize_t start, Py_ssize_t end) + + Return the number of non-overlapping occurrences of *substr* in + ``str[start:end]``. Return ``-1`` if an error occurred. + + +.. c:function:: PyObject* PyUnicode_Replace(PyObject *str, PyObject *substr, \ + PyObject *replstr, Py_ssize_t maxcount) + + Replace at most *maxcount* occurrences of *substr* in *str* with *replstr* and + return the resulting Unicode object. *maxcount* == ``-1`` means replace all + occurrences. + + +.. c:function:: int PyUnicode_Compare(PyObject *left, PyObject *right) + + Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, and greater than, + respectively. + + This function returns ``-1`` upon failure, so one should call + :c:func:`PyErr_Occurred` to check for errors. + + +.. c:function:: int PyUnicode_CompareWithASCIIString(PyObject *uni, const char *string) + + Compare a Unicode object, *uni*, with *string* and return ``-1``, ``0``, ``1`` for less + than, equal, and greater than, respectively. It is best to pass only + ASCII-encoded strings, but the function interprets the input string as + ISO-8859-1 if it contains non-ASCII characters. + + This function does not raise exceptions. + + +.. c:function:: PyObject* PyUnicode_RichCompare(PyObject *left, PyObject *right, int op) + + Rich compare two Unicode strings and return one of the following: + + * ``NULL`` in case an exception was raised + * :const:`Py_True` or :const:`Py_False` for successful comparisons + * :const:`Py_NotImplemented` in case the type combination is unknown + + Possible values for *op* are :const:`Py_GT`, :const:`Py_GE`, :const:`Py_EQ`, + :const:`Py_NE`, :const:`Py_LT`, and :const:`Py_LE`. + + +.. c:function:: PyObject* PyUnicode_Format(PyObject *format, PyObject *args) + + Return a new string object from *format* and *args*; this is analogous to + ``format % args``. + + +.. c:function:: int PyUnicode_Contains(PyObject *container, PyObject *element) + + Check whether *element* is contained in *container* and return true or false + accordingly. + + *element* has to coerce to a one element Unicode string. ``-1`` is returned + if there was an error. + + +.. c:function:: void PyUnicode_InternInPlace(PyObject **string) + + Intern the argument *\*string* in place. The argument must be the address of a + pointer variable pointing to a Python Unicode string object. If there is an + existing interned string that is the same as *\*string*, it sets *\*string* to + it (decrementing the reference count of the old string object and incrementing + the reference count of the interned string object), otherwise it leaves + *\*string* alone and interns it (incrementing its reference count). + (Clarification: even though there is a lot of talk about reference counts, think + of this function as reference-count-neutral; you own the object after the call + if and only if you owned it before the call.) + + +.. c:function:: PyObject* PyUnicode_InternFromString(const char *v) + + A combination of :c:func:`PyUnicode_FromString` and + :c:func:`PyUnicode_InternInPlace`, returning either a new Unicode string + object that has been interned, or a new ("owned") reference to an earlier + interned string object with the same value.
diff --git a/Doc/c-api/utilities.rst b/Doc/c-api/utilities.rst new file mode 100644 index 0000000..a805b56 --- /dev/null +++ b/Doc/c-api/utilities.rst
@@ -0,0 +1,21 @@ +.. highlight:: c + +.. _utilities: + +********* +Utilities +********* + +The functions in this chapter perform various utility tasks, ranging from +helping C code be more portable across platforms, using Python modules from C, +and parsing function arguments and constructing Python values from C values. + +.. toctree:: + + sys.rst + import.rst + marshal.rst + arg.rst + conversion.rst + reflection.rst + codec.rst
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst new file mode 100644 index 0000000..bfb14ac --- /dev/null +++ b/Doc/c-api/veryhigh.rst
@@ -0,0 +1,371 @@ +.. highlight:: c + + +.. _veryhigh: + +************************* +The Very High Level Layer +************************* + +The functions in this chapter will let you execute Python source code given in a +file or a buffer, but they will not let you interact in a more detailed way with +the interpreter. + +Several of these functions accept a start symbol from the grammar as a +parameter. The available start symbols are :const:`Py_eval_input`, +:const:`Py_file_input`, and :const:`Py_single_input`. These are described +following the functions which accept them as parameters. + +Note also that several of these functions take :c:expr:`FILE*` parameters. One +particular issue which needs to be handled carefully is that the :c:expr:`FILE` +structure for different C libraries can be different and incompatible. Under +Windows (at least), it is possible for dynamically linked extensions to actually +use different libraries, so care should be taken that :c:expr:`FILE*` parameters +are only passed to these functions if it is certain that they were created by +the same library that the Python runtime is using. + + +.. c:function:: int Py_Main(int argc, wchar_t **argv) + + The main program for the standard interpreter. This is made available for + programs which embed Python. The *argc* and *argv* parameters should be + prepared exactly as those which are passed to a C program's :c:func:`main` + function (converted to wchar_t according to the user's locale). It is + important to note that the argument list may be modified (but the contents of + the strings pointed to by the argument list are not). The return value will + be ``0`` if the interpreter exits normally (i.e., without an exception), + ``1`` if the interpreter exits due to an exception, or ``2`` if the parameter + list does not represent a valid Python command line. + + Note that if an otherwise unhandled :exc:`SystemExit` is raised, this + function will not return ``1``, but exit the process, as long as + ``Py_InspectFlag`` is not set. + + +.. c:function:: int Py_BytesMain(int argc, char **argv) + + Similar to :c:func:`Py_Main` but *argv* is an array of bytes strings. + + .. versionadded:: 3.8 + + +.. c:function:: int PyRun_AnyFile(FILE *fp, const char *filename) + + This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, leaving + *closeit* set to ``0`` and *flags* set to ``NULL``. + + +.. c:function:: int PyRun_AnyFileFlags(FILE *fp, const char *filename, PyCompilerFlags *flags) + + This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, leaving + the *closeit* argument set to ``0``. + + +.. c:function:: int PyRun_AnyFileEx(FILE *fp, const char *filename, int closeit) + + This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, leaving + the *flags* argument set to ``NULL``. + + +.. c:function:: int PyRun_AnyFileExFlags(FILE *fp, const char *filename, int closeit, PyCompilerFlags *flags) + + If *fp* refers to a file associated with an interactive device (console or + terminal input or Unix pseudo-terminal), return the value of + :c:func:`PyRun_InteractiveLoop`, otherwise return the result of + :c:func:`PyRun_SimpleFile`. *filename* is decoded from the filesystem + encoding (:func:`sys.getfilesystemencoding`). If *filename* is ``NULL``, this + function uses ``"???"`` as the filename. + If *closeit* is true, the file is closed before + ``PyRun_SimpleFileExFlags()`` returns. + + +.. c:function:: int PyRun_SimpleString(const char *command) + + This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, + leaving the :c:struct:`PyCompilerFlags`\* argument set to ``NULL``. + + +.. c:function:: int PyRun_SimpleStringFlags(const char *command, PyCompilerFlags *flags) + + Executes the Python source code from *command* in the :mod:`__main__` module + according to the *flags* argument. If :mod:`__main__` does not already exist, it + is created. Returns ``0`` on success or ``-1`` if an exception was raised. If + there was an error, there is no way to get the exception information. For the + meaning of *flags*, see below. + + Note that if an otherwise unhandled :exc:`SystemExit` is raised, this + function will not return ``-1``, but exit the process, as long as + ``Py_InspectFlag`` is not set. + + +.. c:function:: int PyRun_SimpleFile(FILE *fp, const char *filename) + + This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, + leaving *closeit* set to ``0`` and *flags* set to ``NULL``. + + +.. c:function:: int PyRun_SimpleFileEx(FILE *fp, const char *filename, int closeit) + + This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, + leaving *flags* set to ``NULL``. + + +.. c:function:: int PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit, PyCompilerFlags *flags) + + Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is read + from *fp* instead of an in-memory string. *filename* should be the name of + the file, it is decoded from :term:`filesystem encoding and error handler`. + If *closeit* is true, the file is closed before + ``PyRun_SimpleFileExFlags()`` returns. + + .. note:: + On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, "rb")``). + Otherwise, Python may not handle script file with LF line ending correctly. + + +.. c:function:: int PyRun_InteractiveOne(FILE *fp, const char *filename) + + This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, + leaving *flags* set to ``NULL``. + + +.. c:function:: int PyRun_InteractiveOneFlags(FILE *fp, const char *filename, PyCompilerFlags *flags) + + Read and execute a single statement from a file associated with an + interactive device according to the *flags* argument. The user will be + prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the + :term:`filesystem encoding and error handler`. + + Returns ``0`` when the input was + executed successfully, ``-1`` if there was an exception, or an error code + from the :file:`errcode.h` include file distributed as part of Python if + there was a parse error. (Note that :file:`errcode.h` is not included by + :file:`Python.h`, so must be included specifically if needed.) + + +.. c:function:: int PyRun_InteractiveLoop(FILE *fp, const char *filename) + + This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` below, + leaving *flags* set to ``NULL``. + + +.. c:function:: int PyRun_InteractiveLoopFlags(FILE *fp, const char *filename, PyCompilerFlags *flags) + + Read and execute statements from a file associated with an interactive device + until EOF is reached. The user will be prompted using ``sys.ps1`` and + ``sys.ps2``. *filename* is decoded from the :term:`filesystem encoding and + error handler`. Returns ``0`` at EOF or a negative number upon failure. + + +.. c:var:: int (*PyOS_InputHook)(void) + + Can be set to point to a function with the prototype + ``int func(void)``. The function will be called when Python's + interpreter prompt is about to become idle and wait for user input + from the terminal. The return value is ignored. Overriding this + hook can be used to integrate the interpreter's prompt with other + event loops, as done in the :file:`Modules/_tkinter.c` in the + Python source code. + + +.. c:var:: char* (*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *) + + Can be set to point to a function with the prototype + ``char *func(FILE *stdin, FILE *stdout, char *prompt)``, + overriding the default function used to read a single line of input + at the interpreter's prompt. The function is expected to output + the string *prompt* if it's not ``NULL``, and then read a line of + input from the provided standard input file, returning the + resulting string. For example, The :mod:`readline` module sets + this hook to provide line-editing and tab-completion features. + + The result must be a string allocated by :c:func:`PyMem_RawMalloc` or + :c:func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred. + + .. versionchanged:: 3.4 + The result must be allocated by :c:func:`PyMem_RawMalloc` or + :c:func:`PyMem_RawRealloc`, instead of being allocated by + :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. + +.. c:function:: PyObject* PyRun_String(const char *str, int start, PyObject *globals, PyObject *locals) + + This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving + *flags* set to ``NULL``. + + +.. c:function:: PyObject* PyRun_StringFlags(const char *str, int start, PyObject *globals, PyObject *locals, PyCompilerFlags *flags) + + Execute Python source code from *str* in the context specified by the + objects *globals* and *locals* with the compiler flags specified by + *flags*. *globals* must be a dictionary; *locals* can be any object + that implements the mapping protocol. The parameter *start* specifies + the start token that should be used to parse the source code. + + Returns the result of executing the code as a Python object, or ``NULL`` if an + exception was raised. + + +.. c:function:: PyObject* PyRun_File(FILE *fp, const char *filename, int start, PyObject *globals, PyObject *locals) + + This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving + *closeit* set to ``0`` and *flags* set to ``NULL``. + + +.. c:function:: PyObject* PyRun_FileEx(FILE *fp, const char *filename, int start, PyObject *globals, PyObject *locals, int closeit) + + This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving + *flags* set to ``NULL``. + + +.. c:function:: PyObject* PyRun_FileFlags(FILE *fp, const char *filename, int start, PyObject *globals, PyObject *locals, PyCompilerFlags *flags) + + This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving + *closeit* set to ``0``. + + +.. c:function:: PyObject* PyRun_FileExFlags(FILE *fp, const char *filename, int start, PyObject *globals, PyObject *locals, int closeit, PyCompilerFlags *flags) + + Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read from + *fp* instead of an in-memory string. *filename* should be the name of the file, + it is decoded from the :term:`filesystem encoding and error handler`. + If *closeit* is true, the file is closed before :c:func:`PyRun_FileExFlags` + returns. + + +.. c:function:: PyObject* Py_CompileString(const char *str, const char *filename, int start) + + This is a simplified interface to :c:func:`Py_CompileStringFlags` below, leaving + *flags* set to ``NULL``. + + +.. c:function:: PyObject* Py_CompileStringFlags(const char *str, const char *filename, int start, PyCompilerFlags *flags) + + This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, with + *optimize* set to ``-1``. + + +.. c:function:: PyObject* Py_CompileStringObject(const char *str, PyObject *filename, int start, PyCompilerFlags *flags, int optimize) + + Parse and compile the Python source code in *str*, returning the resulting code + object. The start token is given by *start*; this can be used to constrain the + code which can be compiled and should be :const:`Py_eval_input`, + :const:`Py_file_input`, or :const:`Py_single_input`. The filename specified by + *filename* is used to construct the code object and may appear in tracebacks or + :exc:`SyntaxError` exception messages. This returns ``NULL`` if the code + cannot be parsed or compiled. + + The integer *optimize* specifies the optimization level of the compiler; a + value of ``-1`` selects the optimization level of the interpreter as given by + :option:`-O` options. Explicit levels are ``0`` (no optimization; + ``__debug__`` is true), ``1`` (asserts are removed, ``__debug__`` is false) + or ``2`` (docstrings are removed too). + + .. versionadded:: 3.4 + + +.. c:function:: PyObject* Py_CompileStringExFlags(const char *str, const char *filename, int start, PyCompilerFlags *flags, int optimize) + + Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string + decoded from the :term:`filesystem encoding and error handler`. + + .. versionadded:: 3.2 + +.. c:function:: PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals) + + This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just + the code object, and global and local variables. The other arguments are + set to ``NULL``. + + +.. c:function:: PyObject* PyEval_EvalCodeEx(PyObject *co, PyObject *globals, PyObject *locals, PyObject *const *args, int argcount, PyObject *const *kws, int kwcount, PyObject *const *defs, int defcount, PyObject *kwdefs, PyObject *closure) + + Evaluate a precompiled code object, given a particular environment for its + evaluation. This environment consists of a dictionary of global variables, + a mapping object of local variables, arrays of arguments, keywords and + defaults, a dictionary of default values for :ref:`keyword-only + <keyword-only_parameter>` arguments and a closure tuple of cells. + + +.. c:function:: PyObject* PyEval_EvalFrame(PyFrameObject *f) + + Evaluate an execution frame. This is a simplified interface to + :c:func:`PyEval_EvalFrameEx`, for backward compatibility. + + +.. c:function:: PyObject* PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) + + This is the main, unvarnished function of Python interpretation. The code + object associated with the execution frame *f* is executed, interpreting + bytecode and executing calls as needed. The additional *throwflag* + parameter can mostly be ignored - if true, then it causes an exception + to immediately be thrown; this is used for the :meth:`~generator.throw` + methods of generator objects. + + .. versionchanged:: 3.4 + This function now includes a debug assertion to help ensure that it + does not silently discard an active exception. + + +.. c:function:: int PyEval_MergeCompilerFlags(PyCompilerFlags *cf) + + This function changes the flags of the current evaluation frame, and returns + true on success, false on failure. + + +.. c:var:: int Py_eval_input + + .. index:: single: Py_CompileString() + + The start symbol from the Python grammar for isolated expressions; for use with + :c:func:`Py_CompileString`. + + +.. c:var:: int Py_file_input + + .. index:: single: Py_CompileString() + + The start symbol from the Python grammar for sequences of statements as read + from a file or other source; for use with :c:func:`Py_CompileString`. This is + the symbol to use when compiling arbitrarily long Python source code. + + +.. c:var:: int Py_single_input + + .. index:: single: Py_CompileString() + + The start symbol from the Python grammar for a single statement; for use with + :c:func:`Py_CompileString`. This is the symbol used for the interactive + interpreter loop. + + +.. c:struct:: PyCompilerFlags + + This is the structure used to hold compiler flags. In cases where code is only + being compiled, it is passed as ``int flags``, and in cases where code is being + executed, it is passed as ``PyCompilerFlags *flags``. In this case, ``from + __future__ import`` can modify *flags*. + + Whenever ``PyCompilerFlags *flags`` is ``NULL``, :attr:`cf_flags` is treated as + equal to ``0``, and any modification due to ``from __future__ import`` is + discarded. + + .. c:member:: int cf_flags + + Compiler flags. + + .. c:member:: int cf_feature_version + + *cf_feature_version* is the minor Python version. It should be + initialized to ``PY_MINOR_VERSION``. + + The field is ignored by default, it is used if and only if + ``PyCF_ONLY_AST`` flag is set in *cf_flags*. + + .. versionchanged:: 3.8 + Added *cf_feature_version* field. + + +.. c:var:: int CO_FUTURE_DIVISION + + This bit can be set in *flags* to cause division operator ``/`` to be + interpreted as "true division" according to :pep:`238`.
diff --git a/Doc/c-api/weakref.rst b/Doc/c-api/weakref.rst new file mode 100644 index 0000000..f27ec44 --- /dev/null +++ b/Doc/c-api/weakref.rst
@@ -0,0 +1,79 @@ +.. highlight:: c + +.. _weakrefobjects: + +Weak Reference Objects +---------------------- + +Python supports *weak references* as first-class objects. There are two +specific object types which directly implement weak references. The first is a +simple reference object, and the second acts as a proxy for the original object +as much as it can. + + +.. c:function:: int PyWeakref_Check(ob) + + Return true if *ob* is either a reference or proxy object. This function + always succeeds. + + +.. c:function:: int PyWeakref_CheckRef(ob) + + Return true if *ob* is a reference object. This function always succeeds. + + +.. c:function:: int PyWeakref_CheckProxy(ob) + + Return true if *ob* is a proxy object. This function always succeeds. + + +.. c:function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback) + + Return a weak reference object for the object *ob*. This will always return + a new reference, but is not guaranteed to create a new object; an existing + reference object may be returned. The second parameter, *callback*, can be a + callable object that receives notification when *ob* is garbage collected; it + should accept a single parameter, which will be the weak reference object + itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a + weakly referencable object, or if *callback* is not callable, ``None``, or + ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`. + + +.. c:function:: PyObject* PyWeakref_NewProxy(PyObject *ob, PyObject *callback) + + Return a weak reference proxy object for the object *ob*. This will always + return a new reference, but is not guaranteed to create a new object; an + existing proxy object may be returned. The second parameter, *callback*, can + be a callable object that receives notification when *ob* is garbage + collected; it should accept a single parameter, which will be the weak + reference object itself. *callback* may also be ``None`` or ``NULL``. If *ob* + is not a weakly referencable object, or if *callback* is not callable, + ``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`. + + +.. c:function:: PyObject* PyWeakref_GetObject(PyObject *ref) + + Return the referenced object from a weak reference, *ref*. If the referent is + no longer live, returns :const:`Py_None`. + + .. note:: + + This function returns a :term:`borrowed reference` to the referenced object. + This means that you should always call :c:func:`Py_INCREF` on the object + except when it cannot be destroyed before the last usage of the borrowed + reference. + + +.. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref) + + Similar to :c:func:`PyWeakref_GetObject`, but does no error checking. + + +.. c:function:: void PyObject_ClearWeakRefs(PyObject *object) + + This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler + to clear weak references. + + This iterates through the weak references for *object* and calls callbacks + for those references which have one. It returns when all callbacks have + been attempted.
diff --git a/Doc/conf.py b/Doc/conf.py new file mode 100644 index 0000000..3bd828f --- /dev/null +++ b/Doc/conf.py
@@ -0,0 +1,326 @@ +# +# Python documentation build configuration file +# +# This file is execfile()d with the current directory set to its containing dir. +# +# The contents of this file are pickled, so don't put values in the namespace +# that aren't pickleable (module imports are okay, they're removed automatically). + +import sys, os, time +sys.path.append(os.path.abspath('tools/extensions')) +sys.path.append(os.path.abspath('includes')) + +# General configuration +# --------------------- + +extensions = [ + 'asdl_highlight', + 'c_annotations', + 'escape4chm', + 'glossary_search', + 'peg_highlight', + 'pyspecific', + 'sphinx.ext.coverage', + 'sphinx.ext.doctest', +] + +# Skip if downstream redistributors haven't installed it +try: + import sphinxext.opengraph +except ImportError: + pass +else: + extensions.append('sphinxext.opengraph') + + +doctest_global_setup = ''' +try: + import _tkinter +except ImportError: + _tkinter = None +''' + +manpages_url = 'https://manpages.debian.org/{path}' + +# General substitutions. +project = 'Python' +copyright = '2001-%s, Python Software Foundation' % time.strftime('%Y') + +# We look for the Include/patchlevel.h file in the current Python source tree +# and replace the values accordingly. +import patchlevel +version, release = patchlevel.get_version_info() + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +today = '' +# Else, today_fmt is used as the format for a strftime call. +today_fmt = '%B %d, %Y' + +# By default, highlight as Python 3. +highlight_language = 'python3' + +# Minimum version of sphinx required +needs_sphinx = '3.2' + +# Ignore any .rst files in the includes/ directory; +# they're embedded in pages but not rendered individually. +# Ignore any .rst files in the venv/ directory. +exclude_patterns = ['includes/*.rst', 'venv/*', 'README.rst'] +venvdir = os.getenv('VENVDIR') +if venvdir is not None: + exclude_patterns.append(venvdir + '/*') + +nitpick_ignore = [ + # Do not error nit-picky mode builds when _SubParsersAction.add_parser cannot + # be resolved, as the method is currently undocumented. For context, see + # https://github.com/python/cpython/pull/103289. + ('py:meth', '_SubParsersAction.add_parser'), +] + +# Disable Docutils smartquotes for several translations +smartquotes_excludes = { + 'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'], +} + +# Avoid a warning with Sphinx >= 2.0 +master_doc = 'contents' + +# Allow translation of index directives +gettext_additional_targets = [ + 'index', +] + +# Options for HTML output +# ----------------------- + +# Use our custom theme. +html_theme = 'python_docs_theme' +html_theme_path = ['tools'] +html_theme_options = { + 'collapsiblesidebar': True, + 'issues_url': '/bugs.html', + 'license_url': '/license.html', + 'root_include_title': False # We use the version switcher instead. +} + +# Override stylesheet fingerprinting for Windows CHM htmlhelp to fix GH-91207 +# https://github.com/python/cpython/issues/91207 +if any('htmlhelp' in arg for arg in sys.argv): + html_style = 'pydoctheme.css' + print("\nWARNING: Windows CHM Help is no longer supported.") + print("It may be removed in the future\n") + +# Short title used e.g. for <title> HTML tags. +html_short_title = '%s Documentation' % release + +# Deployment preview information +# (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html) +repository_url = os.getenv("READTHEDOCS_GIT_CLONE_URL") +html_context = { + "is_deployment_preview": os.getenv("READTHEDOCS_VERSION_TYPE") == "external", + "repository_url": repository_url.removesuffix(".git") if repository_url else None, + "pr_id": os.getenv("READTHEDOCS_VERSION") +} + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%b %d, %Y' + +# Path to find HTML templates. +templates_path = ['tools/templates'] + +# Custom sidebar templates, filenames relative to this file. +html_sidebars = { + # Defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars + # Removes the quick search block + '**': ['localtoc.html', 'relations.html', 'customsourcelink.html'], + 'index': ['indexsidebar.html'], +} + +# Additional templates that should be rendered to pages. +html_additional_pages = { + 'download': 'download.html', + 'index': 'indexcontent.html', +} + +# Output an OpenSearch description file. +html_use_opensearch = 'https://docs.python.org/' + version + +# Additional static files. +html_static_path = ['_static', 'tools/static'] + +# Output file base name for HTML help builder. +htmlhelp_basename = 'python' + release.replace('.', '') + +# Split the index +html_split_index = True + + +# Options for LaTeX output +# ------------------------ + +latex_engine = 'xelatex' + +# Get LaTeX to handle Unicode correctly +latex_elements = { +} + +# Additional stuff for the LaTeX preamble. +latex_elements['preamble'] = r''' +\authoraddress{ + \sphinxstrong{Python Software Foundation}\\ + Email: \sphinxemail{docs@python.org} +} +\let\Verbatim=\OriginalVerbatim +\let\endVerbatim=\endOriginalVerbatim +\setcounter{tocdepth}{2} +''' + +# The paper size ('letter' or 'a4'). +latex_elements['papersize'] = 'a4' + +# The font size ('10pt', '11pt' or '12pt'). +latex_elements['pointsize'] = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, document class [howto/manual]). +_stdauthor = 'Guido van Rossum and the Python development team' +latex_documents = [ + ('c-api/index', 'c-api.tex', + 'The Python/C API', _stdauthor, 'manual'), + ('distributing/index', 'distributing.tex', + 'Distributing Python Modules', _stdauthor, 'manual'), + ('extending/index', 'extending.tex', + 'Extending and Embedding Python', _stdauthor, 'manual'), + ('installing/index', 'installing.tex', + 'Installing Python Modules', _stdauthor, 'manual'), + ('library/index', 'library.tex', + 'The Python Library Reference', _stdauthor, 'manual'), + ('reference/index', 'reference.tex', + 'The Python Language Reference', _stdauthor, 'manual'), + ('tutorial/index', 'tutorial.tex', + 'Python Tutorial', _stdauthor, 'manual'), + ('using/index', 'using.tex', + 'Python Setup and Usage', _stdauthor, 'manual'), + ('faq/index', 'faq.tex', + 'Python Frequently Asked Questions', _stdauthor, 'manual'), + ('whatsnew/' + version, 'whatsnew.tex', + 'What\'s New in Python', 'A. M. Kuchling', 'howto'), +] +# Collect all HOWTOs individually +latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex', + '', _stdauthor, 'howto') + for fn in os.listdir('howto') + if fn.endswith('.rst') and fn != 'index.rst') + +# Documents to append as an appendix to all manuals. +latex_appendices = ['glossary', 'about', 'license', 'copyright'] + +# Options for Epub output +# ----------------------- + +epub_author = 'Python Documentation Authors' +epub_publisher = 'Python Software Foundation' + +# Options for the coverage checker +# -------------------------------- + +# The coverage checker will ignore all modules/functions/classes whose names +# match any of the following regexes (using re.match). +coverage_ignore_modules = [ + r'[T|t][k|K]', + r'Tix', + r'distutils.*', +] + +coverage_ignore_functions = [ + 'test($|_)', +] + +coverage_ignore_classes = [ +] + +# Glob patterns for C source files for C API coverage, relative to this directory. +coverage_c_path = [ + '../Include/*.h', +] + +# Regexes to find C items in the source files. +coverage_c_regexes = { + 'cfunction': (r'^PyAPI_FUNC\(.*\)\s+([^_][\w_]+)'), + 'data': (r'^PyAPI_DATA\(.*\)\s+([^_][\w_]+)'), + 'macro': (r'^#define ([^_][\w_]+)\(.*\)[\s|\\]'), +} + +# The coverage checker will ignore all C items whose names match these regexes +# (using re.match) -- the keys must be the same as in coverage_c_regexes. +coverage_ignore_c_items = { +# 'cfunction': [...] +} + + +# Options for the link checker +# ---------------------------- + +linkcheck_allowed_redirects = { + # bpo-NNNN -> BPO -> GH Issues + r'https://bugs.python.org/issue\?@action=redirect&bpo=\d+': r'https://github.com/python/cpython/issues/\d+', + # GH-NNNN used to refer to pull requests + r'https://github.com/python/cpython/issues/\d+': r'https://github.com/python/cpython/pull/\d+', + # :source:`something` linking files in the repository + r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*', + # Intentional HTTP use at Misc/NEWS.d/3.5.0a1.rst + r'http://www.python.org/$': 'https://www.python.org/$', + # Used in license page, keep as is + r'https://www.zope.org/': r'https://www.zope.dev/', + # Microsoft's redirects to learn.microsoft.com + r'https://msdn.microsoft.com/.*': 'https://learn.microsoft.com/.*', + r'https://docs.microsoft.com/.*': 'https://learn.microsoft.com/.*', + r'https://go.microsoft.com/fwlink/\?LinkID=\d+': 'https://learn.microsoft.com/.*', + # Language redirects + r'https://toml.io': 'https://toml.io/en/', + r'https://www.redhat.com': 'https://www.redhat.com/en', + # Other redirects + r'https://www.boost.org/libs/.+': r'https://www.boost.org/doc/libs/\d_\d+_\d/.+', + r'https://support.microsoft.com/en-us/help/\d+': 'https://support.microsoft.com/en-us/topic/.+', + r'https://perf.wiki.kernel.org$': 'https://perf.wiki.kernel.org/index.php/Main_Page', + r'https://www.sqlite.org': 'https://www.sqlite.org/index.html', + r'https://mitpress.mit.edu/sicp$': 'https://mitpress.mit.edu/9780262510875/structure-and-interpretation-of-computer-programs/', + r'https://www.python.org/psf/': 'https://www.python.org/psf-landing/', +} + +linkcheck_anchors_ignore = [ + # ignore anchors that start with a '/', e.g. Wikipedia media files: + # https://en.wikipedia.org/wiki/Walrus#/media/File:Pacific_Walrus_-_Bull_(8247646168).jpg + r'\/.*', +] + +linkcheck_ignore = [ + # The crawler gets "Anchor not found" + r'https://developer.apple.com/documentation/.+?#.*', + r'https://devguide.python.org.+?/#.*', + r'https://github.com.+?#.*', + # Robot crawlers not allowed: "403 Client Error: Forbidden" + r'https://support.enthought.com/hc/.*', + # SSLError CertificateError, even though it is valid + r'https://unix.org/version2/whatsnew/lp64_wp.html', +] + + +# Options for extensions +# ---------------------- + +# Relative filename of the data files +refcount_file = 'data/refcounts.dat' +stable_abi_file = 'data/stable_abi.dat' + +# sphinxext-opengraph config +ogp_site_url = 'https://docs.python.org/3/' +ogp_site_name = 'Python documentation' +ogp_image = '_static/og-image.png' +ogp_custom_meta_tags = [ + '<meta property="og:image:width" content="200" />', + '<meta property="og:image:height" content="200" />', + '<meta name="theme-color" content="#3776ab" />', +]
diff --git a/Doc/constraints.txt b/Doc/constraints.txt new file mode 100644 index 0000000..66c748e --- /dev/null +++ b/Doc/constraints.txt
@@ -0,0 +1,29 @@ +# We have upper bounds on our transitive dependencies here +# To avoid new releases unexpectedly breaking our build. +# This file can be updated on an ad-hoc basis, +# though it will probably have to be updated +# whenever Doc/requirements.txt is updated. + +# Direct dependencies of Sphinx +babel<3 +colorama<0.5 +imagesize<1.5 +Jinja2<3.2 +packaging<24 +# Pygments==2.15.0 breaks CI +Pygments<2.16,!=2.15.0 +requests<3 +snowballstemmer<3 +sphinxcontrib-applehelp<1.1 +sphinxcontrib-devhelp<1.1 +sphinxcontrib-htmlhelp<2.1 +sphinxcontrib-jsmath<1.1 +sphinxcontrib-qthelp<1.1 +sphinxcontrib-serializinghtml<1.2 + +# Direct dependencies of Jinja2 (Jinja is a dependency of Sphinx, see above) +MarkupSafe<2.2 + +# Direct dependencies of sphinx-lint +polib<1.3 +regex<2024
diff --git a/Doc/contents.rst b/Doc/contents.rst new file mode 100644 index 0000000..8690de7 --- /dev/null +++ b/Doc/contents.rst
@@ -0,0 +1,31 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + Python Documentation contents +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +.. toctree:: + + whatsnew/index.rst + tutorial/index.rst + using/index.rst + reference/index.rst + library/index.rst + extending/index.rst + c-api/index.rst + distributing/index.rst + installing/index.rst + howto/index.rst + faq/index.rst + glossary.rst + + about.rst + bugs.rst + copyright.rst + license.rst + +.. to include legacy packaging docs in build + +.. toctree:: + :hidden: + + distutils/index.rst + install/index.rst
diff --git a/Doc/copyright.rst b/Doc/copyright.rst new file mode 100644 index 0000000..9b71683 --- /dev/null +++ b/Doc/copyright.rst
@@ -0,0 +1,19 @@ +********* +Copyright +********* + +Python and this documentation is: + +Copyright © 2001-2023 Python Software Foundation. All rights reserved. + +Copyright © 2000 BeOpen.com. All rights reserved. + +Copyright © 1995-2000 Corporation for National Research Initiatives. All rights +reserved. + +Copyright © 1991-1995 Stichting Mathematisch Centrum. All rights reserved. + +------- + +See :ref:`history-and-license` for complete license and permissions information. +
diff --git a/Doc/data/python3.11.abi b/Doc/data/python3.11.abi new file mode 100644 index 0000000..14ffe9c --- /dev/null +++ b/Doc/data/python3.11.abi
@@ -0,0 +1,16643 @@ +<abi-corpus path='libpython3.11.so' soname='libpython3.11.so.1.0'> + <elf-needed> + <dependency name='libpthread.so.0'/> + <dependency name='libdl.so.2'/> + <dependency name='libutil.so.1'/> + <dependency name='libm.so.6'/> + <dependency name='libc.so.6'/> + </elf-needed> + <elf-function-symbols> + <elf-symbol name='PyAIter_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyArg_Parse' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyArg_ParseTuple' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyArg_ParseTupleAndKeywords' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyArg_UnpackTuple' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyArg_VaParse' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyArg_VaParseTupleAndKeywords' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyArg_ValidateKeywordArguments' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyAsyncGen_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBool_FromLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_FillContiguousStrides' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_FillInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_FromContiguous' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_GetPointer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_IsContiguous' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_Release' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_SizeFromFormat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBuffer_ToContiguous' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArray_AsString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArray_Concat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArray_FromObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArray_FromStringAndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArray_Resize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArray_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_AsString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_AsStringAndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_Concat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_ConcatAndDel' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_DecodeEscape' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_FromFormat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_FromFormatV' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_FromObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_FromString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_FromStringAndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_Repr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCFunction_Call' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCFunction_GetFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCFunction_GetFunction' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCFunction_GetSelf' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCFunction_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCFunction_NewEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCMethod_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCallIter_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCallable_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_GetContext' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_GetDestructor' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_GetName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_GetPointer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_Import' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_IsValid' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_SetContext' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_SetDestructor' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_SetName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_SetPointer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCell_Get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCell_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCell_Set' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyClassMethod_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_Addr2Line' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_Addr2Location' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_GetCode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_NewEmpty' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_NewWithPosOnlyArgs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_Optimize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_BackslashReplaceErrors' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_Decode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_Decoder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_Encode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_Encoder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_IgnoreErrors' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_IncrementalDecoder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_IncrementalEncoder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_KnownEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_LookupError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_NameReplaceErrors' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_Register' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_RegisterError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_ReplaceErrors' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_StreamReader' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_StreamWriter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_StrictErrors' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_Unregister' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCodec_XMLCharRefReplaceErrors' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCompile_OpcodeStackEffect' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCompile_OpcodeStackEffectWithJump' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyComplex_AsCComplex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyComplex_FromCComplex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyComplex_FromDoubles' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyComplex_ImagAsDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyComplex_RealAsDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_InitIsolatedConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_InitPythonConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_Read' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_SetArgv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_SetBytesArgv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_SetBytesString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_SetString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyConfig_SetWideStringList' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContextVar_Get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContextVar_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContextVar_Reset' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContextVar_Set' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContext_Copy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContext_CopyCurrent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContext_Enter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContext_Exit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContext_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCoro_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDescr_IsData' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDescr_NewClassMethod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDescr_NewGetSet' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDescr_NewMember' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDescr_NewMethod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDescr_NewWrapper' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictProxy_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Contains' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Copy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_DelItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_DelItemString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_GetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_GetItemString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_GetItemWithError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Items' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Keys' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Merge' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_MergeFromSeq2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Next' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_SetDefault' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_SetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_SetItemString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Update' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Values' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_BadArgument' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_BadInternalCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_CheckSignals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_Display' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_ExceptionMatches' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_Fetch' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_Format' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_FormatV' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_GetExcInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_GetHandledException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_GivenExceptionMatches' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_NewException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_NewExceptionWithDoc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_NoMemory' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_NormalizeException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_Occurred' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_Print' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_PrintEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_ProgramText' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_ProgramTextObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_RangedSyntaxLocationObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_ResourceWarning' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_Restore' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetExcInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetFromErrno' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetFromErrnoWithFilename' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetFromErrnoWithFilenameObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetFromErrnoWithFilenameObjects' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetHandledException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetImportError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetImportErrorSubclass' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetInterrupt' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetInterruptEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetNone' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SetString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SyntaxLocation' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SyntaxLocationEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_SyntaxLocationObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_WarnEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_WarnExplicit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_WarnExplicitFormat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_WarnExplicitObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_WarnFormat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyErr_WriteUnraisable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_AcquireLock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_AcquireThread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_CallFunction' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_CallMethod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_CallObjectWithKeywords' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_EvalCode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_EvalCodeEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_EvalFrame' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_EvalFrameEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_GetBuiltins' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_GetFrame' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_GetFuncDesc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_GetFuncName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_GetGlobals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_GetLocals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_InitThreads' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_MergeCompilerFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_ReleaseLock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_ReleaseThread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_RestoreThread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_SaveThread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_SetProfile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_SetTrace' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEval_ThreadsInitialized' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExceptionClass_Name' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyException_GetCause' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyException_GetContext' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyException_GetTraceback' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyException_SetCause' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyException_SetContext' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyException_SetTraceback' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_FromFd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_GetLine' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_NewStdPrinter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_OpenCode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_OpenCodeObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_SetOpenCodeHook' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_WriteObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFile_WriteString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_AsDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_FromDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_FromString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_GetInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_GetMax' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_GetMin' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_Pack2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_Pack4' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_Pack8' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_Unpack2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_Unpack4' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_Unpack8' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_FastToLocals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_FastToLocalsWithError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetBack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetBuiltins' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetCode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetGenerator' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetGlobals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetLasti' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetLineNumber' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_GetLocals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_LocalsToFast' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrozenSet_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_GetAnnotations' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_GetClosure' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_GetCode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_GetDefaults' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_GetGlobals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_GetKwDefaults' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_GetModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_NewWithQualName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_SetAnnotations' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_SetClosure' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_SetDefaults' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_SetKwDefaults' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGC_Collect' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGC_Disable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGC_Enable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGC_IsEnabled' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGILState_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGILState_Ensure' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGILState_GetThisThreadState' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGILState_Release' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGen_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGen_NewWithQualName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyHash_GetFuncDef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_AddModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_AddModuleObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_AppendInittab' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ExecCodeModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ExecCodeModuleEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ExecCodeModuleObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ExecCodeModuleWithPathnames' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ExtendInittab' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_GetImporter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_GetMagicNumber' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_GetMagicTag' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_GetModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_GetModuleDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_Import' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ImportFrozenModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ImportFrozenModuleObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ImportModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ImportModuleLevel' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ImportModuleLevelObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ImportModuleNoBlock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_ReloadModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyIndex_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__abc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__ast' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__codecs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__collections' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__functools' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__imp' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__io' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__locale' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__operator' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__signal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__sre' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__stat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__string' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__symtable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__thread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__tokenize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__tracemalloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit__weakref' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_atexit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_errno' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_faulthandler' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_gc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_itertools' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_posix' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_pwd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_time' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInit_xxsubtype' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInstanceMethod_Function' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInstanceMethod_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_Delete' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_Get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_GetDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_GetID' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_Head' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_Main' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_Next' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInterpreterState_ThreadHead' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyIter_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyIter_Next' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyIter_Send' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_Append' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_AsTuple' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_GetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_GetSlice' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_Insert' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_Reverse' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_SetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_SetSlice' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_Sort' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsLongAndOverflow' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsLongLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsLongLongAndOverflow' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsSize_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsSsize_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsUnsignedLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsUnsignedLongLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsUnsignedLongLongMask' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsUnsignedLongMask' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_AsVoidPtr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromLongLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromSize_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromSsize_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromUnicodeObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromUnsignedLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromUnsignedLongLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_FromVoidPtr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_GetInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_GetItemString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_HasKey' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_HasKeyString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_Items' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_Keys' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_Length' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_SetItemString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMapping_Values' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_ReadLastObjectFromFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_ReadLongFromFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_ReadObjectFromFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_ReadObjectFromString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_ReadShortFromFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_WriteLongToFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_WriteObjectToFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMarshal_WriteObjectToString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_Calloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_Free' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_GetAllocator' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_Malloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_RawCalloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_RawFree' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_RawMalloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_RawRealloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_Realloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_SetAllocator' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMem_SetupDebugHooks' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMember_GetOne' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMember_SetOne' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMemoryView_FromBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMemoryView_FromMemory' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMemoryView_FromObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMemoryView_GetContiguous' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMethod_Function' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMethod_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMethod_Self' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModuleDef_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_AddFunctions' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_AddIntConstant' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_AddObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_AddObjectRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_AddStringConstant' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_AddType' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_Create2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_ExecDef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_FromDefAndSpec2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_GetDef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_GetDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_GetFilename' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_GetFilenameObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_GetName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_GetNameObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_GetState' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_NewObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_SetDocString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Absolute' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Add' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_And' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_AsSsize_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Divmod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Float' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_FloorDivide' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceAdd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceAnd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceFloorDivide' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceLshift' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceMatrixMultiply' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceMultiply' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceOr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlacePower' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceRemainder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceRshift' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceSubtract' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceTrueDivide' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_InPlaceXor' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Index' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Invert' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Long' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Lshift' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_MatrixMultiply' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Multiply' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Negative' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Or' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Positive' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Power' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Remainder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Rshift' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Subtract' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_ToBase' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_TrueDivide' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyNumber_Xor' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODict_DelItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODict_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODict_SetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_AfterFork' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_AfterFork_Child' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_AfterFork_Parent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_BeforeFork' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_FSPath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_InterruptOccurred' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_Readline' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_double_to_string' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_getsig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_mystricmp' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_mystrnicmp' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_setsig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_snprintf' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_string_to_double' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_strtol' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_strtoul' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_vsnprintf' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_ASCII' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_AsCharBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_AsFileDescriptor' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_AsReadBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_AsWriteBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Bytes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Call' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallFinalizer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallFinalizerFromDealloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallFunction' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallFunctionObjArgs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallMethod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallMethodObjArgs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallNoArgs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CallOneArg' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Calloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CheckBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CheckReadBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_ClearWeakRefs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_CopyData' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_DelItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_DelItemString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Dir' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Format' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Free' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GC_Del' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GC_IsFinalized' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GC_IsTracked' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GC_Track' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GC_UnTrack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GET_WEAKREFS_LISTPTR' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GenericGetAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GenericGetDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GenericSetAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GenericSetDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GetAIter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GetArenaAllocator' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GetAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GetAttrString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GetBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_GetIter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_HasAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_HasAttrString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Hash' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_HashNotImplemented' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_IS_GC' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_InitVar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_IsInstance' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_IsSubclass' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_IsTrue' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Length' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_LengthHint' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Malloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Not' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Print' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Realloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Repr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_RichCompare' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_RichCompareBool' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_SelfIter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_SetArenaAllocator' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_SetAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_SetAttrString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_SetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Str' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Type' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_Vectorcall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_VectorcallDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyObject_VectorcallMethod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyPickleBuffer_FromObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyPickleBuffer_GetBuffer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyPickleBuffer_Release' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyPreConfig_InitIsolatedConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyPreConfig_InitPythonConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_AnyFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_AnyFileEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_AnyFileExFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_AnyFileFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_File' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_FileEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_FileExFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_FileFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_InteractiveLoop' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_InteractiveLoopFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_InteractiveOne' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_InteractiveOneFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_InteractiveOneObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_SimpleFile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_SimpleFileEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_SimpleFileExFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_SimpleString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_SimpleStringFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRun_StringFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySeqIter_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Check' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Concat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Contains' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Count' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_DelItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_DelSlice' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Fast' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_GetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_GetSlice' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_In' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_InPlaceConcat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_InPlaceRepeat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Index' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Length' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_List' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Repeat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_SetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_SetSlice' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySequence_Tuple' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_Add' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_Contains' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_Discard' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_Pop' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySlice_AdjustIndices' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySlice_GetIndices' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySlice_GetIndicesEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySlice_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySlice_Unpack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyState_AddModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyState_FindModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyState_RemoveModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStaticMethod_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStatus_Error' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStatus_Exception' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStatus_Exit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStatus_IsError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStatus_IsExit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStatus_NoMemory' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStatus_Ok' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStructSequence_GetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStructSequence_InitType' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStructSequence_InitType2' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStructSequence_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStructSequence_NewType' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStructSequence_SetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySymtable_Lookup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_AddAuditHook' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_AddWarnOption' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_AddWarnOptionUnicode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_AddXOption' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_Audit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_FormatStderr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_FormatStdout' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_GetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_GetXOptions' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_HasWarnOptions' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_ResetWarnOptions' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_SetArgv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_SetArgvEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_SetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_SetPath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_WriteStderr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySys_WriteStdout' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_Delete' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_DeleteCurrent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_EnterTracing' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_Get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_GetDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_GetFrame' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_GetID' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_GetInterpreter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_LeaveTracing' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_Next' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_SetAsyncExc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThreadState_Swap' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_GetInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_ReInitTLS' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_acquire_lock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_acquire_lock_timed' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_allocate_lock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_create_key' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_delete_key' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_delete_key_value' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_exit_thread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_free_lock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_get_key_value' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_get_stacksize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_get_thread_ident' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_get_thread_native_id' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_init_thread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_release_lock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_set_key_value' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_set_stacksize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_start_new_thread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_tss_alloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_tss_create' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_tss_delete' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_tss_free' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_tss_get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_tss_is_created' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyThread_tss_set' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyToken_OneChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyToken_ThreeChars' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyToken_TwoChars' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTraceBack_Here' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTraceBack_Print' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTraceMalloc_Track' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTraceMalloc_Untrack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTuple_GetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTuple_GetSlice' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTuple_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTuple_Pack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTuple_SetItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTuple_Size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_ClearCache' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_FromModuleAndSpec' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_FromSpec' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_FromSpecWithBases' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GenericAlloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GenericNew' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GetFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GetModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GetModuleByDef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GetModuleState' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GetName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GetQualName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_GetSlot' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_IsSubtype' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_Modified' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_Ready' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_SUPPORTS_WEAKREFS' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_Create' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_GetEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_GetEnd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_GetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_GetReason' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_GetStart' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_SetEnd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_SetReason' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeDecodeError_SetStart' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_GetEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_GetEnd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_GetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_GetReason' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_GetStart' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_SetEnd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_SetReason' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeEncodeError_SetStart' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeTranslateError_GetEnd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeTranslateError_GetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeTranslateError_GetReason' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeTranslateError_GetStart' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeTranslateError_SetEnd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeTranslateError_SetReason' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeTranslateError_SetStart' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Append' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AppendAndDel' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsASCIIString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsCharmapString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsDecodedObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsDecodedUnicode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsEncodedObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsEncodedString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsEncodedUnicode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsLatin1String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsRawUnicodeEscapeString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUCS4' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUCS4Copy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUTF16String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUTF32String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUTF8' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUTF8AndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUTF8String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUnicode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUnicodeAndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsUnicodeEscapeString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsWideChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_AsWideCharString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_BuildEncodingMap' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Compare' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_CompareWithASCIIString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Concat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Contains' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_CopyCharacters' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Count' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Decode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeASCII' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeCharmap' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeFSDefault' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeFSDefaultAndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeLatin1' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeLocale' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeLocaleAndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeRawUnicodeEscape' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF16' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF16Stateful' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF32' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF32Stateful' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF7' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF7Stateful' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF8' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUTF8Stateful' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_DecodeUnicodeEscape' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_EncodeFSDefault' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_EncodeLocale' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FSConverter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FSDecoder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Fill' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Find' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FindChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Format' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromEncodedObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromFormat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromFormatV' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromKindAndData' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromOrdinal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromStringAndSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromUnicode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_FromWideChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_GetDefaultEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_GetLength' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_GetSize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_InternFromString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_InternImmortal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_InternInPlace' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_IsIdentifier' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Join' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Partition' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_RPartition' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_RSplit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_ReadChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Replace' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Resize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_RichCompare' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Split' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Splitlines' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Substring' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Tailmatch' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Translate' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_WriteChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyVectorcall_Call' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyVectorcall_Function' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyWeakref_GetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyWeakref_NewProxy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyWeakref_NewRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyWideStringList_Append' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyWideStringList_Insert' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyWrapper_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_AddPendingCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_AtExit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_BuildValue' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_BytesMain' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_CompileString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_CompileStringExFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_CompileStringFlags' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_CompileStringObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_DecRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_DecodeLocale' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_EncodeLocale' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_EndInterpreter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_EnterRecursiveCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_Exit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_ExitStatusException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_FatalError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_FdIsInteractive' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_Finalize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_FinalizeEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_FrozenMain' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GETENV' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GenericAlias' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetArgcArgv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetBuildInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetCompiler' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetCopyright' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetExecPrefix' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetPath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetPlatform' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetPrefix' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetProgramFullPath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetProgramName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetPythonHome' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetRecursionLimit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GetVersion' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_IncRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_Initialize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_InitializeEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_InitializeFromConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_Is' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_IsFalse' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_IsInitialized' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_IsNone' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_IsTrue' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_LeaveRecursiveCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_Main' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_MakePendingCalls' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_NewInterpreter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_NewRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_PreInitialize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_PreInitializeFromArgs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_PreInitializeFromBytesArgs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_ReprEnter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_ReprLeave' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_RunMain' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_SetPath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_SetProgramName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_SetPythonHome' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_SetRecursionLimit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_SetStandardStreamEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_UniversalNewlineFgets' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_VaBuildValue' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_XNewRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAST_Compile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAccu_Accumulate' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAccu_Destroy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAccu_Finish' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAccu_FinishAsList' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAccu_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArena_AddPyObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArena_Free' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArena_Malloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArena_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_BadArgument' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_CheckPositional' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_NoKeywords' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_NoKwnames' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_NoPositional' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseStack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseStackAndKeywords' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseStackAndKeywords_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseStack_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseTupleAndKeywordsFast' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseTupleAndKeywordsFast_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseTupleAndKeywords_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_ParseTuple_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_Parse_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_UnpackKeywords' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_UnpackKeywordsWithVararg' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_UnpackStack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_VaParseTupleAndKeywordsFast' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_VaParseTupleAndKeywordsFast_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_VaParseTupleAndKeywords_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArg_VaParse_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyArgv_AsWstrList' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesWriter_Alloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesWriter_Dealloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesWriter_Finish' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesWriter_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesWriter_Prepare' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesWriter_Resize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesWriter_WriteBytes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_DecodeEscape' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_Find' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_FormatEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_FromHex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_Join' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_Repeat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_Resize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytes_ReverseFind' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCode_CheckLineNumber' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCode_ConstantKey' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCode_GetExtra' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCode_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCode_SetExtra' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCode_Validate' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCodecInfo_GetIncrementalDecoder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCodecInfo_GetIncrementalEncoder' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCodec_DecodeText' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCodec_EncodeText' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCodec_Lookup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCodec_LookupTextEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyConfig_AsDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyConfig_FromDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyConfig_InitCompatConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyContext_NewHamtForTests' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCrossInterpreterData_Lookup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCrossInterpreterData_NewObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCrossInterpreterData_RegisterClass' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCrossInterpreterData_Release' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDeadline_Get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDeadline_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDebugAllocatorStats' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDictView_Intersect' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDictView_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_CheckConsistency' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_ContainsId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_Contains_KnownHash' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_DebugMallocStats' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_DelItemId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_DelItemIf' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_DelItem_KnownHash' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_GetItemIdWithError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_GetItemStringWithError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_GetItemWithError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_GetItem_KnownHash' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_HasOnlyStringKeys' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_MaybeUntrack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_MergeEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_NewPresized' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_Next' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_Pop' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_SetItemId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_SetItem_KnownHash' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyDict_SizeOf' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_BadInternalCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_ChainExceptions' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_ChainStackItem' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_CheckSignals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_CheckSignalsTstate' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_Display' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_ExceptionMatches' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_Fetch' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_Format' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_FormatFromCause' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_FormatFromCauseTstate' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_GetExcInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_GetHandledException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_GetTopmostException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_NoMemory' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_NormalizeException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_Print' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_ProgramDecodedTextObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_Restore' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_SetHandledException' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_SetKeyError' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_SetNone' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_SetObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_SetString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_StackItemToExcInfoTuple' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_TrySetFromCause' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyErr_WriteUnraisableMsg' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_AddPendingCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_EvalFrameDefault' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_GetBuiltin' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_GetBuiltinId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_GetSwitchInterval' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_RequestCodeExtraIndex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_SetProfile' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_SetSwitchInterval' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_SetTrace' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_SignalAsyncExc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_SignalReceived' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_SliceIndex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyEval_SliceIndexNotNone' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyFloat_DebugMallocStats' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyFloat_FormatAdvancedWriter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyFrame_IsEntryFrame' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyFunction_Vectorcall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyGILState_GetInterpreterStateUnsafe' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyGen_FetchStopIterationValue' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyGen_Finalize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyGen_SetStopIterationValue' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_AcquireLock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_FixupBuiltin' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_FixupExtensionObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_GetModuleAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_GetModuleAttrString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_GetModuleId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_IsInitialized' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_ReleaseLock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_SetModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_SetModuleString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterID_LookUp' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterID_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_Enable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_GetConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_GetConfigCopy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_GetEvalFrameFunc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_GetIDObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_GetMainModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_IDDecref' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_IDIncref' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_IDInitref' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_LookUpID' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_RequireIDRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_RequiresIDRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_SetConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterState_SetEvalFrameFunc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyList_DebugMallocStats' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyList_Extend' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_AsByteArray' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_AsInt' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_AsTime_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_Copy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_DivmodNear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FileDescriptor_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_Format' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FormatAdvancedWriter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FormatBytesWriter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FormatWriter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_Frexp' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FromByteArray' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FromBytes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FromGid' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FromTime_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_FromUid' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_GCD' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_Lshift' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_NumBits' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_Rshift' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_Sign' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_Size_t_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_UnsignedInt_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_UnsignedLongLong_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_UnsignedLong_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_UnsignedShort_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMem_GetAllocatorName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMem_GetCurrentAllocatorName' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMem_RawStrdup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMem_RawWcsdup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMem_SetDefaultAllocator' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMem_SetupAllocators' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMem_Strdup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyModuleSpec_IsInitializing' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyModule_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyModule_ClearDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyModule_CreateInitialized' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyNamespace_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyNumber_Index' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyOS_InterruptOccurred' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyOS_IsMainThread' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyOS_URandom' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyOS_URandomNonblock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_AssertFailed' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_Call' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CallFunction_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CallMethod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CallMethodId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CallMethodIdObjArgs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CallMethodId_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CallMethod_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_Call_Prepend' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CheckConsistency' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_CheckCrossInterpreterData' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_DebugMallocStats' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_DebugTypeStats' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_Dump' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_FastCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_FastCallDictTstate' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_FunctionStr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GC_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GC_NewVar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GC_Resize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GenericGetAttrWithDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GenericSetAttrWithDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GetAttrId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GetCrossInterpreterData' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GetDictPtr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GetMethod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_GetState' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_HasLen' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_IsAbstract' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_IsFreed' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_LookupAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_LookupAttrId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_LookupSpecial' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_LookupSpecialId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_MakeTpCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_New' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_NewVar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_NextNotImplemented' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_RealIsInstance' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_RealIsSubclass' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyObject_SetAttrId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyPathConfig_ClearGlobal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyPreConfig_InitCompatConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRun_AnyFileObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRun_InteractiveLoopObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRun_SimpleFileObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRuntimeState_Fini' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRuntimeState_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRuntime_Finalize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRuntime_Initialize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySequence_BytesToCharpArray' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySequence_IterSearch' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySet_NextEntry' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySet_Update' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySlice_FromIndices' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySlice_GetLongIndices' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyStack_AsDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyState_AddModule' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyStructSequence_InitType' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyStructSequence_NewType' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySys_GetAttr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySys_GetSizeOf' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_DeleteCurrent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_DeleteExcept' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_GetDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_Prealloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_SetCurrent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_Swap' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThreadState_UncheckedGet' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThread_CurrentExceptions' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThread_CurrentFrames' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyThread_at_fork_reinit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_Add' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsMicroseconds' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsMilliseconds' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsNanoseconds' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsNanosecondsObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsSecondsDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsTimespec' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsTimespec_clamp' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsTimeval' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsTimevalTime_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_AsTimeval_clamp' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_FromMillisecondsObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_FromNanoseconds' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_FromNanosecondsObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_FromSeconds' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_FromSecondsObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_FromTimespec' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_FromTimeval' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_GetMonotonicClock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_GetMonotonicClockWithInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_GetPerfCounter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_GetPerfCounterWithInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_GetSystemClock' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_GetSystemClockWithInfo' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_MulDiv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_ObjectToTime_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_ObjectToTimespec' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_ObjectToTimeval' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_gmtime' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTime_localtime' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTraceBack_FromFrame' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTraceBack_Print_Indented' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTraceMalloc_GetTraceback' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTraceback_Add' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTrash_begin' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTrash_cond' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTrash_end' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTuple_DebugMallocStats' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTuple_MaybeUntrack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyTuple_Resize' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyType_CalculateMetaclass' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyType_CheckConsistency' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyType_GetDocFromInternalDoc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyType_GetTextSignatureFromInternalDoc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyType_Lookup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyType_LookupId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyType_Name' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeTranslateError_Create' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_Dealloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_Finish' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_PrepareInternal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_PrepareKindInternal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_WriteASCIIString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_WriteChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_WriteLatin1String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_WriteStr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicodeWriter_WriteSubstring' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_AsASCIIString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_AsLatin1String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_AsUTF8String' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_AsUnicode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_CheckConsistency' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_Copy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_DecodeRawUnicodeEscapeStateful' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_DecodeUnicodeEscapeInternal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_DecodeUnicodeEscapeStateful' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_EQ' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_EncodeCharmap' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_EncodeUTF16' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_EncodeUTF32' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_EncodeUTF7' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_Equal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_EqualToASCIIId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_EqualToASCIIString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_FastCopyCharacters' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_FastFill' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_FindMaxChar' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_FormatAdvancedWriter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_FormatLong' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_FromASCII' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_FromId' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_InsertThousandsGrouping' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsAlpha' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsCaseIgnorable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsCased' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsDecimalDigit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsDigit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsLinebreak' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsLowercase' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsNumeric' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsPrintable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsTitlecase' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsUppercase' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsWhitespace' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsXidContinue' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_IsXidStart' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_JoinArray' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_Ready' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ScanIdentifier' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToDecimalDigit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToDigit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToFoldedFull' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToLowerFull' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToLowercase' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToNumeric' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToTitleFull' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToTitlecase' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToUpperFull' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_ToUppercase' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_TransformDecimalAndSpaceToASCII' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_WideCharString_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_WideCharString_Opt_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyUnicode_XStrip' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWarnings_Init' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWeakref_ClearRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWeakref_GetWeakrefCount' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWideStringList_AsList' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWideStringList_Clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWideStringList_Copy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWideStringList_Extend' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_BreakPoint' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_BuildValue_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_CheckFunctionResult' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_CheckRecursiveCall' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_ClearArgcArgv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_ClearStandardStreamEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_CoerceLegacyLocale' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_Dealloc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DecRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DecodeLocaleEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DecodeUTF8Ex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DecodeUTF8_surrogateescape' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DisplaySourceLine' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DumpASCII' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DumpDecimal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DumpExtensionModules' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DumpHexadecimal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DumpTraceback' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_DumpTracebackThreads' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_EncodeLocaleEx' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_EncodeLocaleRaw' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_EncodeUTF8Ex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_FatalErrorFormat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_FatalErrorFunc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_FatalError_TstateNULL' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_FatalRefcountErrorFunc' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_FdIsInteractive' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_FreeCharPArray' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetAllocatedBlocks' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetConfigsAsDict' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetEnv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetErrorHandler' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetForceASCII' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetLocaleEncoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetLocaleEncodingObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_GetLocaleconvNumeric' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_Get_Getpath_CodeObject' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_Gid_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_HandleSystemExit' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_HashBytes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_HashDouble' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_HashPointer' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_HashPointerRaw' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_IncRef' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_InitializeMain' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_IsCoreInitialized' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_IsFinalizing' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_IsLocaleCoercionTarget' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_LegacyLocaleDetected' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_NewInterpreter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_NewReference' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_PreInitializeFromConfig' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_PreInitializeFromPyArgv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_ResetForceASCII' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_RestoreSignals' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_SetLocaleFromEnv' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_SetProgramFullPath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_Sigset_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_SourceAsString' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_UTF8_Edit_Cost' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_Uid_Converter' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_VaBuildStack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_VaBuildStack_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_VaBuildValue_SizeT' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_WriteIndent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_WriteIndentedMargin' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_add_one_to_index_C' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_add_one_to_index_F' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_c_abs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_c_diff' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_c_neg' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_c_pow' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_c_prod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_c_quot' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_c_sum' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_closerange' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_convert_optional_to_ssize_t' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_device_encoding' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_dg_dtoa' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_dg_freedtoa' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_dg_infinity' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_dg_stdnan' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_dg_strtod' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_dup' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_fopen_obj' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_fstat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_fstat_noraise' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_get_blocking' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_get_env_flag' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_get_inheritable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_get_xoption' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_gitidentifier' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_gitversion' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_clear' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_compare_direct' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_destroy' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_foreach' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_get' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_hash_ptr' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_new' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_new_full' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_set' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_size' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_hashtable_steal' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_normpath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_open' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_open_noraise' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_parse_inf_or_nan' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_read' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_set_blocking' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_set_inheritable' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_set_inheritable_async_safe' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_stat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_str_to_int' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_strhex' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_strhex_bytes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_strhex_bytes_with_sep' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_strhex_with_sep' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_string_to_number_with_underscores' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_wfopen' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_wgetcwd' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_wreadlink' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_wrealpath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_write' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_write_noraise' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + </elf-function-symbols> + <elf-variable-symbols> + <elf-symbol name='PyAsyncGen_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBaseObject_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBool_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArrayIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyByteArray_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytesIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyBytes_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCFunction_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCMethod_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCallIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCapsule_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCell_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyClassMethodDescr_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyClassMethod_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCode_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyComplex_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContextToken_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContextVar_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyContext_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyCoro_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictItems_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictIterItem_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictIterKey_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictIterValue_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictKeys_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictProxy_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictRevIterItem_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictRevIterKey_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictRevIterValue_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDictValues_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyDict_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEllipsis_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyEnum_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ArithmeticError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_AssertionError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_AttributeError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_BaseException' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_BaseExceptionGroup' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_BlockingIOError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_BrokenPipeError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_BufferError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_BytesWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ChildProcessError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ConnectionAbortedError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ConnectionError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ConnectionRefusedError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ConnectionResetError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_DeprecationWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_EOFError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_EncodingWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_EnvironmentError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_Exception' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_FileExistsError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_FileNotFoundError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_FloatingPointError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_FutureWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_GeneratorExit' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_IOError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ImportError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ImportWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_IndentationError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_IndexError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_InterruptedError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_IsADirectoryError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_KeyError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_KeyboardInterrupt' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_LookupError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_MemoryError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ModuleNotFoundError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_NameError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_NotADirectoryError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_NotImplementedError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_OSError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_OverflowError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_PendingDeprecationWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_PermissionError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ProcessLookupError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_RecursionError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ReferenceError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ResourceWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_RuntimeError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_RuntimeWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_StopAsyncIteration' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_StopIteration' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_SyntaxError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_SyntaxWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_SystemError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_SystemExit' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_TabError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_TimeoutError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_TypeError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_UnboundLocalError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_UnicodeDecodeError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_UnicodeEncodeError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_UnicodeError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_UnicodeTranslateError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_UnicodeWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_UserWarning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ValueError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_Warning' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyExc_ZeroDivisionError' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFilter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFloat_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrame_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFrozenSet_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyFunction_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGen_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyGetSetDescr_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_FrozenModules' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyImport_Inittab' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyInstanceMethod_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyListIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyListRevIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyList_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLongRangeIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyLong_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMap_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMemberDescr_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMemoryView_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMethodDescr_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyMethod_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModuleDef_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyModule_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODictItems_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODictIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODictKeys_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODictValues_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyODict_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_InputHook' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyOS_ReadlineFunctionPointer' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyPickleBuffer_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyProperty_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRangeIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyRange_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyReversed_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySeqIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySetIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySet_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySlice_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStaticMethod_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStdPrinter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyStructSequence_UnnamedField' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PySuper_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTraceBack_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTupleIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyTuple_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyType_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicodeIter_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyUnicode_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyWrapperDescr_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='PyZip_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_BytesWarningFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_DebugFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_DontWriteBytecodeFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_FileSystemDefaultEncodeErrors' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_FileSystemDefaultEncoding' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_FrozenFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_GenericAliasType' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_HasFileSystemDefaultEncoding' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_HashRandomizationFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_IgnoreEnvironmentFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_InspectFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_InteractiveFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_IsolatedFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_NoSiteFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_NoUserSiteDirectory' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_OptimizeFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_QuietFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_UTF8Mode' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_UnbufferedStdioFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_VerboseFlag' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_Version' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='Py_hexdigits' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAsyncGenASend_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAsyncGenAThrow_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyAsyncGenWrappedValue_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyByteArray_empty_string' size='1' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyBytesIOBuffer_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyCoroWrapper_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_FrozenBootstrap' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_FrozenStdlib' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyImport_FrozenTest' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyInterpreterID_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyLong_DigitValue' size='256' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyManagedBuffer_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyMethodWrapper_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyNamespace_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyNone_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyNotImplemented_Type' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyOS_ReadlineTState' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyParser_TokenNames' size='520' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyRuntime' size='166688' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PySet_Dummy' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWeakref_CallableProxyType' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWeakref_ProxyType' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_PyWeakref_RefType' size='408' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_EllipsisObject' size='16' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_FalseStruct' size='32' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_HasFileSystemDefaultEncodeErrors' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_HashSecret' size='24' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_NoneStruct' size='16' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_NotImplementedStruct' size='16' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_PackageContext' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_SwappedOp' size='24' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_TrueStruct' size='32' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_UnhandledKeyboardInterrupt' size='4' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_ascii_whitespace' size='128' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_ctype_table' size='1024' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_ctype_tolower' size='256' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_ctype_toupper' size='256' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + <elf-symbol name='_Py_tracemalloc_config' size='12' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/> + </elf-variable-symbols> + <abi-instr version='1.0' address-size='64' path='./Modules/getbuildinfo.c' comp-dir-path='/src' language='LANG_C99'> + <type-decl name='char' size-in-bits='8' id='type-id-1'/> + <qualified-type-def type-id='type-id-1' const='yes' id='type-id-2'/> + <pointer-type-def type-id='type-id-2' size-in-bits='64' id='type-id-3'/> + <function-decl name='_Py_gitidentifier' mangled-name='_Py_gitidentifier' filepath='./Modules/getbuildinfo.c' line='59' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_gitidentifier'> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='_Py_gitversion' mangled-name='_Py_gitversion' filepath='./Modules/getbuildinfo.c' line='53' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_gitversion'> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='Py_GetBuildInfo' mangled-name='Py_GetBuildInfo' filepath='./Modules/getbuildinfo.c' line='35' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetBuildInfo'> + <return type-id='type-id-3'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Parser/token.c' comp-dir-path='/src' language='LANG_C99'> + <qualified-type-def type-id='type-id-3' const='yes' id='type-id-4'/> + + <array-type-def dimensions='1' type-id='type-id-4' size-in-bits='infinite' id='type-id-5'> + <subrange length='infinite' id='type-id-6'/> + + </array-type-def> + <qualified-type-def type-id='type-id-5' const='yes' id='type-id-7'/> + <var-decl name='_PyParser_TokenNames' type-id='type-id-7' mangled-name='_PyParser_TokenNames' visibility='default' filepath='./Include/token.h' line='88' column='1' elf-symbol-id='_PyParser_TokenNames'/> + <type-decl name='int' size-in-bits='32' id='type-id-8'/> + <function-decl name='PyToken_ThreeChars' mangled-name='PyToken_ThreeChars' filepath='Parser/token.c' line='194' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyToken_ThreeChars'> + <parameter type-id='type-id-8' name='c1' filepath='Parser/token.c' line='194' column='1'/> + <parameter type-id='type-id-8' name='c2' filepath='Parser/token.c' line='194' column='1'/> + <parameter type-id='type-id-8' name='c3' filepath='Parser/token.c' line='194' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyToken_TwoChars' mangled-name='PyToken_TwoChars' filepath='Parser/token.c' line='110' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyToken_TwoChars'> + <parameter type-id='type-id-8' name='c1' filepath='Parser/token.c' line='110' column='1'/> + <parameter type-id='type-id-8' name='c2' filepath='Parser/token.c' line='110' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyToken_OneChar' mangled-name='PyToken_OneChar' filepath='Parser/token.c' line='79' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyToken_OneChar'> + <parameter type-id='type-id-8' name='c1' filepath='Parser/token.c' line='79' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Parser/myreadline.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='_ts' size-in-bits='2880' is-struct='yes' visibility='default' filepath='./Include/cpython/pystate.h' line='82' column='1' id='type-id-9'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='prev' type-id='type-id-10' visibility='default' filepath='./Include/cpython/pystate.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='next' type-id='type-id-10' visibility='default' filepath='./Include/cpython/pystate.h' line='86' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='interp' type-id='type-id-11' visibility='default' filepath='./Include/cpython/pystate.h' line='87' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='_initialized' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='_static' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='96' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='recursion_remaining' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='98' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='recursion_limit' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='99' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='recursion_headroom' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='352'> + <var-decl name='tracing' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='105' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='tracing_what' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='106' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='cframe' type-id='type-id-12' visibility='default' filepath='./Include/cpython/pystate.h' line='110' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='c_profilefunc' type-id='type-id-13' visibility='default' filepath='./Include/cpython/pystate.h' line='112' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='c_tracefunc' type-id='type-id-13' visibility='default' filepath='./Include/cpython/pystate.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='c_profileobj' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='c_traceobj' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='curexc_type' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='118' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='curexc_value' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='119' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='curexc_traceback' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='120' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='exc_info' type-id='type-id-15' visibility='default' filepath='./Include/cpython/pystate.h' line='125' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='dict' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='127' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='gilstate_counter' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='129' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1152'> + <var-decl name='async_exc' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='131' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='thread_id' type-id='type-id-16' visibility='default' filepath='./Include/cpython/pystate.h' line='132' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='native_thread_id' type-id='type-id-16' visibility='default' filepath='./Include/cpython/pystate.h' line='138' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='trash_delete_nesting' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='140' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='trash_delete_later' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='141' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='on_delete' type-id='type-id-17' visibility='default' filepath='./Include/cpython/pystate.h' line='166' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='on_delete_data' type-id='type-id-18' visibility='default' filepath='./Include/cpython/pystate.h' line='167' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1600'> + <var-decl name='coroutine_origin_tracking_depth' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='169' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1664'> + <var-decl name='async_gen_firstiter' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1728'> + <var-decl name='async_gen_finalizer' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1792'> + <var-decl name='context' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='174' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='context_ver' type-id='type-id-19' visibility='default' filepath='./Include/cpython/pystate.h' line='175' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1920'> + <var-decl name='id' type-id='type-id-19' visibility='default' filepath='./Include/cpython/pystate.h' line='178' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1984'> + <var-decl name='trace_info' type-id='type-id-20' visibility='default' filepath='./Include/cpython/pystate.h' line='180' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2368'> + <var-decl name='datastack_chunk' type-id='type-id-21' visibility='default' filepath='./Include/cpython/pystate.h' line='182' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2432'> + <var-decl name='datastack_top' type-id='type-id-22' visibility='default' filepath='./Include/cpython/pystate.h' line='183' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2496'> + <var-decl name='datastack_limit' type-id='type-id-22' visibility='default' filepath='./Include/cpython/pystate.h' line='184' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2560'> + <var-decl name='exc_state' type-id='type-id-23' visibility='default' filepath='./Include/cpython/pystate.h' line='199' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2688'> + <var-decl name='root_cframe' type-id='type-id-24' visibility='default' filepath='./Include/cpython/pystate.h' line='202' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyThreadState' type-id='type-id-9' filepath='./Include/pytypedefs.h' line='24' column='1' id='type-id-25'/> + <pointer-type-def type-id='type-id-25' size-in-bits='64' id='type-id-10'/> + <class-decl name='_is' size-in-bits='862016' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_interp.h' line='78' column='1' id='type-id-26'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='next' type-id='type-id-11' visibility='default' filepath='./Include/internal/pycore_interp.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='threads' type-id='type-id-27' visibility='default' filepath='./Include/internal/pycore_interp.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='runtime' type-id='type-id-28' visibility='default' filepath='./Include/internal/pycore_interp.h' line='98' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='id' type-id='type-id-29' visibility='default' filepath='./Include/internal/pycore_interp.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='id_refcount' type-id='type-id-29' visibility='default' filepath='./Include/internal/pycore_interp.h' line='101' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='requires_idref' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='102' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='id_mutex' type-id='type-id-30' visibility='default' filepath='./Include/internal/pycore_interp.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='_initialized' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='109' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='672'> + <var-decl name='finalizing' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='110' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='_static' type-id='type-id-31' visibility='default' filepath='./Include/internal/pycore_interp.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='ceval' type-id='type-id-32' visibility='default' filepath='./Include/internal/pycore_interp.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5184'> + <var-decl name='gc' type-id='type-id-33' visibility='default' filepath='./Include/internal/pycore_interp.h' line='116' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7104'> + <var-decl name='modules' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='119' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7168'> + <var-decl name='modules_by_index' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='120' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7232'> + <var-decl name='sysdict' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='122' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7296'> + <var-decl name='builtins' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='124' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7360'> + <var-decl name='importlib' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='126' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7424'> + <var-decl name='override_frozen_modules' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='129' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7488'> + <var-decl name='codec_search_path' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='131' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7552'> + <var-decl name='codec_search_cache' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='132' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7616'> + <var-decl name='codec_error_registry' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='133' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7680'> + <var-decl name='codecs_initialized' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='134' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7744'> + <var-decl name='config' type-id='type-id-34' visibility='default' filepath='./Include/internal/pycore_interp.h' line='136' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11136'> + <var-decl name='dlopenflags' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='138' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11200'> + <var-decl name='dict' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='141' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11264'> + <var-decl name='builtins_copy' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='143' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11328'> + <var-decl name='import_func' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='144' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11392'> + <var-decl name='eval_frame' type-id='type-id-35' visibility='default' filepath='./Include/internal/pycore_interp.h' line='146' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11456'> + <var-decl name='co_extra_user_count' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_interp.h' line='148' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11520'> + <var-decl name='co_extra_freefuncs' type-id='type-id-37' visibility='default' filepath='./Include/internal/pycore_interp.h' line='149' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='27840'> + <var-decl name='before_forkers' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='152' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='27904'> + <var-decl name='after_forkers_parent' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='153' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='27968'> + <var-decl name='after_forkers_child' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='154' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28032'> + <var-decl name='warnings' type-id='type-id-38' visibility='default' filepath='./Include/internal/pycore_interp.h' line='157' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28288'> + <var-decl name='atexit' type-id='type-id-39' visibility='default' filepath='./Include/internal/pycore_interp.h' line='158' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28416'> + <var-decl name='audit_hooks' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='160' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28480'> + <var-decl name='unicode' type-id='type-id-40' visibility='default' filepath='./Include/internal/pycore_interp.h' line='162' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28864'> + <var-decl name='float_state' type-id='type-id-41' visibility='default' filepath='./Include/internal/pycore_interp.h' line='163' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28992'> + <var-decl name='slice_cache' type-id='type-id-42' visibility='default' filepath='./Include/internal/pycore_interp.h' line='166' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='29056'> + <var-decl name='tuple' type-id='type-id-43' visibility='default' filepath='./Include/internal/pycore_interp.h' line='168' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='30976'> + <var-decl name='list' type-id='type-id-44' visibility='default' filepath='./Include/internal/pycore_interp.h' line='169' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='36160'> + <var-decl name='dict_state' type-id='type-id-45' visibility='default' filepath='./Include/internal/pycore_interp.h' line='170' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='46528'> + <var-decl name='async_gen' type-id='type-id-46' visibility='default' filepath='./Include/internal/pycore_interp.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='56896'> + <var-decl name='context' type-id='type-id-47' visibility='default' filepath='./Include/internal/pycore_interp.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='57024'> + <var-decl name='exc_state' type-id='type-id-48' visibility='default' filepath='./Include/internal/pycore_interp.h' line='173' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='57280'> + <var-decl name='ast' type-id='type-id-49' visibility='default' filepath='./Include/internal/pycore_interp.h' line='175' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='72448'> + <var-decl name='type_cache' type-id='type-id-50' visibility='default' filepath='./Include/internal/pycore_interp.h' line='176' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='858880'> + <var-decl name='callable_cache' type-id='type-id-51' visibility='default' filepath='./Include/internal/pycore_interp.h' line='177' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='859072'> + <var-decl name='int_max_str_digits' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='179' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='859136'> + <var-decl name='_initial_thread' type-id='type-id-25' visibility='default' filepath='./Include/internal/pycore_interp.h' line='192' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyInterpreterState' type-id='type-id-26' filepath='./Include/pytypedefs.h' line='25' column='1' id='type-id-52'/> + <pointer-type-def type-id='type-id-52' size-in-bits='64' id='type-id-11'/> + <class-decl name='pythreads' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_interp.h' line='82' column='1' id='type-id-27'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='next_unique_id' type-id='type-id-19' visibility='default' filepath='./Include/internal/pycore_interp.h' line='83' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='head' type-id='type-id-10' visibility='default' filepath='./Include/internal/pycore_interp.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='count' type-id='type-id-53' visibility='default' filepath='./Include/internal/pycore_interp.h' line='87' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='stacksize' type-id='type-id-54' visibility='default' filepath='./Include/internal/pycore_interp.h' line='92' column='1'/> + </data-member> + </class-decl> + <type-decl name='unsigned long int' size-in-bits='64' id='type-id-16'/> + <typedef-decl name='__uint64_t' type-id='type-id-16' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='45' column='1' id='type-id-55'/> + <typedef-decl name='uint64_t' type-id='type-id-55' filepath='/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h' line='27' column='1' id='type-id-19'/> + <type-decl name='long int' size-in-bits='64' id='type-id-53'/> + <typedef-decl name='size_t' type-id='type-id-16' filepath='/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h' line='209' column='1' id='type-id-54'/> + <class-decl name='pyruntimestate' size-in-bits='1333504' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='59' column='1' id='type-id-56'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_initialized' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='preinitializing' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='preinitialized' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='core_initialized' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='73' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='initialized' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='76' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='_finalizing' type-id='type-id-57' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='83' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='interpreters' type-id='type-id-58' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='102' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='xidregistry' type-id='type-id-59' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='107' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='main_thread' type-id='type-id-16' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='109' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='exitfuncs' type-id='type-id-60' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='112' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2752'> + <var-decl name='nexitfuncs' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2816'> + <var-decl name='ceval' type-id='type-id-61' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4544'> + <var-decl name='gilstate' type-id='type-id-62' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='116' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4800'> + <var-decl name='preconfig' type-id='type-id-63' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='118' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5120'> + <var-decl name='open_code_hook' type-id='type-id-64' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='122' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5184'> + <var-decl name='open_code_userdata' type-id='type-id-18' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='123' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5248'> + <var-decl name='audit_hook_head' type-id='type-id-65' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='124' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5312'> + <var-decl name='unicode_ids' type-id='type-id-66' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='126' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5440'> + <var-decl name='global_objects' type-id='type-id-67' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='129' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='471488'> + <var-decl name='_main_interpreter' type-id='type-id-52' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='146' column='1'/> + </data-member> + </class-decl> + <class-decl name='_Py_atomic_address' size-in-bits='64' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_atomic.h' line='45' column='1' id='type-id-68'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_value' type-id='type-id-69' visibility='default' filepath='./Include/internal/pycore_atomic.h' line='46' column='1'/> + </data-member> + </class-decl> + <type-decl name='atomic_uintptr_t' size-in-bits='64' id='type-id-69'/> + <typedef-decl name='_Py_atomic_address' type-id='type-id-68' filepath='./Include/internal/pycore_atomic.h' line='47' column='1' id='type-id-57'/> + <class-decl name='pyinterpreters' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='85' column='1' id='type-id-58'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='mutex' type-id='type-id-30' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='86' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='head' type-id='type-id-11' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='88' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='main' type-id='type-id-11' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='92' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='next_id' type-id='type-id-29' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='101' column='1'/> + </data-member> + </class-decl> + <type-decl name='void' id='type-id-70'/> + <pointer-type-def type-id='type-id-70' size-in-bits='64' id='type-id-18'/> + <typedef-decl name='PyThread_type_lock' type-id='type-id-18' filepath='./Include/pythread.h' line='4' column='1' id='type-id-30'/> + <typedef-decl name='__int64_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='44' column='1' id='type-id-71'/> + <typedef-decl name='int64_t' type-id='type-id-71' filepath='/usr/include/x86_64-linux-gnu/bits/stdint-intn.h' line='27' column='1' id='type-id-29'/> + <class-decl name='_xidregistry' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='104' column='1' id='type-id-59'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='mutex' type-id='type-id-30' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='105' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='head' type-id='type-id-72' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='106' column='1'/> + </data-member> + </class-decl> + <class-decl name='_xidregitem' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_interp.h' line='210' column='1' id='type-id-73'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='cls' type-id='type-id-74' visibility='default' filepath='./Include/internal/pycore_interp.h' line='211' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='getdata' type-id='type-id-75' visibility='default' filepath='./Include/internal/pycore_interp.h' line='212' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='next' type-id='type-id-72' visibility='default' filepath='./Include/internal/pycore_interp.h' line='213' column='1'/> + </data-member> + </class-decl> + <class-decl name='_typeobject' size-in-bits='3264' is-struct='yes' visibility='default' filepath='./Include/cpython/object.h' line='148' column='1' id='type-id-76'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-77' visibility='default' filepath='./Include/cpython/object.h' line='149' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='tp_name' type-id='type-id-3' visibility='default' filepath='./Include/cpython/object.h' line='150' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='tp_basicsize' type-id='type-id-36' visibility='default' filepath='./Include/cpython/object.h' line='151' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='tp_itemsize' type-id='type-id-36' visibility='default' filepath='./Include/cpython/object.h' line='151' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='tp_dealloc' type-id='type-id-78' visibility='default' filepath='./Include/cpython/object.h' line='155' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='tp_vectorcall_offset' type-id='type-id-36' visibility='default' filepath='./Include/cpython/object.h' line='156' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='tp_getattr' type-id='type-id-79' visibility='default' filepath='./Include/cpython/object.h' line='157' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='tp_setattr' type-id='type-id-80' visibility='default' filepath='./Include/cpython/object.h' line='158' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='tp_as_async' type-id='type-id-81' visibility='default' filepath='./Include/cpython/object.h' line='159' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='tp_repr' type-id='type-id-82' visibility='default' filepath='./Include/cpython/object.h' line='161' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='tp_as_number' type-id='type-id-83' visibility='default' filepath='./Include/cpython/object.h' line='165' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='tp_as_sequence' type-id='type-id-84' visibility='default' filepath='./Include/cpython/object.h' line='166' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='tp_as_mapping' type-id='type-id-85' visibility='default' filepath='./Include/cpython/object.h' line='167' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='tp_hash' type-id='type-id-86' visibility='default' filepath='./Include/cpython/object.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='tp_call' type-id='type-id-87' visibility='default' filepath='./Include/cpython/object.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='tp_str' type-id='type-id-82' visibility='default' filepath='./Include/cpython/object.h' line='173' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1152'> + <var-decl name='tp_getattro' type-id='type-id-88' visibility='default' filepath='./Include/cpython/object.h' line='174' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='tp_setattro' type-id='type-id-89' visibility='default' filepath='./Include/cpython/object.h' line='175' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='tp_as_buffer' type-id='type-id-90' visibility='default' filepath='./Include/cpython/object.h' line='178' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='tp_flags' type-id='type-id-16' visibility='default' filepath='./Include/cpython/object.h' line='181' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='tp_doc' type-id='type-id-3' visibility='default' filepath='./Include/cpython/object.h' line='183' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='tp_traverse' type-id='type-id-91' visibility='default' filepath='./Include/cpython/object.h' line='187' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='tp_clear' type-id='type-id-92' visibility='default' filepath='./Include/cpython/object.h' line='190' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1600'> + <var-decl name='tp_richcompare' type-id='type-id-93' visibility='default' filepath='./Include/cpython/object.h' line='194' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1664'> + <var-decl name='tp_weaklistoffset' type-id='type-id-36' visibility='default' filepath='./Include/cpython/object.h' line='197' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1728'> + <var-decl name='tp_iter' type-id='type-id-94' visibility='default' filepath='./Include/cpython/object.h' line='200' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1792'> + <var-decl name='tp_iternext' type-id='type-id-95' visibility='default' filepath='./Include/cpython/object.h' line='201' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='tp_methods' type-id='type-id-96' visibility='default' filepath='./Include/cpython/object.h' line='204' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1920'> + <var-decl name='tp_members' type-id='type-id-97' visibility='default' filepath='./Include/cpython/object.h' line='205' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1984'> + <var-decl name='tp_getset' type-id='type-id-98' visibility='default' filepath='./Include/cpython/object.h' line='206' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2048'> + <var-decl name='tp_base' type-id='type-id-74' visibility='default' filepath='./Include/cpython/object.h' line='208' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2112'> + <var-decl name='tp_dict' type-id='type-id-14' visibility='default' filepath='./Include/cpython/object.h' line='209' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2176'> + <var-decl name='tp_descr_get' type-id='type-id-99' visibility='default' filepath='./Include/cpython/object.h' line='210' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2240'> + <var-decl name='tp_descr_set' type-id='type-id-100' visibility='default' filepath='./Include/cpython/object.h' line='211' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2304'> + <var-decl name='tp_dictoffset' type-id='type-id-36' visibility='default' filepath='./Include/cpython/object.h' line='212' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2368'> + <var-decl name='tp_init' type-id='type-id-101' visibility='default' filepath='./Include/cpython/object.h' line='213' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2432'> + <var-decl name='tp_alloc' type-id='type-id-102' visibility='default' filepath='./Include/cpython/object.h' line='214' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2496'> + <var-decl name='tp_new' type-id='type-id-103' visibility='default' filepath='./Include/cpython/object.h' line='215' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2560'> + <var-decl name='tp_free' type-id='type-id-104' visibility='default' filepath='./Include/cpython/object.h' line='216' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2624'> + <var-decl name='tp_is_gc' type-id='type-id-92' visibility='default' filepath='./Include/cpython/object.h' line='217' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2688'> + <var-decl name='tp_bases' type-id='type-id-14' visibility='default' filepath='./Include/cpython/object.h' line='218' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2752'> + <var-decl name='tp_mro' type-id='type-id-14' visibility='default' filepath='./Include/cpython/object.h' line='219' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2816'> + <var-decl name='tp_cache' type-id='type-id-14' visibility='default' filepath='./Include/cpython/object.h' line='220' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2880'> + <var-decl name='tp_subclasses' type-id='type-id-14' visibility='default' filepath='./Include/cpython/object.h' line='221' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2944'> + <var-decl name='tp_weaklist' type-id='type-id-14' visibility='default' filepath='./Include/cpython/object.h' line='222' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3008'> + <var-decl name='tp_del' type-id='type-id-78' visibility='default' filepath='./Include/cpython/object.h' line='223' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3072'> + <var-decl name='tp_version_tag' type-id='type-id-105' visibility='default' filepath='./Include/cpython/object.h' line='226' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3136'> + <var-decl name='tp_finalize' type-id='type-id-78' visibility='default' filepath='./Include/cpython/object.h' line='228' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3200'> + <var-decl name='tp_vectorcall' type-id='type-id-106' visibility='default' filepath='./Include/cpython/object.h' line='229' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-77' visibility='default' filepath='./Include/object.h' line='109' column='1' id='type-id-107'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/object.h' line='110' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ob_size' type-id='type-id-36' visibility='default' filepath='./Include/object.h' line='111' column='1'/> + </data-member> + </class-decl> + <class-decl name='_object' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/object.h' line='100' column='1' id='type-id-109'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_refcnt' type-id='type-id-36' visibility='default' filepath='./Include/object.h' line='102' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ob_type' type-id='type-id-74' visibility='default' filepath='./Include/object.h' line='103' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='__ssize_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='193' column='1' id='type-id-110'/> + <typedef-decl name='ssize_t' type-id='type-id-110' filepath='/usr/include/x86_64-linux-gnu/sys/types.h' line='108' column='1' id='type-id-111'/> + <typedef-decl name='Py_ssize_t' type-id='type-id-111' filepath='./Include/pyport.h' line='131' column='1' id='type-id-36'/> + <typedef-decl name='PyTypeObject' type-id='type-id-76' filepath='./Include/pytypedefs.h' line='20' column='1' id='type-id-112'/> + <pointer-type-def type-id='type-id-112' size-in-bits='64' id='type-id-74'/> + <typedef-decl name='PyObject' type-id='type-id-109' filepath='./Include/pytypedefs.h' line='18' column='1' id='type-id-108'/> + <typedef-decl name='PyVarObject' type-id='type-id-107' filepath='./Include/object.h' line='112' column='1' id='type-id-77'/> + <pointer-type-def type-id='type-id-108' size-in-bits='64' id='type-id-14'/> + <pointer-type-def type-id='type-id-113' size-in-bits='64' id='type-id-114'/> + <typedef-decl name='destructor' type-id='type-id-114' filepath='./Include/object.h' line='213' column='1' id='type-id-78'/> + <pointer-type-def type-id='type-id-1' size-in-bits='64' id='type-id-115'/> + <pointer-type-def type-id='type-id-116' size-in-bits='64' id='type-id-117'/> + <typedef-decl name='getattrfunc' type-id='type-id-117' filepath='./Include/object.h' line='214' column='1' id='type-id-79'/> + <pointer-type-def type-id='type-id-118' size-in-bits='64' id='type-id-119'/> + <typedef-decl name='setattrfunc' type-id='type-id-119' filepath='./Include/object.h' line='216' column='1' id='type-id-80'/> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-120' visibility='default' filepath='./Include/cpython/object.h' line='130' column='1' id='type-id-121'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='am_await' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='131' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='am_aiter' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='132' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='am_anext' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='133' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='am_send' type-id='type-id-123' visibility='default' filepath='./Include/cpython/object.h' line='134' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-124' size-in-bits='64' id='type-id-125'/> + <typedef-decl name='unaryfunc' type-id='type-id-125' filepath='./Include/object.h' line='196' column='1' id='type-id-122'/> + <type-decl name='unnamed-enum-underlying-type' is-anonymous='yes' size-in-bits='32' alignment-in-bits='32' id='type-id-126'/> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/object.h' line='676' column='1' id='type-id-127'> + <underlying-type type-id='type-id-126'/> + <enumerator name='PYGEN_RETURN' value='0'/> + <enumerator name='PYGEN_ERROR' value='-1'/> + <enumerator name='PYGEN_NEXT' value='1'/> + </enum-decl> + <typedef-decl name='PySendResult' type-id='type-id-127' filepath='./Include/object.h' line='680' column='1' id='type-id-128'/> + <pointer-type-def type-id='type-id-14' size-in-bits='64' id='type-id-22'/> + <pointer-type-def type-id='type-id-129' size-in-bits='64' id='type-id-130'/> + <typedef-decl name='sendfunc' type-id='type-id-130' filepath='./Include/cpython/object.h' line='128' column='1' id='type-id-123'/> + <typedef-decl name='PyAsyncMethods' type-id='type-id-121' filepath='./Include/cpython/object.h' line='135' column='1' id='type-id-120'/> + <pointer-type-def type-id='type-id-120' size-in-bits='64' id='type-id-81'/> + <typedef-decl name='reprfunc' type-id='type-id-125' filepath='./Include/object.h' line='218' column='1' id='type-id-82'/> + <class-decl name='__anonymous_struct__' size-in-bits='2304' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-131' visibility='default' filepath='./Include/cpython/object.h' line='61' column='1' id='type-id-132'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='nb_add' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='66' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='nb_subtract' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='nb_multiply' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='nb_remainder' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='nb_divmod' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='nb_power' type-id='type-id-87' visibility='default' filepath='./Include/cpython/object.h' line='71' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='nb_negative' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='72' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='nb_positive' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='73' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='nb_absolute' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='nb_bool' type-id='type-id-92' visibility='default' filepath='./Include/cpython/object.h' line='75' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='nb_invert' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='76' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='nb_lshift' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='nb_rshift' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='nb_and' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='79' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='nb_xor' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='nb_or' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='81' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='nb_int' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='82' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='nb_reserved' type-id='type-id-18' visibility='default' filepath='./Include/cpython/object.h' line='83' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1152'> + <var-decl name='nb_float' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='84' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='nb_inplace_add' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='86' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='nb_inplace_subtract' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='87' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='nb_inplace_multiply' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='88' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='nb_inplace_remainder' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='89' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='nb_inplace_power' type-id='type-id-87' visibility='default' filepath='./Include/cpython/object.h' line='90' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='nb_inplace_lshift' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='91' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1600'> + <var-decl name='nb_inplace_rshift' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='92' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1664'> + <var-decl name='nb_inplace_and' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1728'> + <var-decl name='nb_inplace_xor' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='94' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1792'> + <var-decl name='nb_inplace_or' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='95' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='nb_floor_divide' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='97' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1920'> + <var-decl name='nb_true_divide' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='98' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1984'> + <var-decl name='nb_inplace_floor_divide' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='99' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2048'> + <var-decl name='nb_inplace_true_divide' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2112'> + <var-decl name='nb_index' type-id='type-id-122' visibility='default' filepath='./Include/cpython/object.h' line='102' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2176'> + <var-decl name='nb_matrix_multiply' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='104' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2240'> + <var-decl name='nb_inplace_matrix_multiply' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='105' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-134' size-in-bits='64' id='type-id-135'/> + <typedef-decl name='binaryfunc' type-id='type-id-135' filepath='./Include/object.h' line='197' column='1' id='type-id-133'/> + <pointer-type-def type-id='type-id-136' size-in-bits='64' id='type-id-137'/> + <typedef-decl name='ternaryfunc' type-id='type-id-137' filepath='./Include/object.h' line='198' column='1' id='type-id-87'/> + <pointer-type-def type-id='type-id-138' size-in-bits='64' id='type-id-139'/> + <typedef-decl name='inquiry' type-id='type-id-139' filepath='./Include/object.h' line='199' column='1' id='type-id-92'/> + <typedef-decl name='PyNumberMethods' type-id='type-id-132' filepath='./Include/cpython/object.h' line='106' column='1' id='type-id-131'/> + <pointer-type-def type-id='type-id-131' size-in-bits='64' id='type-id-83'/> + <class-decl name='__anonymous_struct__' size-in-bits='640' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-140' visibility='default' filepath='./Include/cpython/object.h' line='108' column='1' id='type-id-141'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='sq_length' type-id='type-id-142' visibility='default' filepath='./Include/cpython/object.h' line='109' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='sq_concat' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='110' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='sq_repeat' type-id='type-id-143' visibility='default' filepath='./Include/cpython/object.h' line='111' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='sq_item' type-id='type-id-143' visibility='default' filepath='./Include/cpython/object.h' line='112' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='was_sq_slice' type-id='type-id-18' visibility='default' filepath='./Include/cpython/object.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='sq_ass_item' type-id='type-id-144' visibility='default' filepath='./Include/cpython/object.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='was_sq_ass_slice' type-id='type-id-18' visibility='default' filepath='./Include/cpython/object.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='sq_contains' type-id='type-id-145' visibility='default' filepath='./Include/cpython/object.h' line='116' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='sq_inplace_concat' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='118' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='sq_inplace_repeat' type-id='type-id-143' visibility='default' filepath='./Include/cpython/object.h' line='119' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-146' size-in-bits='64' id='type-id-147'/> + <typedef-decl name='lenfunc' type-id='type-id-147' filepath='./Include/object.h' line='200' column='1' id='type-id-142'/> + <pointer-type-def type-id='type-id-148' size-in-bits='64' id='type-id-149'/> + <typedef-decl name='ssizeargfunc' type-id='type-id-149' filepath='./Include/object.h' line='201' column='1' id='type-id-143'/> + <pointer-type-def type-id='type-id-150' size-in-bits='64' id='type-id-151'/> + <typedef-decl name='ssizeobjargproc' type-id='type-id-151' filepath='./Include/object.h' line='203' column='1' id='type-id-144'/> + <pointer-type-def type-id='type-id-152' size-in-bits='64' id='type-id-153'/> + <typedef-decl name='objobjproc' type-id='type-id-153' filepath='./Include/object.h' line='207' column='1' id='type-id-145'/> + <typedef-decl name='PySequenceMethods' type-id='type-id-141' filepath='./Include/cpython/object.h' line='120' column='1' id='type-id-140'/> + <pointer-type-def type-id='type-id-140' size-in-bits='64' id='type-id-84'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-154' visibility='default' filepath='./Include/cpython/object.h' line='122' column='1' id='type-id-155'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='mp_length' type-id='type-id-142' visibility='default' filepath='./Include/cpython/object.h' line='123' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='mp_subscript' type-id='type-id-133' visibility='default' filepath='./Include/cpython/object.h' line='124' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='mp_ass_subscript' type-id='type-id-156' visibility='default' filepath='./Include/cpython/object.h' line='125' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-157' size-in-bits='64' id='type-id-158'/> + <typedef-decl name='objobjargproc' type-id='type-id-158' filepath='./Include/object.h' line='205' column='1' id='type-id-156'/> + <typedef-decl name='PyMappingMethods' type-id='type-id-155' filepath='./Include/cpython/object.h' line='126' column='1' id='type-id-154'/> + <pointer-type-def type-id='type-id-154' size-in-bits='64' id='type-id-85'/> + <typedef-decl name='Py_hash_t' type-id='type-id-36' filepath='./Include/pyport.h' line='145' column='1' id='type-id-159'/> + <pointer-type-def type-id='type-id-160' size-in-bits='64' id='type-id-161'/> + <typedef-decl name='hashfunc' type-id='type-id-161' filepath='./Include/object.h' line='219' column='1' id='type-id-86'/> + <typedef-decl name='getattrofunc' type-id='type-id-135' filepath='./Include/object.h' line='215' column='1' id='type-id-88'/> + <typedef-decl name='setattrofunc' type-id='type-id-158' filepath='./Include/object.h' line='217' column='1' id='type-id-89'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-162' visibility='default' filepath='./Include/cpython/object.h' line='137' column='1' id='type-id-163'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='bf_getbuffer' type-id='type-id-164' visibility='default' filepath='./Include/cpython/object.h' line='138' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='bf_releasebuffer' type-id='type-id-165' visibility='default' filepath='./Include/cpython/object.h' line='139' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='640' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-166' visibility='default' filepath='./Include/pybuffer.h' line='20' column='1' id='type-id-167'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='buf' type-id='type-id-18' visibility='default' filepath='./Include/pybuffer.h' line='21' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='obj' type-id='type-id-14' visibility='default' filepath='./Include/pybuffer.h' line='22' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='len' type-id='type-id-36' visibility='default' filepath='./Include/pybuffer.h' line='23' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='itemsize' type-id='type-id-36' visibility='default' filepath='./Include/pybuffer.h' line='24' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='readonly' type-id='type-id-8' visibility='default' filepath='./Include/pybuffer.h' line='26' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='ndim' type-id='type-id-8' visibility='default' filepath='./Include/pybuffer.h' line='27' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='format' type-id='type-id-115' visibility='default' filepath='./Include/pybuffer.h' line='28' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='shape' type-id='type-id-168' visibility='default' filepath='./Include/pybuffer.h' line='29' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='strides' type-id='type-id-168' visibility='default' filepath='./Include/pybuffer.h' line='30' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='suboffsets' type-id='type-id-168' visibility='default' filepath='./Include/pybuffer.h' line='31' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='internal' type-id='type-id-18' visibility='default' filepath='./Include/pybuffer.h' line='32' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-36' size-in-bits='64' id='type-id-168'/> + <typedef-decl name='Py_buffer' type-id='type-id-167' filepath='./Include/pybuffer.h' line='33' column='1' id='type-id-166'/> + <pointer-type-def type-id='type-id-166' size-in-bits='64' id='type-id-169'/> + <pointer-type-def type-id='type-id-170' size-in-bits='64' id='type-id-171'/> + <typedef-decl name='getbufferproc' type-id='type-id-171' filepath='./Include/cpython/object.h' line='54' column='1' id='type-id-164'/> + <pointer-type-def type-id='type-id-172' size-in-bits='64' id='type-id-173'/> + <typedef-decl name='releasebufferproc' type-id='type-id-173' filepath='./Include/cpython/object.h' line='55' column='1' id='type-id-165'/> + <typedef-decl name='PyBufferProcs' type-id='type-id-163' filepath='./Include/cpython/object.h' line='140' column='1' id='type-id-162'/> + <pointer-type-def type-id='type-id-162' size-in-bits='64' id='type-id-90'/> + <pointer-type-def type-id='type-id-174' size-in-bits='64' id='type-id-175'/> + <typedef-decl name='visitproc' type-id='type-id-175' filepath='./Include/object.h' line='208' column='1' id='type-id-176'/> + <pointer-type-def type-id='type-id-177' size-in-bits='64' id='type-id-178'/> + <typedef-decl name='traverseproc' type-id='type-id-178' filepath='./Include/object.h' line='209' column='1' id='type-id-91'/> + <pointer-type-def type-id='type-id-179' size-in-bits='64' id='type-id-180'/> + <typedef-decl name='richcmpfunc' type-id='type-id-180' filepath='./Include/object.h' line='220' column='1' id='type-id-93'/> + <typedef-decl name='getiterfunc' type-id='type-id-125' filepath='./Include/object.h' line='221' column='1' id='type-id-94'/> + <typedef-decl name='iternextfunc' type-id='type-id-125' filepath='./Include/object.h' line='222' column='1' id='type-id-95'/> + <class-decl name='PyMethodDef' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/methodobject.h' line='54' column='1' id='type-id-181'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ml_name' type-id='type-id-3' visibility='default' filepath='./Include/methodobject.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ml_meth' type-id='type-id-182' visibility='default' filepath='./Include/methodobject.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ml_flags' type-id='type-id-8' visibility='default' filepath='./Include/methodobject.h' line='57' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ml_doc' type-id='type-id-3' visibility='default' filepath='./Include/methodobject.h' line='59' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyCFunction' type-id='type-id-135' filepath='./Include/methodobject.h' line='19' column='1' id='type-id-182'/> + <typedef-decl name='PyMethodDef' type-id='type-id-181' filepath='./Include/pytypedefs.h' line='14' column='1' id='type-id-183'/> + <pointer-type-def type-id='type-id-183' size-in-bits='64' id='type-id-96'/> + <class-decl name='PyMemberDef' size-in-bits='320' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-184'/> + <typedef-decl name='PyMemberDef' type-id='type-id-184' filepath='./Include/pytypedefs.h' line='16' column='1' id='type-id-185'/> + <pointer-type-def type-id='type-id-185' size-in-bits='64' id='type-id-97'/> + <class-decl name='PyGetSetDef' size-in-bits='320' is-struct='yes' visibility='default' filepath='./Include/descrobject.h' line='11' column='1' id='type-id-186'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/descrobject.h' line='12' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='get' type-id='type-id-187' visibility='default' filepath='./Include/descrobject.h' line='13' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='set' type-id='type-id-188' visibility='default' filepath='./Include/descrobject.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='doc' type-id='type-id-3' visibility='default' filepath='./Include/descrobject.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='closure' type-id='type-id-18' visibility='default' filepath='./Include/descrobject.h' line='16' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-189' size-in-bits='64' id='type-id-190'/> + <typedef-decl name='getter' type-id='type-id-190' filepath='./Include/descrobject.h' line='8' column='1' id='type-id-187'/> + <pointer-type-def type-id='type-id-191' size-in-bits='64' id='type-id-192'/> + <typedef-decl name='setter' type-id='type-id-192' filepath='./Include/descrobject.h' line='9' column='1' id='type-id-188'/> + <typedef-decl name='PyGetSetDef' type-id='type-id-186' filepath='./Include/pytypedefs.h' line='15' column='1' id='type-id-193'/> + <pointer-type-def type-id='type-id-193' size-in-bits='64' id='type-id-98'/> + <typedef-decl name='descrgetfunc' type-id='type-id-137' filepath='./Include/object.h' line='223' column='1' id='type-id-99'/> + <typedef-decl name='descrsetfunc' type-id='type-id-158' filepath='./Include/object.h' line='224' column='1' id='type-id-100'/> + <typedef-decl name='initproc' type-id='type-id-158' filepath='./Include/object.h' line='225' column='1' id='type-id-101'/> + <pointer-type-def type-id='type-id-194' size-in-bits='64' id='type-id-195'/> + <typedef-decl name='allocfunc' type-id='type-id-195' filepath='./Include/object.h' line='227' column='1' id='type-id-102'/> + <pointer-type-def type-id='type-id-196' size-in-bits='64' id='type-id-197'/> + <typedef-decl name='newfunc' type-id='type-id-197' filepath='./Include/object.h' line='226' column='1' id='type-id-103'/> + <pointer-type-def type-id='type-id-198' size-in-bits='64' id='type-id-17'/> + <typedef-decl name='freefunc' type-id='type-id-17' filepath='./Include/object.h' line='212' column='1' id='type-id-104'/> + <type-decl name='unsigned int' size-in-bits='32' id='type-id-105'/> + <qualified-type-def type-id='type-id-14' const='yes' id='type-id-199'/> + <pointer-type-def type-id='type-id-199' size-in-bits='64' id='type-id-200'/> + <pointer-type-def type-id='type-id-201' size-in-bits='64' id='type-id-202'/> + <typedef-decl name='vectorcallfunc' type-id='type-id-202' filepath='./Include/cpython/object.h' line='57' column='1' id='type-id-106'/> + <class-decl name='_xid' size-in-bits='320' is-struct='yes' visibility='default' filepath='./Include/cpython/pystate.h' line='316' column='1' id='type-id-203'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='data' type-id='type-id-18' visibility='default' filepath='./Include/cpython/pystate.h' line='320' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='obj' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='327' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='interp' type-id='type-id-29' visibility='default' filepath='./Include/cpython/pystate.h' line='337' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='new_object' type-id='type-id-204' visibility='default' filepath='./Include/cpython/pystate.h' line='342' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='free' type-id='type-id-17' visibility='default' filepath='./Include/cpython/pystate.h' line='352' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='_PyCrossInterpreterData' type-id='type-id-203' filepath='./Include/cpython/pystate.h' line='314' column='1' id='type-id-205'/> + <pointer-type-def type-id='type-id-205' size-in-bits='64' id='type-id-206'/> + <pointer-type-def type-id='type-id-207' size-in-bits='64' id='type-id-204'/> + <pointer-type-def type-id='type-id-208' size-in-bits='64' id='type-id-209'/> + <typedef-decl name='crossinterpdatafunc' type-id='type-id-209' filepath='./Include/cpython/pystate.h' line='363' column='1' id='type-id-75'/> + <pointer-type-def type-id='type-id-73' size-in-bits='64' id='type-id-72'/> + <pointer-type-def type-id='type-id-210' size-in-bits='64' id='type-id-211'/> + + <array-type-def dimensions='1' type-id='type-id-211' size-in-bits='2048' id='type-id-60'> + <subrange length='32' type-id='type-id-16' id='type-id-212'/> + + </array-type-def> + <class-decl name='_ceval_runtime_state' size-in-bits='1728' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='20' column='1' id='type-id-61'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='signals_pending' type-id='type-id-213' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='gil' type-id='type-id-214' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='26' column='1'/> + </data-member> + </class-decl> + <class-decl name='_Py_atomic_int' size-in-bits='32' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_atomic.h' line='49' column='1' id='type-id-215'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_value' type-id='type-id-216' visibility='default' filepath='./Include/internal/pycore_atomic.h' line='50' column='1'/> + </data-member> + </class-decl> + <type-decl name='atomic_int' size-in-bits='32' id='type-id-216'/> + <typedef-decl name='_Py_atomic_int' type-id='type-id-215' filepath='./Include/internal/pycore_atomic.h' line='51' column='1' id='type-id-213'/> + <class-decl name='_gil_runtime_state' size-in-bits='1664' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_gil.h' line='23' column='1' id='type-id-214'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='interval' type-id='type-id-16' visibility='default' filepath='./Include/internal/pycore_gil.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='last_holder' type-id='type-id-57' visibility='default' filepath='./Include/internal/pycore_gil.h' line='28' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='locked' type-id='type-id-213' visibility='default' filepath='./Include/internal/pycore_gil.h' line='31' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='switch_number' type-id='type-id-16' visibility='default' filepath='./Include/internal/pycore_gil.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='cond' type-id='type-id-217' visibility='default' filepath='./Include/internal/pycore_gil.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='mutex' type-id='type-id-218' visibility='default' filepath='./Include/internal/pycore_gil.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='switch_cond' type-id='type-id-217' visibility='default' filepath='./Include/internal/pycore_gil.h' line='42' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='switch_mutex' type-id='type-id-218' visibility='default' filepath='./Include/internal/pycore_gil.h' line='43' column='1'/> + </data-member> + </class-decl> + <union-decl name='__anonymous_union__' size-in-bits='384' is-anonymous='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='75' column='1' id='type-id-219'> + <data-member access='private'> + <var-decl name='__data' type-id='type-id-220' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='77' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='__size' type-id='type-id-221' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='78' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='__align' type-id='type-id-222' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='79' column='1'/> + </data-member> + </union-decl> + <class-decl name='__pthread_cond_s' size-in-bits='384' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='92' column='1' id='type-id-220'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='' type-id='type-id-223' visibility='default'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='__g_refs' type-id='type-id-224' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='112' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='__g_size' type-id='type-id-224' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='__g1_orig_size' type-id='type-id-105' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='__wrefs' type-id='type-id-105' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='__g_signals' type-id='type-id-224' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='116' column='1'/> + </data-member> + </class-decl> + <union-decl name='__anonymous_union__' size-in-bits='64' is-anonymous='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='94' column='1' id='type-id-223'> + <data-member access='private'> + <var-decl name='__wseq' type-id='type-id-225' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='96' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='__wseq32' type-id='type-id-226' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='101' column='1'/> + </data-member> + </union-decl> + <type-decl name='long long unsigned int' size-in-bits='64' id='type-id-225'/> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='97' column='1' id='type-id-226'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='__low' type-id='type-id-105' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='99' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='__high' type-id='type-id-105' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='100' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-105' size-in-bits='64' id='type-id-224'> + <subrange length='2' type-id='type-id-16' id='type-id-227'/> + + </array-type-def> + + <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='384' id='type-id-221'> + <subrange length='48' type-id='type-id-16' id='type-id-228'/> + + </array-type-def> + <type-decl name='long long int' size-in-bits='64' id='type-id-222'/> + <typedef-decl name='pthread_cond_t' type-id='type-id-219' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='80' column='1' id='type-id-217'/> + <union-decl name='__anonymous_union__' size-in-bits='320' is-anonymous='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='67' column='1' id='type-id-229'> + <data-member access='private'> + <var-decl name='__data' type-id='type-id-230' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='69' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='__size' type-id='type-id-231' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='70' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='__align' type-id='type-id-53' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='71' column='1'/> + </data-member> + </union-decl> + <class-decl name='__pthread_mutex_s' size-in-bits='320' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='22' column='1' id='type-id-230'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='__lock' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='24' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='__count' type-id='type-id-105' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='__owner' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='26' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='__nusers' type-id='type-id-105' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='28' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='__kind' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='__spins' type-id='type-id-232' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='176'> + <var-decl name='__elision' type-id='type-id-232' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='35' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='__list' type-id='type-id-233' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/struct_mutex.h' line='36' column='1'/> + </data-member> + </class-decl> + <type-decl name='short int' size-in-bits='16' id='type-id-232'/> + <class-decl name='__pthread_internal_list' size-in-bits='128' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='49' column='1' id='type-id-234'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='__prev' type-id='type-id-235' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='__next' type-id='type-id-235' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='52' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-234' size-in-bits='64' id='type-id-235'/> + <typedef-decl name='__pthread_list_t' type-id='type-id-234' filepath='/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h' line='53' column='1' id='type-id-233'/> + + <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='320' id='type-id-231'> + <subrange length='40' type-id='type-id-16' id='type-id-236'/> + + </array-type-def> + <typedef-decl name='pthread_mutex_t' type-id='type-id-229' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='72' column='1' id='type-id-218'/> + <class-decl name='_gilstate_runtime_state' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='31' column='1' id='type-id-62'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='check_enabled' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='tstate_current' type-id='type-id-57' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='autoInterpreterState' type-id='type-id-11' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='42' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='autoTSSkey' type-id='type-id-237' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='43' column='1'/> + </data-member> + </class-decl> + <class-decl name='_Py_tss_t' size-in-bits='64' is-struct='yes' visibility='default' filepath='./Include/cpython/pythread.h' line='31' column='1' id='type-id-238'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_is_initialized' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pythread.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='_key' type-id='type-id-239' visibility='default' filepath='./Include/cpython/pythread.h' line='33' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='pthread_key_t' type-id='type-id-105' filepath='/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h' line='49' column='1' id='type-id-239'/> + <typedef-decl name='Py_tss_t' type-id='type-id-238' filepath='./Include/pythread.h' line='111' column='1' id='type-id-237'/> + <class-decl name='PyPreConfig' size-in-bits='320' is-struct='yes' visibility='default' filepath='./Include/cpython/initconfig.h' line='47' column='1' id='type-id-240'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_config_init' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='48' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='parse_argv' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='isolated' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='use_environment' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='configure_locale' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='coerce_c_locale' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='81' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='coerce_c_locale_warn' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='89' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='utf8_mode' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='dev_mode' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='120' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='allocator' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='124' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyPreConfig' type-id='type-id-240' filepath='./Include/cpython/initconfig.h' line='125' column='1' id='type-id-63'/> + <typedef-decl name='Py_OpenCodeHookFunction' type-id='type-id-190' filepath='./Include/cpython/fileobject.h' line='12' column='1' id='type-id-64'/> + <class-decl name='_Py_AuditHookEntry' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='48' column='1' id='type-id-241'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='next' type-id='type-id-65' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='hookCFunction' type-id='type-id-242' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='userData' type-id='type-id-18' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='51' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-241' size-in-bits='64' id='type-id-65'/> + <pointer-type-def type-id='type-id-243' size-in-bits='64' id='type-id-244'/> + <typedef-decl name='Py_AuditHookFunction' type-id='type-id-244' filepath='./Include/cpython/sysmodule.h' line='10' column='1' id='type-id-242'/> + <typedef-decl name='_Py_AuditHookEntry' type-id='type-id-241' filepath='./Include/internal/pycore_runtime.h' line='52' column='1' id='type-id-245'/> + <class-decl name='_Py_unicode_runtime_ids' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='28' column='1' id='type-id-66'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='lock' type-id='type-id-30' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='29' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='next_index' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='32' column='1'/> + </data-member> + </class-decl> + <class-decl name='_Py_global_objects' size-in-bits='466048' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='28' column='1' id='type-id-67'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='singletons' type-id='type-id-246' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='47' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='466048' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='29' column='1' id='type-id-246'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='small_ints' type-id='type-id-247' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='35' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='67072'> + <var-decl name='bytes_empty' type-id='type-id-248' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='67392'> + <var-decl name='bytes_characters' type-id='type-id-249' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='41' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='165696'> + <var-decl name='strings' type-id='type-id-250' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='43' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='465664'> + <var-decl name='_tuple_empty_gc_not_used' type-id='type-id-251' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='45' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='465792'> + <var-decl name='tuple_empty' type-id='type-id-252' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='46' column='1'/> + </data-member> + </class-decl> + <class-decl name='_longobject' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/cpython/longintrepr.h' line='79' column='1' id='type-id-253'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-77' visibility='default' filepath='./Include/cpython/longintrepr.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ob_digit' type-id='type-id-254' visibility='default' filepath='./Include/cpython/longintrepr.h' line='81' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='__uint32_t' type-id='type-id-105' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='42' column='1' id='type-id-255'/> + <typedef-decl name='uint32_t' type-id='type-id-255' filepath='/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h' line='26' column='1' id='type-id-256'/> + <typedef-decl name='digit' type-id='type-id-256' filepath='./Include/cpython/longintrepr.h' line='43' column='1' id='type-id-257'/> + + <array-type-def dimensions='1' type-id='type-id-257' size-in-bits='32' id='type-id-254'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='PyLongObject' type-id='type-id-253' filepath='./Include/pytypedefs.h' line='19' column='1' id='type-id-259'/> + + <array-type-def dimensions='1' type-id='type-id-259' size-in-bits='67072' id='type-id-247'> + <subrange length='262' type-id='type-id-16' id='type-id-260'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='320' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-248' visibility='default' filepath='./Include/cpython/bytesobject.h' line='5' column='1' id='type-id-261'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-77' visibility='default' filepath='./Include/cpython/bytesobject.h' line='6' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ob_shash' type-id='type-id-159' visibility='default' filepath='./Include/cpython/bytesobject.h' line='7' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='ob_sval' type-id='type-id-262' visibility='default' filepath='./Include/cpython/bytesobject.h' line='8' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='8' id='type-id-262'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='PyBytesObject' type-id='type-id-261' filepath='./Include/cpython/bytesobject.h' line='15' column='1' id='type-id-248'/> + <class-decl name='__anonymous_struct__' size-in-bits='384' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='38' column='1' id='type-id-263'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob' type-id='type-id-248' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='eos' type-id='type-id-1' visibility='default' filepath='./Include/internal/pycore_global_objects.h' line='40' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-263' size-in-bits='98304' id='type-id-249'> + <subrange length='256' type-id='type-id-16' id='type-id-264'/> + + </array-type-def> + <class-decl name='_Py_global_strings' size-in-bits='299968' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='29' column='1' id='type-id-250'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='literals' type-id='type-id-265' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10112'> + <var-decl name='identifiers' type-id='type-id-266' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='359' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160704'> + <var-decl name='ascii' type-id='type-id-267' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='363' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='218048'> + <var-decl name='latin1' type-id='type-id-268' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='367' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='10112' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='30' column='1' id='type-id-265'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_anon_dictcomp' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='31' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='_anon_genexpr' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='_anon_lambda' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='_anon_listcomp' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2048'> + <var-decl name='_anon_module' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='35' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2560'> + <var-decl name='_anon_setcomp' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='36' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3072'> + <var-decl name='_anon_string' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3584'> + <var-decl name='_anon_unknown' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4096'> + <var-decl name='_close_br' type-id='type-id-272' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4544'> + <var-decl name='_comma_sep' type-id='type-id-273' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4992'> + <var-decl name='_dbl_close_br' type-id='type-id-273' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='41' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5440'> + <var-decl name='_dbl_open_br' type-id='type-id-273' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='42' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5888'> + <var-decl name='_dbl_percent' type-id='type-id-273' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='43' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6336'> + <var-decl name='_dot' type-id='type-id-272' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='44' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6784'> + <var-decl name='_dot_locals' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='45' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7296'> + <var-decl name='_empty' type-id='type-id-274' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='46' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7744'> + <var-decl name='_list_err' type-id='type-id-275' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='47' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8320'> + <var-decl name='_newline' type-id='type-id-272' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='48' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8768'> + <var-decl name='_open_br' type-id='type-id-272' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9216'> + <var-decl name='_percent' type-id='type-id-272' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9664'> + <var-decl name='_utf_8' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='51' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='31' column='1' id='type-id-269'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='31' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-278' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='31' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='384' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-277' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='72' column='1' id='type-id-279'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='146' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='length' type-id='type-id-36' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='147' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='hash' type-id='type-id-159' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='148' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='state' type-id='type-id-280' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='204' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='wstr' type-id='type-id-281' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='205' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='149' column='1' id='type-id-280'> + <data-member access='public' layout-offset-in-bits='30'> + <var-decl name='interned' type-id='type-id-105' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='158' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='27'> + <var-decl name='kind' type-id='type-id-105' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='186' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='26'> + <var-decl name='compact' type-id='type-id-105' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='191' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='25'> + <var-decl name='ascii' type-id='type-id-105' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='195' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='24'> + <var-decl name='ready' type-id='type-id-105' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='200' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='wchar_t' type-id='type-id-8' filepath='/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h' line='321' column='1' id='type-id-282'/> + <pointer-type-def type-id='type-id-282' size-in-bits='64' id='type-id-281'/> + <typedef-decl name='PyASCIIObject' type-id='type-id-279' filepath='./Include/cpython/unicodeobject.h' line='206' column='1' id='type-id-277'/> + <type-decl name='unsigned char' size-in-bits='8' id='type-id-283'/> + <typedef-decl name='__uint8_t' type-id='type-id-283' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='38' column='1' id='type-id-284'/> + <typedef-decl name='uint8_t' type-id='type-id-284' filepath='/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h' line='24' column='1' id='type-id-285'/> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='88' id='type-id-278'> + <subrange length='11' type-id='type-id-16' id='type-id-286'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='32' column='1' id='type-id-270'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-287' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='32' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='80' id='type-id-287'> + <subrange length='10' type-id='type-id-16' id='type-id-288'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='33' column='1' id='type-id-271'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-289' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='33' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='72' id='type-id-289'> + <subrange length='9' type-id='type-id-16' id='type-id-290'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='39' column='1' id='type-id-272'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-291' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='39' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='16' id='type-id-291'> + <subrange length='2' type-id='type-id-16' id='type-id-227'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='40' column='1' id='type-id-273'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-292' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='40' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='24' id='type-id-292'> + <subrange length='3' type-id='type-id-16' id='type-id-293'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='46' column='1' id='type-id-274'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='46' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-294' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='46' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='8' id='type-id-294'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='576' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='47' column='1' id='type-id-275'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='47' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-295' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='47' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='192' id='type-id-295'> + <subrange length='24' type-id='type-id-16' id='type-id-296'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='51' column='1' id='type-id-276'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-297' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='51' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='48' id='type-id-297'> + <subrange length='6' type-id='type-id-16' id='type-id-298'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='150592' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='54' column='1' id='type-id-266'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_False' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='_Py_Repr' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='_TextIOWrapper' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='57' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='_True' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='_WarningMessage' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2368'> + <var-decl name='__' type-id='type-id-272' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='60' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2816'> + <var-decl name='___IOBase_closed' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3328'> + <var-decl name='___abc_tpflags__' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='62' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3840'> + <var-decl name='___abs__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='63' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4288'> + <var-decl name='___abstractmethods__' type-id='type-id-304' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4864'> + <var-decl name='___add__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='65' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5312'> + <var-decl name='___aenter__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='66' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5824'> + <var-decl name='___aexit__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6336'> + <var-decl name='___aiter__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6848'> + <var-decl name='___all__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7296'> + <var-decl name='___and__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7744'> + <var-decl name='___anext__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='71' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8256'> + <var-decl name='___annotations__' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='72' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8768'> + <var-decl name='___args__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='73' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9280'> + <var-decl name='___await__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9792'> + <var-decl name='___bases__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='75' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10304'> + <var-decl name='___bool__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='76' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10816'> + <var-decl name='___build_class__' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11328'> + <var-decl name='___builtins__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11840'> + <var-decl name='___bytes__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='79' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12352'> + <var-decl name='___call__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12864'> + <var-decl name='___cantrace__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='81' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13376'> + <var-decl name='___class__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='82' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13888'> + <var-decl name='___class_getitem__' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='83' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14464'> + <var-decl name='___classcell__' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='84' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14976'> + <var-decl name='___complex__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='15488'> + <var-decl name='___contains__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='86' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='16000'> + <var-decl name='___copy__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='87' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='16512'> + <var-decl name='___del__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='88' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='16960'> + <var-decl name='___delattr__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='89' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='17472'> + <var-decl name='___delete__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='90' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='17984'> + <var-decl name='___delitem__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='91' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='18496'> + <var-decl name='___dict__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='92' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='19008'> + <var-decl name='___dir__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='19456'> + <var-decl name='___divmod__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='94' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='19968'> + <var-decl name='___doc__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='95' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='20416'> + <var-decl name='___enter__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='96' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='20928'> + <var-decl name='___eq__' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='97' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='21376'> + <var-decl name='___exit__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='98' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='21888'> + <var-decl name='___file__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='99' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='22400'> + <var-decl name='___float__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='22912'> + <var-decl name='___floordiv__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='101' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='23424'> + <var-decl name='___format__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='102' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='23936'> + <var-decl name='___fspath__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='24448'> + <var-decl name='___ge__' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='104' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='24896'> + <var-decl name='___get__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='105' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='25344'> + <var-decl name='___getattr__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='106' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='25856'> + <var-decl name='___getattribute__' type-id='type-id-309' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='107' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='26432'> + <var-decl name='___getinitargs__' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='108' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='26944'> + <var-decl name='___getitem__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='109' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='27456'> + <var-decl name='___getnewargs__' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='110' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='27968'> + <var-decl name='___getnewargs_ex__' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='111' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28544'> + <var-decl name='___getstate__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='112' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='29056'> + <var-decl name='___gt__' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='29504'> + <var-decl name='___hash__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='30016'> + <var-decl name='___iadd__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='30528'> + <var-decl name='___iand__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='116' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='31040'> + <var-decl name='___ifloordiv__' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='117' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='31552'> + <var-decl name='___ilshift__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='118' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32064'> + <var-decl name='___imatmul__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='119' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32576'> + <var-decl name='___imod__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='120' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='33088'> + <var-decl name='___import__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='121' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='33600'> + <var-decl name='___imul__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='122' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='34112'> + <var-decl name='___index__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='123' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='34624'> + <var-decl name='___init__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='124' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='35136'> + <var-decl name='___init_subclass__' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='125' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='35712'> + <var-decl name='___instancecheck__' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='126' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='36288'> + <var-decl name='___int__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='127' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='36736'> + <var-decl name='___invert__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='128' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='37248'> + <var-decl name='___ior__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='129' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='37696'> + <var-decl name='___ipow__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='130' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='38208'> + <var-decl name='___irshift__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='131' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='38720'> + <var-decl name='___isabstractmethod__' type-id='type-id-310' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='132' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='39296'> + <var-decl name='___isub__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='133' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='39808'> + <var-decl name='___iter__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='134' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='40320'> + <var-decl name='___itruediv__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='135' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='40832'> + <var-decl name='___ixor__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='136' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='41344'> + <var-decl name='___le__' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='137' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='41792'> + <var-decl name='___len__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='138' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='42240'> + <var-decl name='___length_hint__' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='139' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='42752'> + <var-decl name='___lltrace__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='140' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='43264'> + <var-decl name='___loader__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='141' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='43776'> + <var-decl name='___lshift__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='142' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='44288'> + <var-decl name='___lt__' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='143' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='44736'> + <var-decl name='___main__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='144' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='45248'> + <var-decl name='___matmul__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='145' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='45760'> + <var-decl name='___missing__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='146' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='46272'> + <var-decl name='___mod__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='147' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='46720'> + <var-decl name='___module__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='148' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='47232'> + <var-decl name='___mro_entries__' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='149' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='47744'> + <var-decl name='___mul__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='150' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='48192'> + <var-decl name='___name__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='151' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='48704'> + <var-decl name='___ne__' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='152' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='49152'> + <var-decl name='___neg__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='153' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='49600'> + <var-decl name='___new__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='154' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='50048'> + <var-decl name='___newobj__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='155' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='50560'> + <var-decl name='___newobj_ex__' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='156' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='51072'> + <var-decl name='___next__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='157' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='51584'> + <var-decl name='___notes__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='158' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='52096'> + <var-decl name='___or__' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='159' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='52544'> + <var-decl name='___orig_class__' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='160' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='53056'> + <var-decl name='___origin__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='161' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='53568'> + <var-decl name='___package__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='162' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='54080'> + <var-decl name='___parameters__' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='163' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='54592'> + <var-decl name='___path__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='164' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='55104'> + <var-decl name='___pos__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='165' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='55552'> + <var-decl name='___pow__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='166' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='56000'> + <var-decl name='___prepare__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='167' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='56512'> + <var-decl name='___qualname__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='168' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='57024'> + <var-decl name='___radd__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='169' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='57536'> + <var-decl name='___rand__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='170' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='58048'> + <var-decl name='___rdivmod__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='58560'> + <var-decl name='___reduce__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='59072'> + <var-decl name='___reduce_ex__' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='173' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='59584'> + <var-decl name='___repr__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='174' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='60096'> + <var-decl name='___reversed__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='175' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='60608'> + <var-decl name='___rfloordiv__' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='176' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='61120'> + <var-decl name='___rlshift__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='177' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='61632'> + <var-decl name='___rmatmul__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='178' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='62144'> + <var-decl name='___rmod__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='179' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='62656'> + <var-decl name='___rmul__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='180' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='63168'> + <var-decl name='___ror__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='181' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='63616'> + <var-decl name='___round__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='182' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64128'> + <var-decl name='___rpow__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='183' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64640'> + <var-decl name='___rrshift__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='184' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='65152'> + <var-decl name='___rshift__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='185' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='65664'> + <var-decl name='___rsub__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='186' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='66176'> + <var-decl name='___rtruediv__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='187' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='66688'> + <var-decl name='___rxor__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='188' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='67200'> + <var-decl name='___set__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='189' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='67648'> + <var-decl name='___set_name__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='190' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='68160'> + <var-decl name='___setattr__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='191' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='68672'> + <var-decl name='___setitem__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='192' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='69184'> + <var-decl name='___setstate__' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='193' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='69696'> + <var-decl name='___sizeof__' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='194' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='70208'> + <var-decl name='___slotnames__' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='195' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='70720'> + <var-decl name='___slots__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='196' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='71232'> + <var-decl name='___spec__' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='197' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='71744'> + <var-decl name='___str__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='198' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='72192'> + <var-decl name='___sub__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='199' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='72640'> + <var-decl name='___subclasscheck__' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='200' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='73216'> + <var-decl name='___subclasshook__' type-id='type-id-309' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='201' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='73792'> + <var-decl name='___truediv__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='202' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='74304'> + <var-decl name='___trunc__' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='203' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='74816'> + <var-decl name='___typing_is_unpacked_typevartuple__' type-id='type-id-311' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='204' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='75520'> + <var-decl name='___typing_prepare_subst__' type-id='type-id-312' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='205' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='76160'> + <var-decl name='___typing_subst__' type-id='type-id-309' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='206' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='76736'> + <var-decl name='___typing_unpacked_tuple_args__' type-id='type-id-313' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='207' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='77376'> + <var-decl name='___warningregistry__' type-id='type-id-304' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='208' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='77952'> + <var-decl name='___weakref__' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='209' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='78464'> + <var-decl name='___xor__' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='210' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='78912'> + <var-decl name='__abc_impl' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='211' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='79424'> + <var-decl name='__annotation' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='212' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='79936'> + <var-decl name='__blksize' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='213' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='80448'> + <var-decl name='__bootstrap' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='214' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='80960'> + <var-decl name='__dealloc_warn' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='215' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='81472'> + <var-decl name='__finalizing' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='216' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='81984'> + <var-decl name='__find_and_load' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='217' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='82496'> + <var-decl name='__fix_up_module' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='218' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='83008'> + <var-decl name='__get_sourcefile' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='219' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='83520'> + <var-decl name='__handle_fromlist' type-id='type-id-309' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='220' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='84096'> + <var-decl name='__initializing' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='221' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='84608'> + <var-decl name='__is_text_encoding' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='222' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='85184'> + <var-decl name='__lock_unlock_module' type-id='type-id-304' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='223' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='85760'> + <var-decl name='__showwarnmsg' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='224' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='86272'> + <var-decl name='__shutdown' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='225' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='86784'> + <var-decl name='__slotnames' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='226' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='87296'> + <var-decl name='__strptime_time' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='227' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='87808'> + <var-decl name='__uninitialized_submodules' type-id='type-id-314' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='228' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='88448'> + <var-decl name='__warn_unawaited_coroutine' type-id='type-id-314' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='229' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='89088'> + <var-decl name='__xoptions' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='230' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='89600'> + <var-decl name='_add' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='231' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='90048'> + <var-decl name='_append' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='232' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='90496'> + <var-decl name='_big' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='233' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='90944'> + <var-decl name='_buffer' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='234' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='91392'> + <var-decl name='_builtins' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='235' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='91904'> + <var-decl name='_c_call' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='236' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='92352'> + <var-decl name='_c_exception' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='237' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='92864'> + <var-decl name='_c_return' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='238' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='93376'> + <var-decl name='_call' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='239' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='93824'> + <var-decl name='_clear' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='240' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='94272'> + <var-decl name='_close' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='241' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='94720'> + <var-decl name='_closed' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='242' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='95168'> + <var-decl name='_code' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='243' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='95616'> + <var-decl name='_copy' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='244' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96064'> + <var-decl name='_copyreg' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='245' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96512'> + <var-decl name='_decode' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='246' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96960'> + <var-decl name='_default' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='247' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='97408'> + <var-decl name='_defaultaction' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='248' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='97920'> + <var-decl name='_dictcomp' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='249' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='98432'> + <var-decl name='_difference_update' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='250' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='99008'> + <var-decl name='_dispatch_table' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='251' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='99520'> + <var-decl name='_displayhook' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='252' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='100032'> + <var-decl name='_enable' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='253' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='100480'> + <var-decl name='_encode' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='254' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='100928'> + <var-decl name='_encoding' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='255' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='101440'> + <var-decl name='_end_lineno' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='256' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='101952'> + <var-decl name='_end_offset' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='257' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='102464'> + <var-decl name='_errors' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='258' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='102912'> + <var-decl name='_excepthook' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='259' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='103424'> + <var-decl name='_exception' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='260' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='103936'> + <var-decl name='_extend' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='261' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='104384'> + <var-decl name='_filename' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='262' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='104896'> + <var-decl name='_fileno' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='263' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='105344'> + <var-decl name='_fillvalue' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='264' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='105856'> + <var-decl name='_filters' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='265' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='106304'> + <var-decl name='_find_class' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='266' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='106816'> + <var-decl name='_flush' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='267' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='107264'> + <var-decl name='_genexpr' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='268' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='107712'> + <var-decl name='_get' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='269' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='108160'> + <var-decl name='_get_source' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='270' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='108672'> + <var-decl name='_getattr' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='271' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='109120'> + <var-decl name='_getstate' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='272' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='109632'> + <var-decl name='_ignore' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='273' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='110080'> + <var-decl name='_importlib' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='274' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='110592'> + <var-decl name='_inf' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='275' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='111040'> + <var-decl name='_intersection' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='276' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='111552'> + <var-decl name='_isatty' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='277' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='112000'> + <var-decl name='_isinstance' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='278' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='112512'> + <var-decl name='_items' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='279' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='112960'> + <var-decl name='_iter' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='280' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='113408'> + <var-decl name='_join' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='281' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='113856'> + <var-decl name='_keys' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='282' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='114304'> + <var-decl name='_lambda' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='283' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='114752'> + <var-decl name='_last_traceback' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='284' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='115264'> + <var-decl name='_last_type' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='285' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='115776'> + <var-decl name='_last_value' type-id='type-id-269' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='286' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='116288'> + <var-decl name='_latin1' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='287' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='116736'> + <var-decl name='_len' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='288' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='117184'> + <var-decl name='_line' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='289' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='117632'> + <var-decl name='_lineno' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='290' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='118080'> + <var-decl name='_listcomp' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='291' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='118592'> + <var-decl name='_little' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='292' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='119040'> + <var-decl name='_locale' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='293' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='119488'> + <var-decl name='_match' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='294' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='119936'> + <var-decl name='_metaclass' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='295' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='120448'> + <var-decl name='_mode' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='296' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='120896'> + <var-decl name='_modules' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='297' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='121344'> + <var-decl name='_mro' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='298' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='121792'> + <var-decl name='_msg' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='299' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='122240'> + <var-decl name='_n_fields' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='300' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='122752'> + <var-decl name='_n_sequence_fields' type-id='type-id-306' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='301' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='123328'> + <var-decl name='_n_unnamed_fields' type-id='type-id-309' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='302' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='123904'> + <var-decl name='_name' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='303' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='124352'> + <var-decl name='_newlines' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='304' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='124864'> + <var-decl name='_next' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='305' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='125312'> + <var-decl name='_obj' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='306' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='125760'> + <var-decl name='_offset' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='307' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='126208'> + <var-decl name='_onceregistry' type-id='type-id-305' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='308' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='126720'> + <var-decl name='_opcode' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='309' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='127168'> + <var-decl name='_open' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='310' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='127616'> + <var-decl name='_parent' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='311' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128064'> + <var-decl name='_partial' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='312' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128512'> + <var-decl name='_path' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='313' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128960'> + <var-decl name='_peek' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='314' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='129408'> + <var-decl name='_persistent_id' type-id='type-id-300' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='315' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='129920'> + <var-decl name='_persistent_load' type-id='type-id-303' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='316' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='130432'> + <var-decl name='_print_file_and_line' type-id='type-id-304' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='317' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='131008'> + <var-decl name='_ps1' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='318' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='131456'> + <var-decl name='_ps2' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='319' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='131904'> + <var-decl name='_raw' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='320' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='132352'> + <var-decl name='_read' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='321' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='132800'> + <var-decl name='_read1' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='322' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='133248'> + <var-decl name='_readable' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='323' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='133760'> + <var-decl name='_readall' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='324' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='134208'> + <var-decl name='_readinto' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='325' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='134720'> + <var-decl name='_readinto1' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='326' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='135232'> + <var-decl name='_readline' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='327' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='135744'> + <var-decl name='_reducer_override' type-id='type-id-309' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='328' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='136320'> + <var-decl name='_reload' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='329' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='136768'> + <var-decl name='_replace' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='330' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='137216'> + <var-decl name='_reset' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='331' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='137664'> + <var-decl name='_return' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='332' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='138112'> + <var-decl name='_reversed' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='333' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='138624'> + <var-decl name='_seek' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='334' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='139072'> + <var-decl name='_seekable' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='335' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='139584'> + <var-decl name='_send' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='336' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='140032'> + <var-decl name='_setcomp' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='337' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='140480'> + <var-decl name='_setstate' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='338' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='140992'> + <var-decl name='_sort' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='339' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='141440'> + <var-decl name='_stderr' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='340' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='141888'> + <var-decl name='_stdin' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='341' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='142336'> + <var-decl name='_stdout' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='342' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='142784'> + <var-decl name='_strict' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='343' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='143232'> + <var-decl name='_symmetric_difference_update' type-id='type-id-316' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='344' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='143872'> + <var-decl name='_tell' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='345' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='144320'> + <var-decl name='_text' type-id='type-id-301' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='346' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='144768'> + <var-decl name='_threading' type-id='type-id-270' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='347' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='145280'> + <var-decl name='_throw' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='348' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='145728'> + <var-decl name='_top' type-id='type-id-315' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='349' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='146176'> + <var-decl name='_truncate' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='350' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='146688'> + <var-decl name='_unraisablehook' type-id='type-id-302' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='351' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='147200'> + <var-decl name='_values' type-id='type-id-308' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='352' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='147648'> + <var-decl name='_version' type-id='type-id-299' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='353' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='148096'> + <var-decl name='_warnings' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='354' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='148608'> + <var-decl name='_warnoptions' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='355' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='149120'> + <var-decl name='_writable' type-id='type-id-271' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='356' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='149632'> + <var-decl name='_write' type-id='type-id-276' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='357' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='150080'> + <var-decl name='_zipimporter' type-id='type-id-307' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='358' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='56' column='1' id='type-id-299'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-317' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='56' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='64' id='type-id-317'> + <subrange length='8' type-id='type-id-16' id='type-id-318'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='57' column='1' id='type-id-300'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='57' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-319' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='57' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='112' id='type-id-319'> + <subrange length='14' type-id='type-id-16' id='type-id-320'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='58' column='1' id='type-id-301'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-321' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='58' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='40' id='type-id-321'> + <subrange length='5' type-id='type-id-16' id='type-id-322'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='59' column='1' id='type-id-302'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-323' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='59' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='120' id='type-id-323'> + <subrange length='15' type-id='type-id-16' id='type-id-324'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='61' column='1' id='type-id-303'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-325' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='61' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='128' id='type-id-325'> + <subrange length='16' type-id='type-id-16' id='type-id-326'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='576' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='64' column='1' id='type-id-304'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-327' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='64' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='160' id='type-id-327'> + <subrange length='20' type-id='type-id-16' id='type-id-328'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='78' column='1' id='type-id-305'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-329' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='78' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='104' id='type-id-329'> + <subrange length='13' type-id='type-id-16' id='type-id-330'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='576' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='83' column='1' id='type-id-306'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='83' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-331' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='83' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='144' id='type-id-331'> + <subrange length='18' type-id='type-id-16' id='type-id-332'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='512' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='85' column='1' id='type-id-307'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-333' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='85' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='96' id='type-id-333'> + <subrange length='12' type-id='type-id-16' id='type-id-334'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='97' column='1' id='type-id-308'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='97' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-335' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='97' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='56' id='type-id-335'> + <subrange length='7' type-id='type-id-16' id='type-id-336'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='576' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='107' column='1' id='type-id-309'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='107' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-337' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='107' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='136' id='type-id-337'> + <subrange length='17' type-id='type-id-16' id='type-id-338'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='576' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='132' column='1' id='type-id-310'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='132' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-339' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='132' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='168' id='type-id-339'> + <subrange length='21' type-id='type-id-16' id='type-id-340'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='704' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='204' column='1' id='type-id-311'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='204' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-341' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='204' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='288' id='type-id-341'> + <subrange length='36' type-id='type-id-16' id='type-id-342'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='640' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='205' column='1' id='type-id-312'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='205' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-343' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='205' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='200' id='type-id-343'> + <subrange length='25' type-id='type-id-16' id='type-id-344'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='640' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='207' column='1' id='type-id-313'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='207' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-345' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='207' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='248' id='type-id-345'> + <subrange length='31' type-id='type-id-16' id='type-id-346'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='640' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='228' column='1' id='type-id-314'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='228' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-347' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='228' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='208' id='type-id-347'> + <subrange length='26' type-id='type-id-16' id='type-id-348'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='231' column='1' id='type-id-315'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='231' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-349' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='231' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='32' id='type-id-349'> + <subrange length='4' type-id='type-id-16' id='type-id-350'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='640' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='344' column='1' id='type-id-316'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_ascii' type-id='type-id-277' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='344' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_data' type-id='type-id-351' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='344' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='224' id='type-id-351'> + <subrange length='28' type-id='type-id-16' id='type-id-352'/> + + </array-type-def> + + <array-type-def dimensions='1' type-id='type-id-272' size-in-bits='57344' id='type-id-267'> + <subrange length='128' type-id='type-id-16' id='type-id-353'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='640' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='364' column='1' id='type-id-354'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_latin1' type-id='type-id-355' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='365' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='_data' type-id='type-id-291' visibility='default' filepath='./Include/internal/pycore_global_strings.h' line='366' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='576' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-355' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='211' column='1' id='type-id-356'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_base' type-id='type-id-277' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='212' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='utf8_length' type-id='type-id-36' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='213' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='utf8' type-id='type-id-115' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='215' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='wstr_length' type-id='type-id-36' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='216' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyCompactUnicodeObject' type-id='type-id-356' filepath='./Include/cpython/unicodeobject.h' line='218' column='1' id='type-id-355'/> + + <array-type-def dimensions='1' type-id='type-id-354' size-in-bits='81920' id='type-id-268'> + <subrange length='128' type-id='type-id-16' id='type-id-353'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-251' visibility='default' filepath='./Include/internal/pycore_gc.h' line='12' column='1' id='type-id-357'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_gc_next' type-id='type-id-358' visibility='default' filepath='./Include/internal/pycore_gc.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='_gc_prev' type-id='type-id-358' visibility='default' filepath='./Include/internal/pycore_gc.h' line='19' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='uintptr_t' type-id='type-id-16' filepath='/usr/include/stdint.h' line='90' column='1' id='type-id-358'/> + <typedef-decl name='PyGC_Head' type-id='type-id-357' filepath='./Include/internal/pycore_gc.h' line='20' column='1' id='type-id-251'/> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-252' visibility='default' filepath='./Include/cpython/tupleobject.h' line='5' column='1' id='type-id-359'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-77' visibility='default' filepath='./Include/cpython/tupleobject.h' line='6' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ob_item' type-id='type-id-360' visibility='default' filepath='./Include/cpython/tupleobject.h' line='10' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-14' size-in-bits='64' id='type-id-360'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='PyTupleObject' type-id='type-id-359' filepath='./Include/cpython/tupleobject.h' line='11' column='1' id='type-id-252'/> + <pointer-type-def type-id='type-id-56' size-in-bits='64' id='type-id-28'/> + <type-decl name='bool' size-in-bits='8' id='type-id-31'/> + <class-decl name='_ceval_state' size-in-bits='4416' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_interp.h' line='46' column='1' id='type-id-32'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='recursion_limit' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='47' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='eval_breaker' type-id='type-id-213' visibility='default' filepath='./Include/internal/pycore_interp.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='gil_drop_request' type-id='type-id-213' visibility='default' filepath='./Include/internal/pycore_interp.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='pending' type-id='type-id-361' visibility='default' filepath='./Include/internal/pycore_interp.h' line='53' column='1'/> + </data-member> + </class-decl> + <class-decl name='_pending_calls' size-in-bits='4288' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_interp.h' line='29' column='1' id='type-id-361'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='lock' type-id='type-id-30' visibility='default' filepath='./Include/internal/pycore_interp.h' line='30' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='calls_to_do' type-id='type-id-213' visibility='default' filepath='./Include/internal/pycore_interp.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='async_exc' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='36' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='calls' type-id='type-id-362' visibility='default' filepath='./Include/internal/pycore_interp.h' line='41' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4224'> + <var-decl name='first' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='42' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4256'> + <var-decl name='last' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='43' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_interp.h' line='38' column='1' id='type-id-363'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='func' type-id='type-id-364' visibility='default' filepath='./Include/internal/pycore_interp.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='arg' type-id='type-id-18' visibility='default' filepath='./Include/internal/pycore_interp.h' line='40' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-365' size-in-bits='64' id='type-id-364'/> + + <array-type-def dimensions='1' type-id='type-id-363' size-in-bits='4096' id='type-id-362'> + <subrange length='32' type-id='type-id-16' id='type-id-212'/> + + </array-type-def> + <class-decl name='_gc_runtime_state' size-in-bits='1920' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_gc.h' line='131' column='1' id='type-id-33'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='trash_delete_later' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_gc.h' line='134' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='trash_delete_nesting' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_gc.h' line='136' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='enabled' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_gc.h' line='139' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='debug' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_gc.h' line='140' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='generations' type-id='type-id-366' visibility='default' filepath='./Include/internal/pycore_gc.h' line='142' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='generation0' type-id='type-id-367' visibility='default' filepath='./Include/internal/pycore_gc.h' line='143' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='permanent_generation' type-id='type-id-368' visibility='default' filepath='./Include/internal/pycore_gc.h' line='145' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='generation_stats' type-id='type-id-369' visibility='default' filepath='./Include/internal/pycore_gc.h' line='146' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1600'> + <var-decl name='collecting' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_gc.h' line='148' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1664'> + <var-decl name='garbage' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_gc.h' line='150' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1728'> + <var-decl name='callbacks' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_gc.h' line='152' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1792'> + <var-decl name='long_lived_total' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_gc.h' line='159' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='long_lived_pending' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_gc.h' line='163' column='1'/> + </data-member> + </class-decl> + <class-decl name='gc_generation' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_gc.h' line='114' column='1' id='type-id-368'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='head' type-id='type-id-251' visibility='default' filepath='./Include/internal/pycore_gc.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='threshold' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_gc.h' line='116' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='count' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_gc.h' line='117' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-368' size-in-bits='576' id='type-id-366'> + <subrange length='3' type-id='type-id-16' id='type-id-293'/> + + </array-type-def> + <pointer-type-def type-id='type-id-251' size-in-bits='64' id='type-id-367'/> + <class-decl name='gc_generation_stats' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_gc.h' line='122' column='1' id='type-id-370'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='collections' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_gc.h' line='124' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='collected' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_gc.h' line='126' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='uncollectable' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_gc.h' line='128' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-370' size-in-bits='576' id='type-id-369'> + <subrange length='3' type-id='type-id-16' id='type-id-293'/> + + </array-type-def> + <class-decl name='PyConfig' size-in-bits='3392' is-struct='yes' visibility='default' filepath='./Include/cpython/initconfig.h' line='134' column='1' id='type-id-371'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_config_init' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='135' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='isolated' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='137' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='use_environment' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='138' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='dev_mode' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='139' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='install_signal_handlers' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='140' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='use_hash_seed' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='141' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='hash_seed' type-id='type-id-16' visibility='default' filepath='./Include/cpython/initconfig.h' line='142' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='faulthandler' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='143' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='tracemalloc' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='144' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='import_time' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='145' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='352'> + <var-decl name='code_debug_ranges' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='146' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='show_ref_count' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='147' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='416'> + <var-decl name='dump_refs' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='148' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='dump_refs_file' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='149' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='malloc_stats' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='150' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='filesystem_encoding' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='151' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='filesystem_errors' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='152' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='pycache_prefix' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='153' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='parse_argv' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='154' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='orig_argv' type-id='type-id-372' visibility='default' filepath='./Include/cpython/initconfig.h' line='155' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='argv' type-id='type-id-372' visibility='default' filepath='./Include/cpython/initconfig.h' line='156' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='xoptions' type-id='type-id-372' visibility='default' filepath='./Include/cpython/initconfig.h' line='157' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='warnoptions' type-id='type-id-372' visibility='default' filepath='./Include/cpython/initconfig.h' line='158' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='site_import' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='159' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1376'> + <var-decl name='bytes_warning' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='160' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='warn_default_encoding' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='161' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1440'> + <var-decl name='inspect' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='162' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='interactive' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='163' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1504'> + <var-decl name='optimization_level' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='164' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='parser_debug' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='165' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1568'> + <var-decl name='write_bytecode' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='166' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1600'> + <var-decl name='verbose' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='167' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1632'> + <var-decl name='quiet' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='168' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1664'> + <var-decl name='user_site_directory' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='169' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1696'> + <var-decl name='configure_c_stdio' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='170' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1728'> + <var-decl name='buffered_stdio' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1792'> + <var-decl name='stdio_encoding' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='stdio_errors' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='173' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1920'> + <var-decl name='check_hash_pycs_mode' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='177' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1984'> + <var-decl name='use_frozen_modules' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='178' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2016'> + <var-decl name='safe_path' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='179' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2048'> + <var-decl name='pathconfig_warnings' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='182' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2112'> + <var-decl name='program_name' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='183' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2176'> + <var-decl name='pythonpath_env' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='184' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2240'> + <var-decl name='home' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='185' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2304'> + <var-decl name='platlibdir' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='186' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2368'> + <var-decl name='module_search_paths_set' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='189' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2432'> + <var-decl name='module_search_paths' type-id='type-id-372' visibility='default' filepath='./Include/cpython/initconfig.h' line='190' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2560'> + <var-decl name='stdlib_dir' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='191' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2624'> + <var-decl name='executable' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='192' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2688'> + <var-decl name='base_executable' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='193' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2752'> + <var-decl name='prefix' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='194' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2816'> + <var-decl name='base_prefix' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='195' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2880'> + <var-decl name='exec_prefix' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='196' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2944'> + <var-decl name='base_exec_prefix' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='197' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3008'> + <var-decl name='skip_source_first_line' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='200' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3072'> + <var-decl name='run_command' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='201' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3136'> + <var-decl name='run_module' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='202' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3200'> + <var-decl name='run_filename' type-id='type-id-281' visibility='default' filepath='./Include/cpython/initconfig.h' line='203' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3264'> + <var-decl name='_install_importlib' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='209' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3296'> + <var-decl name='_init_main' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='212' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3328'> + <var-decl name='_isolated_interpreter' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='216' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3360'> + <var-decl name='_is_python_build' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='219' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-372' visibility='default' filepath='./Include/cpython/initconfig.h' line='31' column='1' id='type-id-373'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='length' type-id='type-id-36' visibility='default' filepath='./Include/cpython/initconfig.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='items' type-id='type-id-374' visibility='default' filepath='./Include/cpython/initconfig.h' line='35' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-281' size-in-bits='64' id='type-id-374'/> + <typedef-decl name='PyWideStringList' type-id='type-id-373' filepath='./Include/cpython/initconfig.h' line='36' column='1' id='type-id-372'/> + <typedef-decl name='PyConfig' type-id='type-id-371' filepath='./Include/cpython/initconfig.h' line='220' column='1' id='type-id-34'/> + <class-decl name='_PyInterpreterFrame' size-in-bits='640' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-375'/> + <pointer-type-def type-id='type-id-375' size-in-bits='64' id='type-id-376'/> + <pointer-type-def type-id='type-id-377' size-in-bits='64' id='type-id-378'/> + <typedef-decl name='_PyFrameEvalFunction' type-id='type-id-378' filepath='./Include/cpython/pystate.h' line='264' column='1' id='type-id-35'/> + + <array-type-def dimensions='1' type-id='type-id-104' size-in-bits='16320' id='type-id-37'> + <subrange length='255' type-id='type-id-16' id='type-id-379'/> + + </array-type-def> + <class-decl name='_warnings_runtime_state' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_warnings.h' line='11' column='1' id='type-id-38'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='filters' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_warnings.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='once_registry' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_warnings.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='default_action' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_warnings.h' line='16' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='filters_version' type-id='type-id-53' visibility='default' filepath='./Include/internal/pycore_warnings.h' line='17' column='1'/> + </data-member> + </class-decl> + <class-decl name='atexit_state' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_interp.h' line='64' column='1' id='type-id-39'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='callbacks' type-id='type-id-380' visibility='default' filepath='./Include/internal/pycore_interp.h' line='65' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ncallbacks' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='66' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='callback_len' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_interp.h' line='67' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-381' visibility='default' filepath='./Include/internal/pycore_interp.h' line='58' column='1' id='type-id-382'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='func' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='args' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='60' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='kwargs' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_interp.h' line='61' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='atexit_callback' type-id='type-id-382' filepath='./Include/internal/pycore_interp.h' line='62' column='1' id='type-id-381'/> + <pointer-type-def type-id='type-id-381' size-in-bits='64' id='type-id-383'/> + <pointer-type-def type-id='type-id-383' size-in-bits='64' id='type-id-380'/> + <class-decl name='_Py_unicode_state' size-in-bits='384' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='49' column='1' id='type-id-40'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='fs_codec' type-id='type-id-384' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='ids' type-id='type-id-385' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='53' column='1'/> + </data-member> + </class-decl> + <class-decl name='_Py_unicode_fs_codec' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='37' column='1' id='type-id-384'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='encoding' type-id='type-id-115' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='utf8' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='errors' type-id='type-id-115' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='error_handler' type-id='type-id-386' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='41' column='1'/> + </data-member> + </class-decl> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/internal/pycore_fileutils.h' line='13' column='1' id='type-id-387'> + <underlying-type type-id='type-id-126'/> + <enumerator name='_Py_ERROR_UNKNOWN' value='0'/> + <enumerator name='_Py_ERROR_STRICT' value='1'/> + <enumerator name='_Py_ERROR_SURROGATEESCAPE' value='2'/> + <enumerator name='_Py_ERROR_REPLACE' value='3'/> + <enumerator name='_Py_ERROR_IGNORE' value='4'/> + <enumerator name='_Py_ERROR_BACKSLASHREPLACE' value='5'/> + <enumerator name='_Py_ERROR_SURROGATEPASS' value='6'/> + <enumerator name='_Py_ERROR_XMLCHARREFREPLACE' value='7'/> + <enumerator name='_Py_ERROR_OTHER' value='8'/> + </enum-decl> + <typedef-decl name='_Py_error_handler' type-id='type-id-387' filepath='./Include/internal/pycore_fileutils.h' line='23' column='1' id='type-id-386'/> + <class-decl name='_Py_unicode_ids' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='44' column='1' id='type-id-385'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='45' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='array' type-id='type-id-22' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='46' column='1'/> + </data-member> + </class-decl> + <class-decl name='_Py_float_state' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_floatobject.h' line='31' column='1' id='type-id-41'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_floatobject.h' line='36' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='free_list' type-id='type-id-388' visibility='default' filepath='./Include/internal/pycore_floatobject.h' line='37' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-389' visibility='default' filepath='./Include/cpython/floatobject.h' line='5' column='1' id='type-id-390'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/cpython/floatobject.h' line='6' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ob_fval' type-id='type-id-391' visibility='default' filepath='./Include/cpython/floatobject.h' line='7' column='1'/> + </data-member> + </class-decl> + <type-decl name='double' size-in-bits='64' id='type-id-391'/> + <typedef-decl name='PyFloatObject' type-id='type-id-390' filepath='./Include/cpython/floatobject.h' line='8' column='1' id='type-id-389'/> + <pointer-type-def type-id='type-id-389' size-in-bits='64' id='type-id-388'/> + <class-decl name='__anonymous_struct__' size-in-bits='320' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-392' visibility='default' filepath='./Include/sliceobject.h' line='22' column='1' id='type-id-393'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/sliceobject.h' line='23' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='start' type-id='type-id-14' visibility='default' filepath='./Include/sliceobject.h' line='24' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='stop' type-id='type-id-14' visibility='default' filepath='./Include/sliceobject.h' line='24' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='step' type-id='type-id-14' visibility='default' filepath='./Include/sliceobject.h' line='24' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PySliceObject' type-id='type-id-393' filepath='./Include/sliceobject.h' line='25' column='1' id='type-id-392'/> + <pointer-type-def type-id='type-id-392' size-in-bits='64' id='type-id-42'/> + <class-decl name='_Py_tuple_state' size-in-bits='1920' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_tuple.h' line='48' column='1' id='type-id-43'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='free_list' type-id='type-id-394' visibility='default' filepath='./Include/internal/pycore_tuple.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='numfree' type-id='type-id-395' visibility='default' filepath='./Include/internal/pycore_tuple.h' line='59' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-252' size-in-bits='64' id='type-id-396'/> + + <array-type-def dimensions='1' type-id='type-id-396' size-in-bits='1280' id='type-id-394'> + <subrange length='20' type-id='type-id-16' id='type-id-328'/> + + </array-type-def> + + <array-type-def dimensions='1' type-id='type-id-8' size-in-bits='640' id='type-id-395'> + <subrange length='20' type-id='type-id-16' id='type-id-328'/> + + </array-type-def> + <class-decl name='_Py_list_state' size-in-bits='5184' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_list.h' line='31' column='1' id='type-id-44'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='free_list' type-id='type-id-397' visibility='default' filepath='./Include/internal/pycore_list.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5120'> + <var-decl name='numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_list.h' line='34' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='320' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-398' visibility='default' filepath='./Include/cpython/listobject.h' line='5' column='1' id='type-id-399'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-77' visibility='default' filepath='./Include/cpython/listobject.h' line='6' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ob_item' type-id='type-id-22' visibility='default' filepath='./Include/cpython/listobject.h' line='8' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='allocated' type-id='type-id-36' visibility='default' filepath='./Include/cpython/listobject.h' line='21' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyListObject' type-id='type-id-399' filepath='./Include/cpython/listobject.h' line='22' column='1' id='type-id-398'/> + <pointer-type-def type-id='type-id-398' size-in-bits='64' id='type-id-400'/> + + <array-type-def dimensions='1' type-id='type-id-400' size-in-bits='5120' id='type-id-397'> + <subrange length='80' type-id='type-id-16' id='type-id-401'/> + + </array-type-def> + <class-decl name='_Py_dict_state' size-in-bits='10368' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_dict.h' line='29' column='1' id='type-id-45'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='free_list' type-id='type-id-402' visibility='default' filepath='./Include/internal/pycore_dict.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5120'> + <var-decl name='numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_dict.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5184'> + <var-decl name='keys_free_list' type-id='type-id-403' visibility='default' filepath='./Include/internal/pycore_dict.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10304'> + <var-decl name='keys_numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_dict.h' line='35' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='384' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-404' visibility='default' filepath='./Include/cpython/dictobject.h' line='11' column='1' id='type-id-405'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/cpython/dictobject.h' line='12' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ma_used' type-id='type-id-36' visibility='default' filepath='./Include/cpython/dictobject.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ma_version_tag' type-id='type-id-19' visibility='default' filepath='./Include/cpython/dictobject.h' line='19' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='ma_keys' type-id='type-id-406' visibility='default' filepath='./Include/cpython/dictobject.h' line='21' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='ma_values' type-id='type-id-407' visibility='default' filepath='./Include/cpython/dictobject.h' line='28' column='1'/> + </data-member> + </class-decl> + <class-decl name='_dictkeysobject' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_dict.h' line='87' column='1' id='type-id-408'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='dk_refcnt' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_dict.h' line='88' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='dk_log2_size' type-id='type-id-285' visibility='default' filepath='./Include/internal/pycore_dict.h' line='91' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='72'> + <var-decl name='dk_log2_index_bytes' type-id='type-id-285' visibility='default' filepath='./Include/internal/pycore_dict.h' line='94' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='80'> + <var-decl name='dk_kind' type-id='type-id-285' visibility='default' filepath='./Include/internal/pycore_dict.h' line='97' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='dk_version' type-id='type-id-256' visibility='default' filepath='./Include/internal/pycore_dict.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='dk_usable' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_dict.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='dk_nentries' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_dict.h' line='106' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='dk_indices' type-id='type-id-409' visibility='default' filepath='./Include/internal/pycore_dict.h' line='121' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='infinite' id='type-id-409'> + <subrange length='infinite' type-id='type-id-16' id='type-id-6'/> + + </array-type-def> + <typedef-decl name='PyDictKeysObject' type-id='type-id-408' filepath='./Include/cpython/dictobject.h' line='5' column='1' id='type-id-410'/> + <pointer-type-def type-id='type-id-410' size-in-bits='64' id='type-id-406'/> + <class-decl name='_dictvalues' size-in-bits='64' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_dict.h' line='137' column='1' id='type-id-411'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='values' type-id='type-id-360' visibility='default' filepath='./Include/internal/pycore_dict.h' line='138' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyDictValues' type-id='type-id-411' filepath='./Include/cpython/dictobject.h' line='6' column='1' id='type-id-412'/> + <pointer-type-def type-id='type-id-412' size-in-bits='64' id='type-id-407'/> + <typedef-decl name='PyDictObject' type-id='type-id-405' filepath='./Include/cpython/dictobject.h' line='29' column='1' id='type-id-404'/> + <pointer-type-def type-id='type-id-404' size-in-bits='64' id='type-id-413'/> + + <array-type-def dimensions='1' type-id='type-id-413' size-in-bits='5120' id='type-id-402'> + <subrange length='80' type-id='type-id-16' id='type-id-401'/> + + </array-type-def> + + <array-type-def dimensions='1' type-id='type-id-406' size-in-bits='5120' id='type-id-403'> + <subrange length='80' type-id='type-id-16' id='type-id-401'/> + + </array-type-def> + <class-decl name='_Py_async_gen_state' size-in-bits='10368' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_genobject.h' line='31' column='1' id='type-id-46'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value_freelist' type-id='type-id-414' visibility='default' filepath='./Include/internal/pycore_genobject.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5120'> + <var-decl name='value_numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_genobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5184'> + <var-decl name='asend_freelist' type-id='type-id-415' visibility='default' filepath='./Include/internal/pycore_genobject.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10304'> + <var-decl name='asend_numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_genobject.h' line='41' column='1'/> + </data-member> + </class-decl> + <class-decl name='_PyAsyncGenWrappedValue' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-416'/> + <pointer-type-def type-id='type-id-416' size-in-bits='64' id='type-id-417'/> + + <array-type-def dimensions='1' type-id='type-id-417' size-in-bits='5120' id='type-id-414'> + <subrange length='80' type-id='type-id-16' id='type-id-401'/> + + </array-type-def> + <class-decl name='PyAsyncGenASend' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-418'/> + <pointer-type-def type-id='type-id-418' size-in-bits='64' id='type-id-419'/> + + <array-type-def dimensions='1' type-id='type-id-419' size-in-bits='5120' id='type-id-415'> + <subrange length='80' type-id='type-id-16' id='type-id-401'/> + + </array-type-def> + <class-decl name='_Py_context_state' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_context.h' line='30' column='1' id='type-id-47'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='freelist' type-id='type-id-420' visibility='default' filepath='./Include/internal/pycore_context.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_context.h' line='34' column='1'/> + </data-member> + </class-decl> + <class-decl name='_pycontextobject' size-in-bits='384' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_context.h' line='38' column='1' id='type-id-421'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/internal/pycore_context.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ctx_prev' type-id='type-id-420' visibility='default' filepath='./Include/internal/pycore_context.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ctx_vars' type-id='type-id-422' visibility='default' filepath='./Include/internal/pycore_context.h' line='41' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='ctx_weakreflist' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_context.h' line='42' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='ctx_entered' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_context.h' line='43' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyContext' type-id='type-id-421' filepath='./Include/cpython/context.h' line='9' column='1' id='type-id-423'/> + <pointer-type-def type-id='type-id-423' size-in-bits='64' id='type-id-420'/> + <class-decl name='__anonymous_struct__' size-in-bits='320' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-424' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='48' column='1' id='type-id-425'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='h_root' type-id='type-id-426' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='h_weakreflist' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='h_count' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='52' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-427' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='42' column='1' id='type-id-428'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='43' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyHamtNode' type-id='type-id-428' filepath='./Include/internal/pycore_hamt.h' line='44' column='1' id='type-id-427'/> + <pointer-type-def type-id='type-id-427' size-in-bits='64' id='type-id-426'/> + <typedef-decl name='PyHamtObject' type-id='type-id-425' filepath='./Include/internal/pycore_hamt.h' line='53' column='1' id='type-id-424'/> + <pointer-type-def type-id='type-id-424' size-in-bits='64' id='type-id-422'/> + <class-decl name='_Py_exc_state' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_exceptions.h' line='22' column='1' id='type-id-48'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='errnomap' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_exceptions.h' line='24' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='memerrors_freelist' type-id='type-id-429' visibility='default' filepath='./Include/internal/pycore_exceptions.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='memerrors_numfree' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_exceptions.h' line='26' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='PyExc_ExceptionGroup' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_exceptions.h' line='28' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='576' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-430' visibility='default' filepath='./Include/cpython/pyerrors.h' line='13' column='1' id='type-id-431'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='dict' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='args' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='notes' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='traceback' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='context' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='cause' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='suppress_context' type-id='type-id-1' visibility='default' filepath='./Include/cpython/pyerrors.h' line='14' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyBaseExceptionObject' type-id='type-id-431' filepath='./Include/cpython/pyerrors.h' line='15' column='1' id='type-id-430'/> + <pointer-type-def type-id='type-id-430' size-in-bits='64' id='type-id-429'/> + <class-decl name='ast_state' size-in-bits='15168' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='13' column='1' id='type-id-49'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='initialized' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='recursion_depth' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='recursion_limit' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='16' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='AST_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='17' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='Add_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='18' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='Add_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='19' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='And_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='20' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='And_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='21' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='AnnAssign_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='22' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='Assert_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='23' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='Assign_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='24' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='AsyncFor_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='AsyncFunctionDef_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='26' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='AsyncWith_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='27' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='Attribute_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='28' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='AugAssign_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='29' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='Await_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='30' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='BinOp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='31' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='BitAnd_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1152'> + <var-decl name='BitAnd_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='BitOr_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='BitOr_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='35' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='BitXor_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='36' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='BitXor_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='BoolOp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='Break_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1600'> + <var-decl name='Call_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1664'> + <var-decl name='ClassDef_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='41' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1728'> + <var-decl name='Compare_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='42' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1792'> + <var-decl name='Constant_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='43' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='Continue_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='44' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1920'> + <var-decl name='Del_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='45' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1984'> + <var-decl name='Del_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='46' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2048'> + <var-decl name='Delete_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='47' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2112'> + <var-decl name='DictComp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='48' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2176'> + <var-decl name='Dict_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2240'> + <var-decl name='Div_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2304'> + <var-decl name='Div_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2368'> + <var-decl name='Eq_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2432'> + <var-decl name='Eq_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='53' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2496'> + <var-decl name='ExceptHandler_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='54' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2560'> + <var-decl name='Expr_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2624'> + <var-decl name='Expression_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2688'> + <var-decl name='FloorDiv_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='57' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2752'> + <var-decl name='FloorDiv_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2816'> + <var-decl name='For_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2880'> + <var-decl name='FormattedValue_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='60' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2944'> + <var-decl name='FunctionDef_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3008'> + <var-decl name='FunctionType_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='62' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3072'> + <var-decl name='GeneratorExp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='63' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3136'> + <var-decl name='Global_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3200'> + <var-decl name='GtE_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='65' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3264'> + <var-decl name='GtE_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='66' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3328'> + <var-decl name='Gt_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3392'> + <var-decl name='Gt_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3456'> + <var-decl name='IfExp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3520'> + <var-decl name='If_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3584'> + <var-decl name='ImportFrom_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='71' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3648'> + <var-decl name='Import_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='72' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3712'> + <var-decl name='In_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='73' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3776'> + <var-decl name='In_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3840'> + <var-decl name='Interactive_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='75' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3904'> + <var-decl name='Invert_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='76' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='3968'> + <var-decl name='Invert_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4032'> + <var-decl name='IsNot_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4096'> + <var-decl name='IsNot_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='79' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4160'> + <var-decl name='Is_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4224'> + <var-decl name='Is_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='81' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4288'> + <var-decl name='JoinedStr_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='82' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4352'> + <var-decl name='LShift_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='83' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4416'> + <var-decl name='LShift_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='84' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4480'> + <var-decl name='Lambda_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4544'> + <var-decl name='ListComp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='86' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4608'> + <var-decl name='List_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='87' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4672'> + <var-decl name='Load_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='88' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4736'> + <var-decl name='Load_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='89' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4800'> + <var-decl name='LtE_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='90' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4864'> + <var-decl name='LtE_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='91' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4928'> + <var-decl name='Lt_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='92' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='4992'> + <var-decl name='Lt_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5056'> + <var-decl name='MatMult_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='94' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5120'> + <var-decl name='MatMult_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='95' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5184'> + <var-decl name='MatchAs_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='96' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5248'> + <var-decl name='MatchClass_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='97' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5312'> + <var-decl name='MatchMapping_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='98' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5376'> + <var-decl name='MatchOr_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='99' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5440'> + <var-decl name='MatchSequence_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5504'> + <var-decl name='MatchSingleton_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='101' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5568'> + <var-decl name='MatchStar_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='102' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5632'> + <var-decl name='MatchValue_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5696'> + <var-decl name='Match_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='104' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5760'> + <var-decl name='Mod_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='105' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5824'> + <var-decl name='Mod_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='106' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5888'> + <var-decl name='Module_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='107' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='5952'> + <var-decl name='Mult_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='108' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6016'> + <var-decl name='Mult_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='109' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6080'> + <var-decl name='Name_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='110' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6144'> + <var-decl name='NamedExpr_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='111' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6208'> + <var-decl name='Nonlocal_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='112' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6272'> + <var-decl name='NotEq_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6336'> + <var-decl name='NotEq_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6400'> + <var-decl name='NotIn_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6464'> + <var-decl name='NotIn_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='116' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6528'> + <var-decl name='Not_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='117' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6592'> + <var-decl name='Not_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='118' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6656'> + <var-decl name='Or_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='119' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6720'> + <var-decl name='Or_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='120' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6784'> + <var-decl name='Pass_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='121' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6848'> + <var-decl name='Pow_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='122' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6912'> + <var-decl name='Pow_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='123' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='6976'> + <var-decl name='RShift_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='124' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7040'> + <var-decl name='RShift_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='125' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7104'> + <var-decl name='Raise_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='126' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7168'> + <var-decl name='Return_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='127' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7232'> + <var-decl name='SetComp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='128' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7296'> + <var-decl name='Set_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='129' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7360'> + <var-decl name='Slice_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='130' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7424'> + <var-decl name='Starred_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='131' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7488'> + <var-decl name='Store_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='132' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7552'> + <var-decl name='Store_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='133' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7616'> + <var-decl name='Sub_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='134' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7680'> + <var-decl name='Sub_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='135' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7744'> + <var-decl name='Subscript_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='136' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7808'> + <var-decl name='TryStar_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='137' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7872'> + <var-decl name='Try_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='138' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='7936'> + <var-decl name='Tuple_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='139' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8000'> + <var-decl name='TypeIgnore_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='140' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8064'> + <var-decl name='UAdd_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='141' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8128'> + <var-decl name='UAdd_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='142' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8192'> + <var-decl name='USub_singleton' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='143' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8256'> + <var-decl name='USub_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='144' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8320'> + <var-decl name='UnaryOp_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='145' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8384'> + <var-decl name='While_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='146' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8448'> + <var-decl name='With_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='147' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8512'> + <var-decl name='YieldFrom_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='148' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8576'> + <var-decl name='Yield_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='149' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8640'> + <var-decl name='__dict__' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='150' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8704'> + <var-decl name='__doc__' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='151' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8768'> + <var-decl name='__match_args__' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='152' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8832'> + <var-decl name='__module__' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='153' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8896'> + <var-decl name='_attributes' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='154' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='8960'> + <var-decl name='_fields' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='155' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9024'> + <var-decl name='alias_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='156' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9088'> + <var-decl name='annotation' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='157' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9152'> + <var-decl name='arg' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='158' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9216'> + <var-decl name='arg_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='159' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9280'> + <var-decl name='args' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='160' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9344'> + <var-decl name='argtypes' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='161' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9408'> + <var-decl name='arguments_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='162' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9472'> + <var-decl name='asname' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='163' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9536'> + <var-decl name='ast' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='164' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9600'> + <var-decl name='attr' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='165' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9664'> + <var-decl name='bases' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='166' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9728'> + <var-decl name='body' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='167' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9792'> + <var-decl name='boolop_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='168' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9856'> + <var-decl name='cases' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='169' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9920'> + <var-decl name='cause' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='170' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='9984'> + <var-decl name='cls' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10048'> + <var-decl name='cmpop_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10112'> + <var-decl name='col_offset' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='173' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10176'> + <var-decl name='comparators' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='174' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10240'> + <var-decl name='comprehension_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='175' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10304'> + <var-decl name='context_expr' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='176' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10368'> + <var-decl name='conversion' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='177' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10432'> + <var-decl name='ctx' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='178' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10496'> + <var-decl name='decorator_list' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='179' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10560'> + <var-decl name='defaults' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='180' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10624'> + <var-decl name='elt' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='181' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10688'> + <var-decl name='elts' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='182' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10752'> + <var-decl name='end_col_offset' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='183' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10816'> + <var-decl name='end_lineno' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='184' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10880'> + <var-decl name='exc' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='185' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='10944'> + <var-decl name='excepthandler_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='186' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11008'> + <var-decl name='expr_context_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='187' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11072'> + <var-decl name='expr_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='188' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11136'> + <var-decl name='finalbody' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='189' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11200'> + <var-decl name='format_spec' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='190' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11264'> + <var-decl name='func' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='191' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11328'> + <var-decl name='generators' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='192' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11392'> + <var-decl name='guard' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='193' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11456'> + <var-decl name='handlers' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='194' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11520'> + <var-decl name='id' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='195' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11584'> + <var-decl name='ifs' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='196' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11648'> + <var-decl name='is_async' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='197' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11712'> + <var-decl name='items' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='198' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11776'> + <var-decl name='iter' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='199' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11840'> + <var-decl name='key' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='200' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11904'> + <var-decl name='keys' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='201' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='11968'> + <var-decl name='keyword_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='202' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12032'> + <var-decl name='keywords' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='203' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12096'> + <var-decl name='kind' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='204' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12160'> + <var-decl name='kw_defaults' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='205' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12224'> + <var-decl name='kwarg' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='206' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12288'> + <var-decl name='kwd_attrs' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='207' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12352'> + <var-decl name='kwd_patterns' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='208' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12416'> + <var-decl name='kwonlyargs' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='209' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12480'> + <var-decl name='left' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='210' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12544'> + <var-decl name='level' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='211' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12608'> + <var-decl name='lineno' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='212' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12672'> + <var-decl name='lower' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='213' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12736'> + <var-decl name='match_case_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='214' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12800'> + <var-decl name='mod_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='215' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12864'> + <var-decl name='module' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='216' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12928'> + <var-decl name='msg' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='217' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='12992'> + <var-decl name='name' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='218' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13056'> + <var-decl name='names' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='219' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13120'> + <var-decl name='op' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='220' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13184'> + <var-decl name='operand' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='221' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13248'> + <var-decl name='operator_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='222' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13312'> + <var-decl name='ops' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='223' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13376'> + <var-decl name='optional_vars' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='224' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13440'> + <var-decl name='orelse' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='225' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13504'> + <var-decl name='pattern' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='226' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13568'> + <var-decl name='pattern_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='227' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13632'> + <var-decl name='patterns' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='228' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13696'> + <var-decl name='posonlyargs' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='229' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13760'> + <var-decl name='rest' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='230' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13824'> + <var-decl name='returns' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='231' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13888'> + <var-decl name='right' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='232' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='13952'> + <var-decl name='simple' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='233' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14016'> + <var-decl name='slice' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='234' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14080'> + <var-decl name='step' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='235' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14144'> + <var-decl name='stmt_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='236' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14208'> + <var-decl name='subject' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='237' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14272'> + <var-decl name='tag' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='238' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14336'> + <var-decl name='target' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='239' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14400'> + <var-decl name='targets' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='240' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14464'> + <var-decl name='test' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='241' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14528'> + <var-decl name='type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='242' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14592'> + <var-decl name='type_comment' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='243' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14656'> + <var-decl name='type_ignore_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='244' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14720'> + <var-decl name='type_ignores' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='245' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14784'> + <var-decl name='unaryop_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='246' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14848'> + <var-decl name='upper' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='247' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14912'> + <var-decl name='value' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='248' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='14976'> + <var-decl name='values' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='249' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='15040'> + <var-decl name='vararg' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='250' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='15104'> + <var-decl name='withitem_type' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_ast_state.h' line='251' column='1'/> + </data-member> + </class-decl> + <class-decl name='type_cache' size-in-bits='786432' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_typeobject.h' line='33' column='1' id='type-id-50'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='hashtable' type-id='type-id-432' visibility='default' filepath='./Include/internal/pycore_typeobject.h' line='34' column='1'/> + </data-member> + </class-decl> + <class-decl name='type_cache_entry' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_typeobject.h' line='24' column='1' id='type-id-433'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='version' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_typeobject.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='name' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_typeobject.h' line='26' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='value' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_typeobject.h' line='27' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-433' size-in-bits='786432' id='type-id-432'> + <subrange length='4096' type-id='type-id-16' id='type-id-434'/> + + </array-type-def> + <class-decl name='callable_cache' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_code.h' line='118' column='1' id='type-id-51'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='isinstance' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='119' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='len' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='120' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='list_append' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='121' column='1'/> + </data-member> + </class-decl> + <class-decl name='_PyCFrame' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/cpython/pystate.h' line='38' column='1' id='type-id-435'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='use_tracing' type-id='type-id-285' visibility='default' filepath='./Include/cpython/pystate.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='current_frame' type-id='type-id-376' visibility='default' filepath='./Include/cpython/pystate.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='previous' type-id='type-id-12' visibility='default' filepath='./Include/cpython/pystate.h' line='52' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-435' size-in-bits='64' id='type-id-12'/> + <typedef-decl name='_PyCFrame' type-id='type-id-435' filepath='./Include/cpython/pystate.h' line='53' column='1' id='type-id-24'/> + <class-decl name='_frame' size-in-bits='448' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-436'/> + <typedef-decl name='PyFrameObject' type-id='type-id-436' filepath='./Include/pytypedefs.h' line='22' column='1' id='type-id-437'/> + <pointer-type-def type-id='type-id-437' size-in-bits='64' id='type-id-438'/> + <pointer-type-def type-id='type-id-439' size-in-bits='64' id='type-id-440'/> + <typedef-decl name='Py_tracefunc' type-id='type-id-440' filepath='./Include/cpython/pystate.h' line='14' column='1' id='type-id-13'/> + <class-decl name='_err_stackitem' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/cpython/pystate.h' line='55' column='1' id='type-id-441'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='exc_value' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='previous_item' type-id='type-id-442' visibility='default' filepath='./Include/cpython/pystate.h' line='71' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-441' size-in-bits='64' id='type-id-442'/> + <typedef-decl name='_PyErr_StackItem' type-id='type-id-441' filepath='./Include/cpython/pystate.h' line='73' column='1' id='type-id-23'/> + <pointer-type-def type-id='type-id-23' size-in-bits='64' id='type-id-15'/> + <class-decl name='__anonymous_struct__' size-in-bits='384' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-20' visibility='default' filepath='./Include/cpython/pystate.h' line='31' column='1' id='type-id-443'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='code' type-id='type-id-444' visibility='default' filepath='./Include/cpython/pystate.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='bounds' type-id='type-id-445' visibility='default' filepath='./Include/cpython/pystate.h' line='33' column='1'/> + </data-member> + </class-decl> + <class-decl name='PyCodeObject' size-in-bits='1536' is-struct='yes' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1' id='type-id-446'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-77' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='co_consts' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='co_names' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='co_exceptiontable' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='co_flags' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='416'> + <var-decl name='co_warmup' type-id='type-id-232' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='432'> + <var-decl name='_co_linearray_entry_size' type-id='type-id-232' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='co_argcount' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='480'> + <var-decl name='co_posonlyargcount' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='co_kwonlyargcount' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='544'> + <var-decl name='co_stacksize' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='co_firstlineno' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='608'> + <var-decl name='co_nlocalsplus' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='co_nlocals' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='672'> + <var-decl name='co_nplaincellvars' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='co_ncellvars' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='736'> + <var-decl name='co_nfreevars' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='co_localsplusnames' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='co_localspluskinds' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='co_filename' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='co_name' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='co_qualname' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='co_linetable' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1152'> + <var-decl name='co_weakreflist' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='_co_code' type-id='type-id-14' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='_co_linearray' type-id='type-id-115' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='_co_firsttraceable' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='co_extra' type-id='type-id-18' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='co_code_adaptive' type-id='type-id-262' visibility='default' filepath='./Include/cpython/code.h' line='103' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyCodeObject' type-id='type-id-446' filepath='./Include/pytypedefs.h' line='21' column='1' id='type-id-447'/> + <pointer-type-def type-id='type-id-447' size-in-bits='64' id='type-id-444'/> + <class-decl name='_line_offsets' size-in-bits='320' is-struct='yes' visibility='default' filepath='./Include/cpython/code.h' line='179' column='1' id='type-id-448'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ar_start' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='180' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='ar_end' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='181' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ar_line' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='182' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='opaque' type-id='type-id-449' visibility='default' filepath='./Include/cpython/code.h' line='183' column='1'/> + </data-member> + </class-decl> + <class-decl name='_opaque' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/cpython/code.h' line='173' column='1' id='type-id-449'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='computed_line' type-id='type-id-8' visibility='default' filepath='./Include/cpython/code.h' line='174' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='lo_next' type-id='type-id-450' visibility='default' filepath='./Include/cpython/code.h' line='175' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='limit' type-id='type-id-450' visibility='default' filepath='./Include/cpython/code.h' line='176' column='1'/> + </data-member> + </class-decl> + <qualified-type-def type-id='type-id-285' const='yes' id='type-id-451'/> + <pointer-type-def type-id='type-id-451' size-in-bits='64' id='type-id-450'/> + <typedef-decl name='PyCodeAddressRange' type-id='type-id-448' filepath='./Include/cpython/code.h' line='184' column='1' id='type-id-445'/> + <typedef-decl name='PyTraceInfo' type-id='type-id-443' filepath='./Include/cpython/pystate.h' line='34' column='1' id='type-id-20'/> + <class-decl name='_stack_chunk' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/cpython/pystate.h' line='75' column='1' id='type-id-452'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='previous' type-id='type-id-453' visibility='default' filepath='./Include/cpython/pystate.h' line='76' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='size' type-id='type-id-54' visibility='default' filepath='./Include/cpython/pystate.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='top' type-id='type-id-54' visibility='default' filepath='./Include/cpython/pystate.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='data' type-id='type-id-360' visibility='default' filepath='./Include/cpython/pystate.h' line='79' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-452' size-in-bits='64' id='type-id-453'/> + <typedef-decl name='_PyStackChunk' type-id='type-id-452' filepath='./Include/cpython/pystate.h' line='80' column='1' id='type-id-454'/> + <pointer-type-def type-id='type-id-454' size-in-bits='64' id='type-id-21'/> + <var-decl name='_PyOS_ReadlineTState' type-id='type-id-10' mangled-name='_PyOS_ReadlineTState' visibility='default' filepath='./Include/cpython/pythonrun.h' line='120' column='1' elf-symbol-id='_PyOS_ReadlineTState'/> + <pointer-type-def type-id='type-id-455' size-in-bits='64' id='type-id-456'/> + <var-decl name='PyOS_InputHook' type-id='type-id-456' mangled-name='PyOS_InputHook' visibility='default' filepath='./Include/pythonrun.h' line='18' column='1' elf-symbol-id='PyOS_InputHook'/> + <class-decl name='_IO_FILE' size-in-bits='1728' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='49' column='1' id='type-id-457'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_flags' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='_IO_read_ptr' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='54' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='_IO_read_end' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='_IO_read_base' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='_IO_write_base' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='57' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='_IO_write_ptr' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_IO_write_end' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='_IO_buf_base' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='60' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='_IO_buf_end' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='_IO_save_base' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='_IO_backup_base' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='65' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='_IO_save_end' type-id='type-id-115' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='66' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='_markers' type-id='type-id-458' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='_chain' type-id='type-id-459' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='_fileno' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='72' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='928'> + <var-decl name='_flags2' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='73' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='_old_offset' type-id='type-id-460' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='_cur_column' type-id='type-id-461' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1040'> + <var-decl name='_vtable_offset' type-id='type-id-462' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1048'> + <var-decl name='_shortbuf' type-id='type-id-262' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='79' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='_lock' type-id='type-id-463' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='81' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1152'> + <var-decl name='_offset' type-id='type-id-464' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='89' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='_codecvt' type-id='type-id-465' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='91' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='_wide_data' type-id='type-id-466' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='92' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='_freeres_list' type-id='type-id-459' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='_freeres_buf' type-id='type-id-18' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='94' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='__pad5' type-id='type-id-54' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='95' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='_mode' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='96' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1568'> + <var-decl name='_unused2' type-id='type-id-467' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='98' column='1'/> + </data-member> + </class-decl> + <class-decl name='_IO_marker' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-468'/> + <pointer-type-def type-id='type-id-468' size-in-bits='64' id='type-id-458'/> + <pointer-type-def type-id='type-id-457' size-in-bits='64' id='type-id-459'/> + <typedef-decl name='__off_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='152' column='1' id='type-id-460'/> + <type-decl name='unsigned short int' size-in-bits='16' id='type-id-461'/> + <type-decl name='signed char' size-in-bits='8' id='type-id-462'/> + <typedef-decl name='_IO_lock_t' type-id='type-id-70' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h' line='43' column='1' id='type-id-469'/> + <pointer-type-def type-id='type-id-469' size-in-bits='64' id='type-id-463'/> + <typedef-decl name='__off64_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='153' column='1' id='type-id-464'/> + <class-decl name='_IO_codecvt' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-470'/> + <pointer-type-def type-id='type-id-470' size-in-bits='64' id='type-id-465'/> + <class-decl name='_IO_wide_data' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-471'/> + <pointer-type-def type-id='type-id-471' size-in-bits='64' id='type-id-466'/> + + <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='160' id='type-id-467'> + <subrange length='20' type-id='type-id-16' id='type-id-328'/> + + </array-type-def> + <typedef-decl name='FILE' type-id='type-id-457' filepath='/usr/include/x86_64-linux-gnu/bits/types/FILE.h' line='7' column='1' id='type-id-472'/> + <pointer-type-def type-id='type-id-472' size-in-bits='64' id='type-id-473'/> + <pointer-type-def type-id='type-id-474' size-in-bits='64' id='type-id-475'/> + <var-decl name='PyOS_ReadlineFunctionPointer' type-id='type-id-475' mangled-name='PyOS_ReadlineFunctionPointer' visibility='default' filepath='./Include/cpython/pythonrun.h' line='121' column='1' elf-symbol-id='PyOS_ReadlineFunctionPointer'/> + <function-decl name='PyOS_Readline' mangled-name='PyOS_Readline' filepath='Parser/myreadline.c' line='355' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_Readline'> + <parameter type-id='type-id-473' name='sys_stdin' filepath='Parser/myreadline.c' line='355' column='1'/> + <parameter type-id='type-id-473' name='sys_stdout' filepath='Parser/myreadline.c' line='355' column='1'/> + <parameter type-id='type-id-3' name='prompt' filepath='Parser/myreadline.c' line='355' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-124'> + <parameter type-id='type-id-14'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-201'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-200'/> + <parameter type-id='type-id-54'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-134'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-136'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-179'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-8'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-116'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-115'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-148'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-36'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-189'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-377'> + <parameter type-id='type-id-10'/> + <parameter type-id='type-id-376'/> + <parameter type-id='type-id-8'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-196'> + <parameter type-id='type-id-74'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-194'> + <parameter type-id='type-id-74'/> + <parameter type-id='type-id-36'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-207'> + <parameter type-id='type-id-206'/> + <return type-id='type-id-14'/> + </function-type> + <function-type size-in-bits='64' id='type-id-474'> + <parameter type-id='type-id-473'/> + <parameter type-id='type-id-473'/> + <parameter type-id='type-id-3'/> + <return type-id='type-id-115'/> + </function-type> + <function-type size-in-bits='64' id='type-id-455'> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-138'> + <parameter type-id='type-id-14'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-439'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-438'/> + <parameter type-id='type-id-8'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-152'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-157'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-191'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-170'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-169'/> + <parameter type-id='type-id-8'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-208'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-206'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-118'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-115'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-150'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-36'/> + <parameter type-id='type-id-14'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-177'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-176'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-174'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-243'> + <parameter type-id='type-id-3'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-365'> + <parameter type-id='type-id-18'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-129'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-22'/> + <return type-id='type-id-128'/> + </function-type> + <function-type size-in-bits='64' id='type-id-160'> + <parameter type-id='type-id-14'/> + <return type-id='type-id-159'/> + </function-type> + <function-type size-in-bits='64' id='type-id-146'> + <parameter type-id='type-id-14'/> + <return type-id='type-id-36'/> + </function-type> + <function-type size-in-bits='64' id='type-id-210'> + <return type-id='type-id-70'/> + </function-type> + <function-type size-in-bits='64' id='type-id-113'> + <parameter type-id='type-id-14'/> + <return type-id='type-id-70'/> + </function-type> + <function-type size-in-bits='64' id='type-id-172'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-169'/> + <return type-id='type-id-70'/> + </function-type> + <function-type size-in-bits='64' id='type-id-198'> + <parameter type-id='type-id-18'/> + <return type-id='type-id-70'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/abstract.c' comp-dir-path='/src' language='LANG_C99'> + <qualified-type-def type-id='type-id-115' const='yes' id='type-id-476'/> + <pointer-type-def type-id='type-id-476' size-in-bits='64' id='type-id-477'/> + <function-decl name='_Py_FreeCharPArray' mangled-name='_Py_FreeCharPArray' filepath='Objects/abstract.c' line='2969' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_FreeCharPArray'> + <parameter type-id='type-id-477' name='array' filepath='Objects/abstract.c' line='2969' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PySequence_BytesToCharpArray' mangled-name='_PySequence_BytesToCharpArray' filepath='Objects/abstract.c' line='2910' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySequence_BytesToCharpArray'> + <parameter type-id='type-id-14' name='self' filepath='Objects/abstract.c' line='2910' column='1'/> + <return type-id='type-id-477'/> + </function-decl> + <function-decl name='PyIter_Send' mangled-name='PyIter_Send' filepath='Objects/abstract.c' line='2877' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyIter_Send'> + <parameter type-id='type-id-14' name='iter' filepath='Objects/abstract.c' line='2877' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Objects/abstract.c' line='2877' column='1'/> + <parameter type-id='type-id-22' name='result' filepath='Objects/abstract.c' line='2877' column='1'/> + <return type-id='type-id-128'/> + </function-decl> + <function-decl name='PyIter_Next' mangled-name='PyIter_Next' filepath='Objects/abstract.c' line='2861' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyIter_Next'> + <parameter type-id='type-id-14' name='iter' filepath='Objects/abstract.c' line='2861' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyAIter_Check' mangled-name='PyAIter_Check' filepath='Objects/abstract.c' line='2845' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyAIter_Check'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyIter_Check' mangled-name='PyIter_Check' filepath='Objects/abstract.c' line='2837' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyIter_Check'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GetAIter' mangled-name='PyObject_GetAIter' filepath='Objects/abstract.c' line='2817' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GetAIter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2817' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_GetIter' mangled-name='PyObject_GetIter' filepath='Objects/abstract.c' line='2791' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GetIter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2791' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_RealIsSubclass' mangled-name='_PyObject_RealIsSubclass' filepath='Objects/abstract.c' line='2784' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_RealIsSubclass'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_RealIsInstance' mangled-name='_PyObject_RealIsInstance' filepath='Objects/abstract.c' line='2778' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_RealIsInstance'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_IsSubclass' mangled-name='PyObject_IsSubclass' filepath='Objects/abstract.c' line='2770' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_IsSubclass'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2770' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2770' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_IsInstance' mangled-name='PyObject_IsInstance' filepath='Objects/abstract.c' line='2682' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_IsInstance'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2770' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2770' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyMapping_Values' mangled-name='PyMapping_Values' filepath='Objects/abstract.c' line='2462' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_Values'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMapping_Items' mangled-name='PyMapping_Items' filepath='Objects/abstract.c' line='2450' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_Items'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMapping_Keys' mangled-name='PyMapping_Keys' filepath='Objects/abstract.c' line='2438' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_Keys'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMapping_HasKey' mangled-name='PyMapping_HasKey' filepath='Objects/abstract.c' line='2392' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_HasKey'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2770' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2770' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyMapping_HasKeyString' mangled-name='PyMapping_HasKeyString' filepath='Objects/abstract.c' line='2378' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_HasKeyString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2378' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2378' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyMapping_SetItemString' mangled-name='PyMapping_SetItemString' filepath='Objects/abstract.c' line='2359' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_SetItemString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/abstract.c' line='2359' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyMapping_GetItemString' mangled-name='PyMapping_GetItemString' filepath='Objects/abstract.c' line='2342' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_GetItemString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2342' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2342' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMapping_Length' mangled-name='PyMapping_Length' filepath='Objects/abstract.c' line='2335' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_Length'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyMapping_Size' mangled-name='PyMapping_Size' filepath='Objects/abstract.c' line='2310' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2310' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyMapping_Check' mangled-name='PyMapping_Check' filepath='Objects/abstract.c' line='2303' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMapping_Check'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySequence_Index' mangled-name='PySequence_Index' filepath='Objects/abstract.c' line='2295' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Index'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='2295' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2295' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PySequence_In' mangled-name='PySequence_In' filepath='Objects/abstract.c' line='2289' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_In'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySequence_Contains' mangled-name='PySequence_Contains' filepath='Objects/abstract.c' line='2274' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Contains'> + <parameter type-id='type-id-14' name='seq' filepath='Objects/abstract.c' line='2274' column='1'/> + <parameter type-id='type-id-14' name='ob' filepath='Objects/abstract.c' line='2274' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySequence_Count' mangled-name='PySequence_Count' filepath='Objects/abstract.c' line='2265' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Count'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='2295' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2295' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PySequence_IterSearch' mangled-name='_PySequence_IterSearch' filepath='Objects/abstract.c' line='2180' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySequence_IterSearch'> + <parameter type-id='type-id-14' name='seq' filepath='Objects/abstract.c' line='2180' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2180' column='1'/> + <parameter type-id='type-id-8' name='operation' filepath='Objects/abstract.c' line='2180' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PySequence_Fast' mangled-name='PySequence_Fast' filepath='Objects/abstract.c' line='2145' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Fast'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2145' column='1'/> + <parameter type-id='type-id-3' name='m' filepath='Objects/abstract.c' line='2145' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_List' mangled-name='PySequence_List' filepath='Objects/abstract.c' line='2122' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_List'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_Tuple' mangled-name='PySequence_Tuple' filepath='Objects/abstract.c' line='2038' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Tuple'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2038' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_DelSlice' mangled-name='PySequence_DelSlice' filepath='Objects/abstract.c' line='2015' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_DelSlice'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='2015' column='1'/> + <parameter type-id='type-id-36' name='i1' filepath='Objects/abstract.c' line='2015' column='1'/> + <parameter type-id='type-id-36' name='i2' filepath='Objects/abstract.c' line='2015' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySequence_SetSlice' mangled-name='PySequence_SetSlice' filepath='Objects/abstract.c' line='1992' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_SetSlice'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1992' column='1'/> + <parameter type-id='type-id-36' name='i1' filepath='Objects/abstract.c' line='1992' column='1'/> + <parameter type-id='type-id-36' name='i2' filepath='Objects/abstract.c' line='1992' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1992' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySequence_DelItem' mangled-name='PySequence_DelItem' filepath='Objects/abstract.c' line='1959' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_DelItem'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1959' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/abstract.c' line='1959' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySequence_SetItem' mangled-name='PySequence_SetItem' filepath='Objects/abstract.c' line='1926' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_SetItem'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1926' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/abstract.c' line='1926' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1926' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySequence_GetSlice' mangled-name='PySequence_GetSlice' filepath='Objects/abstract.c' line='1904' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_GetSlice'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1904' column='1'/> + <parameter type-id='type-id-36' name='i1' filepath='Objects/abstract.c' line='1904' column='1'/> + <parameter type-id='type-id-36' name='i2' filepath='Objects/abstract.c' line='1904' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_GetItem' mangled-name='PySequence_GetItem' filepath='Objects/abstract.c' line='1874' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_GetItem'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1874' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/abstract.c' line='1874' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_InPlaceRepeat' mangled-name='PySequence_InPlaceRepeat' filepath='Objects/abstract.c' line='1840' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_InPlaceRepeat'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1840' column='1'/> + <parameter type-id='type-id-36' name='count' filepath='Objects/abstract.c' line='1840' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_InPlaceConcat' mangled-name='PySequence_InPlaceConcat' filepath='Objects/abstract.c' line='1811' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_InPlaceConcat'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1811' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1811' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_Repeat' mangled-name='PySequence_Repeat' filepath='Objects/abstract.c' line='1780' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Repeat'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1780' column='1'/> + <parameter type-id='type-id-36' name='count' filepath='Objects/abstract.c' line='1780' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_Concat' mangled-name='PySequence_Concat' filepath='Objects/abstract.c' line='1754' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Concat'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1754' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1754' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySequence_Length' mangled-name='PySequence_Length' filepath='Objects/abstract.c' line='1747' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Length'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PySequence_Size' mangled-name='PySequence_Size' filepath='Objects/abstract.c' line='1723' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2310' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PySequence_Check' mangled-name='PySequence_Check' filepath='Objects/abstract.c' line='1714' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySequence_Check'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyNumber_ToBase' mangled-name='PyNumber_ToBase' filepath='Objects/abstract.c' line='1695' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_ToBase'> + <parameter type-id='type-id-14' name='n' filepath='Objects/abstract.c' line='1695' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Objects/abstract.c' line='1695' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Float' mangled-name='PyNumber_Float' filepath='Objects/abstract.c' line='1634' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Float'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1634' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Long' mangled-name='PyNumber_Long' filepath='Objects/abstract.c' line='1518' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Long'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1518' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_AsSsize_t' mangled-name='PyNumber_AsSsize_t' filepath='Objects/abstract.c' line='1467' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_AsSsize_t'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1467' column='1'/> + <parameter type-id='type-id-14' name='err' filepath='Objects/abstract.c' line='1467' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyNumber_Index' mangled-name='PyNumber_Index' filepath='Objects/abstract.c' line='1455' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Index'> + <parameter type-id='type-id-14' name='iter' filepath='Objects/abstract.c' line='2861' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyNumber_Index' mangled-name='_PyNumber_Index' filepath='Objects/abstract.c' line='1408' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyNumber_Index'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyIndex_Check' mangled-name='PyIndex_Check' filepath='Objects/abstract.c' line='1396' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyIndex_Check'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyNumber_Absolute' mangled-name='PyNumber_Absolute' filepath='Objects/abstract.c' line='1378' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Absolute'> + <parameter type-id='type-id-14' name='iter' filepath='Objects/abstract.c' line='2861' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Invert' mangled-name='PyNumber_Invert' filepath='Objects/abstract.c' line='1361' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Invert'> + <parameter type-id='type-id-14' name='iter' filepath='Objects/abstract.c' line='2861' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Positive' mangled-name='PyNumber_Positive' filepath='Objects/abstract.c' line='1344' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Positive'> + <parameter type-id='type-id-14' name='iter' filepath='Objects/abstract.c' line='2861' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Negative' mangled-name='PyNumber_Negative' filepath='Objects/abstract.c' line='1327' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Negative'> + <parameter type-id='type-id-14' name='iter' filepath='Objects/abstract.c' line='2861' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlacePower' mangled-name='PyNumber_InPlacePower' filepath='Objects/abstract.c' line='1311' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlacePower'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1311' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1311' column='1'/> + <parameter type-id='type-id-14' name='z' filepath='Objects/abstract.c' line='1311' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceMultiply' mangled-name='PyNumber_InPlaceMultiply' filepath='Objects/abstract.c' line='1282' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceMultiply'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1282' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1282' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceAdd' mangled-name='PyNumber_InPlaceAdd' filepath='Objects/abstract.c' line='1259' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceAdd'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1282' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1282' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceRemainder' mangled-name='PyNumber_InPlaceRemainder' filepath='Objects/abstract.c' line='1256' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceRemainder'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceTrueDivide' mangled-name='PyNumber_InPlaceTrueDivide' filepath='Objects/abstract.c' line='1255' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceTrueDivide'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceFloorDivide' mangled-name='PyNumber_InPlaceFloorDivide' filepath='Objects/abstract.c' line='1254' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceFloorDivide'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceMatrixMultiply' mangled-name='PyNumber_InPlaceMatrixMultiply' filepath='Objects/abstract.c' line='1253' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceMatrixMultiply'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceSubtract' mangled-name='PyNumber_InPlaceSubtract' filepath='Objects/abstract.c' line='1252' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceSubtract'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceRshift' mangled-name='PyNumber_InPlaceRshift' filepath='Objects/abstract.c' line='1251' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceRshift'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceLshift' mangled-name='PyNumber_InPlaceLshift' filepath='Objects/abstract.c' line='1250' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceLshift'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceAnd' mangled-name='PyNumber_InPlaceAnd' filepath='Objects/abstract.c' line='1249' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceAnd'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceXor' mangled-name='PyNumber_InPlaceXor' filepath='Objects/abstract.c' line='1248' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceXor'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_InPlaceOr' mangled-name='PyNumber_InPlaceOr' filepath='Objects/abstract.c' line='1247' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_InPlaceOr'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Power' mangled-name='PyNumber_Power' filepath='Objects/abstract.c' line='1152' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Power'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1311' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1311' column='1'/> + <parameter type-id='type-id-14' name='z' filepath='Objects/abstract.c' line='1311' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Remainder' mangled-name='PyNumber_Remainder' filepath='Objects/abstract.c' line='1146' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Remainder'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_TrueDivide' mangled-name='PyNumber_TrueDivide' filepath='Objects/abstract.c' line='1140' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_TrueDivide'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_FloorDivide' mangled-name='PyNumber_FloorDivide' filepath='Objects/abstract.c' line='1134' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_FloorDivide'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_MatrixMultiply' mangled-name='PyNumber_MatrixMultiply' filepath='Objects/abstract.c' line='1128' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_MatrixMultiply'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Multiply' mangled-name='PyNumber_Multiply' filepath='Objects/abstract.c' line='1109' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Multiply'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1282' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1282' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Add' mangled-name='PyNumber_Add' filepath='Objects/abstract.c' line='1071' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Add'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1071' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1071' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Divmod' mangled-name='PyNumber_Divmod' filepath='Objects/abstract.c' line='1068' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Divmod'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Subtract' mangled-name='PyNumber_Subtract' filepath='Objects/abstract.c' line='1067' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Subtract'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Rshift' mangled-name='PyNumber_Rshift' filepath='Objects/abstract.c' line='1066' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Rshift'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Lshift' mangled-name='PyNumber_Lshift' filepath='Objects/abstract.c' line='1065' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Lshift'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_And' mangled-name='PyNumber_And' filepath='Objects/abstract.c' line='1064' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_And'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Xor' mangled-name='PyNumber_Xor' filepath='Objects/abstract.c' line='1063' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Xor'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Or' mangled-name='PyNumber_Or' filepath='Objects/abstract.c' line='1062' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Or'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyNumber_Check' mangled-name='PyNumber_Check' filepath='Objects/abstract.c' line='832' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyNumber_Check'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_Format' mangled-name='PyObject_Format' filepath='Objects/abstract.c' line='770' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Format'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='770' column='1'/> + <parameter type-id='type-id-14' name='format_spec' filepath='Objects/abstract.c' line='770' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyBuffer_Release' mangled-name='PyBuffer_Release' filepath='Objects/abstract.c' line='755' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_Release'> + <parameter type-id='type-id-169' name='view' filepath='Objects/abstract.c' line='755' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyBuffer_FillInfo' mangled-name='PyBuffer_FillInfo' filepath='Objects/abstract.c' line='716' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_FillInfo'> + <parameter type-id='type-id-169' name='view' filepath='Objects/abstract.c' line='716' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='716' column='1'/> + <parameter type-id='type-id-18' name='buf' filepath='Objects/abstract.c' line='716' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/abstract.c' line='716' column='1'/> + <parameter type-id='type-id-8' name='readonly' filepath='Objects/abstract.c' line='717' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Objects/abstract.c' line='717' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyBuffer_FillContiguousStrides' mangled-name='PyBuffer_FillContiguousStrides' filepath='Objects/abstract.c' line='692' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_FillContiguousStrides'> + <parameter type-id='type-id-8' name='nd' filepath='Objects/abstract.c' line='692' column='1'/> + <parameter type-id='type-id-168' name='shape' filepath='Objects/abstract.c' line='692' column='1'/> + <parameter type-id='type-id-168' name='strides' filepath='Objects/abstract.c' line='693' column='1'/> + <parameter type-id='type-id-8' name='itemsize' filepath='Objects/abstract.c' line='693' column='1'/> + <parameter type-id='type-id-1' name='fort' filepath='Objects/abstract.c' line='694' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyObject_CopyData' mangled-name='PyObject_CopyData' filepath='Objects/abstract.c' line='621' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CopyData'> + <parameter type-id='type-id-14' name='dest' filepath='Objects/abstract.c' line='621' column='1'/> + <parameter type-id='type-id-14' name='src' filepath='Objects/abstract.c' line='621' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <qualified-type-def type-id='type-id-166' const='yes' id='type-id-478'/> + <pointer-type-def type-id='type-id-478' size-in-bits='64' id='type-id-479'/> + <function-decl name='PyBuffer_FromContiguous' mangled-name='PyBuffer_FromContiguous' filepath='Objects/abstract.c' line='569' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_FromContiguous'> + <parameter type-id='type-id-479' name='view' filepath='Objects/abstract.c' line='569' column='1'/> + <parameter type-id='type-id-18' name='buf' filepath='Objects/abstract.c' line='569' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/abstract.c' line='569' column='1'/> + <parameter type-id='type-id-1' name='fort' filepath='Objects/abstract.c' line='569' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyBuffer_SizeFromFormat' mangled-name='PyBuffer_SizeFromFormat' filepath='Objects/abstract.c' line='527' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_SizeFromFormat'> + <parameter type-id='type-id-3' name='format' filepath='Objects/abstract.c' line='527' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <qualified-type-def type-id='type-id-36' const='yes' id='type-id-480'/> + <pointer-type-def type-id='type-id-480' size-in-bits='64' id='type-id-481'/> + <function-decl name='_Py_add_one_to_index_C' mangled-name='_Py_add_one_to_index_C' filepath='Objects/abstract.c' line='511' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_add_one_to_index_C'> + <parameter type-id='type-id-8' name='nd' filepath='Objects/abstract.c' line='511' column='1'/> + <parameter type-id='type-id-168' name='index' filepath='Objects/abstract.c' line='511' column='1'/> + <parameter type-id='type-id-481' name='shape' filepath='Objects/abstract.c' line='511' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_add_one_to_index_F' mangled-name='_Py_add_one_to_index_F' filepath='Objects/abstract.c' line='495' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_add_one_to_index_F'> + <parameter type-id='type-id-8' name='nd' filepath='Objects/abstract.c' line='511' column='1'/> + <parameter type-id='type-id-168' name='index' filepath='Objects/abstract.c' line='511' column='1'/> + <parameter type-id='type-id-481' name='shape' filepath='Objects/abstract.c' line='511' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyBuffer_GetPointer' mangled-name='PyBuffer_GetPointer' filepath='Objects/abstract.c' line='479' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_GetPointer'> + <parameter type-id='type-id-479' name='view' filepath='Objects/abstract.c' line='479' column='1'/> + <parameter type-id='type-id-481' name='indices' filepath='Objects/abstract.c' line='479' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyBuffer_IsContiguous' mangled-name='PyBuffer_IsContiguous' filepath='Objects/abstract.c' line='463' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_IsContiguous'> + <parameter type-id='type-id-479' name='view' filepath='Objects/abstract.c' line='463' column='1'/> + <parameter type-id='type-id-1' name='order' filepath='Objects/abstract.c' line='463' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GetBuffer' mangled-name='PyObject_GetBuffer' filepath='Objects/abstract.c' line='380' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GetBuffer'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='380' column='1'/> + <parameter type-id='type-id-169' name='view' filepath='Objects/abstract.c' line='380' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Objects/abstract.c' line='380' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <pointer-type-def type-id='type-id-18' size-in-bits='64' id='type-id-482'/> + <function-decl name='PyObject_AsWriteBuffer' mangled-name='PyObject_AsWriteBuffer' filepath='Objects/abstract.c' line='351' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_AsWriteBuffer'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='351' column='1'/> + <parameter type-id='type-id-482' name='buffer' filepath='Objects/abstract.c' line='352' column='1'/> + <parameter type-id='type-id-168' name='buffer_len' filepath='Objects/abstract.c' line='353' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_AsReadBuffer' mangled-name='PyObject_AsReadBuffer' filepath='Objects/abstract.c' line='344' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_AsReadBuffer'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='344' column='1'/> + <parameter type-id='type-id-482' name='buffer' filepath='Objects/abstract.c' line='345' column='1'/> + <parameter type-id='type-id-168' name='buffer_len' filepath='Objects/abstract.c' line='346' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <pointer-type-def type-id='type-id-3' size-in-bits='64' id='type-id-483'/> + <function-decl name='PyObject_AsCharBuffer' mangled-name='PyObject_AsCharBuffer' filepath='Objects/abstract.c' line='337' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_AsCharBuffer'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='337' column='1'/> + <parameter type-id='type-id-483' name='buffer' filepath='Objects/abstract.c' line='338' column='1'/> + <parameter type-id='type-id-168' name='buffer_len' filepath='Objects/abstract.c' line='339' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_CheckReadBuffer' mangled-name='PyObject_CheckReadBuffer' filepath='Objects/abstract.c' line='302' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CheckReadBuffer'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='302' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_CheckBuffer' mangled-name='PyObject_CheckBuffer' filepath='Objects/abstract.c' line='291' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CheckBuffer'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_DelItemString' mangled-name='PyObject_DelItemString' filepath='Objects/abstract.c' line='271' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_DelItemString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='271' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='271' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_DelItem' mangled-name='PyObject_DelItem' filepath='Objects/abstract.c' line='237' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_DelItem'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='237' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/abstract.c' line='237' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_SetItem' mangled-name='PyObject_SetItem' filepath='Objects/abstract.c' line='203' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_SetItem'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='203' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/abstract.c' line='203' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/abstract.c' line='203' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GetItem' mangled-name='PyObject_GetItem' filepath='Objects/abstract.c' line='149' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GetItem'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='149' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/abstract.c' line='149' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_LengthHint' mangled-name='PyObject_LengthHint' filepath='Objects/abstract.c' line='91' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_LengthHint'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='91' column='1'/> + <parameter type-id='type-id-36' name='defaultvalue' filepath='Objects/abstract.c' line='91' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PyObject_HasLen' mangled-name='_PyObject_HasLen' filepath='Objects/abstract.c' line='79' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_HasLen'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_Length' mangled-name='PyObject_Length' filepath='Objects/abstract.c' line='72' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Length'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyObject_Size' mangled-name='PyObject_Size' filepath='Objects/abstract.c' line='53' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2310' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyObject_Type' mangled-name='PyObject_Type' filepath='Objects/abstract.c' line='39' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Type'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/accu.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-484' visibility='default' filepath='./Include/internal/pycore_accu.h' line='24' column='1' id='type-id-485'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='large' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_accu.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='small' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_accu.h' line='26' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='_PyAccu' type-id='type-id-485' filepath='./Include/internal/pycore_accu.h' line='27' column='1' id='type-id-484'/> + <pointer-type-def type-id='type-id-484' size-in-bits='64' id='type-id-486'/> + <function-decl name='_PyAccu_Destroy' mangled-name='_PyAccu_Destroy' filepath='Objects/accu.c' line='111' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyAccu_Destroy'> + <parameter type-id='type-id-486' name='acc' filepath='Objects/accu.c' line='111' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyAccu_Finish' mangled-name='_PyAccu_Finish' filepath='Objects/accu.c' line='93' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyAccu_Finish'> + <parameter type-id='type-id-486' name='acc' filepath='Objects/accu.c' line='93' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyAccu_FinishAsList' mangled-name='_PyAccu_FinishAsList' filepath='Objects/accu.c' line='76' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyAccu_FinishAsList'> + <parameter type-id='type-id-486' name='acc' filepath='Objects/accu.c' line='76' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyAccu_Accumulate' mangled-name='_PyAccu_Accumulate' filepath='Objects/accu.c' line='55' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyAccu_Accumulate'> + <parameter type-id='type-id-486' name='acc' filepath='Objects/accu.c' line='55' column='1'/> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/accu.c' line='55' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyAccu_Init' mangled-name='_PyAccu_Init' filepath='Objects/accu.c' line='18' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyAccu_Init'> + <parameter type-id='type-id-486' name='acc' filepath='Objects/accu.c' line='18' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/boolobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyBool_Type' type-id='type-id-112' mangled-name='PyBool_Type' visibility='default' filepath='./Include/boolobject.h' line='10' column='1' elf-symbol-id='PyBool_Type'/> + <var-decl name='_Py_FalseStruct' type-id='type-id-259' mangled-name='_Py_FalseStruct' visibility='default' filepath='./Include/boolobject.h' line='18' column='1' elf-symbol-id='_Py_FalseStruct'/> + <var-decl name='_Py_TrueStruct' type-id='type-id-259' mangled-name='_Py_TrueStruct' visibility='default' filepath='./Include/boolobject.h' line='19' column='1' elf-symbol-id='_Py_TrueStruct'/> + <function-decl name='PyBool_FromLong' mangled-name='PyBool_FromLong' filepath='Objects/boolobject.c' line='18' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBool_FromLong'> + <parameter type-id='type-id-53' name='ok' filepath='Objects/boolobject.c' line='18' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/bytes_methods.c' comp-dir-path='/src' language='LANG_C99'> + + <array-type-def dimensions='1' type-id='type-id-2' size-in-bits='infinite' id='type-id-487'> + <subrange length='infinite' id='type-id-6'/> + + </array-type-def> + <qualified-type-def type-id='type-id-487' const='yes' id='type-id-488'/> + <var-decl name='_Py_isspace__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='42' column='1'/> + <var-decl name='_Py_isalpha__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='43' column='1'/> + <var-decl name='_Py_isalnum__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='44' column='1'/> + <var-decl name='_Py_isascii__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='45' column='1'/> + <var-decl name='_Py_isdigit__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='46' column='1'/> + <var-decl name='_Py_islower__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='47' column='1'/> + <var-decl name='_Py_isupper__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='48' column='1'/> + <var-decl name='_Py_istitle__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='49' column='1'/> + <var-decl name='_Py_lower__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='50' column='1'/> + <var-decl name='_Py_upper__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='51' column='1'/> + <var-decl name='_Py_title__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='52' column='1'/> + <var-decl name='_Py_capitalize__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='53' column='1'/> + <var-decl name='_Py_swapcase__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='54' column='1'/> + <var-decl name='_Py_maketrans__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='62' column='1'/> + <var-decl name='_Py_find__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='56' column='1'/> + <var-decl name='_Py_index__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='57' column='1'/> + <var-decl name='_Py_rfind__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='58' column='1'/> + <var-decl name='_Py_rindex__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='59' column='1'/> + <var-decl name='_Py_count__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='55' column='1'/> + <var-decl name='_Py_startswith__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='60' column='1'/> + <var-decl name='_Py_endswith__doc__' type-id='type-id-488' visibility='default' filepath='./Include/internal/pycore_bytes_methods.h' line='61' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/bytearrayobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyByteArray_empty_string' type-id='type-id-409' mangled-name='_PyByteArray_empty_string' visibility='default' filepath='./Include/cpython/bytearrayobject.h' line='14' column='1' elf-symbol-id='_PyByteArray_empty_string'/> + <var-decl name='PyByteArray_Type' type-id='type-id-112' mangled-name='PyByteArray_Type' visibility='default' filepath='./Include/bytearrayobject.h' line='20' column='1' elf-symbol-id='PyByteArray_Type'/> + <var-decl name='PyByteArrayIter_Type' type-id='type-id-112' mangled-name='PyByteArrayIter_Type' visibility='default' filepath='./Include/bytearrayobject.h' line='21' column='1' elf-symbol-id='PyByteArrayIter_Type'/> + <function-decl name='PyByteArray_Concat' mangled-name='PyByteArray_Concat' filepath='Objects/bytearrayobject.c' line='249' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyByteArray_Concat'> + <parameter type-id='type-id-14' name='a' filepath='Objects/bytearrayobject.c' line='249' column='1'/> + <parameter type-id='type-id-14' name='b' filepath='Objects/bytearrayobject.c' line='249' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyByteArray_Resize' mangled-name='PyByteArray_Resize' filepath='Objects/bytearrayobject.c' line='170' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyByteArray_Resize'> + <parameter type-id='type-id-14' name='self' filepath='Objects/bytearrayobject.c' line='170' column='1'/> + <parameter type-id='type-id-36' name='requested_size' filepath='Objects/bytearrayobject.c' line='170' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyByteArray_AsString' mangled-name='PyByteArray_AsString' filepath='Objects/bytearrayobject.c' line='161' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyByteArray_AsString'> + <parameter type-id='type-id-14' name='self' filepath='Objects/bytearrayobject.c' line='161' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='PyByteArray_Size' mangled-name='PyByteArray_Size' filepath='Objects/bytearrayobject.c' line='152' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyByteArray_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyByteArray_FromStringAndSize' mangled-name='PyByteArray_FromStringAndSize' filepath='Objects/bytearrayobject.c' line='108' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyByteArray_FromStringAndSize'> + <parameter type-id='type-id-3' name='bytes' filepath='Objects/bytearrayobject.c' line='108' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytearrayobject.c' line='108' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyByteArray_FromObject' mangled-name='PyByteArray_FromObject' filepath='Objects/bytearrayobject.c' line='82' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyByteArray_FromObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/bytesobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyBytes_Type' type-id='type-id-112' mangled-name='PyBytes_Type' visibility='default' filepath='./Include/bytesobject.h' line='27' column='1' elf-symbol-id='PyBytes_Type'/> + <var-decl name='PyBytesIter_Type' type-id='type-id-112' mangled-name='PyBytesIter_Type' visibility='default' filepath='./Include/bytesobject.h' line='28' column='1' elf-symbol-id='PyBytesIter_Type'/> + <function-decl name='_PyBytes_Repeat' mangled-name='_PyBytes_Repeat' filepath='Objects/bytesobject.c' line='3566' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_Repeat'> + <parameter type-id='type-id-115' name='dest' filepath='Objects/bytesobject.c' line='3566' column='1'/> + <parameter type-id='type-id-36' name='len_dest' filepath='Objects/bytesobject.c' line='3566' column='1'/> + <parameter type-id='type-id-3' name='src' filepath='Objects/bytesobject.c' line='3567' column='1'/> + <parameter type-id='type-id-36' name='len_src' filepath='Objects/bytesobject.c' line='3567' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <class-decl name='__anonymous_struct__' size-in-bits='4416' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-489' visibility='default' filepath='./Include/cpython/bytesobject.h' line='59' column='1' id='type-id-490'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='buffer' type-id='type-id-14' visibility='default' filepath='./Include/cpython/bytesobject.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='allocated' type-id='type-id-36' visibility='default' filepath='./Include/cpython/bytesobject.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='min_size' type-id='type-id-36' visibility='default' filepath='./Include/cpython/bytesobject.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='use_bytearray' type-id='type-id-8' visibility='default' filepath='./Include/cpython/bytesobject.h' line='71' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='overallocate' type-id='type-id-8' visibility='default' filepath='./Include/cpython/bytesobject.h' line='75' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='use_small_buffer' type-id='type-id-8' visibility='default' filepath='./Include/cpython/bytesobject.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='small_buffer' type-id='type-id-491' visibility='default' filepath='./Include/cpython/bytesobject.h' line='79' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-1' size-in-bits='4096' id='type-id-491'> + <subrange length='512' type-id='type-id-16' id='type-id-492'/> + + </array-type-def> + <typedef-decl name='_PyBytesWriter' type-id='type-id-490' filepath='./Include/cpython/bytesobject.h' line='80' column='1' id='type-id-489'/> + <pointer-type-def type-id='type-id-489' size-in-bits='64' id='type-id-493'/> + <function-decl name='_PyBytesWriter_WriteBytes' mangled-name='_PyBytesWriter_WriteBytes' filepath='Objects/bytesobject.c' line='3549' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytesWriter_WriteBytes'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/bytesobject.c' line='3549' column='1'/> + <parameter type-id='type-id-18' name='ptr' filepath='Objects/bytesobject.c' line='3549' column='1'/> + <parameter type-id='type-id-18' name='bytes' filepath='Objects/bytesobject.c' line='3550' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytesobject.c' line='3550' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='_PyBytesWriter_Finish' mangled-name='_PyBytesWriter_Finish' filepath='Objects/bytesobject.c' line='3505' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytesWriter_Finish'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/bytesobject.c' line='3505' column='1'/> + <parameter type-id='type-id-18' name='str' filepath='Objects/bytesobject.c' line='3505' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyBytesWriter_Alloc' mangled-name='_PyBytesWriter_Alloc' filepath='Objects/bytesobject.c' line='3475' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytesWriter_Alloc'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/bytesobject.c' line='3475' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytesobject.c' line='3475' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='_PyBytesWriter_Prepare' mangled-name='_PyBytesWriter_Prepare' filepath='Objects/bytesobject.c' line='3445' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytesWriter_Prepare'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/bytesobject.c' line='3445' column='1'/> + <parameter type-id='type-id-18' name='str' filepath='Objects/bytesobject.c' line='3445' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytesobject.c' line='3445' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='_PyBytesWriter_Resize' mangled-name='_PyBytesWriter_Resize' filepath='Objects/bytesobject.c' line='3375' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytesWriter_Resize'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/bytesobject.c' line='3375' column='1'/> + <parameter type-id='type-id-18' name='str' filepath='Objects/bytesobject.c' line='3375' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytesobject.c' line='3375' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='_PyBytesWriter_Dealloc' mangled-name='_PyBytesWriter_Dealloc' filepath='Objects/bytesobject.c' line='3305' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytesWriter_Dealloc'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/bytesobject.c' line='3305' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyBytesWriter_Init' mangled-name='_PyBytesWriter_Init' filepath='Objects/bytesobject.c' line='3294' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytesWriter_Init'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/bytesobject.c' line='3294' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyBytes_Resize' mangled-name='_PyBytes_Resize' filepath='Objects/bytesobject.c' line='3055' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_Resize'> + <parameter type-id='type-id-22' name='pv' filepath='Objects/bytesobject.c' line='3055' column='1'/> + <parameter type-id='type-id-36' name='newsize' filepath='Objects/bytesobject.c' line='3055' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyBytes_ConcatAndDel' mangled-name='PyBytes_ConcatAndDel' filepath='Objects/bytesobject.c' line='3033' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_ConcatAndDel'> + <parameter type-id='type-id-22' name='pv' filepath='Objects/bytesobject.c' line='3033' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/bytesobject.c' line='3033' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyBytes_Concat' mangled-name='PyBytes_Concat' filepath='Objects/bytesobject.c' line='2984' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_Concat'> + <parameter type-id='type-id-22' name='pv' filepath='Objects/bytesobject.c' line='2984' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/bytesobject.c' line='2984' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyBytes_FromObject' mangled-name='PyBytes_FromObject' filepath='Objects/bytesobject.c' line='2841' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_FromObject'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyBytes_FromHex' mangled-name='_PyBytes_FromHex' filepath='Objects/bytesobject.c' line='2381' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_FromHex'> + <parameter type-id='type-id-14' name='string' filepath='Objects/bytesobject.c' line='2381' column='1'/> + <parameter type-id='type-id-8' name='use_bytearray' filepath='Objects/bytesobject.c' line='2381' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyBytes_Join' mangled-name='_PyBytes_Join' filepath='Objects/bytesobject.c' line='1862' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_Join'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyBytes_Repr' mangled-name='PyBytes_Repr' filepath='Objects/bytesobject.c' line='1302' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_Repr'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/bytesobject.c' line='1302' column='1'/> + <parameter type-id='type-id-8' name='smartquotes' filepath='Objects/bytesobject.c' line='1302' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyBytes_ReverseFind' mangled-name='_PyBytes_ReverseFind' filepath='Objects/bytesobject.c' line='1293' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_ReverseFind'> + <parameter type-id='type-id-3' name='haystack' filepath='Objects/bytesobject.c' line='1293' column='1'/> + <parameter type-id='type-id-36' name='len_haystack' filepath='Objects/bytesobject.c' line='1293' column='1'/> + <parameter type-id='type-id-3' name='needle' filepath='Objects/bytesobject.c' line='1294' column='1'/> + <parameter type-id='type-id-36' name='len_needle' filepath='Objects/bytesobject.c' line='1294' column='1'/> + <parameter type-id='type-id-36' name='offset' filepath='Objects/bytesobject.c' line='1295' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PyBytes_Find' mangled-name='_PyBytes_Find' filepath='Objects/bytesobject.c' line='1284' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_Find'> + <parameter type-id='type-id-3' name='haystack' filepath='Objects/bytesobject.c' line='1293' column='1'/> + <parameter type-id='type-id-36' name='len_haystack' filepath='Objects/bytesobject.c' line='1293' column='1'/> + <parameter type-id='type-id-3' name='needle' filepath='Objects/bytesobject.c' line='1294' column='1'/> + <parameter type-id='type-id-36' name='len_needle' filepath='Objects/bytesobject.c' line='1294' column='1'/> + <parameter type-id='type-id-36' name='offset' filepath='Objects/bytesobject.c' line='1295' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <pointer-type-def type-id='type-id-115' size-in-bits='64' id='type-id-494'/> + <function-decl name='PyBytes_AsStringAndSize' mangled-name='PyBytes_AsStringAndSize' filepath='Objects/bytesobject.c' line='1237' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_AsStringAndSize'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/bytesobject.c' line='1237' column='1'/> + <parameter type-id='type-id-494' name='s' filepath='Objects/bytesobject.c' line='1238' column='1'/> + <parameter type-id='type-id-168' name='len' filepath='Objects/bytesobject.c' line='1239' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyBytes_AsString' mangled-name='PyBytes_AsString' filepath='Objects/bytesobject.c' line='1226' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_AsString'> + <parameter type-id='type-id-14' name='self' filepath='Objects/bytearrayobject.c' line='161' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='PyBytes_Size' mangled-name='PyBytes_Size' filepath='Objects/bytesobject.c' line='1215' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyBytes_DecodeEscape' mangled-name='PyBytes_DecodeEscape' filepath='Objects/bytesobject.c' line='1176' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_DecodeEscape'> + <parameter type-id='type-id-3' name='s' filepath='Objects/bytesobject.c' line='1176' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/bytesobject.c' line='1177' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/bytesobject.c' line='1178' column='1'/> + <parameter type-id='type-id-36' name='_unused_unicode' filepath='Objects/bytesobject.c' line='1179' column='1'/> + <parameter type-id='type-id-3' name='_unused_recode_encoding' filepath='Objects/bytesobject.c' line='1180' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyBytes_DecodeEscape' mangled-name='_PyBytes_DecodeEscape' filepath='Objects/bytesobject.c' line='1062' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_DecodeEscape'> + <parameter type-id='type-id-3' name='s' filepath='Objects/bytesobject.c' line='1062' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/bytesobject.c' line='1063' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/bytesobject.c' line='1064' column='1'/> + <parameter type-id='type-id-483' name='first_invalid_escape' filepath='Objects/bytesobject.c' line='1065' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyBytes_FormatEx' mangled-name='_PyBytes_FormatEx' filepath='Objects/bytesobject.c' line='581' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyBytes_FormatEx'> + <parameter type-id='type-id-3' name='format' filepath='Objects/bytesobject.c' line='581' column='1'/> + <parameter type-id='type-id-36' name='format_len' filepath='Objects/bytesobject.c' line='581' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/bytesobject.c' line='582' column='1'/> + <parameter type-id='type-id-8' name='use_bytearray' filepath='Objects/bytesobject.c' line='582' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyBytes_FromFormat' mangled-name='PyBytes_FromFormat' filepath='Objects/bytesobject.c' line='375' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_FromFormat'> + <parameter type-id='type-id-3' name='format' filepath='Objects/bytesobject.c' line='375' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <class-decl name='__va_list_tag' size-in-bits='192' is-struct='yes' visibility='default' id='type-id-495'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='gp_offset' type-id='type-id-105' visibility='default'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='fp_offset' type-id='type-id-105' visibility='default'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='overflow_arg_area' type-id='type-id-18' visibility='default'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='reg_save_area' type-id='type-id-18' visibility='default'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-495' size-in-bits='64' id='type-id-496'/> + <function-decl name='PyBytes_FromFormatV' mangled-name='PyBytes_FromFormatV' filepath='Objects/bytesobject.c' line='184' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_FromFormatV'> + <parameter type-id='type-id-3' name='format' filepath='Objects/bytesobject.c' line='184' column='1'/> + <parameter type-id='type-id-496' name='vargs' filepath='Objects/bytesobject.c' line='184' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyBytes_FromString' mangled-name='PyBytes_FromString' filepath='Objects/bytesobject.c' line='147' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_FromString'> + <parameter type-id='type-id-3' name='str' filepath='Objects/bytesobject.c' line='147' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyBytes_FromStringAndSize' mangled-name='PyBytes_FromStringAndSize' filepath='Objects/bytesobject.c' line='119' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBytes_FromStringAndSize'> + <parameter type-id='type-id-3' name='str' filepath='Objects/bytesobject.c' line='119' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytesobject.c' line='119' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/call.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyStack_AsDict' mangled-name='_PyStack_AsDict' filepath='Objects/call.c' line='935' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyStack_AsDict'> + <parameter type-id='type-id-200' name='values' filepath='Objects/call.c' line='935' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Objects/call.c' line='935' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_CallFunctionObjArgs' mangled-name='PyObject_CallFunctionObjArgs' filepath='Objects/call.c' line='918' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallFunctionObjArgs'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='918' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <class-decl name='_Py_Identifier' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/cpython/object.h' line='37' column='1' id='type-id-497'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='string' type-id='type-id-3' visibility='default' filepath='./Include/cpython/object.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='index' type-id='type-id-36' visibility='default' filepath='./Include/cpython/object.h' line='41' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='_Py_Identifier' type-id='type-id-497' filepath='./Include/cpython/object.h' line='42' column='1' id='type-id-498'/> + <pointer-type-def type-id='type-id-498' size-in-bits='64' id='type-id-499'/> + <function-decl name='_PyObject_CallMethodIdObjArgs' mangled-name='_PyObject_CallMethodIdObjArgs' filepath='Objects/call.c' line='888' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CallMethodIdObjArgs'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='888' column='1'/> + <parameter type-id='type-id-499' name='name' filepath='Objects/call.c' line='888' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_CallMethodObjArgs' mangled-name='PyObject_CallMethodObjArgs' filepath='Objects/call.c' line='863' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallMethodObjArgs'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='863' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/call.c' line='863' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_VectorcallMethod' mangled-name='PyObject_VectorcallMethod' filepath='Objects/call.c' line='829' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_VectorcallMethod'> + <parameter type-id='type-id-14' name='name' filepath='Objects/call.c' line='829' column='1'/> + <parameter type-id='type-id-200' name='args' filepath='Objects/call.c' line='829' column='1'/> + <parameter type-id='type-id-54' name='nargsf' filepath='Objects/call.c' line='830' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Objects/call.c' line='830' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_CallMethodId_SizeT' mangled-name='_PyObject_CallMethodId_SizeT' filepath='Objects/call.c' line='745' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CallMethodId_SizeT'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='745' column='1'/> + <parameter type-id='type-id-499' name='name' filepath='Objects/call.c' line='745' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='746' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_CallMethod_SizeT' mangled-name='_PyObject_CallMethod_SizeT' filepath='Objects/call.c' line='721' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CallMethod_SizeT'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='721' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Objects/call.c' line='721' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='722' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_CallMethodId' mangled-name='_PyObject_CallMethodId' filepath='Objects/call.c' line='686' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CallMethodId'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='745' column='1'/> + <parameter type-id='type-id-499' name='name' filepath='Objects/call.c' line='745' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='746' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_CallMethod' mangled-name='_PyObject_CallMethod' filepath='Objects/call.c' line='662' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CallMethod'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='662' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/call.c' line='662' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='663' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_CallMethod' mangled-name='PyEval_CallMethod' filepath='Objects/call.c' line='639' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_CallMethod'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='721' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Objects/call.c' line='721' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='722' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_CallMethod' mangled-name='PyObject_CallMethod' filepath='Objects/call.c' line='612' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallMethod'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='721' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Objects/call.c' line='721' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='722' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_CallFunction_SizeT' mangled-name='_PyObject_CallFunction_SizeT' filepath='Objects/call.c' line='584' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CallFunction_SizeT'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='584' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='584' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_CallFunction' mangled-name='PyEval_CallFunction' filepath='Objects/call.c' line='569' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_CallFunction'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='584' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='584' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_CallFunction' mangled-name='PyObject_CallFunction' filepath='Objects/call.c' line='551' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallFunction'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='584' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Objects/call.c' line='584' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_Call_Prepend' mangled-name='_PyObject_Call_Prepend' filepath='Objects/call.c' line='456' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_Call_Prepend'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/call.c' line='456' column='1'/> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='456' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Objects/call.c' line='457' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='457' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='457' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_CallObject' mangled-name='PyObject_CallObject' filepath='Objects/call.c' line='438' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallObject'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='438' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='438' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_CallObjectWithKeywords' mangled-name='PyEval_CallObjectWithKeywords' filepath='Objects/call.c' line='405' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_CallObjectWithKeywords'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='405' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='406' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='406' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyFunction_Vectorcall' mangled-name='_PyFunction_Vectorcall' filepath='Objects/call.c' line='383' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyFunction_Vectorcall'> + <parameter type-id='type-id-14' name='func' filepath='Objects/call.c' line='383' column='1'/> + <parameter type-id='type-id-200' name='stack' filepath='Objects/call.c' line='383' column='1'/> + <parameter type-id='type-id-54' name='nargsf' filepath='Objects/call.c' line='384' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Objects/call.c' line='384' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_CallOneArg' mangled-name='PyObject_CallOneArg' filepath='Objects/call.c' line='368' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallOneArg'> + <parameter type-id='type-id-14' name='func' filepath='Objects/call.c' line='368' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Objects/call.c' line='368' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCFunction_Call' mangled-name='PyCFunction_Call' filepath='Objects/call.c' line='360' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCFunction_Call'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='405' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='406' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='406' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_Call' mangled-name='PyObject_Call' filepath='Objects/call.c' line='352' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Call'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='405' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='406' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='406' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_Call' mangled-name='_PyObject_Call' filepath='Objects/call.c' line='313' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_Call'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/call.c' line='313' column='1'/> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='313' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='314' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='314' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_FastCall' mangled-name='_PyObject_FastCall' filepath='Objects/call.c' line='305' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_FastCall'> + <parameter type-id='type-id-14' name='func' filepath='Objects/call.c' line='305' column='1'/> + <parameter type-id='type-id-200' name='args' filepath='Objects/call.c' line='305' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Objects/call.c' line='305' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_Vectorcall' mangled-name='PyObject_Vectorcall' filepath='Objects/call.c' line='295' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Vectorcall'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='295' column='1'/> + <parameter type-id='type-id-200' name='args' filepath='Objects/call.c' line='295' column='1'/> + <parameter type-id='type-id-54' name='nargsf' filepath='Objects/call.c' line='296' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Objects/call.c' line='296' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyVectorcall_Call' mangled-name='PyVectorcall_Call' filepath='Objects/call.c' line='266' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyVectorcall_Call'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='266' column='1'/> + <parameter type-id='type-id-14' name='tuple' filepath='Objects/call.c' line='266' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='266' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyVectorcall_Function' mangled-name='PyVectorcall_Function' filepath='Objects/call.c' line='229' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyVectorcall_Function'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='229' column='1'/> + <return type-id='type-id-106'/> + </function-decl> + <function-decl name='_PyObject_MakeTpCall' mangled-name='_PyObject_MakeTpCall' filepath='Objects/call.c' line='170' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_MakeTpCall'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/call.c' line='170' column='1'/> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='170' column='1'/> + <parameter type-id='type-id-200' name='args' filepath='Objects/call.c' line='171' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Objects/call.c' line='171' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Objects/call.c' line='172' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_VectorcallDict' mangled-name='PyObject_VectorcallDict' filepath='Objects/call.c' line='161' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_VectorcallDict'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='295' column='1'/> + <parameter type-id='type-id-200' name='args' filepath='Objects/call.c' line='295' column='1'/> + <parameter type-id='type-id-54' name='nargsf' filepath='Objects/call.c' line='296' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Objects/call.c' line='296' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_FastCallDictTstate' mangled-name='_PyObject_FastCallDictTstate' filepath='Objects/call.c' line='117' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_FastCallDictTstate'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/call.c' line='117' column='1'/> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='117' column='1'/> + <parameter type-id='type-id-200' name='args' filepath='Objects/call.c' line='118' column='1'/> + <parameter type-id='type-id-54' name='nargsf' filepath='Objects/call.c' line='118' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='119' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_CallNoArgs' mangled-name='PyObject_CallNoArgs' filepath='Objects/call.c' line='110' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallNoArgs'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_CheckFunctionResult' mangled-name='_Py_CheckFunctionResult' filepath='Objects/call.c' line='33' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_CheckFunctionResult'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/call.c' line='33' column='1'/> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='33' column='1'/> + <parameter type-id='type-id-14' name='result' filepath='Objects/call.c' line='34' column='1'/> + <parameter type-id='type-id-3' name='where' filepath='Objects/call.c' line='34' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/capsule.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyCapsule_Type' type-id='type-id-112' mangled-name='PyCapsule_Type' visibility='default' filepath='./Include/pycapsule.h' line='21' column='1' elf-symbol-id='PyCapsule_Type'/> + <function-decl name='PyCapsule_Import' mangled-name='PyCapsule_Import' filepath='Objects/capsule.c' line='195' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_Import'> + <parameter type-id='type-id-3' name='name' filepath='Objects/capsule.c' line='195' column='1'/> + <parameter type-id='type-id-8' name='no_block' filepath='Objects/capsule.c' line='195' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyCapsule_SetContext' mangled-name='PyCapsule_SetContext' filepath='Objects/capsule.c' line='181' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_SetContext'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <typedef-decl name='PyCapsule_Destructor' type-id='type-id-114' filepath='./Include/pycapsule.h' line='23' column='1' id='type-id-500'/> + <function-decl name='PyCapsule_SetDestructor' mangled-name='PyCapsule_SetDestructor' filepath='Objects/capsule.c' line='167' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_SetDestructor'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='167' column='1'/> + <parameter type-id='type-id-500' name='destructor' filepath='Objects/capsule.c' line='167' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCapsule_SetName' mangled-name='PyCapsule_SetName' filepath='Objects/capsule.c' line='153' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_SetName'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2378' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2378' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCapsule_SetPointer' mangled-name='PyCapsule_SetPointer' filepath='Objects/capsule.c' line='134' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_SetPointer'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCapsule_GetContext' mangled-name='PyCapsule_GetContext' filepath='Objects/capsule.c' line='122' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_GetContext'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='122' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyCapsule_GetDestructor' mangled-name='PyCapsule_GetDestructor' filepath='Objects/capsule.c' line='110' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_GetDestructor'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='110' column='1'/> + <return type-id='type-id-500'/> + </function-decl> + <function-decl name='PyCapsule_GetName' mangled-name='PyCapsule_GetName' filepath='Objects/capsule.c' line='98' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_GetName'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='98' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyCapsule_GetPointer' mangled-name='PyCapsule_GetPointer' filepath='Objects/capsule.c' line='80' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_GetPointer'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='80' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Objects/capsule.c' line='80' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyCapsule_IsValid' mangled-name='PyCapsule_IsValid' filepath='Objects/capsule.c' line='68' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_IsValid'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2378' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2378' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCapsule_New' mangled-name='PyCapsule_New' filepath='Objects/capsule.c' line='44' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCapsule_New'> + <parameter type-id='type-id-18' name='pointer' filepath='Objects/capsule.c' line='44' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Objects/capsule.c' line='44' column='1'/> + <parameter type-id='type-id-500' name='destructor' filepath='Objects/capsule.c' line='44' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/cellobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyCell_Type' type-id='type-id-112' mangled-name='PyCell_Type' visibility='default' filepath='./Include/cpython/cellobject.h' line='16' column='1' elf-symbol-id='PyCell_Type'/> + <function-decl name='PyCell_Set' mangled-name='PyCell_Set' filepath='Objects/cellobject.c' line='64' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCell_Set'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2770' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2770' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCell_Get' mangled-name='PyCell_Get' filepath='Objects/cellobject.c' line='53' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCell_Get'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCell_New' mangled-name='PyCell_New' filepath='Objects/cellobject.c' line='7' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCell_New'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/classobject.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='PyMemberDef' size-in-bits='320' is-struct='yes' visibility='default' filepath='./Include/structmember.h' line='18' column='1' id='type-id-184'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/structmember.h' line='19' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='type' type-id='type-id-8' visibility='default' filepath='./Include/structmember.h' line='20' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='offset' type-id='type-id-36' visibility='default' filepath='./Include/structmember.h' line='21' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='flags' type-id='type-id-8' visibility='default' filepath='./Include/structmember.h' line='22' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='doc' type-id='type-id-3' visibility='default' filepath='./Include/structmember.h' line='23' column='1'/> + </data-member> + </class-decl> + <var-decl name='PyMethod_Type' type-id='type-id-112' mangled-name='PyMethod_Type' visibility='default' filepath='./Include/cpython/classobject.h' line='20' column='1' elf-symbol-id='PyMethod_Type'/> + <var-decl name='PyInstanceMethod_Type' type-id='type-id-112' mangled-name='PyInstanceMethod_Type' visibility='default' filepath='./Include/cpython/classobject.h' line='41' column='1' elf-symbol-id='PyInstanceMethod_Type'/> + <function-decl name='PyInstanceMethod_Function' mangled-name='PyInstanceMethod_Function' filepath='Objects/classobject.c' line='369' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInstanceMethod_Function'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyInstanceMethod_New' mangled-name='PyInstanceMethod_New' filepath='Objects/classobject.c' line='357' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInstanceMethod_New'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMethod_New' mangled-name='PyMethod_New' filepath='Objects/classobject.c' line='105' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMethod_New'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='438' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='438' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMethod_Self' mangled-name='PyMethod_Self' filepath='Objects/classobject.c' line='31' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMethod_Self'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMethod_Function' mangled-name='PyMethod_Function' filepath='Objects/classobject.c' line='21' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMethod_Function'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/codeobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyCode_Type' type-id='type-id-112' mangled-name='PyCode_Type' visibility='default' filepath='./Include/cpython/code.h' line='140' column='1' elf-symbol-id='PyCode_Type'/> + <function-decl name='_PyCode_ConstantKey' mangled-name='_PyCode_ConstantKey' filepath='Objects/codeobject.c' line='2020' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCode_ConstantKey'> + <parameter type-id='type-id-14' name='op' filepath='Objects/codeobject.c' line='2020' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCode_GetCode' mangled-name='PyCode_GetCode' filepath='Objects/codeobject.c' line='1446' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCode_GetCode'> + <parameter type-id='type-id-444' name='co' filepath='Objects/codeobject.c' line='1446' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyCode_SetExtra' mangled-name='_PyCode_SetExtra' filepath='Objects/codeobject.c' line='1351' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCode_SetExtra'> + <parameter type-id='type-id-14' name='code' filepath='Objects/codeobject.c' line='1351' column='1'/> + <parameter type-id='type-id-36' name='index' filepath='Objects/codeobject.c' line='1351' column='1'/> + <parameter type-id='type-id-18' name='extra' filepath='Objects/codeobject.c' line='1351' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyCode_GetExtra' mangled-name='_PyCode_GetExtra' filepath='Objects/codeobject.c' line='1330' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCode_GetExtra'> + <parameter type-id='type-id-14' name='code' filepath='Objects/codeobject.c' line='1330' column='1'/> + <parameter type-id='type-id-36' name='index' filepath='Objects/codeobject.c' line='1330' column='1'/> + <parameter type-id='type-id-482' name='extra' filepath='Objects/codeobject.c' line='1330' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <pointer-type-def type-id='type-id-8' size-in-bits='64' id='type-id-501'/> + <function-decl name='PyCode_Addr2Location' mangled-name='PyCode_Addr2Location' filepath='Objects/codeobject.c' line='965' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCode_Addr2Location'> + <parameter type-id='type-id-444' name='co' filepath='Objects/codeobject.c' line='965' column='1'/> + <parameter type-id='type-id-8' name='addrq' filepath='Objects/codeobject.c' line='965' column='1'/> + <parameter type-id='type-id-501' name='start_line' filepath='Objects/codeobject.c' line='966' column='1'/> + <parameter type-id='type-id-501' name='start_column' filepath='Objects/codeobject.c' line='966' column='1'/> + <parameter type-id='type-id-501' name='end_line' filepath='Objects/codeobject.c' line='967' column='1'/> + <parameter type-id='type-id-501' name='end_column' filepath='Objects/codeobject.c' line='967' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <pointer-type-def type-id='type-id-445' size-in-bits='64' id='type-id-502'/> + <function-decl name='_PyCode_CheckLineNumber' mangled-name='_PyCode_CheckLineNumber' filepath='Objects/codeobject.c' line='788' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCode_CheckLineNumber'> + <parameter type-id='type-id-8' name='lasti' filepath='Objects/codeobject.c' line='788' column='1'/> + <parameter type-id='type-id-502' name='bounds' filepath='Objects/codeobject.c' line='788' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCode_Addr2Line' mangled-name='PyCode_Addr2Line' filepath='Objects/codeobject.c' line='750' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCode_Addr2Line'> + <parameter type-id='type-id-444' name='co' filepath='Objects/codeobject.c' line='750' column='1'/> + <parameter type-id='type-id-8' name='addrq' filepath='Objects/codeobject.c' line='750' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCode_NewEmpty' mangled-name='PyCode_NewEmpty' filepath='Objects/codeobject.c' line='646' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCode_NewEmpty'> + <parameter type-id='type-id-3' name='filename' filepath='Objects/codeobject.c' line='646' column='1'/> + <parameter type-id='type-id-3' name='funcname' filepath='Objects/codeobject.c' line='646' column='1'/> + <parameter type-id='type-id-8' name='firstlineno' filepath='Objects/codeobject.c' line='646' column='1'/> + <return type-id='type-id-444'/> + </function-decl> + <function-decl name='PyCode_New' mangled-name='PyCode_New' filepath='Objects/codeobject.c' line='622' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCode_New'> + <parameter type-id='type-id-8' name='argcount' filepath='Objects/codeobject.c' line='622' column='1'/> + <parameter type-id='type-id-8' name='kwonlyargcount' filepath='Objects/codeobject.c' line='622' column='1'/> + <parameter type-id='type-id-8' name='nlocals' filepath='Objects/codeobject.c' line='623' column='1'/> + <parameter type-id='type-id-8' name='stacksize' filepath='Objects/codeobject.c' line='623' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Objects/codeobject.c' line='623' column='1'/> + <parameter type-id='type-id-14' name='code' filepath='Objects/codeobject.c' line='624' column='1'/> + <parameter type-id='type-id-14' name='consts' filepath='Objects/codeobject.c' line='624' column='1'/> + <parameter type-id='type-id-14' name='names' filepath='Objects/codeobject.c' line='624' column='1'/> + <parameter type-id='type-id-14' name='varnames' filepath='Objects/codeobject.c' line='625' column='1'/> + <parameter type-id='type-id-14' name='freevars' filepath='Objects/codeobject.c' line='625' column='1'/> + <parameter type-id='type-id-14' name='cellvars' filepath='Objects/codeobject.c' line='625' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Objects/codeobject.c' line='626' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/codeobject.c' line='626' column='1'/> + <parameter type-id='type-id-14' name='qualname' filepath='Objects/codeobject.c' line='626' column='1'/> + <parameter type-id='type-id-8' name='firstlineno' filepath='Objects/codeobject.c' line='627' column='1'/> + <parameter type-id='type-id-14' name='linetable' filepath='Objects/codeobject.c' line='628' column='1'/> + <parameter type-id='type-id-14' name='exceptiontable' filepath='Objects/codeobject.c' line='629' column='1'/> + <return type-id='type-id-444'/> + </function-decl> + <function-decl name='PyCode_NewWithPosOnlyArgs' mangled-name='PyCode_NewWithPosOnlyArgs' filepath='Objects/codeobject.c' line='498' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCode_NewWithPosOnlyArgs'> + <parameter type-id='type-id-8' name='argcount' filepath='Objects/codeobject.c' line='498' column='1'/> + <parameter type-id='type-id-8' name='posonlyargcount' filepath='Objects/codeobject.c' line='498' column='1'/> + <parameter type-id='type-id-8' name='kwonlyargcount' filepath='Objects/codeobject.c' line='498' column='1'/> + <parameter type-id='type-id-8' name='nlocals' filepath='Objects/codeobject.c' line='499' column='1'/> + <parameter type-id='type-id-8' name='stacksize' filepath='Objects/codeobject.c' line='499' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Objects/codeobject.c' line='499' column='1'/> + <parameter type-id='type-id-14' name='code' filepath='Objects/codeobject.c' line='500' column='1'/> + <parameter type-id='type-id-14' name='consts' filepath='Objects/codeobject.c' line='500' column='1'/> + <parameter type-id='type-id-14' name='names' filepath='Objects/codeobject.c' line='500' column='1'/> + <parameter type-id='type-id-14' name='varnames' filepath='Objects/codeobject.c' line='501' column='1'/> + <parameter type-id='type-id-14' name='freevars' filepath='Objects/codeobject.c' line='501' column='1'/> + <parameter type-id='type-id-14' name='cellvars' filepath='Objects/codeobject.c' line='501' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Objects/codeobject.c' line='502' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/codeobject.c' line='502' column='1'/> + <parameter type-id='type-id-14' name='qualname' filepath='Objects/codeobject.c' line='503' column='1'/> + <parameter type-id='type-id-8' name='firstlineno' filepath='Objects/codeobject.c' line='503' column='1'/> + <parameter type-id='type-id-14' name='linetable' filepath='Objects/codeobject.c' line='504' column='1'/> + <parameter type-id='type-id-14' name='exceptiontable' filepath='Objects/codeobject.c' line='505' column='1'/> + <return type-id='type-id-444'/> + </function-decl> + <class-decl name='_PyCodeConstructor' size-in-bits='896' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_code.h' line='168' column='1' id='type-id-503'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='filename' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='170' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='name' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='qualname' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='flags' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_code.h' line='173' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='code' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='176' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='firstlineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_code.h' line='177' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='linetable' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='178' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='consts' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='181' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='names' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='182' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='localsplusnames' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='185' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='localspluskinds' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='186' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='argcount' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_code.h' line='189' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='736'> + <var-decl name='posonlyargcount' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_code.h' line='190' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='kwonlyargcount' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_code.h' line='192' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='800'> + <var-decl name='stacksize' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_code.h' line='195' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='exceptiontable' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_code.h' line='198' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-503' size-in-bits='64' id='type-id-504'/> + <function-decl name='_PyCode_New' mangled-name='_PyCode_New' filepath='Objects/codeobject.c' line='446' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCode_New'> + <parameter type-id='type-id-504' name='con' filepath='Objects/codeobject.c' line='446' column='1'/> + <return type-id='type-id-444'/> + </function-decl> + <function-decl name='_PyCode_Validate' mangled-name='_PyCode_Validate' filepath='Objects/codeobject.c' line='231' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCode_Validate'> + <parameter type-id='type-id-504' name='con' filepath='Objects/codeobject.c' line='231' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/complexobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyComplex_Type' type-id='type-id-112' mangled-name='PyComplex_Type' visibility='default' filepath='./Include/complexobject.h' line='11' column='1' elf-symbol-id='PyComplex_Type'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-505' visibility='default' filepath='./Include/cpython/complexobject.h' line='5' column='1' id='type-id-506'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='real' type-id='type-id-391' visibility='default' filepath='./Include/cpython/complexobject.h' line='6' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='imag' type-id='type-id-391' visibility='default' filepath='./Include/cpython/complexobject.h' line='7' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='Py_complex' type-id='type-id-506' filepath='./Include/cpython/complexobject.h' line='8' column='1' id='type-id-505'/> + <function-decl name='PyComplex_AsCComplex' mangled-name='PyComplex_AsCComplex' filepath='Objects/complexobject.c' line='314' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyComplex_AsCComplex'> + <parameter type-id='type-id-14' name='op' filepath='Objects/complexobject.c' line='314' column='1'/> + <return type-id='type-id-505'/> + </function-decl> + <function-decl name='PyComplex_ImagAsDouble' mangled-name='PyComplex_ImagAsDouble' filepath='Objects/complexobject.c' line='270' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyComplex_ImagAsDouble'> + <parameter type-id='type-id-14' name='op' filepath='Objects/complexobject.c' line='270' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyComplex_RealAsDouble' mangled-name='PyComplex_RealAsDouble' filepath='Objects/complexobject.c' line='259' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyComplex_RealAsDouble'> + <parameter type-id='type-id-14' name='op' filepath='Objects/complexobject.c' line='270' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyComplex_FromDoubles' mangled-name='PyComplex_FromDoubles' filepath='Objects/complexobject.c' line='250' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyComplex_FromDoubles'> + <parameter type-id='type-id-391' name='real' filepath='Objects/complexobject.c' line='250' column='1'/> + <parameter type-id='type-id-391' name='imag' filepath='Objects/complexobject.c' line='250' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyComplex_FromCComplex' mangled-name='PyComplex_FromCComplex' filepath='Objects/complexobject.c' line='228' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyComplex_FromCComplex'> + <parameter type-id='type-id-505' name='cval' filepath='Objects/complexobject.c' line='228' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_c_abs' mangled-name='_Py_c_abs' filepath='Objects/complexobject.c' line='185' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_c_abs'> + <parameter type-id='type-id-505' name='z' filepath='Objects/complexobject.c' line='185' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='_Py_c_pow' mangled-name='_Py_c_pow' filepath='Objects/complexobject.c' line='129' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_c_pow'> + <parameter type-id='type-id-505' name='a' filepath='Objects/complexobject.c' line='129' column='1'/> + <parameter type-id='type-id-505' name='b' filepath='Objects/complexobject.c' line='129' column='1'/> + <return type-id='type-id-505'/> + </function-decl> + <function-decl name='_Py_c_quot' mangled-name='_Py_c_quot' filepath='Objects/complexobject.c' line='68' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_c_quot'> + <parameter type-id='type-id-505' name='a' filepath='Objects/complexobject.c' line='68' column='1'/> + <parameter type-id='type-id-505' name='b' filepath='Objects/complexobject.c' line='68' column='1'/> + <return type-id='type-id-505'/> + </function-decl> + <function-decl name='_Py_c_prod' mangled-name='_Py_c_prod' filepath='Objects/complexobject.c' line='55' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_c_prod'> + <parameter type-id='type-id-505' name='a' filepath='Objects/complexobject.c' line='55' column='1'/> + <parameter type-id='type-id-505' name='b' filepath='Objects/complexobject.c' line='55' column='1'/> + <return type-id='type-id-505'/> + </function-decl> + <function-decl name='_Py_c_neg' mangled-name='_Py_c_neg' filepath='Objects/complexobject.c' line='46' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_c_neg'> + <parameter type-id='type-id-505' name='a' filepath='Objects/complexobject.c' line='46' column='1'/> + <return type-id='type-id-505'/> + </function-decl> + <function-decl name='_Py_c_diff' mangled-name='_Py_c_diff' filepath='Objects/complexobject.c' line='37' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_c_diff'> + <parameter type-id='type-id-505' name='a' filepath='Objects/complexobject.c' line='55' column='1'/> + <parameter type-id='type-id-505' name='b' filepath='Objects/complexobject.c' line='55' column='1'/> + <return type-id='type-id-505'/> + </function-decl> + <function-decl name='_Py_c_sum' mangled-name='_Py_c_sum' filepath='Objects/complexobject.c' line='28' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_c_sum'> + <parameter type-id='type-id-505' name='a' filepath='Objects/complexobject.c' line='55' column='1'/> + <parameter type-id='type-id-505' name='b' filepath='Objects/complexobject.c' line='55' column='1'/> + <return type-id='type-id-505'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/descrobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyMethodDescr_Type' type-id='type-id-112' mangled-name='PyMethodDescr_Type' visibility='default' filepath='./Include/descrobject.h' line='22' column='1' elf-symbol-id='PyMethodDescr_Type'/> + <var-decl name='PyClassMethodDescr_Type' type-id='type-id-112' mangled-name='PyClassMethodDescr_Type' visibility='default' filepath='./Include/descrobject.h' line='19' column='1' elf-symbol-id='PyClassMethodDescr_Type'/> + <var-decl name='PyMemberDescr_Type' type-id='type-id-112' mangled-name='PyMemberDescr_Type' visibility='default' filepath='./Include/descrobject.h' line='21' column='1' elf-symbol-id='PyMemberDescr_Type'/> + <var-decl name='PyGetSetDescr_Type' type-id='type-id-112' mangled-name='PyGetSetDescr_Type' visibility='default' filepath='./Include/descrobject.h' line='20' column='1' elf-symbol-id='PyGetSetDescr_Type'/> + <var-decl name='PyWrapperDescr_Type' type-id='type-id-112' mangled-name='PyWrapperDescr_Type' visibility='default' filepath='./Include/descrobject.h' line='23' column='1' elf-symbol-id='PyWrapperDescr_Type'/> + <var-decl name='_PyMethodWrapper_Type' type-id='type-id-112' mangled-name='_PyMethodWrapper_Type' visibility='default' filepath='./Include/cpython/descrobject.h' line='60' column='1' elf-symbol-id='_PyMethodWrapper_Type'/> + <var-decl name='PyDictProxy_Type' type-id='type-id-112' mangled-name='PyDictProxy_Type' visibility='default' filepath='./Include/descrobject.h' line='24' column='1' elf-symbol-id='PyDictProxy_Type'/> + <var-decl name='PyProperty_Type' type-id='type-id-112' mangled-name='PyProperty_Type' visibility='default' filepath='./Include/descrobject.h' line='25' column='1' elf-symbol-id='PyProperty_Type'/> + <function-decl name='PyWrapper_New' mangled-name='PyWrapper_New' filepath='Objects/descrobject.c' line='1450' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyWrapper_New'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1071' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1071' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDictProxy_New' mangled-name='PyDictProxy_New' filepath='Objects/descrobject.c' line='1247' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDictProxy_New'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDescr_IsData' mangled-name='PyDescr_IsData' filepath='Objects/descrobject.c' line='1017' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDescr_IsData'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <class-decl name='wrapperbase' size-in-bits='448' is-struct='yes' visibility='default' filepath='./Include/cpython/descrobject.h' line='11' column='1' id='type-id-507'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/cpython/descrobject.h' line='12' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='offset' type-id='type-id-8' visibility='default' filepath='./Include/cpython/descrobject.h' line='13' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='function' type-id='type-id-18' visibility='default' filepath='./Include/cpython/descrobject.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='wrapper' type-id='type-id-508' visibility='default' filepath='./Include/cpython/descrobject.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='doc' type-id='type-id-3' visibility='default' filepath='./Include/cpython/descrobject.h' line='16' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='flags' type-id='type-id-8' visibility='default' filepath='./Include/cpython/descrobject.h' line='17' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='name_strobj' type-id='type-id-14' visibility='default' filepath='./Include/cpython/descrobject.h' line='18' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-509' size-in-bits='64' id='type-id-510'/> + <typedef-decl name='wrapperfunc' type-id='type-id-510' filepath='./Include/cpython/descrobject.h' line='5' column='1' id='type-id-508'/> + <pointer-type-def type-id='type-id-507' size-in-bits='64' id='type-id-511'/> + <function-decl name='PyDescr_NewWrapper' mangled-name='PyDescr_NewWrapper' filepath='Objects/descrobject.c' line='1003' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDescr_NewWrapper'> + <parameter type-id='type-id-74' name='type' filepath='Objects/descrobject.c' line='1003' column='1'/> + <parameter type-id='type-id-511' name='base' filepath='Objects/descrobject.c' line='1003' column='1'/> + <parameter type-id='type-id-18' name='wrapped' filepath='Objects/descrobject.c' line='1003' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDescr_NewGetSet' mangled-name='PyDescr_NewGetSet' filepath='Objects/descrobject.c' line='991' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDescr_NewGetSet'> + <parameter type-id='type-id-74' name='type' filepath='Objects/descrobject.c' line='991' column='1'/> + <parameter type-id='type-id-98' name='getset' filepath='Objects/descrobject.c' line='991' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDescr_NewMember' mangled-name='PyDescr_NewMember' filepath='Objects/descrobject.c' line='979' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDescr_NewMember'> + <parameter type-id='type-id-74' name='type' filepath='Objects/descrobject.c' line='979' column='1'/> + <parameter type-id='type-id-97' name='member' filepath='Objects/descrobject.c' line='979' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDescr_NewClassMethod' mangled-name='PyDescr_NewClassMethod' filepath='Objects/descrobject.c' line='967' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDescr_NewClassMethod'> + <parameter type-id='type-id-74' name='type' filepath='Objects/descrobject.c' line='967' column='1'/> + <parameter type-id='type-id-96' name='method' filepath='Objects/descrobject.c' line='967' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDescr_NewMethod' mangled-name='PyDescr_NewMethod' filepath='Objects/descrobject.c' line='921' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDescr_NewMethod'> + <parameter type-id='type-id-74' name='type' filepath='Objects/descrobject.c' line='921' column='1'/> + <parameter type-id='type-id-96' name='method' filepath='Objects/descrobject.c' line='921' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-509'> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-14'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-14'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/enumobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyEnum_Type' type-id='type-id-112' mangled-name='PyEnum_Type' visibility='default' filepath='./Include/enumobject.h' line='10' column='1' elf-symbol-id='PyEnum_Type'/> + <var-decl name='PyReversed_Type' type-id='type-id-112' mangled-name='PyReversed_Type' visibility='default' filepath='./Include/enumobject.h' line='11' column='1' elf-symbol-id='PyReversed_Type'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/exceptions.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyExc_EnvironmentError' type-id='type-id-14' mangled-name='PyExc_EnvironmentError' visibility='default' filepath='./Include/pyerrors.h' line='139' column='1' elf-symbol-id='PyExc_EnvironmentError'/> + <var-decl name='PyExc_IOError' type-id='type-id-14' mangled-name='PyExc_IOError' visibility='default' filepath='./Include/pyerrors.h' line='140' column='1' elf-symbol-id='PyExc_IOError'/> + <var-decl name='PyExc_BaseException' type-id='type-id-14' mangled-name='PyExc_BaseException' visibility='default' filepath='./Include/pyerrors.h' line='72' column='1' elf-symbol-id='PyExc_BaseException'/> + <var-decl name='PyExc_Exception' type-id='type-id-14' mangled-name='PyExc_Exception' visibility='default' filepath='./Include/pyerrors.h' line='73' column='1' elf-symbol-id='PyExc_Exception'/> + <var-decl name='PyExc_TypeError' type-id='type-id-14' mangled-name='PyExc_TypeError' visibility='default' filepath='./Include/pyerrors.h' line='110' column='1' elf-symbol-id='PyExc_TypeError'/> + <var-decl name='PyExc_StopAsyncIteration' type-id='type-id-14' mangled-name='PyExc_StopAsyncIteration' visibility='default' filepath='./Include/pyerrors.h' line='76' column='1' elf-symbol-id='PyExc_StopAsyncIteration'/> + <var-decl name='PyExc_StopIteration' type-id='type-id-14' mangled-name='PyExc_StopIteration' visibility='default' filepath='./Include/pyerrors.h' line='78' column='1' elf-symbol-id='PyExc_StopIteration'/> + <var-decl name='PyExc_GeneratorExit' type-id='type-id-14' mangled-name='PyExc_GeneratorExit' visibility='default' filepath='./Include/pyerrors.h' line='79' column='1' elf-symbol-id='PyExc_GeneratorExit'/> + <var-decl name='PyExc_SystemExit' type-id='type-id-14' mangled-name='PyExc_SystemExit' visibility='default' filepath='./Include/pyerrors.h' line='109' column='1' elf-symbol-id='PyExc_SystemExit'/> + <var-decl name='PyExc_BaseExceptionGroup' type-id='type-id-14' mangled-name='PyExc_BaseExceptionGroup' visibility='default' filepath='./Include/pyerrors.h' line='74' column='1' elf-symbol-id='PyExc_BaseExceptionGroup'/> + <var-decl name='PyExc_KeyboardInterrupt' type-id='type-id-14' mangled-name='PyExc_KeyboardInterrupt' visibility='default' filepath='./Include/pyerrors.h' line='95' column='1' elf-symbol-id='PyExc_KeyboardInterrupt'/> + <var-decl name='PyExc_ImportError' type-id='type-id-14' mangled-name='PyExc_ImportError' visibility='default' filepath='./Include/pyerrors.h' line='89' column='1' elf-symbol-id='PyExc_ImportError'/> + <var-decl name='PyExc_ModuleNotFoundError' type-id='type-id-14' mangled-name='PyExc_ModuleNotFoundError' visibility='default' filepath='./Include/pyerrors.h' line='91' column='1' elf-symbol-id='PyExc_ModuleNotFoundError'/> + <var-decl name='PyExc_OSError' type-id='type-id-14' mangled-name='PyExc_OSError' visibility='default' filepath='./Include/pyerrors.h' line='88' column='1' elf-symbol-id='PyExc_OSError'/> + <var-decl name='PyExc_BlockingIOError' type-id='type-id-14' mangled-name='PyExc_BlockingIOError' visibility='default' filepath='./Include/pyerrors.h' line='120' column='1' elf-symbol-id='PyExc_BlockingIOError'/> + <var-decl name='PyExc_ConnectionError' type-id='type-id-14' mangled-name='PyExc_ConnectionError' visibility='default' filepath='./Include/pyerrors.h' line='123' column='1' elf-symbol-id='PyExc_ConnectionError'/> + <var-decl name='PyExc_ChildProcessError' type-id='type-id-14' mangled-name='PyExc_ChildProcessError' visibility='default' filepath='./Include/pyerrors.h' line='122' column='1' elf-symbol-id='PyExc_ChildProcessError'/> + <var-decl name='PyExc_BrokenPipeError' type-id='type-id-14' mangled-name='PyExc_BrokenPipeError' visibility='default' filepath='./Include/pyerrors.h' line='121' column='1' elf-symbol-id='PyExc_BrokenPipeError'/> + <var-decl name='PyExc_ConnectionAbortedError' type-id='type-id-14' mangled-name='PyExc_ConnectionAbortedError' visibility='default' filepath='./Include/pyerrors.h' line='124' column='1' elf-symbol-id='PyExc_ConnectionAbortedError'/> + <var-decl name='PyExc_ConnectionRefusedError' type-id='type-id-14' mangled-name='PyExc_ConnectionRefusedError' visibility='default' filepath='./Include/pyerrors.h' line='125' column='1' elf-symbol-id='PyExc_ConnectionRefusedError'/> + <var-decl name='PyExc_ConnectionResetError' type-id='type-id-14' mangled-name='PyExc_ConnectionResetError' visibility='default' filepath='./Include/pyerrors.h' line='126' column='1' elf-symbol-id='PyExc_ConnectionResetError'/> + <var-decl name='PyExc_FileExistsError' type-id='type-id-14' mangled-name='PyExc_FileExistsError' visibility='default' filepath='./Include/pyerrors.h' line='127' column='1' elf-symbol-id='PyExc_FileExistsError'/> + <var-decl name='PyExc_FileNotFoundError' type-id='type-id-14' mangled-name='PyExc_FileNotFoundError' visibility='default' filepath='./Include/pyerrors.h' line='128' column='1' elf-symbol-id='PyExc_FileNotFoundError'/> + <var-decl name='PyExc_IsADirectoryError' type-id='type-id-14' mangled-name='PyExc_IsADirectoryError' visibility='default' filepath='./Include/pyerrors.h' line='130' column='1' elf-symbol-id='PyExc_IsADirectoryError'/> + <var-decl name='PyExc_NotADirectoryError' type-id='type-id-14' mangled-name='PyExc_NotADirectoryError' visibility='default' filepath='./Include/pyerrors.h' line='131' column='1' elf-symbol-id='PyExc_NotADirectoryError'/> + <var-decl name='PyExc_InterruptedError' type-id='type-id-14' mangled-name='PyExc_InterruptedError' visibility='default' filepath='./Include/pyerrors.h' line='129' column='1' elf-symbol-id='PyExc_InterruptedError'/> + <var-decl name='PyExc_PermissionError' type-id='type-id-14' mangled-name='PyExc_PermissionError' visibility='default' filepath='./Include/pyerrors.h' line='132' column='1' elf-symbol-id='PyExc_PermissionError'/> + <var-decl name='PyExc_ProcessLookupError' type-id='type-id-14' mangled-name='PyExc_ProcessLookupError' visibility='default' filepath='./Include/pyerrors.h' line='133' column='1' elf-symbol-id='PyExc_ProcessLookupError'/> + <var-decl name='PyExc_TimeoutError' type-id='type-id-14' mangled-name='PyExc_TimeoutError' visibility='default' filepath='./Include/pyerrors.h' line='134' column='1' elf-symbol-id='PyExc_TimeoutError'/> + <var-decl name='PyExc_EOFError' type-id='type-id-14' mangled-name='PyExc_EOFError' visibility='default' filepath='./Include/pyerrors.h' line='86' column='1' elf-symbol-id='PyExc_EOFError'/> + <var-decl name='PyExc_RuntimeError' type-id='type-id-14' mangled-name='PyExc_RuntimeError' visibility='default' filepath='./Include/pyerrors.h' line='99' column='1' elf-symbol-id='PyExc_RuntimeError'/> + <var-decl name='PyExc_RecursionError' type-id='type-id-14' mangled-name='PyExc_RecursionError' visibility='default' filepath='./Include/pyerrors.h' line='101' column='1' elf-symbol-id='PyExc_RecursionError'/> + <var-decl name='PyExc_NotImplementedError' type-id='type-id-14' mangled-name='PyExc_NotImplementedError' visibility='default' filepath='./Include/pyerrors.h' line='103' column='1' elf-symbol-id='PyExc_NotImplementedError'/> + <var-decl name='PyExc_NameError' type-id='type-id-14' mangled-name='PyExc_NameError' visibility='default' filepath='./Include/pyerrors.h' line='97' column='1' elf-symbol-id='PyExc_NameError'/> + <var-decl name='PyExc_UnboundLocalError' type-id='type-id-14' mangled-name='PyExc_UnboundLocalError' visibility='default' filepath='./Include/pyerrors.h' line='111' column='1' elf-symbol-id='PyExc_UnboundLocalError'/> + <var-decl name='PyExc_AttributeError' type-id='type-id-14' mangled-name='PyExc_AttributeError' visibility='default' filepath='./Include/pyerrors.h' line='84' column='1' elf-symbol-id='PyExc_AttributeError'/> + <var-decl name='PyExc_SyntaxError' type-id='type-id-14' mangled-name='PyExc_SyntaxError' visibility='default' filepath='./Include/pyerrors.h' line='104' column='1' elf-symbol-id='PyExc_SyntaxError'/> + <var-decl name='PyExc_IndentationError' type-id='type-id-14' mangled-name='PyExc_IndentationError' visibility='default' filepath='./Include/pyerrors.h' line='105' column='1' elf-symbol-id='PyExc_IndentationError'/> + <var-decl name='PyExc_TabError' type-id='type-id-14' mangled-name='PyExc_TabError' visibility='default' filepath='./Include/pyerrors.h' line='106' column='1' elf-symbol-id='PyExc_TabError'/> + <var-decl name='PyExc_LookupError' type-id='type-id-14' mangled-name='PyExc_LookupError' visibility='default' filepath='./Include/pyerrors.h' line='81' column='1' elf-symbol-id='PyExc_LookupError'/> + <var-decl name='PyExc_IndexError' type-id='type-id-14' mangled-name='PyExc_IndexError' visibility='default' filepath='./Include/pyerrors.h' line='93' column='1' elf-symbol-id='PyExc_IndexError'/> + <var-decl name='PyExc_KeyError' type-id='type-id-14' mangled-name='PyExc_KeyError' visibility='default' filepath='./Include/pyerrors.h' line='94' column='1' elf-symbol-id='PyExc_KeyError'/> + <var-decl name='PyExc_ValueError' type-id='type-id-14' mangled-name='PyExc_ValueError' visibility='default' filepath='./Include/pyerrors.h' line='116' column='1' elf-symbol-id='PyExc_ValueError'/> + <var-decl name='PyExc_UnicodeError' type-id='type-id-14' mangled-name='PyExc_UnicodeError' visibility='default' filepath='./Include/pyerrors.h' line='112' column='1' elf-symbol-id='PyExc_UnicodeError'/> + <var-decl name='PyExc_UnicodeEncodeError' type-id='type-id-14' mangled-name='PyExc_UnicodeEncodeError' visibility='default' filepath='./Include/pyerrors.h' line='113' column='1' elf-symbol-id='PyExc_UnicodeEncodeError'/> + <var-decl name='PyExc_UnicodeDecodeError' type-id='type-id-14' mangled-name='PyExc_UnicodeDecodeError' visibility='default' filepath='./Include/pyerrors.h' line='114' column='1' elf-symbol-id='PyExc_UnicodeDecodeError'/> + <var-decl name='PyExc_UnicodeTranslateError' type-id='type-id-14' mangled-name='PyExc_UnicodeTranslateError' visibility='default' filepath='./Include/pyerrors.h' line='115' column='1' elf-symbol-id='PyExc_UnicodeTranslateError'/> + <var-decl name='PyExc_AssertionError' type-id='type-id-14' mangled-name='PyExc_AssertionError' visibility='default' filepath='./Include/pyerrors.h' line='83' column='1' elf-symbol-id='PyExc_AssertionError'/> + <var-decl name='PyExc_ArithmeticError' type-id='type-id-14' mangled-name='PyExc_ArithmeticError' visibility='default' filepath='./Include/pyerrors.h' line='80' column='1' elf-symbol-id='PyExc_ArithmeticError'/> + <var-decl name='PyExc_FloatingPointError' type-id='type-id-14' mangled-name='PyExc_FloatingPointError' visibility='default' filepath='./Include/pyerrors.h' line='87' column='1' elf-symbol-id='PyExc_FloatingPointError'/> + <var-decl name='PyExc_OverflowError' type-id='type-id-14' mangled-name='PyExc_OverflowError' visibility='default' filepath='./Include/pyerrors.h' line='98' column='1' elf-symbol-id='PyExc_OverflowError'/> + <var-decl name='PyExc_ZeroDivisionError' type-id='type-id-14' mangled-name='PyExc_ZeroDivisionError' visibility='default' filepath='./Include/pyerrors.h' line='117' column='1' elf-symbol-id='PyExc_ZeroDivisionError'/> + <var-decl name='PyExc_SystemError' type-id='type-id-14' mangled-name='PyExc_SystemError' visibility='default' filepath='./Include/pyerrors.h' line='108' column='1' elf-symbol-id='PyExc_SystemError'/> + <var-decl name='PyExc_ReferenceError' type-id='type-id-14' mangled-name='PyExc_ReferenceError' visibility='default' filepath='./Include/pyerrors.h' line='107' column='1' elf-symbol-id='PyExc_ReferenceError'/> + <var-decl name='PyExc_MemoryError' type-id='type-id-14' mangled-name='PyExc_MemoryError' visibility='default' filepath='./Include/pyerrors.h' line='96' column='1' elf-symbol-id='PyExc_MemoryError'/> + <var-decl name='PyExc_BufferError' type-id='type-id-14' mangled-name='PyExc_BufferError' visibility='default' filepath='./Include/pyerrors.h' line='85' column='1' elf-symbol-id='PyExc_BufferError'/> + <var-decl name='PyExc_Warning' type-id='type-id-14' mangled-name='PyExc_Warning' visibility='default' filepath='./Include/pyerrors.h' line='146' column='1' elf-symbol-id='PyExc_Warning'/> + <var-decl name='PyExc_UserWarning' type-id='type-id-14' mangled-name='PyExc_UserWarning' visibility='default' filepath='./Include/pyerrors.h' line='147' column='1' elf-symbol-id='PyExc_UserWarning'/> + <var-decl name='PyExc_DeprecationWarning' type-id='type-id-14' mangled-name='PyExc_DeprecationWarning' visibility='default' filepath='./Include/pyerrors.h' line='148' column='1' elf-symbol-id='PyExc_DeprecationWarning'/> + <var-decl name='PyExc_PendingDeprecationWarning' type-id='type-id-14' mangled-name='PyExc_PendingDeprecationWarning' visibility='default' filepath='./Include/pyerrors.h' line='149' column='1' elf-symbol-id='PyExc_PendingDeprecationWarning'/> + <var-decl name='PyExc_SyntaxWarning' type-id='type-id-14' mangled-name='PyExc_SyntaxWarning' visibility='default' filepath='./Include/pyerrors.h' line='150' column='1' elf-symbol-id='PyExc_SyntaxWarning'/> + <var-decl name='PyExc_RuntimeWarning' type-id='type-id-14' mangled-name='PyExc_RuntimeWarning' visibility='default' filepath='./Include/pyerrors.h' line='151' column='1' elf-symbol-id='PyExc_RuntimeWarning'/> + <var-decl name='PyExc_FutureWarning' type-id='type-id-14' mangled-name='PyExc_FutureWarning' visibility='default' filepath='./Include/pyerrors.h' line='152' column='1' elf-symbol-id='PyExc_FutureWarning'/> + <var-decl name='PyExc_ImportWarning' type-id='type-id-14' mangled-name='PyExc_ImportWarning' visibility='default' filepath='./Include/pyerrors.h' line='153' column='1' elf-symbol-id='PyExc_ImportWarning'/> + <var-decl name='PyExc_UnicodeWarning' type-id='type-id-14' mangled-name='PyExc_UnicodeWarning' visibility='default' filepath='./Include/pyerrors.h' line='154' column='1' elf-symbol-id='PyExc_UnicodeWarning'/> + <var-decl name='PyExc_BytesWarning' type-id='type-id-14' mangled-name='PyExc_BytesWarning' visibility='default' filepath='./Include/pyerrors.h' line='155' column='1' elf-symbol-id='PyExc_BytesWarning'/> + <var-decl name='PyExc_EncodingWarning' type-id='type-id-14' mangled-name='PyExc_EncodingWarning' visibility='default' filepath='./Include/pyerrors.h' line='156' column='1' elf-symbol-id='PyExc_EncodingWarning'/> + <var-decl name='PyExc_ResourceWarning' type-id='type-id-14' mangled-name='PyExc_ResourceWarning' visibility='default' filepath='./Include/pyerrors.h' line='157' column='1' elf-symbol-id='PyExc_ResourceWarning'/> + <function-decl name='_PyErr_TrySetFromCause' mangled-name='_PyErr_TrySetFromCause' filepath='Objects/exceptions.c' line='3744' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_TrySetFromCause'> + <parameter type-id='type-id-3' name='format' filepath='Objects/exceptions.c' line='3744' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicodeTranslateError_Create' mangled-name='_PyUnicodeTranslateError_Create' filepath='Objects/exceptions.c' line='3139' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeTranslateError_Create'> + <parameter type-id='type-id-14' name='object' filepath='Objects/exceptions.c' line='3140' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/exceptions.c' line='3141' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='3141' column='1'/> + <parameter type-id='type-id-3' name='reason' filepath='Objects/exceptions.c' line='3141' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_Create' mangled-name='PyUnicodeDecodeError_Create' filepath='Objects/exceptions.c' line='3042' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_Create'> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/exceptions.c' line='3043' column='1'/> + <parameter type-id='type-id-3' name='object' filepath='Objects/exceptions.c' line='3043' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Objects/exceptions.c' line='3043' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/exceptions.c' line='3044' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='3044' column='1'/> + <parameter type-id='type-id-3' name='reason' filepath='Objects/exceptions.c' line='3044' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeTranslateError_SetReason' mangled-name='PyUnicodeTranslateError_SetReason' filepath='Objects/exceptions.c' line='2789' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeTranslateError_SetReason'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2789' column='1'/> + <parameter type-id='type-id-3' name='reason' filepath='Objects/exceptions.c' line='2789' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_SetReason' mangled-name='PyUnicodeDecodeError_SetReason' filepath='Objects/exceptions.c' line='2781' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_SetReason'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2789' column='1'/> + <parameter type-id='type-id-3' name='reason' filepath='Objects/exceptions.c' line='2789' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_SetReason' mangled-name='PyUnicodeEncodeError_SetReason' filepath='Objects/exceptions.c' line='2773' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_SetReason'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2789' column='1'/> + <parameter type-id='type-id-3' name='reason' filepath='Objects/exceptions.c' line='2789' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeTranslateError_GetReason' mangled-name='PyUnicodeTranslateError_GetReason' filepath='Objects/exceptions.c' line='2766' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeTranslateError_GetReason'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_GetReason' mangled-name='PyUnicodeDecodeError_GetReason' filepath='Objects/exceptions.c' line='2759' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_GetReason'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_GetReason' mangled-name='PyUnicodeEncodeError_GetReason' filepath='Objects/exceptions.c' line='2752' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_GetReason'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeTranslateError_SetEnd' mangled-name='PyUnicodeTranslateError_SetEnd' filepath='Objects/exceptions.c' line='2745' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeTranslateError_SetEnd'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2745' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='2745' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_SetEnd' mangled-name='PyUnicodeDecodeError_SetEnd' filepath='Objects/exceptions.c' line='2737' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_SetEnd'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2745' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='2745' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_SetEnd' mangled-name='PyUnicodeEncodeError_SetEnd' filepath='Objects/exceptions.c' line='2729' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_SetEnd'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2745' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='2745' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeTranslateError_GetEnd' mangled-name='PyUnicodeTranslateError_GetEnd' filepath='Objects/exceptions.c' line='2722' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeTranslateError_GetEnd'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2722' column='1'/> + <parameter type-id='type-id-168' name='end' filepath='Objects/exceptions.c' line='2722' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_GetEnd' mangled-name='PyUnicodeDecodeError_GetEnd' filepath='Objects/exceptions.c' line='2704' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_GetEnd'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2704' column='1'/> + <parameter type-id='type-id-168' name='end' filepath='Objects/exceptions.c' line='2704' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_GetEnd' mangled-name='PyUnicodeEncodeError_GetEnd' filepath='Objects/exceptions.c' line='2685' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_GetEnd'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2704' column='1'/> + <parameter type-id='type-id-168' name='end' filepath='Objects/exceptions.c' line='2704' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeTranslateError_SetStart' mangled-name='PyUnicodeTranslateError_SetStart' filepath='Objects/exceptions.c' line='2677' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeTranslateError_SetStart'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2745' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='2745' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_SetStart' mangled-name='PyUnicodeDecodeError_SetStart' filepath='Objects/exceptions.c' line='2669' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_SetStart'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2745' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='2745' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_SetStart' mangled-name='PyUnicodeEncodeError_SetStart' filepath='Objects/exceptions.c' line='2661' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_SetStart'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2745' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/exceptions.c' line='2745' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeTranslateError_GetStart' mangled-name='PyUnicodeTranslateError_GetStart' filepath='Objects/exceptions.c' line='2654' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeTranslateError_GetStart'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2722' column='1'/> + <parameter type-id='type-id-168' name='end' filepath='Objects/exceptions.c' line='2722' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_GetStart' mangled-name='PyUnicodeDecodeError_GetStart' filepath='Objects/exceptions.c' line='2636' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_GetStart'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2704' column='1'/> + <parameter type-id='type-id-168' name='end' filepath='Objects/exceptions.c' line='2704' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_GetStart' mangled-name='PyUnicodeEncodeError_GetStart' filepath='Objects/exceptions.c' line='2617' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_GetStart'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2704' column='1'/> + <parameter type-id='type-id-168' name='end' filepath='Objects/exceptions.c' line='2704' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicodeTranslateError_GetObject' mangled-name='PyUnicodeTranslateError_GetObject' filepath='Objects/exceptions.c' line='2611' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeTranslateError_GetObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_GetObject' mangled-name='PyUnicodeDecodeError_GetObject' filepath='Objects/exceptions.c' line='2605' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_GetObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_GetObject' mangled-name='PyUnicodeEncodeError_GetObject' filepath='Objects/exceptions.c' line='2599' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_GetObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeDecodeError_GetEncoding' mangled-name='PyUnicodeDecodeError_GetEncoding' filepath='Objects/exceptions.c' line='2593' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeDecodeError_GetEncoding'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicodeEncodeError_GetEncoding' mangled-name='PyUnicodeEncodeError_GetEncoding' filepath='Objects/exceptions.c' line='2587' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicodeEncodeError_GetEncoding'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyExceptionClass_Name' mangled-name='PyExceptionClass_Name' filepath='Objects/exceptions.c' line='421' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyExceptionClass_Name'> + <parameter type-id='type-id-14' name='ob' filepath='Objects/exceptions.c' line='421' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyException_SetContext' mangled-name='PyException_SetContext' filepath='Objects/exceptions.c' line='415' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyException_SetContext'> + <parameter type-id='type-id-14' name='self' filepath='Objects/exceptions.c' line='415' column='1'/> + <parameter type-id='type-id-14' name='context' filepath='Objects/exceptions.c' line='415' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyException_GetContext' mangled-name='PyException_GetContext' filepath='Objects/exceptions.c' line='406' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyException_GetContext'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyException_SetCause' mangled-name='PyException_SetCause' filepath='Objects/exceptions.c' line='398' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyException_SetCause'> + <parameter type-id='type-id-14' name='self' filepath='Objects/exceptions.c' line='398' column='1'/> + <parameter type-id='type-id-14' name='cause' filepath='Objects/exceptions.c' line='398' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyException_GetCause' mangled-name='PyException_GetCause' filepath='Objects/exceptions.c' line='389' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyException_GetCause'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyException_SetTraceback' mangled-name='PyException_SetTraceback' filepath='Objects/exceptions.c' line='383' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyException_SetTraceback'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyException_GetTraceback' mangled-name='PyException_GetTraceback' filepath='Objects/exceptions.c' line='374' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyException_GetTraceback'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/genericaliasobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='Py_GenericAliasType' type-id='type-id-112' mangled-name='Py_GenericAliasType' visibility='default' filepath='./Include/genericaliasobject.h' line='9' column='1' elf-symbol-id='Py_GenericAliasType'/> + <function-decl name='Py_GenericAlias' mangled-name='Py_GenericAlias' filepath='Objects/genericaliasobject.c' line='946' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GenericAlias'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='438' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='438' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/genobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyGen_Type' type-id='type-id-112' mangled-name='PyGen_Type' visibility='default' filepath='./Include/cpython/genobject.h' line='38' column='1' elf-symbol-id='PyGen_Type'/> + <var-decl name='PyCoro_Type' type-id='type-id-112' mangled-name='PyCoro_Type' visibility='default' filepath='./Include/cpython/genobject.h' line='57' column='1' elf-symbol-id='PyCoro_Type'/> + <var-decl name='_PyCoroWrapper_Type' type-id='type-id-112' mangled-name='_PyCoroWrapper_Type' visibility='default' filepath='./Include/cpython/genobject.h' line='58' column='1' elf-symbol-id='_PyCoroWrapper_Type'/> + <var-decl name='PyAsyncGen_Type' type-id='type-id-112' mangled-name='PyAsyncGen_Type' visibility='default' filepath='./Include/cpython/genobject.h' line='71' column='1' elf-symbol-id='PyAsyncGen_Type'/> + <var-decl name='_PyAsyncGenASend_Type' type-id='type-id-112' mangled-name='_PyAsyncGenASend_Type' visibility='default' filepath='./Include/cpython/genobject.h' line='72' column='1' elf-symbol-id='_PyAsyncGenASend_Type'/> + <var-decl name='_PyAsyncGenWrappedValue_Type' type-id='type-id-112' mangled-name='_PyAsyncGenWrappedValue_Type' visibility='default' filepath='./Include/cpython/genobject.h' line='73' column='1' elf-symbol-id='_PyAsyncGenWrappedValue_Type'/> + <var-decl name='_PyAsyncGenAThrow_Type' type-id='type-id-112' mangled-name='_PyAsyncGenAThrow_Type' visibility='default' filepath='./Include/cpython/genobject.h' line='74' column='1' elf-symbol-id='_PyAsyncGenAThrow_Type'/> + <class-decl name='_frame' size-in-bits='448' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_frame.h' line='15' column='1' id='type-id-436'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/internal/pycore_frame.h' line='16' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='f_back' type-id='type-id-438' visibility='default' filepath='./Include/internal/pycore_frame.h' line='17' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='f_frame' type-id='type-id-376' visibility='default' filepath='./Include/internal/pycore_frame.h' line='18' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='f_trace' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_frame.h' line='19' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='f_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_frame.h' line='20' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='352'> + <var-decl name='f_trace_lines' type-id='type-id-1' visibility='default' filepath='./Include/internal/pycore_frame.h' line='21' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='360'> + <var-decl name='f_trace_opcodes' type-id='type-id-1' visibility='default' filepath='./Include/internal/pycore_frame.h' line='22' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='368'> + <var-decl name='f_fast_as_locals' type-id='type-id-1' visibility='default' filepath='./Include/internal/pycore_frame.h' line='23' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='_f_frame_data' type-id='type-id-360' visibility='default' filepath='./Include/internal/pycore_frame.h' line='25' column='1'/> + </data-member> + </class-decl> + <class-decl name='_PyInterpreterFrame' size-in-bits='640' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_frame.h' line='47' column='1' id='type-id-375'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='f_func' type-id='type-id-512' visibility='default' filepath='./Include/internal/pycore_frame.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='f_globals' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_frame.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='f_builtins' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_frame.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='f_locals' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_frame.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='f_code' type-id='type-id-444' visibility='default' filepath='./Include/internal/pycore_frame.h' line='53' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='frame_obj' type-id='type-id-438' visibility='default' filepath='./Include/internal/pycore_frame.h' line='54' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='previous' type-id='type-id-376' visibility='default' filepath='./Include/internal/pycore_frame.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='prev_instr' type-id='type-id-513' visibility='default' filepath='./Include/internal/pycore_frame.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='stacktop' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_frame.h' line='62' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='544'> + <var-decl name='is_entry' type-id='type-id-31' visibility='default' filepath='./Include/internal/pycore_frame.h' line='63' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='552'> + <var-decl name='owner' type-id='type-id-1' visibility='default' filepath='./Include/internal/pycore_frame.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='localsplus' type-id='type-id-360' visibility='default' filepath='./Include/internal/pycore_frame.h' line='66' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='1088' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-514' visibility='default' filepath='./Include/cpython/funcobject.h' line='36' column='1' id='type-id-515'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/cpython/funcobject.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='func_globals' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='func_builtins' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='func_name' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='func_qualname' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='func_code' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='func_defaults' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='func_kwdefaults' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='func_closure' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='func_doc' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='39' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='func_dict' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='func_weakreflist' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='41' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='func_module' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='42' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='func_annotations' type-id='type-id-14' visibility='default' filepath='./Include/cpython/funcobject.h' line='43' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='vectorcall' type-id='type-id-106' visibility='default' filepath='./Include/cpython/funcobject.h' line='44' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='func_version' type-id='type-id-256' visibility='default' filepath='./Include/cpython/funcobject.h' line='52' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyFunctionObject' type-id='type-id-515' filepath='./Include/cpython/funcobject.h' line='59' column='1' id='type-id-514'/> + <pointer-type-def type-id='type-id-514' size-in-bits='64' id='type-id-512'/> + <typedef-decl name='__uint16_t' type-id='type-id-461' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='40' column='1' id='type-id-516'/> + <typedef-decl name='uint16_t' type-id='type-id-516' filepath='/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h' line='25' column='1' id='type-id-517'/> + <typedef-decl name='_Py_CODEUNIT' type-id='type-id-517' filepath='./Include/cpython/code.h' line='19' column='1' id='type-id-518'/> + <pointer-type-def type-id='type-id-518' size-in-bits='64' id='type-id-513'/> + <function-decl name='PyAsyncGen_New' mangled-name='PyAsyncGen_New' filepath='Objects/genobject.c' line='1641' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyAsyncGen_New'> + <parameter type-id='type-id-438' name='f' filepath='Objects/genobject.c' line='1641' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/genobject.c' line='1641' column='1'/> + <parameter type-id='type-id-14' name='qualname' filepath='Objects/genobject.c' line='1641' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCoro_New' mangled-name='PyCoro_New' filepath='Objects/genobject.c' line='1360' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCoro_New'> + <parameter type-id='type-id-438' name='f' filepath='Objects/genobject.c' line='1360' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/genobject.c' line='1360' column='1'/> + <parameter type-id='type-id-14' name='qualname' filepath='Objects/genobject.c' line='1360' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyGen_New' mangled-name='PyGen_New' filepath='Objects/genobject.c' line='1009' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGen_New'> + <parameter type-id='type-id-438' name='f' filepath='Objects/genobject.c' line='1009' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyGen_NewWithQualName' mangled-name='PyGen_NewWithQualName' filepath='Objects/genobject.c' line='1003' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGen_NewWithQualName'> + <parameter type-id='type-id-438' name='f' filepath='Objects/genobject.c' line='1003' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/genobject.c' line='1003' column='1'/> + <parameter type-id='type-id-14' name='qualname' filepath='Objects/genobject.c' line='1003' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyGen_FetchStopIterationValue' mangled-name='_PyGen_FetchStopIterationValue' filepath='Objects/genobject.c' line='649' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyGen_FetchStopIterationValue'> + <parameter type-id='type-id-22' name='pvalue' filepath='Objects/genobject.c' line='649' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyGen_SetStopIterationValue' mangled-name='_PyGen_SetStopIterationValue' filepath='Objects/genobject.c' line='610' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyGen_SetStopIterationValue'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyGen_Finalize' mangled-name='_PyGen_Finalize' filepath='Objects/genobject.c' line='53' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyGen_Finalize'> + <parameter type-id='type-id-14' name='self' filepath='Objects/genobject.c' line='53' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/fileobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyStdPrinter_Type' type-id='type-id-112' mangled-name='PyStdPrinter_Type' visibility='default' filepath='./Include/cpython/fileobject.h' line='10' column='1' elf-symbol-id='PyStdPrinter_Type'/> + <function-decl name='PyFile_OpenCode' mangled-name='PyFile_OpenCode' filepath='Objects/fileobject.c' line='516' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_OpenCode'> + <parameter type-id='type-id-3' name='str' filepath='Objects/bytesobject.c' line='147' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFile_OpenCodeObject' mangled-name='PyFile_OpenCodeObject' filepath='Objects/fileobject.c' line='491' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_OpenCodeObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2817' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFile_SetOpenCodeHook' mangled-name='PyFile_SetOpenCodeHook' filepath='Objects/fileobject.c' line='471' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_SetOpenCodeHook'> + <parameter type-id='type-id-64' name='hook' filepath='Objects/fileobject.c' line='471' column='1'/> + <parameter type-id='type-id-18' name='userData' filepath='Objects/fileobject.c' line='471' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFile_NewStdPrinter' mangled-name='PyFile_NewStdPrinter' filepath='Objects/fileobject.c' line='284' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_NewStdPrinter'> + <parameter type-id='type-id-8' name='fd' filepath='Objects/fileobject.c' line='284' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='Py_UniversalNewlineFgets' mangled-name='Py_UniversalNewlineFgets' filepath='Objects/fileobject.c' line='242' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_UniversalNewlineFgets'> + <parameter type-id='type-id-115' name='buf' filepath='Objects/fileobject.c' line='242' column='1'/> + <parameter type-id='type-id-8' name='n' filepath='Objects/fileobject.c' line='242' column='1'/> + <parameter type-id='type-id-473' name='stream' filepath='Objects/fileobject.c' line='242' column='1'/> + <parameter type-id='type-id-14' name='fobj' filepath='Objects/fileobject.c' line='242' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='_PyLong_FileDescriptor_Converter' mangled-name='_PyLong_FileDescriptor_Converter' filepath='Objects/fileobject.c' line='223' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FileDescriptor_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_AsFileDescriptor' mangled-name='PyObject_AsFileDescriptor' filepath='Objects/fileobject.c' line='177' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_AsFileDescriptor'> + <parameter type-id='type-id-14' name='o' filepath='Objects/fileobject.c' line='177' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFile_WriteString' mangled-name='PyFile_WriteString' filepath='Objects/fileobject.c' line='147' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_WriteString'> + <parameter type-id='type-id-3' name='s' filepath='Objects/fileobject.c' line='147' column='1'/> + <parameter type-id='type-id-14' name='f' filepath='Objects/fileobject.c' line='147' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFile_WriteObject' mangled-name='PyFile_WriteObject' filepath='Objects/fileobject.c' line='117' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_WriteObject'> + <parameter type-id='type-id-14' name='v' filepath='Objects/fileobject.c' line='117' column='1'/> + <parameter type-id='type-id-14' name='f' filepath='Objects/fileobject.c' line='117' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Objects/fileobject.c' line='117' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFile_GetLine' mangled-name='PyFile_GetLine' filepath='Objects/fileobject.c' line='53' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_GetLine'> + <parameter type-id='type-id-14' name='f' filepath='Objects/fileobject.c' line='53' column='1'/> + <parameter type-id='type-id-8' name='n' filepath='Objects/fileobject.c' line='53' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFile_FromFd' mangled-name='PyFile_FromFd' filepath='Objects/fileobject.c' line='32' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFile_FromFd'> + <parameter type-id='type-id-8' name='fd' filepath='Objects/fileobject.c' line='32' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Objects/fileobject.c' line='32' column='1'/> + <parameter type-id='type-id-3' name='mode' filepath='Objects/fileobject.c' line='32' column='1'/> + <parameter type-id='type-id-8' name='buffering' filepath='Objects/fileobject.c' line='32' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/fileobject.c' line='32' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/fileobject.c' line='33' column='1'/> + <parameter type-id='type-id-3' name='newline' filepath='Objects/fileobject.c' line='33' column='1'/> + <parameter type-id='type-id-8' name='closefd' filepath='Objects/fileobject.c' line='33' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/floatobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyFloat_Type' type-id='type-id-112' mangled-name='PyFloat_Type' visibility='default' filepath='./Include/floatobject.h' line='14' column='1' elf-symbol-id='PyFloat_Type'/> + <function-decl name='PyFloat_Unpack8' mangled-name='PyFloat_Unpack8' filepath='Objects/floatobject.c' line='2547' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_Unpack8'> + <parameter type-id='type-id-3' name='data' filepath='Objects/floatobject.c' line='2547' column='1'/> + <parameter type-id='type-id-8' name='le' filepath='Objects/floatobject.c' line='2547' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyFloat_Unpack4' mangled-name='PyFloat_Unpack4' filepath='Objects/floatobject.c' line='2468' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_Unpack4'> + <parameter type-id='type-id-3' name='data' filepath='Objects/floatobject.c' line='2547' column='1'/> + <parameter type-id='type-id-8' name='le' filepath='Objects/floatobject.c' line='2547' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyFloat_Unpack2' mangled-name='PyFloat_Unpack2' filepath='Objects/floatobject.c' line='2405' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_Unpack2'> + <parameter type-id='type-id-3' name='data' filepath='Objects/floatobject.c' line='2405' column='1'/> + <parameter type-id='type-id-8' name='le' filepath='Objects/floatobject.c' line='2405' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyFloat_Pack8' mangled-name='PyFloat_Pack8' filepath='Objects/floatobject.c' line='2275' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_Pack8'> + <parameter type-id='type-id-391' name='x' filepath='Objects/floatobject.c' line='2275' column='1'/> + <parameter type-id='type-id-115' name='data' filepath='Objects/floatobject.c' line='2275' column='1'/> + <parameter type-id='type-id-8' name='le' filepath='Objects/floatobject.c' line='2275' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFloat_Pack4' mangled-name='PyFloat_Pack4' filepath='Objects/floatobject.c' line='2167' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_Pack4'> + <parameter type-id='type-id-391' name='x' filepath='Objects/floatobject.c' line='2275' column='1'/> + <parameter type-id='type-id-115' name='data' filepath='Objects/floatobject.c' line='2275' column='1'/> + <parameter type-id='type-id-8' name='le' filepath='Objects/floatobject.c' line='2275' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFloat_Pack2' mangled-name='PyFloat_Pack2' filepath='Objects/floatobject.c' line='2062' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_Pack2'> + <parameter type-id='type-id-391' name='x' filepath='Objects/floatobject.c' line='2062' column='1'/> + <parameter type-id='type-id-115' name='data' filepath='Objects/floatobject.c' line='2062' column='1'/> + <parameter type-id='type-id-8' name='le' filepath='Objects/floatobject.c' line='2062' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyFloat_DebugMallocStats' mangled-name='_PyFloat_DebugMallocStats' filepath='Objects/floatobject.c' line='2039' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyFloat_DebugMallocStats'> + <parameter type-id='type-id-473' name='out' filepath='Objects/floatobject.c' line='2039' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyFloat_AsDouble' mangled-name='PyFloat_AsDouble' filepath='Objects/floatobject.c' line='282' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_AsDouble'> + <parameter type-id='type-id-14' name='op' filepath='Objects/floatobject.c' line='282' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyFloat_FromString' mangled-name='PyFloat_FromString' filepath='Objects/floatobject.c' line='193' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_FromString'> + <parameter type-id='type-id-14' name='v' filepath='Objects/floatobject.c' line='193' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFloat_FromDouble' mangled-name='PyFloat_FromDouble' filepath='Objects/floatobject.c' line='131' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_FromDouble'> + <parameter type-id='type-id-391' name='fval' filepath='Objects/floatobject.c' line='131' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFloat_GetInfo' mangled-name='PyFloat_GetInfo' filepath='Objects/floatobject.c' line='94' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_GetInfo'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFloat_GetMin' mangled-name='PyFloat_GetMin' filepath='Objects/floatobject.c' line='50' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_GetMin'> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyFloat_GetMax' mangled-name='PyFloat_GetMax' filepath='Objects/floatobject.c' line='44' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFloat_GetMax'> + <return type-id='type-id-391'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/frameobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyFrame_Type' type-id='type-id-112' mangled-name='PyFrame_Type' visibility='default' filepath='./Include/cpython/pyframe.h' line='5' column='1' elf-symbol-id='PyFrame_Type'/> + <function-decl name='PyFrame_GetGenerator' mangled-name='PyFrame_GetGenerator' filepath='Objects/frameobject.c' line='1207' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetGenerator'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1207' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFrame_GetLasti' mangled-name='PyFrame_GetLasti' filepath='Objects/frameobject.c' line='1197' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetLasti'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1197' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFrame_GetBuiltins' mangled-name='PyFrame_GetBuiltins' filepath='Objects/frameobject.c' line='1191' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetBuiltins'> + <parameter type-id='type-id-438' name='f' filepath='Objects/genobject.c' line='1009' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFrame_GetGlobals' mangled-name='PyFrame_GetGlobals' filepath='Objects/frameobject.c' line='1185' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetGlobals'> + <parameter type-id='type-id-438' name='f' filepath='Objects/genobject.c' line='1009' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFrame_GetLocals' mangled-name='PyFrame_GetLocals' filepath='Objects/frameobject.c' line='1179' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetLocals'> + <parameter type-id='type-id-438' name='f' filepath='Objects/genobject.c' line='1009' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFrame_GetBack' mangled-name='PyFrame_GetBack' filepath='Objects/frameobject.c' line='1161' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetBack'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1161' column='1'/> + <return type-id='type-id-438'/> + </function-decl> + <function-decl name='PyFrame_GetCode' mangled-name='PyFrame_GetCode' filepath='Objects/frameobject.c' line='1150' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetCode'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1150' column='1'/> + <return type-id='type-id-444'/> + </function-decl> + <function-decl name='_PyFrame_IsEntryFrame' mangled-name='_PyFrame_IsEntryFrame' filepath='Objects/frameobject.c' line='1142' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyFrame_IsEntryFrame'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1142' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFrame_LocalsToFast' mangled-name='PyFrame_LocalsToFast' filepath='Objects/frameobject.c' line='1133' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_LocalsToFast'> + <parameter type-id='type-id-438' name='f' filepath='Objects/frameobject.c' line='1133' column='1'/> + <parameter type-id='type-id-8' name='clear' filepath='Objects/frameobject.c' line='1133' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyFrame_FastToLocals' mangled-name='PyFrame_FastToLocals' filepath='Objects/frameobject.c' line='1054' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_FastToLocals'> + <parameter type-id='type-id-438' name='f' filepath='Objects/frameobject.c' line='1054' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyFrame_FastToLocalsWithError' mangled-name='PyFrame_FastToLocalsWithError' filepath='Objects/frameobject.c' line='1040' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_FastToLocalsWithError'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1197' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFrame_New' mangled-name='PyFrame_New' filepath='Objects/frameobject.c' line='887' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_New'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/frameobject.c' line='887' column='1'/> + <parameter type-id='type-id-444' name='code' filepath='Objects/frameobject.c' line='887' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Objects/frameobject.c' line='888' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Objects/frameobject.c' line='888' column='1'/> + <return type-id='type-id-438'/> + </function-decl> + <function-decl name='PyFrame_GetLineNumber' mangled-name='PyFrame_GetLineNumber' filepath='Objects/frameobject.c' line='36' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrame_GetLineNumber'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1142' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/funcobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyFunction_Type' type-id='type-id-112' mangled-name='PyFunction_Type' visibility='default' filepath='./Include/cpython/funcobject.h' line='61' column='1' elf-symbol-id='PyFunction_Type'/> + <var-decl name='PyClassMethod_Type' type-id='type-id-112' mangled-name='PyClassMethod_Type' visibility='default' filepath='./Include/cpython/funcobject.h' line='103' column='1' elf-symbol-id='PyClassMethod_Type'/> + <var-decl name='PyStaticMethod_Type' type-id='type-id-112' mangled-name='PyStaticMethod_Type' visibility='default' filepath='./Include/cpython/funcobject.h' line='104' column='1' elf-symbol-id='PyStaticMethod_Type'/> + <function-decl name='PyStaticMethod_New' mangled-name='PyStaticMethod_New' filepath='Objects/funcobject.c' line='1218' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStaticMethod_New'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyClassMethod_New' mangled-name='PyClassMethod_New' filepath='Objects/funcobject.c' line='1022' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyClassMethod_New'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_SetAnnotations' mangled-name='PyFunction_SetAnnotations' filepath='Objects/funcobject.c' line='319' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_SetAnnotations'> + <parameter type-id='type-id-14' name='op' filepath='Objects/funcobject.c' line='319' column='1'/> + <parameter type-id='type-id-14' name='annotations' filepath='Objects/funcobject.c' line='319' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFunction_GetAnnotations' mangled-name='PyFunction_GetAnnotations' filepath='Objects/funcobject.c' line='309' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_GetAnnotations'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_SetClosure' mangled-name='PyFunction_SetClosure' filepath='Objects/funcobject.c' line='255' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_SetClosure'> + <parameter type-id='type-id-14' name='op' filepath='Objects/funcobject.c' line='319' column='1'/> + <parameter type-id='type-id-14' name='annotations' filepath='Objects/funcobject.c' line='319' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFunction_GetClosure' mangled-name='PyFunction_GetClosure' filepath='Objects/funcobject.c' line='245' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_GetClosure'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_SetKwDefaults' mangled-name='PyFunction_SetKwDefaults' filepath='Objects/funcobject.c' line='223' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_SetKwDefaults'> + <parameter type-id='type-id-14' name='op' filepath='Objects/funcobject.c' line='319' column='1'/> + <parameter type-id='type-id-14' name='annotations' filepath='Objects/funcobject.c' line='319' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFunction_GetKwDefaults' mangled-name='PyFunction_GetKwDefaults' filepath='Objects/funcobject.c' line='213' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_GetKwDefaults'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_SetDefaults' mangled-name='PyFunction_SetDefaults' filepath='Objects/funcobject.c' line='192' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_SetDefaults'> + <parameter type-id='type-id-14' name='op' filepath='Objects/funcobject.c' line='319' column='1'/> + <parameter type-id='type-id-14' name='annotations' filepath='Objects/funcobject.c' line='319' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyFunction_GetDefaults' mangled-name='PyFunction_GetDefaults' filepath='Objects/funcobject.c' line='182' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_GetDefaults'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_GetModule' mangled-name='PyFunction_GetModule' filepath='Objects/funcobject.c' line='172' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_GetModule'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_GetGlobals' mangled-name='PyFunction_GetGlobals' filepath='Objects/funcobject.c' line='162' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_GetGlobals'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_GetCode' mangled-name='PyFunction_GetCode' filepath='Objects/funcobject.c' line='152' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_GetCode'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_New' mangled-name='PyFunction_New' filepath='Objects/funcobject.c' line='146' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_New'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyFunction_NewWithQualName' mangled-name='PyFunction_NewWithQualName' filepath='Objects/funcobject.c' line='47' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFunction_NewWithQualName'> + <parameter type-id='type-id-14' name='code' filepath='Objects/funcobject.c' line='47' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Objects/funcobject.c' line='47' column='1'/> + <parameter type-id='type-id-14' name='qualname' filepath='Objects/funcobject.c' line='47' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/interpreteridobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyInterpreterID_Type' type-id='type-id-112' mangled-name='_PyInterpreterID_Type' visibility='default' filepath='./Include/internal/pycore_interpreteridobject.h' line='13' column='1' elf-symbol-id='_PyInterpreterID_Type'/> + <function-decl name='_PyInterpreterID_LookUp' mangled-name='_PyInterpreterID_LookUp' filepath='Objects/interpreteridobject.c' line='287' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterID_LookUp'> + <parameter type-id='type-id-14' name='requested_id' filepath='Objects/interpreteridobject.c' line='287' column='1'/> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='_PyInterpreterState_GetIDObject' mangled-name='_PyInterpreterState_GetIDObject' filepath='Objects/interpreteridobject.c' line='274' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_GetIDObject'> + <parameter type-id='type-id-11' name='interp' filepath='Objects/interpreteridobject.c' line='274' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyInterpreterID_New' mangled-name='_PyInterpreterID_New' filepath='Objects/interpreteridobject.c' line='268' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterID_New'> + <parameter type-id='type-id-29' name='id' filepath='Objects/interpreteridobject.c' line='268' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/iterobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PySeqIter_Type' type-id='type-id-112' mangled-name='PySeqIter_Type' visibility='default' filepath='./Include/iterobject.h' line='8' column='1' elf-symbol-id='PySeqIter_Type'/> + <var-decl name='PyCallIter_Type' type-id='type-id-112' mangled-name='PyCallIter_Type' visibility='default' filepath='./Include/iterobject.h' line='9' column='1' elf-symbol-id='PyCallIter_Type'/> + <var-decl name='_PyAnextAwaitable_Type' type-id='type-id-112' visibility='default' filepath='./Include/iterobject.h' line='11' column='1'/> + <function-decl name='PyCallIter_New' mangled-name='PyCallIter_New' filepath='Objects/iterobject.c' line='180' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCallIter_New'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='438' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='438' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySeqIter_New' mangled-name='PySeqIter_New' filepath='Objects/iterobject.c' line='14' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySeqIter_New'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/listobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyList_Type' type-id='type-id-112' mangled-name='PyList_Type' visibility='default' filepath='./Include/listobject.h' line='20' column='1' elf-symbol-id='PyList_Type'/> + <var-decl name='PyListIter_Type' type-id='type-id-112' mangled-name='PyListIter_Type' visibility='default' filepath='./Include/listobject.h' line='21' column='1' elf-symbol-id='PyListIter_Type'/> + <var-decl name='PyListRevIter_Type' type-id='type-id-112' mangled-name='PyListRevIter_Type' visibility='default' filepath='./Include/listobject.h' line='22' column='1' elf-symbol-id='PyListRevIter_Type'/> + <function-decl name='PyList_AsTuple' mangled-name='PyList_AsTuple' filepath='Objects/listobject.c' line='2621' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_AsTuple'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyList_Reverse' mangled-name='PyList_Reverse' filepath='Objects/listobject.c' line='2607' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_Reverse'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyList_Sort' mangled-name='PyList_Sort' filepath='Objects/listobject.c' line='2578' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_Sort'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyList_Extend' mangled-name='_PyList_Extend' filepath='Objects/listobject.c' line='996' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyList_Extend'> + <parameter type-id='type-id-400' name='self' filepath='Objects/listobject.c' line='996' column='1'/> + <parameter type-id='type-id-14' name='iterable' filepath='Objects/listobject.c' line='996' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyList_SetSlice' mangled-name='PyList_SetSlice' filepath='Objects/listobject.c' line='734' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_SetSlice'> + <parameter type-id='type-id-14' name='a' filepath='Objects/listobject.c' line='734' column='1'/> + <parameter type-id='type-id-36' name='ilow' filepath='Objects/listobject.c' line='734' column='1'/> + <parameter type-id='type-id-36' name='ihigh' filepath='Objects/listobject.c' line='734' column='1'/> + <parameter type-id='type-id-14' name='v' filepath='Objects/listobject.c' line='734' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyList_GetSlice' mangled-name='PyList_GetSlice' filepath='Objects/listobject.c' line='488' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_GetSlice'> + <parameter type-id='type-id-14' name='a' filepath='Objects/listobject.c' line='488' column='1'/> + <parameter type-id='type-id-36' name='ilow' filepath='Objects/listobject.c' line='488' column='1'/> + <parameter type-id='type-id-36' name='ihigh' filepath='Objects/listobject.c' line='488' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyList_Append' mangled-name='PyList_Append' filepath='Objects/listobject.c' line='326' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_Append'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyList_Insert' mangled-name='PyList_Insert' filepath='Objects/listobject.c' line='302' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_Insert'> + <parameter type-id='type-id-14' name='op' filepath='Objects/listobject.c' line='302' column='1'/> + <parameter type-id='type-id-36' name='where' filepath='Objects/listobject.c' line='302' column='1'/> + <parameter type-id='type-id-14' name='newitem' filepath='Objects/listobject.c' line='302' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyList_SetItem' mangled-name='PyList_SetItem' filepath='Objects/listobject.c' line='252' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_SetItem'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1926' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/abstract.c' line='1926' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1926' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyList_GetItem' mangled-name='PyList_GetItem' filepath='Objects/listobject.c' line='237' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_GetItem'> + <parameter type-id='type-id-14' name='op' filepath='Objects/listobject.c' line='237' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/listobject.c' line='237' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyList_Size' mangled-name='PyList_Size' filepath='Objects/listobject.c' line='213' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyList_New' mangled-name='PyList_New' filepath='Objects/listobject.c' line='149' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyList_New'> + <parameter type-id='type-id-36' name='size' filepath='Objects/listobject.c' line='149' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyList_DebugMallocStats' mangled-name='_PyList_DebugMallocStats' filepath='Objects/listobject.c' line='138' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyList_DebugMallocStats'> + <parameter type-id='type-id-473' name='out' filepath='Objects/floatobject.c' line='2039' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/longobject.c' comp-dir-path='/src' language='LANG_C99'> + + <array-type-def dimensions='1' type-id='type-id-283' size-in-bits='2048' id='type-id-519'> + <subrange length='256' type-id='type-id-16' id='type-id-264'/> + + </array-type-def> + <var-decl name='_PyLong_DigitValue' type-id='type-id-519' mangled-name='_PyLong_DigitValue' visibility='default' filepath='./Include/internal/pycore_long.h' line='52' column='1' elf-symbol-id='_PyLong_DigitValue'/> + <var-decl name='PyLong_Type' type-id='type-id-112' mangled-name='PyLong_Type' visibility='default' filepath='./Include/longobject.h' line='10' column='1' elf-symbol-id='PyLong_Type'/> + <function-decl name='PyLong_GetInfo' mangled-name='PyLong_GetInfo' filepath='Objects/longobject.c' line='6072' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_GetInfo'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_DivmodNear' mangled-name='_PyLong_DivmodNear' filepath='Objects/longobject.c' line='5443' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_DivmodNear'> + <parameter type-id='type-id-14' name='a' filepath='Objects/longobject.c' line='5443' column='1'/> + <parameter type-id='type-id-14' name='b' filepath='Objects/longobject.c' line='5443' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_GCD' mangled-name='_PyLong_GCD' filepath='Objects/longobject.c' line='5081' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_GCD'> + <parameter type-id='type-id-14' name='aarg' filepath='Objects/longobject.c' line='5081' column='1'/> + <parameter type-id='type-id-14' name='barg' filepath='Objects/longobject.c' line='5081' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_Lshift' mangled-name='_PyLong_Lshift' filepath='Objects/longobject.c' line='4880' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_Lshift'> + <parameter type-id='type-id-14' name='a' filepath='Objects/longobject.c' line='4880' column='1'/> + <parameter type-id='type-id-54' name='shiftby' filepath='Objects/longobject.c' line='4880' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_Rshift' mangled-name='_PyLong_Rshift' filepath='Objects/longobject.c' line='4803' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_Rshift'> + <parameter type-id='type-id-14' name='a' filepath='Objects/longobject.c' line='4880' column='1'/> + <parameter type-id='type-id-54' name='shiftby' filepath='Objects/longobject.c' line='4880' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_AsDouble' mangled-name='PyLong_AsDouble' filepath='Objects/longobject.c' line='3023' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsDouble'> + <parameter type-id='type-id-14' name='v' filepath='Objects/longobject.c' line='3023' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <pointer-type-def type-id='type-id-259' size-in-bits='64' id='type-id-520'/> + <function-decl name='_PyLong_Frexp' mangled-name='_PyLong_Frexp' filepath='Objects/longobject.c' line='2911' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_Frexp'> + <parameter type-id='type-id-520' name='a' filepath='Objects/longobject.c' line='2911' column='1'/> + <parameter type-id='type-id-168' name='e' filepath='Objects/longobject.c' line='2911' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='PyLong_FromUnicodeObject' mangled-name='PyLong_FromUnicodeObject' filepath='Objects/longobject.c' line='2620' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromUnicodeObject'> + <parameter type-id='type-id-14' name='u' filepath='Objects/longobject.c' line='2620' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Objects/longobject.c' line='2620' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_FromBytes' mangled-name='_PyLong_FromBytes' filepath='Objects/longobject.c' line='2600' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FromBytes'> + <parameter type-id='type-id-3' name='s' filepath='Objects/longobject.c' line='2600' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/longobject.c' line='2600' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Objects/longobject.c' line='2600' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_FromString' mangled-name='PyLong_FromString' filepath='Objects/longobject.c' line='2239' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromString'> + <parameter type-id='type-id-3' name='str' filepath='Objects/longobject.c' line='2239' column='1'/> + <parameter type-id='type-id-494' name='pend' filepath='Objects/longobject.c' line='2239' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Objects/longobject.c' line='2239' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_FormatBytesWriter' mangled-name='_PyLong_FormatBytesWriter' filepath='Objects/longobject.c' line='2088' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FormatBytesWriter'> + <parameter type-id='type-id-493' name='writer' filepath='Objects/longobject.c' line='2088' column='1'/> + <parameter type-id='type-id-115' name='str' filepath='Objects/longobject.c' line='2088' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Objects/longobject.c' line='2089' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Objects/longobject.c' line='2090' column='1'/> + <parameter type-id='type-id-8' name='alternate' filepath='Objects/longobject.c' line='2090' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <class-decl name='__anonymous_struct__' size-in-bits='448' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-521' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='718' column='1' id='type-id-522'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='buffer' type-id='type-id-14' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='719' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='data' type-id='type-id-18' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='720' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='kind' type-id='type-id-523' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='721' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='maxchar' type-id='type-id-524' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='722' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='723' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='pos' type-id='type-id-36' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='724' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='min_length' type-id='type-id-36' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='727' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='min_char' type-id='type-id-524' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='730' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='416'> + <var-decl name='overallocate' type-id='type-id-283' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='733' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='424'> + <var-decl name='readonly' type-id='type-id-283' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='737' column='1'/> + </data-member> + </class-decl> + <enum-decl name='PyUnicode_Kind' filepath='./Include/cpython/unicodeobject.h' line='304' column='1' id='type-id-523'> + <underlying-type type-id='type-id-126'/> + <enumerator name='PyUnicode_WCHAR_KIND' value='0'/> + <enumerator name='PyUnicode_1BYTE_KIND' value='1'/> + <enumerator name='PyUnicode_2BYTE_KIND' value='2'/> + <enumerator name='PyUnicode_4BYTE_KIND' value='4'/> + </enum-decl> + <typedef-decl name='Py_UCS4' type-id='type-id-256' filepath='./Include/unicodeobject.h' line='102' column='1' id='type-id-524'/> + <typedef-decl name='_PyUnicodeWriter' type-id='type-id-522' filepath='./Include/cpython/unicodeobject.h' line='738' column='1' id='type-id-521'/> + <pointer-type-def type-id='type-id-521' size-in-bits='64' id='type-id-525'/> + <function-decl name='_PyLong_FormatWriter' mangled-name='_PyLong_FormatWriter' filepath='Objects/longobject.c' line='2075' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FormatWriter'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/longobject.c' line='2075' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Objects/longobject.c' line='2076' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Objects/longobject.c' line='2077' column='1'/> + <parameter type-id='type-id-8' name='alternate' filepath='Objects/longobject.c' line='2077' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_Format' mangled-name='_PyLong_Format' filepath='Objects/longobject.c' line='2061' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_Format'> + <parameter type-id='type-id-14' name='n' filepath='Objects/abstract.c' line='1695' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Objects/abstract.c' line='1695' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_Size_t_Converter' mangled-name='_PyLong_Size_t_Converter' filepath='Objects/longobject.c' line='1502' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_Size_t_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_UnsignedLongLong_Converter' mangled-name='_PyLong_UnsignedLongLong_Converter' filepath='Objects/longobject.c' line='1485' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_UnsignedLongLong_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_UnsignedLong_Converter' mangled-name='_PyLong_UnsignedLong_Converter' filepath='Objects/longobject.c' line='1468' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_UnsignedLong_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_UnsignedInt_Converter' mangled-name='_PyLong_UnsignedInt_Converter' filepath='Objects/longobject.c' line='1446' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_UnsignedInt_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_UnsignedShort_Converter' mangled-name='_PyLong_UnsignedShort_Converter' filepath='Objects/longobject.c' line='1424' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_UnsignedShort_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyLong_AsLongLongAndOverflow' mangled-name='PyLong_AsLongLongAndOverflow' filepath='Objects/longobject.c' line='1348' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsLongLongAndOverflow'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='1348' column='1'/> + <parameter type-id='type-id-501' name='overflow' filepath='Objects/longobject.c' line='1348' column='1'/> + <return type-id='type-id-222'/> + </function-decl> + <function-decl name='PyLong_AsUnsignedLongLongMask' mangled-name='PyLong_AsUnsignedLongLongMask' filepath='Objects/longobject.c' line='1314' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsUnsignedLongLongMask'> + <parameter type-id='type-id-14' name='op' filepath='Objects/longobject.c' line='1314' column='1'/> + <return type-id='type-id-225'/> + </function-decl> + <function-decl name='PyLong_AsUnsignedLongLong' mangled-name='PyLong_AsUnsignedLongLong' filepath='Objects/longobject.c' line='1249' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsUnsignedLongLong'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='1249' column='1'/> + <return type-id='type-id-225'/> + </function-decl> + <function-decl name='PyLong_AsLongLong' mangled-name='PyLong_AsLongLong' filepath='Objects/longobject.c' line='1197' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsLongLong'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='1197' column='1'/> + <return type-id='type-id-222'/> + </function-decl> + <function-decl name='PyLong_FromSsize_t' mangled-name='PyLong_FromSsize_t' filepath='Objects/longobject.c' line='1153' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromSsize_t'> + <parameter type-id='type-id-36' name='ival' filepath='Objects/longobject.c' line='1153' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_FromLongLong' mangled-name='PyLong_FromLongLong' filepath='Objects/longobject.c' line='1112' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromLongLong'> + <parameter type-id='type-id-222' name='ival' filepath='Objects/longobject.c' line='1112' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_AsVoidPtr' mangled-name='PyLong_AsVoidPtr' filepath='Objects/longobject.c' line='1075' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsVoidPtr'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='122' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyLong_FromVoidPtr' mangled-name='PyLong_FromVoidPtr' filepath='Objects/longobject.c' line='1058' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromVoidPtr'> + <parameter type-id='type-id-18' name='p' filepath='Objects/longobject.c' line='1058' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <pointer-type-def type-id='type-id-283' size-in-bits='64' id='type-id-526'/> + <function-decl name='_PyLong_AsByteArray' mangled-name='_PyLong_AsByteArray' filepath='Objects/longobject.c' line='923' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_AsByteArray'> + <parameter type-id='type-id-520' name='v' filepath='Objects/longobject.c' line='923' column='1'/> + <parameter type-id='type-id-526' name='bytes' filepath='Objects/longobject.c' line='924' column='1'/> + <parameter type-id='type-id-54' name='n' filepath='Objects/longobject.c' line='924' column='1'/> + <parameter type-id='type-id-8' name='little_endian' filepath='Objects/longobject.c' line='925' column='1'/> + <parameter type-id='type-id-8' name='is_signed' filepath='Objects/longobject.c' line='925' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <qualified-type-def type-id='type-id-283' const='yes' id='type-id-527'/> + <pointer-type-def type-id='type-id-527' size-in-bits='64' id='type-id-528'/> + <function-decl name='_PyLong_FromByteArray' mangled-name='_PyLong_FromByteArray' filepath='Objects/longobject.c' line='812' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FromByteArray'> + <parameter type-id='type-id-528' name='bytes' filepath='Objects/longobject.c' line='812' column='1'/> + <parameter type-id='type-id-54' name='n' filepath='Objects/longobject.c' line='812' column='1'/> + <parameter type-id='type-id-8' name='little_endian' filepath='Objects/longobject.c' line='813' column='1'/> + <parameter type-id='type-id-8' name='is_signed' filepath='Objects/longobject.c' line='813' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_NumBits' mangled-name='_PyLong_NumBits' filepath='Objects/longobject.c' line='782' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_NumBits'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='782' column='1'/> + <return type-id='type-id-54'/> + </function-decl> + <function-decl name='_PyLong_Sign' mangled-name='_PyLong_Sign' filepath='Objects/longobject.c' line='761' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_Sign'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyLong_AsUnsignedLongMask' mangled-name='PyLong_AsUnsignedLongMask' filepath='Objects/longobject.c' line='737' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsUnsignedLongMask'> + <parameter type-id='type-id-14' name='op' filepath='Objects/longobject.c' line='737' column='1'/> + <return type-id='type-id-16'/> + </function-decl> + <function-decl name='PyLong_AsSize_t' mangled-name='PyLong_AsSize_t' filepath='Objects/longobject.c' line='664' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsSize_t'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='664' column='1'/> + <return type-id='type-id-54'/> + </function-decl> + <function-decl name='PyLong_AsUnsignedLong' mangled-name='PyLong_AsUnsignedLong' filepath='Objects/longobject.c' line='620' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsUnsignedLong'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='620' column='1'/> + <return type-id='type-id-16'/> + </function-decl> + <function-decl name='PyLong_AsSsize_t' mangled-name='PyLong_AsSsize_t' filepath='Objects/longobject.c' line='565' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsSsize_t'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='565' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PyLong_AsInt' mangled-name='_PyLong_AsInt' filepath='Objects/longobject.c' line='547' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_AsInt'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='302' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyLong_AsLong' mangled-name='PyLong_AsLong' filepath='Objects/longobject.c' line='530' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsLong'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/longobject.c' line='530' column='1'/> + <return type-id='type-id-53'/> + </function-decl> + <function-decl name='PyLong_AsLongAndOverflow' mangled-name='PyLong_AsLongAndOverflow' filepath='Objects/longobject.c' line='451' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_AsLongAndOverflow'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='451' column='1'/> + <parameter type-id='type-id-501' name='overflow' filepath='Objects/longobject.c' line='451' column='1'/> + <return type-id='type-id-53'/> + </function-decl> + <function-decl name='PyLong_FromDouble' mangled-name='PyLong_FromDouble' filepath='Objects/longobject.c' line='374' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromDouble'> + <parameter type-id='type-id-391' name='dval' filepath='Objects/longobject.c' line='374' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_FromSize_t' mangled-name='PyLong_FromSize_t' filepath='Objects/longobject.c' line='366' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromSize_t'> + <parameter type-id='type-id-54' name='ival' filepath='Objects/longobject.c' line='366' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_FromUnsignedLongLong' mangled-name='PyLong_FromUnsignedLongLong' filepath='Objects/longobject.c' line='358' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromUnsignedLongLong'> + <parameter type-id='type-id-225' name='ival' filepath='Objects/longobject.c' line='358' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_FromUnsignedLong' mangled-name='PyLong_FromUnsignedLong' filepath='Objects/longobject.c' line='350' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromUnsignedLong'> + <parameter type-id='type-id-16' name='ival' filepath='Objects/longobject.c' line='350' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyLong_FromLong' mangled-name='PyLong_FromLong' filepath='Objects/longobject.c' line='285' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyLong_FromLong'> + <parameter type-id='type-id-53' name='ival' filepath='Objects/longobject.c' line='285' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_Copy' mangled-name='_PyLong_Copy' filepath='Objects/longobject.c' line='169' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_Copy'> + <parameter type-id='type-id-520' name='src' filepath='Objects/longobject.c' line='169' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_New' mangled-name='_PyLong_New' filepath='Objects/longobject.c' line='142' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_New'> + <parameter type-id='type-id-36' name='size' filepath='Objects/longobject.c' line='142' column='1'/> + <return type-id='type-id-520'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/dictobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_pydict_global_version' type-id='type-id-19' visibility='default' filepath='./Include/internal/pycore_dict.h' line='162' column='1'/> + <var-decl name='PyDict_Type' type-id='type-id-112' mangled-name='PyDict_Type' visibility='default' filepath='./Include/dictobject.h' line='15' column='1' elf-symbol-id='PyDict_Type'/> + <var-decl name='PyDictIterKey_Type' type-id='type-id-112' mangled-name='PyDictIterKey_Type' visibility='default' filepath='./Include/dictobject.h' line='79' column='1' elf-symbol-id='PyDictIterKey_Type'/> + <var-decl name='PyDictIterValue_Type' type-id='type-id-112' mangled-name='PyDictIterValue_Type' visibility='default' filepath='./Include/dictobject.h' line='80' column='1' elf-symbol-id='PyDictIterValue_Type'/> + <var-decl name='PyDictIterItem_Type' type-id='type-id-112' mangled-name='PyDictIterItem_Type' visibility='default' filepath='./Include/dictobject.h' line='81' column='1' elf-symbol-id='PyDictIterItem_Type'/> + <var-decl name='PyDictRevIterKey_Type' type-id='type-id-112' mangled-name='PyDictRevIterKey_Type' visibility='default' filepath='./Include/dictobject.h' line='83' column='1' elf-symbol-id='PyDictRevIterKey_Type'/> + <var-decl name='PyDictRevIterItem_Type' type-id='type-id-112' mangled-name='PyDictRevIterItem_Type' visibility='default' filepath='./Include/dictobject.h' line='84' column='1' elf-symbol-id='PyDictRevIterItem_Type'/> + <var-decl name='PyDictRevIterValue_Type' type-id='type-id-112' mangled-name='PyDictRevIterValue_Type' visibility='default' filepath='./Include/dictobject.h' line='85' column='1' elf-symbol-id='PyDictRevIterValue_Type'/> + <var-decl name='PyDictKeys_Type' type-id='type-id-112' mangled-name='PyDictKeys_Type' visibility='default' filepath='./Include/dictobject.h' line='66' column='1' elf-symbol-id='PyDictKeys_Type'/> + <var-decl name='PyDictItems_Type' type-id='type-id-112' mangled-name='PyDictItems_Type' visibility='default' filepath='./Include/dictobject.h' line='68' column='1' elf-symbol-id='PyDictItems_Type'/> + <var-decl name='PyDictValues_Type' type-id='type-id-112' mangled-name='PyDictValues_Type' visibility='default' filepath='./Include/dictobject.h' line='67' column='1' elf-symbol-id='PyDictValues_Type'/> + <function-decl name='PyObject_GenericGetDict' mangled-name='PyObject_GenericGetDict' filepath='Objects/dictobject.c' line='5587' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GenericGetDict'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/dictobject.c' line='5587' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/dictobject.c' line='5587' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDictView_Intersect' mangled-name='_PyDictView_Intersect' filepath='Objects/dictobject.c' line='4799' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDictView_Intersect'> + <parameter type-id='type-id-14' name='self' filepath='Objects/dictobject.c' line='4799' column='1'/> + <parameter type-id='type-id-14' name='other' filepath='Objects/dictobject.c' line='4799' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDictView_New' mangled-name='_PyDictView_New' filepath='Objects/dictobject.c' line='4573' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDictView_New'> + <parameter type-id='type-id-14' name='dict' filepath='Objects/dictobject.c' line='4573' column='1'/> + <parameter type-id='type-id-74' name='type' filepath='Objects/dictobject.c' line='4573' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_DelItemString' mangled-name='PyDict_DelItemString' filepath='Objects/dictobject.c' line='3935' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_DelItemString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='271' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='271' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_DelItemId' mangled-name='_PyDict_DelItemId' filepath='Objects/dictobject.c' line='3926' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_DelItemId'> + <parameter type-id='type-id-14' name='v' filepath='Objects/dictobject.c' line='3926' column='1'/> + <parameter type-id='type-id-499' name='key' filepath='Objects/dictobject.c' line='3926' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_SetItemString' mangled-name='PyDict_SetItemString' filepath='Objects/dictobject.c' line='3912' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_SetItemString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/abstract.c' line='2359' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_SetItemId' mangled-name='_PyDict_SetItemId' filepath='Objects/dictobject.c' line='3902' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_SetItemId'> + <parameter type-id='type-id-14' name='v' filepath='Objects/dictobject.c' line='3902' column='1'/> + <parameter type-id='type-id-499' name='key' filepath='Objects/dictobject.c' line='3902' column='1'/> + <parameter type-id='type-id-14' name='item' filepath='Objects/dictobject.c' line='3902' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_GetItemString' mangled-name='PyDict_GetItemString' filepath='Objects/dictobject.c' line='3888' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_GetItemString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2342' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2342' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_ContainsId' mangled-name='_PyDict_ContainsId' filepath='Objects/dictobject.c' line='3724' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_ContainsId'> + <parameter type-id='type-id-14' name='v' filepath='Objects/dictobject.c' line='3926' column='1'/> + <parameter type-id='type-id-499' name='key' filepath='Objects/dictobject.c' line='3926' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_Contains_KnownHash' mangled-name='_PyDict_Contains_KnownHash' filepath='Objects/dictobject.c' line='3711' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_Contains_KnownHash'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='3711' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='3711' column='1'/> + <parameter type-id='type-id-159' name='hash' filepath='Objects/dictobject.c' line='3711' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_Contains' mangled-name='PyDict_Contains' filepath='Objects/dictobject.c' line='3691' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Contains'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='3691' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='3691' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_SizeOf' mangled-name='_PyDict_SizeOf' filepath='Objects/dictobject.c' line='3573' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_SizeOf'> + <parameter type-id='type-id-413' name='mp' filepath='Objects/dictobject.c' line='3573' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyDict_SetDefault' mangled-name='PyDict_SetDefault' filepath='Objects/dictobject.c' line='3298' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_SetDefault'> + <parameter type-id='type-id-14' name='d' filepath='Objects/dictobject.c' line='3298' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='3298' column='1'/> + <parameter type-id='type-id-14' name='defaultobj' filepath='Objects/dictobject.c' line='3298' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_Items' mangled-name='PyDict_Items' filepath='Objects/dictobject.c' line='3138' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Items'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_Values' mangled-name='PyDict_Values' filepath='Objects/dictobject.c' line='3128' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Values'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_Keys' mangled-name='PyDict_Keys' filepath='Objects/dictobject.c' line='3118' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Keys'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_Size' mangled-name='PyDict_Size' filepath='Objects/dictobject.c' line='3108' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyDict_Copy' mangled-name='PyDict_Copy' filepath='Objects/dictobject.c' line='3013' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Copy'> + <parameter type-id='type-id-14' name='o' filepath='Objects/dictobject.c' line='3013' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_MergeEx' mangled-name='_PyDict_MergeEx' filepath='Objects/dictobject.c' line='3001' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_MergeEx'> + <parameter type-id='type-id-14' name='a' filepath='Objects/dictobject.c' line='3001' column='1'/> + <parameter type-id='type-id-14' name='b' filepath='Objects/dictobject.c' line='3001' column='1'/> + <parameter type-id='type-id-8' name='override' filepath='Objects/dictobject.c' line='3001' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_Merge' mangled-name='PyDict_Merge' filepath='Objects/dictobject.c' line='2994' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Merge'> + <parameter type-id='type-id-14' name='a' filepath='Objects/dictobject.c' line='3001' column='1'/> + <parameter type-id='type-id-14' name='b' filepath='Objects/dictobject.c' line='3001' column='1'/> + <parameter type-id='type-id-8' name='override' filepath='Objects/dictobject.c' line='3001' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_Update' mangled-name='PyDict_Update' filepath='Objects/dictobject.c' line='2988' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Update'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_MergeFromSeq2' mangled-name='PyDict_MergeFromSeq2' filepath='Objects/dictobject.c' line='2731' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_MergeFromSeq2'> + <parameter type-id='type-id-14' name='d' filepath='Objects/dictobject.c' line='2731' column='1'/> + <parameter type-id='type-id-14' name='seq2' filepath='Objects/dictobject.c' line='2731' column='1'/> + <parameter type-id='type-id-8' name='override' filepath='Objects/dictobject.c' line='2731' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_Pop' mangled-name='_PyDict_Pop' filepath='Objects/dictobject.c' line='2244' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_Pop'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='405' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='406' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Objects/call.c' line='406' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_Next' mangled-name='PyDict_Next' filepath='Objects/dictobject.c' line='2200' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Next'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='2200' column='1'/> + <parameter type-id='type-id-168' name='ppos' filepath='Objects/dictobject.c' line='2200' column='1'/> + <parameter type-id='type-id-22' name='pkey' filepath='Objects/dictobject.c' line='2200' column='1'/> + <parameter type-id='type-id-22' name='pvalue' filepath='Objects/dictobject.c' line='2200' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <pointer-type-def type-id='type-id-159' size-in-bits='64' id='type-id-529'/> + <function-decl name='_PyDict_Next' mangled-name='_PyDict_Next' filepath='Objects/dictobject.c' line='2119' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_Next'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='2119' column='1'/> + <parameter type-id='type-id-168' name='ppos' filepath='Objects/dictobject.c' line='2119' column='1'/> + <parameter type-id='type-id-22' name='pkey' filepath='Objects/dictobject.c' line='2119' column='1'/> + <parameter type-id='type-id-22' name='pvalue' filepath='Objects/dictobject.c' line='2120' column='1'/> + <parameter type-id='type-id-529' name='phash' filepath='Objects/dictobject.c' line='2120' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_Clear' mangled-name='PyDict_Clear' filepath='Objects/dictobject.c' line='2077' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_Clear'> + <parameter type-id='type-id-14' name='self' filepath='Objects/genobject.c' line='53' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyDict_DelItemIf' mangled-name='_PyDict_DelItemIf' filepath='Objects/dictobject.c' line='2036' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_DelItemIf'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='2036' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='2036' column='1'/> + <parameter type-id='type-id-139' name='predicate' filepath='Objects/dictobject.c' line='2037' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_DelItem_KnownHash' mangled-name='_PyDict_DelItem_KnownHash' filepath='Objects/dictobject.c' line='2007' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_DelItem_KnownHash'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='3711' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='3711' column='1'/> + <parameter type-id='type-id-159' name='hash' filepath='Objects/dictobject.c' line='3711' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_DelItem' mangled-name='PyDict_DelItem' filepath='Objects/dictobject.c' line='1993' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_DelItem'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2770' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2770' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_SetItem_KnownHash' mangled-name='_PyDict_SetItem_KnownHash' filepath='Objects/dictobject.c' line='1910' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_SetItem_KnownHash'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='1910' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='1910' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/dictobject.c' line='1910' column='1'/> + <parameter type-id='type-id-159' name='hash' filepath='Objects/dictobject.c' line='1911' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_SetItem' mangled-name='PyDict_SetItem' filepath='Objects/dictobject.c' line='1896' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_SetItem'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='1896' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='1896' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/dictobject.c' line='1896' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_GetItemStringWithError' mangled-name='_PyDict_GetItemStringWithError' filepath='Objects/dictobject.c' line='1818' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_GetItemStringWithError'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2342' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2342' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_GetItemIdWithError' mangled-name='_PyDict_GetItemIdWithError' filepath='Objects/dictobject.c' line='1806' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_GetItemIdWithError'> + <parameter type-id='type-id-14' name='dp' filepath='Objects/dictobject.c' line='1806' column='1'/> + <parameter type-id='type-id-499' name='key' filepath='Objects/dictobject.c' line='1806' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_GetItemWithError' mangled-name='_PyDict_GetItemWithError' filepath='Objects/dictobject.c' line='1795' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_GetItemWithError'> + <parameter type-id='type-id-14' name='callable' filepath='Objects/call.c' line='438' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/call.c' line='438' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_GetItemWithError' mangled-name='PyDict_GetItemWithError' filepath='Objects/dictobject.c' line='1770' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_GetItemWithError'> + <parameter type-id='type-id-14' name='func' filepath='Objects/call.c' line='368' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Objects/call.c' line='368' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_GetItem_KnownHash' mangled-name='_PyDict_GetItem_KnownHash' filepath='Objects/dictobject.c' line='1749' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_GetItem_KnownHash'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='1749' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='1749' column='1'/> + <parameter type-id='type-id-159' name='hash' filepath='Objects/dictobject.c' line='1749' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyDict_GetItem' mangled-name='PyDict_GetItem' filepath='Objects/dictobject.c' line='1649' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_GetItem'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='1649' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='1649' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_NewPresized' mangled-name='_PyDict_NewPresized' filepath='Objects/dictobject.c' line='1595' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_NewPresized'> + <parameter type-id='type-id-36' name='minused' filepath='Objects/dictobject.c' line='1595' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_MaybeUntrack' mangled-name='_PyDict_MaybeUntrack' filepath='Objects/dictobject.c' line='1116' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_MaybeUntrack'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='1116' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyDict_HasOnlyStringKeys' mangled-name='_PyDict_HasOnlyStringKeys' filepath='Objects/dictobject.c' line='1091' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_HasOnlyStringKeys'> + <parameter type-id='type-id-14' name='dict' filepath='Objects/dictobject.c' line='1091' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyDict_New' mangled-name='PyDict_New' filepath='Objects/dictobject.c' line='838' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyDict_New'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyDict_CheckConsistency' mangled-name='_PyDict_CheckConsistency' filepath='Objects/dictobject.c' line='502' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_CheckConsistency'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='502' column='1'/> + <parameter type-id='type-id-8' name='check_content' filepath='Objects/dictobject.c' line='502' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDict_DebugMallocStats' mangled-name='_PyDict_DebugMallocStats' filepath='Objects/dictobject.c' line='294' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDict_DebugMallocStats'> + <parameter type-id='type-id-473' name='out' filepath='Objects/floatobject.c' line='2039' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/odictobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyODict_Type' type-id='type-id-112' mangled-name='PyODict_Type' visibility='default' filepath='./Include/cpython/odictobject.h' line='15' column='1' elf-symbol-id='PyODict_Type'/> + <var-decl name='PyODictIter_Type' type-id='type-id-112' mangled-name='PyODictIter_Type' visibility='default' filepath='./Include/cpython/odictobject.h' line='16' column='1' elf-symbol-id='PyODictIter_Type'/> + <var-decl name='PyODictKeys_Type' type-id='type-id-112' mangled-name='PyODictKeys_Type' visibility='default' filepath='./Include/cpython/odictobject.h' line='17' column='1' elf-symbol-id='PyODictKeys_Type'/> + <var-decl name='PyODictItems_Type' type-id='type-id-112' mangled-name='PyODictItems_Type' visibility='default' filepath='./Include/cpython/odictobject.h' line='18' column='1' elf-symbol-id='PyODictItems_Type'/> + <var-decl name='PyODictValues_Type' type-id='type-id-112' mangled-name='PyODictValues_Type' visibility='default' filepath='./Include/cpython/odictobject.h' line='19' column='1' elf-symbol-id='PyODictValues_Type'/> + <function-decl name='PyODict_DelItem' mangled-name='PyODict_DelItem' filepath='Objects/odictobject.c' line='1624' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyODict_DelItem'> + <parameter type-id='type-id-14' name='od' filepath='Objects/odictobject.c' line='1624' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/odictobject.c' line='1624' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyODict_SetItem' mangled-name='PyODict_SetItem' filepath='Objects/odictobject.c' line='1615' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyODict_SetItem'> + <parameter type-id='type-id-14' name='od' filepath='Objects/odictobject.c' line='1615' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/odictobject.c' line='1615' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/odictobject.c' line='1615' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyODict_New' mangled-name='PyODict_New' filepath='Objects/odictobject.c' line='1591' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyODict_New'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/memoryobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyManagedBuffer_Type' type-id='type-id-112' mangled-name='_PyManagedBuffer_Type' visibility='default' filepath='./Include/memoryobject.h' line='10' column='1' elf-symbol-id='_PyManagedBuffer_Type'/> + <var-decl name='PyMemoryView_Type' type-id='type-id-112' mangled-name='PyMemoryView_Type' visibility='default' filepath='./Include/memoryobject.h' line='12' column='1' elf-symbol-id='PyMemoryView_Type'/> + <function-decl name='PyBuffer_ToContiguous' mangled-name='PyBuffer_ToContiguous' filepath='Objects/memoryobject.c' line='983' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyBuffer_ToContiguous'> + <parameter type-id='type-id-18' name='buf' filepath='Objects/memoryobject.c' line='983' column='1'/> + <parameter type-id='type-id-479' name='src' filepath='Objects/memoryobject.c' line='983' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/memoryobject.c' line='983' column='1'/> + <parameter type-id='type-id-1' name='order' filepath='Objects/memoryobject.c' line='983' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyMemoryView_GetContiguous' mangled-name='PyMemoryView_GetContiguous' filepath='Objects/memoryobject.c' line='918' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMemoryView_GetContiguous'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/memoryobject.c' line='918' column='1'/> + <parameter type-id='type-id-8' name='buffertype' filepath='Objects/memoryobject.c' line='918' column='1'/> + <parameter type-id='type-id-1' name='order' filepath='Objects/memoryobject.c' line='918' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMemoryView_FromObject' mangled-name='PyMemoryView_FromObject' filepath='Objects/memoryobject.c' line='786' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMemoryView_FromObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1634' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMemoryView_FromBuffer' mangled-name='PyMemoryView_FromBuffer' filepath='Objects/memoryobject.c' line='756' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMemoryView_FromBuffer'> + <parameter type-id='type-id-479' name='info' filepath='Objects/memoryobject.c' line='756' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMemoryView_FromMemory' mangled-name='PyMemoryView_FromMemory' filepath='Objects/memoryobject.c' line='727' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMemoryView_FromMemory'> + <parameter type-id='type-id-115' name='mem' filepath='Objects/memoryobject.c' line='727' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/memoryobject.c' line='727' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Objects/memoryobject.c' line='727' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/methodobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyCFunction_Type' type-id='type-id-112' mangled-name='PyCFunction_Type' visibility='default' filepath='./Include/methodobject.h' line='14' column='1' elf-symbol-id='PyCFunction_Type'/> + <var-decl name='PyCMethod_Type' type-id='type-id-112' mangled-name='PyCMethod_Type' visibility='default' filepath='./Include/cpython/methodobject.h' line='32' column='1' elf-symbol-id='PyCMethod_Type'/> + <function-decl name='PyCFunction_GetFlags' mangled-name='PyCFunction_GetFlags' filepath='Objects/methodobject.c' line='139' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCFunction_GetFlags'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCFunction_GetSelf' mangled-name='PyCFunction_GetSelf' filepath='Objects/methodobject.c' line='129' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCFunction_GetSelf'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCFunction_GetFunction' mangled-name='PyCFunction_GetFunction' filepath='Objects/methodobject.c' line='119' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCFunction_GetFunction'> + <parameter type-id='type-id-14' name='op' filepath='Objects/methodobject.c' line='119' column='1'/> + <return type-id='type-id-182'/> + </function-decl> + <function-decl name='PyCMethod_New' mangled-name='PyCMethod_New' filepath='Objects/methodobject.c' line='44' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCMethod_New'> + <parameter type-id='type-id-96' name='ml' filepath='Objects/methodobject.c' line='44' column='1'/> + <parameter type-id='type-id-14' name='self' filepath='Objects/methodobject.c' line='44' column='1'/> + <parameter type-id='type-id-14' name='module' filepath='Objects/methodobject.c' line='44' column='1'/> + <parameter type-id='type-id-74' name='cls' filepath='Objects/methodobject.c' line='44' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCFunction_NewEx' mangled-name='PyCFunction_NewEx' filepath='Objects/methodobject.c' line='38' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCFunction_NewEx'> + <parameter type-id='type-id-96' name='ml' filepath='Objects/methodobject.c' line='38' column='1'/> + <parameter type-id='type-id-14' name='self' filepath='Objects/methodobject.c' line='38' column='1'/> + <parameter type-id='type-id-14' name='module' filepath='Objects/methodobject.c' line='38' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCFunction_New' mangled-name='PyCFunction_New' filepath='Objects/methodobject.c' line='32' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCFunction_New'> + <parameter type-id='type-id-96' name='ml' filepath='Objects/methodobject.c' line='32' column='1'/> + <parameter type-id='type-id-14' name='self' filepath='Objects/methodobject.c' line='32' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/moduleobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyModuleDef_Type' type-id='type-id-112' mangled-name='PyModuleDef_Type' visibility='default' filepath='./Include/moduleobject.h' line='41' column='1' elf-symbol-id='PyModuleDef_Type'/> + <var-decl name='PyModule_Type' type-id='type-id-112' mangled-name='PyModule_Type' visibility='default' filepath='./Include/moduleobject.h' line='10' column='1' elf-symbol-id='PyModule_Type'/> + <function-decl name='_PyModuleSpec_IsInitializing' mangled-name='_PyModuleSpec_IsInitializing' filepath='Objects/moduleobject.c' line='718' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyModuleSpec_IsInitializing'> + <parameter type-id='type-id-14' name='spec' filepath='Objects/moduleobject.c' line='718' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyModule_ClearDict' mangled-name='_PyModule_ClearDict' filepath='Objects/moduleobject.c' line='586' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyModule_ClearDict'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='1116' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyModule_Clear' mangled-name='_PyModule_Clear' filepath='Objects/moduleobject.c' line='578' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyModule_Clear'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='578' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyModule_GetState' mangled-name='PyModule_GetState' filepath='Objects/moduleobject.c' line='568' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_GetState'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='568' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <class-decl name='PyModuleDef' size-in-bits='832' is-struct='yes' visibility='default' filepath='./Include/moduleobject.h' line='74' column='1' id='type-id-530'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='m_base' type-id='type-id-531' visibility='default' filepath='./Include/moduleobject.h' line='75' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='m_name' type-id='type-id-3' visibility='default' filepath='./Include/moduleobject.h' line='76' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='m_doc' type-id='type-id-3' visibility='default' filepath='./Include/moduleobject.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='m_size' type-id='type-id-36' visibility='default' filepath='./Include/moduleobject.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='m_methods' type-id='type-id-96' visibility='default' filepath='./Include/moduleobject.h' line='79' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='m_slots' type-id='type-id-532' visibility='default' filepath='./Include/moduleobject.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='m_traverse' type-id='type-id-91' visibility='default' filepath='./Include/moduleobject.h' line='81' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='m_clear' type-id='type-id-92' visibility='default' filepath='./Include/moduleobject.h' line='82' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='m_free' type-id='type-id-104' visibility='default' filepath='./Include/moduleobject.h' line='83' column='1'/> + </data-member> + </class-decl> + <class-decl name='PyModuleDef_Base' size-in-bits='320' is-struct='yes' visibility='default' filepath='./Include/moduleobject.h' line='44' column='1' id='type-id-533'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/moduleobject.h' line='45' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='m_init' type-id='type-id-534' visibility='default' filepath='./Include/moduleobject.h' line='46' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='m_index' type-id='type-id-36' visibility='default' filepath='./Include/moduleobject.h' line='47' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='m_copy' type-id='type-id-14' visibility='default' filepath='./Include/moduleobject.h' line='48' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-535' size-in-bits='64' id='type-id-534'/> + <typedef-decl name='PyModuleDef_Base' type-id='type-id-533' filepath='./Include/moduleobject.h' line='49' column='1' id='type-id-531'/> + <class-decl name='PyModuleDef_Slot' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/moduleobject.h' line='60' column='1' id='type-id-536'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='slot' type-id='type-id-8' visibility='default' filepath='./Include/moduleobject.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='value' type-id='type-id-18' visibility='default' filepath='./Include/moduleobject.h' line='62' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyModuleDef_Slot' type-id='type-id-536' filepath='./Include/pytypedefs.h' line='13' column='1' id='type-id-537'/> + <pointer-type-def type-id='type-id-537' size-in-bits='64' id='type-id-532'/> + <typedef-decl name='PyModuleDef' type-id='type-id-530' filepath='./Include/pytypedefs.h' line='12' column='1' id='type-id-538'/> + <pointer-type-def type-id='type-id-538' size-in-bits='64' id='type-id-539'/> + <function-decl name='PyModule_GetDef' mangled-name='PyModule_GetDef' filepath='Objects/moduleobject.c' line='558' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_GetDef'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='558' column='1'/> + <return type-id='type-id-539'/> + </function-decl> + <function-decl name='PyModule_GetFilename' mangled-name='PyModule_GetFilename' filepath='Objects/moduleobject.c' line='545' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_GetFilename'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='545' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyModule_GetFilenameObject' mangled-name='PyModule_GetFilenameObject' filepath='Objects/moduleobject.c' line='522' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_GetFilenameObject'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyModule_GetName' mangled-name='PyModule_GetName' filepath='Objects/moduleobject.c' line='510' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_GetName'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='98' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyModule_GetNameObject' mangled-name='PyModule_GetNameObject' filepath='Objects/moduleobject.c' line='487' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_GetNameObject'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyModule_GetDict' mangled-name='PyModule_GetDict' filepath='Objects/moduleobject.c' line='477' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_GetDict'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyModule_SetDocString' mangled-name='PyModule_SetDocString' filepath='Objects/moduleobject.c' line='463' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_SetDocString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2378' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2378' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyModule_AddFunctions' mangled-name='PyModule_AddFunctions' filepath='Objects/moduleobject.c' line='449' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_AddFunctions'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='449' column='1'/> + <parameter type-id='type-id-96' name='functions' filepath='Objects/moduleobject.c' line='449' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyModule_ExecDef' mangled-name='PyModule_ExecDef' filepath='Objects/moduleobject.c' line='384' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_ExecDef'> + <parameter type-id='type-id-14' name='module' filepath='Objects/moduleobject.c' line='384' column='1'/> + <parameter type-id='type-id-539' name='def' filepath='Objects/moduleobject.c' line='384' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyModule_FromDefAndSpec2' mangled-name='PyModule_FromDefAndSpec2' filepath='Objects/moduleobject.c' line='260' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_FromDefAndSpec2'> + <parameter type-id='type-id-539' name='def' filepath='Objects/moduleobject.c' line='260' column='1'/> + <parameter type-id='type-id-14' name='spec' filepath='Objects/moduleobject.c' line='260' column='1'/> + <parameter type-id='type-id-8' name='module_api_version' filepath='Objects/moduleobject.c' line='260' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyModule_CreateInitialized' mangled-name='_PyModule_CreateInitialized' filepath='Objects/moduleobject.c' line='197' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyModule_CreateInitialized'> + <parameter type-id='type-id-539' name='module' filepath='Objects/moduleobject.c' line='197' column='1'/> + <parameter type-id='type-id-8' name='module_api_version' filepath='Objects/moduleobject.c' line='197' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyModule_Create2' mangled-name='PyModule_Create2' filepath='Objects/moduleobject.c' line='186' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_Create2'> + <parameter type-id='type-id-539' name='module' filepath='Objects/moduleobject.c' line='186' column='1'/> + <parameter type-id='type-id-8' name='module_api_version' filepath='Objects/moduleobject.c' line='186' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyModule_New' mangled-name='PyModule_New' filepath='Objects/moduleobject.c' line='126' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_New'> + <parameter type-id='type-id-3' name='str' filepath='Objects/bytesobject.c' line='147' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyModule_NewObject' mangled-name='PyModule_NewObject' filepath='Objects/moduleobject.c' line='110' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_NewObject'> + <parameter type-id='type-id-14' name='name' filepath='Objects/moduleobject.c' line='110' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyModuleDef_Init' mangled-name='PyModuleDef_Init' filepath='Objects/moduleobject.c' line='42' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModuleDef_Init'> + <parameter type-id='type-id-539' name='def' filepath='Objects/moduleobject.c' line='42' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-535'> + <return type-id='type-id-14'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/namespaceobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyNamespace_Type' type-id='type-id-112' mangled-name='_PyNamespace_Type' visibility='default' filepath='./Include/internal/pycore_namespace.h' line='13' column='1' elf-symbol-id='_PyNamespace_Type'/> + <function-decl name='_PyNamespace_New' mangled-name='_PyNamespace_New' filepath='Objects/namespaceobject.c' line='248' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyNamespace_New'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/object.c' comp-dir-path='/src' language='LANG_C99'> + + <array-type-def dimensions='1' type-id='type-id-8' size-in-bits='infinite' id='type-id-540'> + <subrange length='infinite' id='type-id-6'/> + + </array-type-def> + <var-decl name='_Py_SwappedOp' type-id='type-id-540' mangled-name='_Py_SwappedOp' visibility='default' filepath='./Include/cpython/object.h' line='352' column='1' elf-symbol-id='_Py_SwappedOp'/> + <var-decl name='_PyNone_Type' type-id='type-id-112' mangled-name='_PyNone_Type' visibility='default' filepath='./Include/cpython/object.h' line='346' column='1' elf-symbol-id='_PyNone_Type'/> + <var-decl name='_Py_NoneStruct' type-id='type-id-108' mangled-name='_Py_NoneStruct' visibility='default' filepath='./Include/object.h' line='646' column='1' elf-symbol-id='_Py_NoneStruct'/> + <var-decl name='_PyNotImplemented_Type' type-id='type-id-112' mangled-name='_PyNotImplemented_Type' visibility='default' filepath='./Include/cpython/object.h' line='347' column='1' elf-symbol-id='_PyNotImplemented_Type'/> + <var-decl name='_Py_NotImplementedStruct' type-id='type-id-108' mangled-name='_Py_NotImplementedStruct' visibility='default' filepath='./Include/object.h' line='660' column='1' elf-symbol-id='_Py_NotImplementedStruct'/> + <function-decl name='Py_IsFalse' mangled-name='Py_IsFalse' filepath='Objects/object.c' line='2455' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_IsFalse'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_IsTrue' mangled-name='Py_IsTrue' filepath='Objects/object.c' line='2450' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_IsTrue'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_IsNone' mangled-name='Py_IsNone' filepath='Objects/object.c' line='2445' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_IsNone'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_Is' mangled-name='Py_Is' filepath='Objects/object.c' line='2440' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_Is'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_XNewRef' mangled-name='Py_XNewRef' filepath='Objects/object.c' line='2428' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_XNewRef'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='Py_NewRef' mangled-name='Py_NewRef' filepath='Objects/object.c' line='2422' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_NewRef'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_GET_WEAKREFS_LISTPTR' mangled-name='PyObject_GET_WEAKREFS_LISTPTR' filepath='Objects/object.c' line='2411' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GET_WEAKREFS_LISTPTR'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2411' column='1'/> + <return type-id='type-id-22'/> + </function-decl> + <function-decl name='_Py_Dealloc' mangled-name='_Py_Dealloc' filepath='Objects/object.c' line='2366' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_Dealloc'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2366' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyObject_AssertFailed' mangled-name='_PyObject_AssertFailed' filepath='Objects/object.c' line='2310' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_AssertFailed'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/object.c' line='2310' column='1'/> + <parameter type-id='type-id-3' name='expr' filepath='Objects/object.c' line='2310' column='1'/> + <parameter type-id='type-id-3' name='msg' filepath='Objects/object.c' line='2310' column='1'/> + <parameter type-id='type-id-3' name='file' filepath='Objects/object.c' line='2311' column='1'/> + <parameter type-id='type-id-8' name='line' filepath='Objects/object.c' line='2311' column='1'/> + <parameter type-id='type-id-3' name='function' filepath='Objects/object.c' line='2311' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyTrash_cond' mangled-name='_PyTrash_cond' filepath='Objects/object.c' line='2303' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTrash_cond'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2303' column='1'/> + <parameter type-id='type-id-78' name='dealloc' filepath='Objects/object.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTrash_end' mangled-name='_PyTrash_end' filepath='Objects/object.c' line='2291' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTrash_end'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2291' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyTrash_begin' mangled-name='_PyTrash_begin' filepath='Objects/object.c' line='2277' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTrash_begin'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2277' column='1'/> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2277' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_ReprLeave' mangled-name='Py_ReprLeave' filepath='Objects/object.c' line='2186' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_ReprLeave'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/object.c' line='2186' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_ReprEnter' mangled-name='Py_ReprEnter' filepath='Objects/object.c' line='2152' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_ReprEnter'> + <parameter type-id='type-id-14' name='dict' filepath='Objects/dictobject.c' line='1091' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_DebugTypeStats' mangled-name='_PyObject_DebugTypeStats' filepath='Objects/object.c' line='2131' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_DebugTypeStats'> + <parameter type-id='type-id-473' name='out' filepath='Objects/object.c' line='2131' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_NewReference' mangled-name='_Py_NewReference' filepath='Objects/object.c' line='2016' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_NewReference'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2016' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyObject_Dir' mangled-name='PyObject_Dir' filepath='Objects/object.c' line='1602' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Dir'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCallable_Check' mangled-name='PyCallable_Check' filepath='Objects/object.c' line='1530' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCallable_Check'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_Not' mangled-name='PyObject_Not' filepath='Objects/object.c' line='1518' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Not'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_IsTrue' mangled-name='PyObject_IsTrue' filepath='Objects/object.c' line='1490' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_IsTrue'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GenericSetDict' mangled-name='PyObject_GenericSetDict' filepath='Objects/object.c' line='1454' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GenericSetDict'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/object.c' line='1454' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/object.c' line='1454' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/object.c' line='1454' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GenericSetAttr' mangled-name='PyObject_GenericSetAttr' filepath='Objects/object.c' line='1448' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GenericSetAttr'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='1896' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='1896' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/dictobject.c' line='1896' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_GenericSetAttrWithDict' mangled-name='_PyObject_GenericSetAttrWithDict' filepath='Objects/object.c' line='1365' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GenericSetAttrWithDict'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/object.c' line='1365' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/object.c' line='1365' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/object.c' line='1366' column='1'/> + <parameter type-id='type-id-14' name='dict' filepath='Objects/object.c' line='1366' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GenericGetAttr' mangled-name='PyObject_GenericGetAttr' filepath='Objects/object.c' line='1359' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GenericGetAttr'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_GenericGetAttrWithDict' mangled-name='_PyObject_GenericGetAttrWithDict' filepath='Objects/object.c' line='1238' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GenericGetAttrWithDict'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/object.c' line='1238' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/object.c' line='1238' column='1'/> + <parameter type-id='type-id-14' name='dict' filepath='Objects/object.c' line='1239' column='1'/> + <parameter type-id='type-id-8' name='suppress' filepath='Objects/object.c' line='1239' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_GetMethod' mangled-name='_PyObject_GetMethod' filepath='Objects/object.c' line='1145' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GetMethod'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/object.c' line='1145' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/object.c' line='1145' column='1'/> + <parameter type-id='type-id-22' name='method' filepath='Objects/object.c' line='1145' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_NextNotImplemented' mangled-name='_PyObject_NextNotImplemented' filepath='Objects/object.c' line='1125' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_NextNotImplemented'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_SelfIter' mangled-name='PyObject_SelfIter' filepath='Objects/object.c' line='1113' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_SelfIter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_GetDictPtr' mangled-name='_PyObject_GetDictPtr' filepath='Objects/object.c' line='1091' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GetDictPtr'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/object.c' line='1091' column='1'/> + <return type-id='type-id-22'/> + </function-decl> + <function-decl name='PyObject_SetAttr' mangled-name='PyObject_SetAttr' filepath='Objects/object.c' line='1013' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_SetAttr'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='1013' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/object.c' line='1013' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/object.c' line='1013' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_HasAttr' mangled-name='PyObject_HasAttr' filepath='Objects/object.c' line='998' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_HasAttr'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2770' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2770' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_LookupAttrId' mangled-name='_PyObject_LookupAttrId' filepath='Objects/object.c' line='987' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_LookupAttrId'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='987' column='1'/> + <parameter type-id='type-id-499' name='name' filepath='Objects/object.c' line='987' column='1'/> + <parameter type-id='type-id-22' name='result' filepath='Objects/object.c' line='987' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_LookupAttr' mangled-name='_PyObject_LookupAttr' filepath='Objects/object.c' line='938' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_LookupAttr'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='938' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/object.c' line='938' column='1'/> + <parameter type-id='type-id-22' name='result' filepath='Objects/object.c' line='938' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GetAttr' mangled-name='PyObject_GetAttr' filepath='Objects/object.c' line='904' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GetAttr'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='904' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/object.c' line='904' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_SetAttrId' mangled-name='_PyObject_SetAttrId' filepath='Objects/object.c' line='863' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_SetAttrId'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='863' column='1'/> + <parameter type-id='type-id-499' name='name' filepath='Objects/object.c' line='863' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/object.c' line='863' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_GetAttrId' mangled-name='_PyObject_GetAttrId' filepath='Objects/object.c' line='852' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GetAttrId'> + <parameter type-id='type-id-14' name='dp' filepath='Objects/dictobject.c' line='1806' column='1'/> + <parameter type-id='type-id-499' name='key' filepath='Objects/dictobject.c' line='1806' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_IsAbstract' mangled-name='_PyObject_IsAbstract' filepath='Objects/object.c' line='835' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_IsAbstract'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='302' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_SetAttrString' mangled-name='PyObject_SetAttrString' filepath='Objects/object.c' line='819' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_SetAttrString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/abstract.c' line='2359' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_HasAttrString' mangled-name='PyObject_HasAttrString' filepath='Objects/object.c' line='807' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_HasAttrString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2378' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2378' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GetAttrString' mangled-name='PyObject_GetAttrString' filepath='Objects/object.c' line='792' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GetAttrString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2342' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2342' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_Hash' mangled-name='PyObject_Hash' filepath='Objects/object.c' line='771' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Hash'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='771' column='1'/> + <return type-id='type-id-159'/> + </function-decl> + <function-decl name='PyObject_HashNotImplemented' mangled-name='PyObject_HashNotImplemented' filepath='Objects/object.c' line='763' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_HashNotImplemented'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='763' column='1'/> + <return type-id='type-id-159'/> + </function-decl> + <function-decl name='PyObject_RichCompareBool' mangled-name='PyObject_RichCompareBool' filepath='Objects/object.c' line='737' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_RichCompareBool'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='737' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/object.c' line='737' column='1'/> + <parameter type-id='type-id-8' name='op' filepath='Objects/object.c' line='737' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_RichCompare' mangled-name='PyObject_RichCompare' filepath='Objects/object.c' line='715' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_RichCompare'> + <parameter type-id='type-id-14' name='v' filepath='Objects/object.c' line='715' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/object.c' line='715' column='1'/> + <parameter type-id='type-id-8' name='op' filepath='Objects/object.c' line='715' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_FunctionStr' mangled-name='_PyObject_FunctionStr' filepath='Objects/object.c' line='590' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_FunctionStr'> + <parameter type-id='type-id-14' name='x' filepath='Objects/object.c' line='590' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_Bytes' mangled-name='PyObject_Bytes' filepath='Objects/object.c' line='542' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Bytes'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_ASCII' mangled-name='PyObject_ASCII' filepath='Objects/object.c' line='515' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_ASCII'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2817' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_Str' mangled-name='PyObject_Str' filepath='Objects/object.c' line='455' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Str'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_Repr' mangled-name='PyObject_Repr' filepath='Objects/object.c' line='402' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Repr'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_Dump' mangled-name='_PyObject_Dump' filepath='Objects/object.c' line='361' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_Dump'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='361' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyObject_IsFreed' mangled-name='_PyObject_IsFreed' filepath='Objects/object.c' line='340' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_IsFreed'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_BreakPoint' mangled-name='_Py_BreakPoint' filepath='Objects/object.c' line='328' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_BreakPoint'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyObject_Print' mangled-name='PyObject_Print' filepath='Objects/object.c' line='257' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Print'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='257' column='1'/> + <parameter type-id='type-id-473' name='fp' filepath='Objects/object.c' line='257' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Objects/object.c' line='257' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_CallFinalizerFromDealloc' mangled-name='PyObject_CallFinalizerFromDealloc' filepath='Objects/object.c' line='215' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallFinalizerFromDealloc'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='302' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_CallFinalizer' mangled-name='PyObject_CallFinalizer' filepath='Objects/object.c' line='198' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_CallFinalizer'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='578' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <pointer-type-def type-id='type-id-77' size-in-bits='64' id='type-id-541'/> + <function-decl name='_PyObject_NewVar' mangled-name='_PyObject_NewVar' filepath='Objects/object.c' line='185' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_NewVar'> + <parameter type-id='type-id-74' name='tp' filepath='Objects/object.c' line='185' column='1'/> + <parameter type-id='type-id-36' name='nitems' filepath='Objects/object.c' line='185' column='1'/> + <return type-id='type-id-541'/> + </function-decl> + <function-decl name='_PyObject_New' mangled-name='_PyObject_New' filepath='Objects/object.c' line='174' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_New'> + <parameter type-id='type-id-74' name='tp' filepath='Objects/object.c' line='174' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_InitVar' mangled-name='PyObject_InitVar' filepath='Objects/object.c' line='163' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_InitVar'> + <parameter type-id='type-id-541' name='op' filepath='Objects/object.c' line='163' column='1'/> + <parameter type-id='type-id-74' name='tp' filepath='Objects/object.c' line='163' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/object.c' line='163' column='1'/> + <return type-id='type-id-541'/> + </function-decl> + <function-decl name='PyObject_Init' mangled-name='PyObject_Init' filepath='Objects/object.c' line='152' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Init'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='152' column='1'/> + <parameter type-id='type-id-74' name='tp' filepath='Objects/object.c' line='152' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_DecRef' mangled-name='_Py_DecRef' filepath='Objects/object.c' line='146' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DecRef'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2016' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_IncRef' mangled-name='_Py_IncRef' filepath='Objects/object.c' line='140' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_IncRef'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2016' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_DecRef' mangled-name='Py_DecRef' filepath='Objects/object.c' line='134' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_DecRef'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2016' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_IncRef' mangled-name='Py_IncRef' filepath='Objects/object.c' line='128' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_IncRef'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2016' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyObject_CheckConsistency' mangled-name='_PyObject_CheckConsistency' filepath='Objects/object.c' line='35' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CheckConsistency'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='35' column='1'/> + <parameter type-id='type-id-8' name='check_content' filepath='Objects/object.c' line='35' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/obmalloc.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='_PyTraceMalloc_Config' size-in-bits='96' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_pymem.h' line='72' column='1' id='type-id-542'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='initialized' type-id='type-id-543' visibility='default' filepath='./Include/internal/pycore_pymem.h' line='79' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='tracing' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_pymem.h' line='83' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='max_nframe' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_pymem.h' line='87' column='1'/> + </data-member> + </class-decl> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/internal/pycore_pymem.h' line='75' column='1' id='type-id-543'> + <underlying-type type-id='type-id-126'/> + <enumerator name='TRACEMALLOC_NOT_INITIALIZED' value='0'/> + <enumerator name='TRACEMALLOC_INITIALIZED' value='1'/> + <enumerator name='TRACEMALLOC_FINALIZED' value='2'/> + </enum-decl> + <var-decl name='_Py_tracemalloc_config' type-id='type-id-542' mangled-name='_Py_tracemalloc_config' visibility='default' filepath='./Include/internal/pycore_pymem.h' line='95' column='1' elf-symbol-id='_Py_tracemalloc_config'/> + <function-decl name='_PyObject_DebugMallocStats' mangled-name='_PyObject_DebugMallocStats' filepath='Objects/obmalloc.c' line='2958' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_DebugMallocStats'> + <parameter type-id='type-id-473' name='out' filepath='Objects/obmalloc.c' line='2958' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyDebugAllocatorStats' mangled-name='_PyDebugAllocatorStats' filepath='Objects/obmalloc.c' line='2913' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDebugAllocatorStats'> + <parameter type-id='type-id-473' name='out' filepath='Objects/obmalloc.c' line='2913' column='1'/> + <parameter type-id='type-id-3' name='block_name' filepath='Objects/obmalloc.c' line='2914' column='1'/> + <parameter type-id='type-id-8' name='num_blocks' filepath='Objects/obmalloc.c' line='2914' column='1'/> + <parameter type-id='type-id-54' name='sizeof_block' filepath='Objects/obmalloc.c' line='2914' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_GetAllocatedBlocks' mangled-name='_Py_GetAllocatedBlocks' filepath='Objects/obmalloc.c' line='1277' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetAllocatedBlocks'> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyObject_Free' mangled-name='PyObject_Free' filepath='Objects/obmalloc.c' line='738' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Free'> + <parameter type-id='type-id-18' name='ptr' filepath='Objects/obmalloc.c' line='738' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyObject_Realloc' mangled-name='PyObject_Realloc' filepath='Objects/obmalloc.c' line='729' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Realloc'> + <parameter type-id='type-id-18' name='ptr' filepath='Objects/obmalloc.c' line='729' column='1'/> + <parameter type-id='type-id-54' name='new_size' filepath='Objects/obmalloc.c' line='729' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyObject_Calloc' mangled-name='PyObject_Calloc' filepath='Objects/obmalloc.c' line='716' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Calloc'> + <parameter type-id='type-id-54' name='nelem' filepath='Objects/obmalloc.c' line='716' column='1'/> + <parameter type-id='type-id-54' name='elsize' filepath='Objects/obmalloc.c' line='716' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyObject_Malloc' mangled-name='PyObject_Malloc' filepath='Objects/obmalloc.c' line='703' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_Malloc'> + <parameter type-id='type-id-54' name='size' filepath='Objects/obmalloc.c' line='703' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='_PyMem_Strdup' mangled-name='_PyMem_Strdup' filepath='Objects/obmalloc.c' line='690' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyMem_Strdup'> + <parameter type-id='type-id-3' name='str' filepath='Objects/obmalloc.c' line='690' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='_PyMem_RawStrdup' mangled-name='_PyMem_RawStrdup' filepath='Objects/obmalloc.c' line='677' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyMem_RawStrdup'> + <parameter type-id='type-id-3' name='str' filepath='Objects/obmalloc.c' line='690' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <qualified-type-def type-id='type-id-282' const='yes' id='type-id-544'/> + <pointer-type-def type-id='type-id-544' size-in-bits='64' id='type-id-545'/> + <function-decl name='_PyMem_RawWcsdup' mangled-name='_PyMem_RawWcsdup' filepath='Objects/obmalloc.c' line='657' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyMem_RawWcsdup'> + <parameter type-id='type-id-545' name='str' filepath='Objects/obmalloc.c' line='657' column='1'/> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='PyMem_Free' mangled-name='PyMem_Free' filepath='Objects/obmalloc.c' line='649' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_Free'> + <parameter type-id='type-id-18' name='ptr' filepath='Objects/obmalloc.c' line='738' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyMem_Realloc' mangled-name='PyMem_Realloc' filepath='Objects/obmalloc.c' line='640' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_Realloc'> + <parameter type-id='type-id-18' name='ptr' filepath='Objects/obmalloc.c' line='729' column='1'/> + <parameter type-id='type-id-54' name='new_size' filepath='Objects/obmalloc.c' line='729' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyMem_Calloc' mangled-name='PyMem_Calloc' filepath='Objects/obmalloc.c' line='627' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_Calloc'> + <parameter type-id='type-id-54' name='nelem' filepath='Objects/obmalloc.c' line='716' column='1'/> + <parameter type-id='type-id-54' name='elsize' filepath='Objects/obmalloc.c' line='716' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyMem_Malloc' mangled-name='PyMem_Malloc' filepath='Objects/obmalloc.c' line='614' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_Malloc'> + <parameter type-id='type-id-54' name='size' filepath='Objects/obmalloc.c' line='703' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyMem_RawFree' mangled-name='PyMem_RawFree' filepath='Objects/obmalloc.c' line='607' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_RawFree'> + <parameter type-id='type-id-18' name='ptr' filepath='Objects/obmalloc.c' line='738' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyMem_RawRealloc' mangled-name='PyMem_RawRealloc' filepath='Objects/obmalloc.c' line='599' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_RawRealloc'> + <parameter type-id='type-id-18' name='ptr' filepath='Objects/obmalloc.c' line='729' column='1'/> + <parameter type-id='type-id-54' name='new_size' filepath='Objects/obmalloc.c' line='729' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyMem_RawCalloc' mangled-name='PyMem_RawCalloc' filepath='Objects/obmalloc.c' line='590' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_RawCalloc'> + <parameter type-id='type-id-54' name='nelem' filepath='Objects/obmalloc.c' line='716' column='1'/> + <parameter type-id='type-id-54' name='elsize' filepath='Objects/obmalloc.c' line='716' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyMem_RawMalloc' mangled-name='PyMem_RawMalloc' filepath='Objects/obmalloc.c' line='576' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_RawMalloc'> + <parameter type-id='type-id-54' name='size' filepath='Objects/obmalloc.c' line='703' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-546' visibility='default' filepath='./Include/cpython/objimpl.h' line='56' column='1' id='type-id-547'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ctx' type-id='type-id-18' visibility='default' filepath='./Include/cpython/objimpl.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='alloc' type-id='type-id-548' visibility='default' filepath='./Include/cpython/objimpl.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='free' type-id='type-id-549' visibility='default' filepath='./Include/cpython/objimpl.h' line='64' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-550' size-in-bits='64' id='type-id-548'/> + <pointer-type-def type-id='type-id-551' size-in-bits='64' id='type-id-549'/> + <typedef-decl name='PyObjectArenaAllocator' type-id='type-id-547' filepath='./Include/cpython/objimpl.h' line='65' column='1' id='type-id-546'/> + <pointer-type-def type-id='type-id-546' size-in-bits='64' id='type-id-552'/> + <function-decl name='PyObject_SetArenaAllocator' mangled-name='PyObject_SetArenaAllocator' filepath='Objects/obmalloc.c' line='570' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_SetArenaAllocator'> + <parameter type-id='type-id-552' name='allocator' filepath='Objects/obmalloc.c' line='570' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyObject_GetArenaAllocator' mangled-name='PyObject_GetArenaAllocator' filepath='Objects/obmalloc.c' line='552' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GetArenaAllocator'> + <parameter type-id='type-id-552' name='allocator' filepath='Objects/obmalloc.c' line='570' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/cpython/pymem.h' line='23' column='1' id='type-id-553'> + <underlying-type type-id='type-id-126'/> + <enumerator name='PYMEM_DOMAIN_RAW' value='0'/> + <enumerator name='PYMEM_DOMAIN_MEM' value='1'/> + <enumerator name='PYMEM_DOMAIN_OBJ' value='2'/> + </enum-decl> + <typedef-decl name='PyMemAllocatorDomain' type-id='type-id-553' filepath='./Include/cpython/pymem.h' line='32' column='1' id='type-id-554'/> + <class-decl name='__anonymous_struct__' size-in-bits='320' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-555' visibility='default' filepath='./Include/cpython/pymem.h' line='47' column='1' id='type-id-556'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ctx' type-id='type-id-18' visibility='default' filepath='./Include/cpython/pymem.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='malloc' type-id='type-id-548' visibility='default' filepath='./Include/cpython/pymem.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='calloc' type-id='type-id-557' visibility='default' filepath='./Include/cpython/pymem.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='realloc' type-id='type-id-558' visibility='default' filepath='./Include/cpython/pymem.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='free' type-id='type-id-559' visibility='default' filepath='./Include/cpython/pymem.h' line='61' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-560' size-in-bits='64' id='type-id-557'/> + <pointer-type-def type-id='type-id-561' size-in-bits='64' id='type-id-558'/> + <pointer-type-def type-id='type-id-562' size-in-bits='64' id='type-id-559'/> + <typedef-decl name='PyMemAllocatorEx' type-id='type-id-556' filepath='./Include/cpython/pymem.h' line='62' column='1' id='type-id-555'/> + <pointer-type-def type-id='type-id-555' size-in-bits='64' id='type-id-563'/> + <function-decl name='PyMem_SetAllocator' mangled-name='PyMem_SetAllocator' filepath='Objects/obmalloc.c' line='540' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_SetAllocator'> + <parameter type-id='type-id-554' name='domain' filepath='Objects/obmalloc.c' line='540' column='1'/> + <parameter type-id='type-id-563' name='allocator' filepath='Objects/obmalloc.c' line='540' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyMem_GetAllocator' mangled-name='PyMem_GetAllocator' filepath='Objects/obmalloc.c' line='522' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_GetAllocator'> + <parameter type-id='type-id-554' name='domain' filepath='Objects/obmalloc.c' line='540' column='1'/> + <parameter type-id='type-id-563' name='allocator' filepath='Objects/obmalloc.c' line='540' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyMem_SetupDebugHooks' mangled-name='PyMem_SetupDebugHooks' filepath='Objects/obmalloc.c' line='514' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMem_SetupDebugHooks'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyMem_GetCurrentAllocatorName' mangled-name='_PyMem_GetCurrentAllocatorName' filepath='Objects/obmalloc.c' line='376' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyMem_GetCurrentAllocatorName'> + <return type-id='type-id-3'/> + </function-decl> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/cpython/pymem.h' line='34' column='1' id='type-id-564'> + <underlying-type type-id='type-id-126'/> + <enumerator name='PYMEM_ALLOCATOR_NOT_SET' value='0'/> + <enumerator name='PYMEM_ALLOCATOR_DEFAULT' value='1'/> + <enumerator name='PYMEM_ALLOCATOR_DEBUG' value='2'/> + <enumerator name='PYMEM_ALLOCATOR_MALLOC' value='3'/> + <enumerator name='PYMEM_ALLOCATOR_MALLOC_DEBUG' value='4'/> + <enumerator name='PYMEM_ALLOCATOR_PYMALLOC' value='5'/> + <enumerator name='PYMEM_ALLOCATOR_PYMALLOC_DEBUG' value='6'/> + </enum-decl> + <typedef-decl name='PyMemAllocatorName' type-id='type-id-564' filepath='./Include/cpython/pymem.h' line='44' column='1' id='type-id-565'/> + <function-decl name='_PyMem_SetupAllocators' mangled-name='_PyMem_SetupAllocators' filepath='Objects/obmalloc.c' line='309' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyMem_SetupAllocators'> + <parameter type-id='type-id-565' name='allocator' filepath='Objects/obmalloc.c' line='309' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <pointer-type-def type-id='type-id-565' size-in-bits='64' id='type-id-566'/> + <function-decl name='_PyMem_GetAllocatorName' mangled-name='_PyMem_GetAllocatorName' filepath='Objects/obmalloc.c' line='273' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyMem_GetAllocatorName'> + <parameter type-id='type-id-3' name='name' filepath='Objects/obmalloc.c' line='273' column='1'/> + <parameter type-id='type-id-566' name='allocator' filepath='Objects/obmalloc.c' line='273' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyMem_SetDefaultAllocator' mangled-name='_PyMem_SetDefaultAllocator' filepath='Objects/obmalloc.c' line='260' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyMem_SetDefaultAllocator'> + <parameter type-id='type-id-554' name='domain' filepath='Objects/obmalloc.c' line='260' column='1'/> + <parameter type-id='type-id-563' name='old_alloc' filepath='Objects/obmalloc.c' line='261' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-562'> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-70'/> + </function-type> + <function-type size-in-bits='64' id='type-id-551'> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-54'/> + <return type-id='type-id-70'/> + </function-type> + <function-type size-in-bits='64' id='type-id-550'> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-54'/> + <return type-id='type-id-18'/> + </function-type> + <function-type size-in-bits='64' id='type-id-560'> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-54'/> + <parameter type-id='type-id-54'/> + <return type-id='type-id-18'/> + </function-type> + <function-type size-in-bits='64' id='type-id-561'> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-54'/> + <return type-id='type-id-18'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/picklebufobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyPickleBuffer_Type' type-id='type-id-112' mangled-name='PyPickleBuffer_Type' visibility='default' filepath='./Include/cpython/picklebufobject.h' line='13' column='1' elf-symbol-id='PyPickleBuffer_Type'/> + <function-decl name='PyPickleBuffer_Release' mangled-name='PyPickleBuffer_Release' filepath='Objects/picklebufobject.c' line='55' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyPickleBuffer_Release'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyPickleBuffer_GetBuffer' mangled-name='PyPickleBuffer_GetBuffer' filepath='Objects/picklebufobject.c' line='36' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyPickleBuffer_GetBuffer'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/picklebufobject.c' line='36' column='1'/> + <return type-id='type-id-479'/> + </function-decl> + <function-decl name='PyPickleBuffer_FromObject' mangled-name='PyPickleBuffer_FromObject' filepath='Objects/picklebufobject.c' line='17' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyPickleBuffer_FromObject'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/rangeobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyRange_Type' type-id='type-id-112' mangled-name='PyRange_Type' visibility='default' filepath='./Include/rangeobject.h' line='18' column='1' elf-symbol-id='PyRange_Type'/> + <var-decl name='PyRangeIter_Type' type-id='type-id-112' mangled-name='PyRangeIter_Type' visibility='default' filepath='./Include/rangeobject.h' line='19' column='1' elf-symbol-id='PyRangeIter_Type'/> + <var-decl name='PyLongRangeIter_Type' type-id='type-id-112' mangled-name='PyLongRangeIter_Type' visibility='default' filepath='./Include/rangeobject.h' line='20' column='1' elf-symbol-id='PyLongRangeIter_Type'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/setobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PySetIter_Type' type-id='type-id-112' mangled-name='PySetIter_Type' visibility='default' filepath='./Include/setobject.h' line='11' column='1' elf-symbol-id='PySetIter_Type'/> + <var-decl name='PySet_Type' type-id='type-id-112' mangled-name='PySet_Type' visibility='default' filepath='./Include/setobject.h' line='9' column='1' elf-symbol-id='PySet_Type'/> + <var-decl name='PyFrozenSet_Type' type-id='type-id-112' mangled-name='PyFrozenSet_Type' visibility='default' filepath='./Include/setobject.h' line='10' column='1' elf-symbol-id='PyFrozenSet_Type'/> + <var-decl name='_PySet_Dummy' type-id='type-id-14' mangled-name='_PySet_Dummy' visibility='default' filepath='./Include/cpython/setobject.h' line='64' column='1' elf-symbol-id='_PySet_Dummy'/> + <function-decl name='_PySet_Update' mangled-name='_PySet_Update' filepath='Objects/setobject.c' line='2367' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySet_Update'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySet_Pop' mangled-name='PySet_Pop' filepath='Objects/setobject.c' line='2357' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySet_Pop'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PySet_NextEntry' mangled-name='_PySet_NextEntry' filepath='Objects/setobject.c' line='2341' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySet_NextEntry'> + <parameter type-id='type-id-14' name='set' filepath='Objects/setobject.c' line='2341' column='1'/> + <parameter type-id='type-id-168' name='pos' filepath='Objects/setobject.c' line='2341' column='1'/> + <parameter type-id='type-id-22' name='key' filepath='Objects/setobject.c' line='2341' column='1'/> + <parameter type-id='type-id-529' name='hash' filepath='Objects/setobject.c' line='2341' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySet_Add' mangled-name='PySet_Add' filepath='Objects/setobject.c' line='2330' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySet_Add'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySet_Discard' mangled-name='PySet_Discard' filepath='Objects/setobject.c' line='2320' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySet_Discard'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySet_Contains' mangled-name='PySet_Contains' filepath='Objects/setobject.c' line='2310' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySet_Contains'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySet_Clear' mangled-name='PySet_Clear' filepath='Objects/setobject.c' line='2300' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySet_Clear'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySet_Size' mangled-name='PySet_Size' filepath='Objects/setobject.c' line='2290' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySet_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyFrozenSet_New' mangled-name='PyFrozenSet_New' filepath='Objects/setobject.c' line='2284' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyFrozenSet_New'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySet_New' mangled-name='PySet_New' filepath='Objects/setobject.c' line='2278' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySet_New'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/sliceobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyEllipsis_Type' type-id='type-id-112' mangled-name='PyEllipsis_Type' visibility='default' filepath='./Include/sliceobject.h' line='29' column='1' elf-symbol-id='PyEllipsis_Type'/> + <var-decl name='_Py_EllipsisObject' type-id='type-id-108' mangled-name='_Py_EllipsisObject' visibility='default' filepath='./Include/sliceobject.h' line='9' column='1' elf-symbol-id='_Py_EllipsisObject'/> + <var-decl name='PySlice_Type' type-id='type-id-112' mangled-name='PySlice_Type' visibility='default' filepath='./Include/sliceobject.h' line='28' column='1' elf-symbol-id='PySlice_Type'/> + <function-decl name='_PySlice_GetLongIndices' mangled-name='_PySlice_GetLongIndices' filepath='Objects/sliceobject.c' line='382' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySlice_GetLongIndices'> + <parameter type-id='type-id-42' name='self' filepath='Objects/sliceobject.c' line='382' column='1'/> + <parameter type-id='type-id-14' name='length' filepath='Objects/sliceobject.c' line='382' column='1'/> + <parameter type-id='type-id-22' name='start_ptr' filepath='Objects/sliceobject.c' line='383' column='1'/> + <parameter type-id='type-id-22' name='stop_ptr' filepath='Objects/sliceobject.c' line='383' column='1'/> + <parameter type-id='type-id-22' name='step_ptr' filepath='Objects/sliceobject.c' line='384' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySlice_GetIndicesEx' mangled-name='PySlice_GetIndicesEx' filepath='Objects/sliceobject.c' line='293' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySlice_GetIndicesEx'> + <parameter type-id='type-id-14' name='_r' filepath='Objects/sliceobject.c' line='293' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Objects/sliceobject.c' line='293' column='1'/> + <parameter type-id='type-id-168' name='start' filepath='Objects/sliceobject.c' line='294' column='1'/> + <parameter type-id='type-id-168' name='stop' filepath='Objects/sliceobject.c' line='294' column='1'/> + <parameter type-id='type-id-168' name='step' filepath='Objects/sliceobject.c' line='294' column='1'/> + <parameter type-id='type-id-168' name='slicelength' filepath='Objects/sliceobject.c' line='295' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySlice_AdjustIndices' mangled-name='PySlice_AdjustIndices' filepath='Objects/sliceobject.c' line='249' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySlice_AdjustIndices'> + <parameter type-id='type-id-36' name='length' filepath='Objects/sliceobject.c' line='249' column='1'/> + <parameter type-id='type-id-168' name='start' filepath='Objects/sliceobject.c' line='250' column='1'/> + <parameter type-id='type-id-168' name='stop' filepath='Objects/sliceobject.c' line='250' column='1'/> + <parameter type-id='type-id-36' name='step' filepath='Objects/sliceobject.c' line='250' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PySlice_Unpack' mangled-name='PySlice_Unpack' filepath='Objects/sliceobject.c' line='203' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySlice_Unpack'> + <parameter type-id='type-id-14' name='_r' filepath='Objects/sliceobject.c' line='203' column='1'/> + <parameter type-id='type-id-168' name='start' filepath='Objects/sliceobject.c' line='204' column='1'/> + <parameter type-id='type-id-168' name='stop' filepath='Objects/sliceobject.c' line='204' column='1'/> + <parameter type-id='type-id-168' name='step' filepath='Objects/sliceobject.c' line='204' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySlice_GetIndices' mangled-name='PySlice_GetIndices' filepath='Objects/sliceobject.c' line='171' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySlice_GetIndices'> + <parameter type-id='type-id-14' name='_r' filepath='Objects/sliceobject.c' line='171' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Objects/sliceobject.c' line='171' column='1'/> + <parameter type-id='type-id-168' name='start' filepath='Objects/sliceobject.c' line='172' column='1'/> + <parameter type-id='type-id-168' name='stop' filepath='Objects/sliceobject.c' line='172' column='1'/> + <parameter type-id='type-id-168' name='step' filepath='Objects/sliceobject.c' line='172' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PySlice_FromIndices' mangled-name='_PySlice_FromIndices' filepath='Objects/sliceobject.c' line='152' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySlice_FromIndices'> + <parameter type-id='type-id-36' name='istart' filepath='Objects/sliceobject.c' line='152' column='1'/> + <parameter type-id='type-id-36' name='istop' filepath='Objects/sliceobject.c' line='152' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySlice_New' mangled-name='PySlice_New' filepath='Objects/sliceobject.c' line='114' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySlice_New'> + <parameter type-id='type-id-14' name='start' filepath='Objects/sliceobject.c' line='114' column='1'/> + <parameter type-id='type-id-14' name='stop' filepath='Objects/sliceobject.c' line='114' column='1'/> + <parameter type-id='type-id-14' name='step' filepath='Objects/sliceobject.c' line='114' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/structseq.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyStructSequence_UnnamedField' type-id='type-id-4' mangled-name='PyStructSequence_UnnamedField' visibility='default' filepath='./Include/structseq.h' line='22' column='1' elf-symbol-id='PyStructSequence_UnnamedField'/> + <class-decl name='PyStructSequence_Desc' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/structseq.h' line='15' column='1' id='type-id-567'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/structseq.h' line='16' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='doc' type-id='type-id-3' visibility='default' filepath='./Include/structseq.h' line='17' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='fields' type-id='type-id-568' visibility='default' filepath='./Include/structseq.h' line='18' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='n_in_sequence' type-id='type-id-8' visibility='default' filepath='./Include/structseq.h' line='19' column='1'/> + </data-member> + </class-decl> + <class-decl name='PyStructSequence_Field' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/structseq.h' line='10' column='1' id='type-id-569'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/structseq.h' line='11' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='doc' type-id='type-id-3' visibility='default' filepath='./Include/structseq.h' line='12' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyStructSequence_Field' type-id='type-id-569' filepath='./Include/structseq.h' line='13' column='1' id='type-id-570'/> + <pointer-type-def type-id='type-id-570' size-in-bits='64' id='type-id-568'/> + <typedef-decl name='PyStructSequence_Desc' type-id='type-id-567' filepath='./Include/structseq.h' line='20' column='1' id='type-id-571'/> + <pointer-type-def type-id='type-id-571' size-in-bits='64' id='type-id-572'/> + <function-decl name='PyStructSequence_NewType' mangled-name='PyStructSequence_NewType' filepath='Objects/structseq.c' line='616' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStructSequence_NewType'> + <parameter type-id='type-id-572' name='desc' filepath='Objects/structseq.c' line='616' column='1'/> + <return type-id='type-id-74'/> + </function-decl> + <function-decl name='_PyStructSequence_NewType' mangled-name='_PyStructSequence_NewType' filepath='Objects/structseq.c' line='563' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyStructSequence_NewType'> + <parameter type-id='type-id-572' name='desc' filepath='Objects/structseq.c' line='563' column='1'/> + <parameter type-id='type-id-16' name='tp_flags' filepath='Objects/structseq.c' line='563' column='1'/> + <return type-id='type-id-74'/> + </function-decl> + <function-decl name='PyStructSequence_InitType' mangled-name='PyStructSequence_InitType' filepath='Objects/structseq.c' line='524' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStructSequence_InitType'> + <parameter type-id='type-id-74' name='type' filepath='Objects/structseq.c' line='524' column='1'/> + <parameter type-id='type-id-572' name='desc' filepath='Objects/structseq.c' line='524' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyStructSequence_InitType2' mangled-name='PyStructSequence_InitType2' filepath='Objects/structseq.c' line='518' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStructSequence_InitType2'> + <parameter type-id='type-id-74' name='type' filepath='Objects/structseq.c' line='518' column='1'/> + <parameter type-id='type-id-572' name='desc' filepath='Objects/structseq.c' line='518' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyStructSequence_InitType' mangled-name='_PyStructSequence_InitType' filepath='Objects/structseq.c' line='460' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyStructSequence_InitType'> + <parameter type-id='type-id-74' name='type' filepath='Objects/structseq.c' line='460' column='1'/> + <parameter type-id='type-id-572' name='desc' filepath='Objects/structseq.c' line='460' column='1'/> + <parameter type-id='type-id-16' name='tp_flags' filepath='Objects/structseq.c' line='461' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyStructSequence_GetItem' mangled-name='PyStructSequence_GetItem' filepath='Objects/structseq.c' line='82' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStructSequence_GetItem'> + <parameter type-id='type-id-14' name='op' filepath='Objects/listobject.c' line='237' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/listobject.c' line='237' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyStructSequence_SetItem' mangled-name='PyStructSequence_SetItem' filepath='Objects/structseq.c' line='76' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStructSequence_SetItem'> + <parameter type-id='type-id-14' name='op' filepath='Objects/structseq.c' line='76' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/structseq.c' line='76' column='1'/> + <parameter type-id='type-id-14' name='v' filepath='Objects/structseq.c' line='76' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyStructSequence_New' mangled-name='PyStructSequence_New' filepath='Objects/structseq.c' line='51' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStructSequence_New'> + <parameter type-id='type-id-74' name='type' filepath='Objects/structseq.c' line='51' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/tupleobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyTuple_Type' type-id='type-id-112' mangled-name='PyTuple_Type' visibility='default' filepath='./Include/tupleobject.h' line='23' column='1' elf-symbol-id='PyTuple_Type'/> + <var-decl name='PyTupleIter_Type' type-id='type-id-112' mangled-name='PyTupleIter_Type' visibility='default' filepath='./Include/tupleobject.h' line='24' column='1' elf-symbol-id='PyTupleIter_Type'/> + <function-decl name='_PyTuple_DebugMallocStats' mangled-name='_PyTuple_DebugMallocStats' filepath='Objects/tupleobject.c' line='1254' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTuple_DebugMallocStats'> + <parameter type-id='type-id-473' name='out' filepath='Objects/tupleobject.c' line='1254' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyTuple_Resize' mangled-name='_PyTuple_Resize' filepath='Objects/tupleobject.c' line='915' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTuple_Resize'> + <parameter type-id='type-id-22' name='pv' filepath='Objects/tupleobject.c' line='915' column='1'/> + <parameter type-id='type-id-36' name='newsize' filepath='Objects/tupleobject.c' line='915' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyTuple_GetSlice' mangled-name='PyTuple_GetSlice' filepath='Objects/tupleobject.c' line='435' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTuple_GetSlice'> + <parameter type-id='type-id-14' name='a' filepath='Objects/listobject.c' line='488' column='1'/> + <parameter type-id='type-id-36' name='ilow' filepath='Objects/listobject.c' line='488' column='1'/> + <parameter type-id='type-id-36' name='ihigh' filepath='Objects/listobject.c' line='488' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyTuple_Pack' mangled-name='PyTuple_Pack' filepath='Objects/tupleobject.c' line='154' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTuple_Pack'> + <parameter type-id='type-id-36' name='n' filepath='Objects/tupleobject.c' line='154' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyTuple_MaybeUntrack' mangled-name='_PyTuple_MaybeUntrack' filepath='Objects/tupleobject.c' line='132' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTuple_MaybeUntrack'> + <parameter type-id='type-id-14' name='op' filepath='Objects/tupleobject.c' line='132' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyTuple_SetItem' mangled-name='PyTuple_SetItem' filepath='Objects/tupleobject.c' line='112' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTuple_SetItem'> + <parameter type-id='type-id-14' name='s' filepath='Objects/abstract.c' line='1926' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/abstract.c' line='1926' column='1'/> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='1926' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyTuple_GetItem' mangled-name='PyTuple_GetItem' filepath='Objects/tupleobject.c' line='98' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTuple_GetItem'> + <parameter type-id='type-id-14' name='op' filepath='Objects/listobject.c' line='237' column='1'/> + <parameter type-id='type-id-36' name='i' filepath='Objects/listobject.c' line='237' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyTuple_Size' mangled-name='PyTuple_Size' filepath='Objects/tupleobject.c' line='87' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTuple_Size'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyTuple_New' mangled-name='PyTuple_New' filepath='Objects/tupleobject.c' line='69' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTuple_New'> + <parameter type-id='type-id-36' name='size' filepath='Objects/tupleobject.c' line='69' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/typeobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyType_Type' type-id='type-id-112' mangled-name='PyType_Type' visibility='default' filepath='./Include/object.h' line='269' column='1' elf-symbol-id='PyType_Type'/> + <var-decl name='PyBaseObject_Type' type-id='type-id-112' mangled-name='PyBaseObject_Type' visibility='default' filepath='./Include/object.h' line='270' column='1' elf-symbol-id='PyBaseObject_Type'/> + <var-decl name='PySuper_Type' type-id='type-id-112' mangled-name='PySuper_Type' visibility='default' filepath='./Include/object.h' line='271' column='1' elf-symbol-id='PySuper_Type'/> + <function-decl name='PyType_Ready' mangled-name='PyType_Ready' filepath='Objects/typeobject.c' line='6467' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_Ready'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='6467' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_GetState' mangled-name='_PyObject_GetState' filepath='Objects/typeobject.c' line='5108' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GetState'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyType_LookupId' mangled-name='_PyType_LookupId' filepath='Objects/typeobject.c' line='3868' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyType_LookupId'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='3868' column='1'/> + <parameter type-id='type-id-499' name='name' filepath='Objects/typeobject.c' line='3868' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyType_Lookup' mangled-name='_PyType_Lookup' filepath='Objects/typeobject.c' line='3810' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyType_Lookup'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='3810' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Objects/typeobject.c' line='3810' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_GetModuleByDef' mangled-name='PyType_GetModuleByDef' filepath='Objects/typeobject.c' line='3715' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GetModuleByDef'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='3715' column='1'/> + <parameter type-id='type-id-539' name='def' filepath='Objects/typeobject.c' line='3715' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_GetModuleState' mangled-name='PyType_GetModuleState' filepath='Objects/typeobject.c' line='3701' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GetModuleState'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='3701' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyType_GetModule' mangled-name='PyType_GetModule' filepath='Objects/typeobject.c' line='3677' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GetModule'> + <parameter type-id='type-id-74' name='tp' filepath='Objects/object.c' line='174' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_GetSlot' mangled-name='PyType_GetSlot' filepath='Objects/typeobject.c' line='3655' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GetSlot'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='3655' column='1'/> + <parameter type-id='type-id-8' name='slot' filepath='Objects/typeobject.c' line='3655' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyType_GetQualName' mangled-name='PyType_GetQualName' filepath='Objects/typeobject.c' line='3649' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GetQualName'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='3649' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_GetName' mangled-name='PyType_GetName' filepath='Objects/typeobject.c' line='3643' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GetName'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='3649' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-573' visibility='default' filepath='./Include/object.h' line='234' column='1' id='type-id-574'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/object.h' line='235' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='basicsize' type-id='type-id-8' visibility='default' filepath='./Include/object.h' line='236' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='itemsize' type-id='type-id-8' visibility='default' filepath='./Include/object.h' line='237' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='flags' type-id='type-id-105' visibility='default' filepath='./Include/object.h' line='238' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='slots' type-id='type-id-575' visibility='default' filepath='./Include/object.h' line='239' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-576' visibility='default' filepath='./Include/object.h' line='229' column='1' id='type-id-577'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='slot' type-id='type-id-8' visibility='default' filepath='./Include/object.h' line='230' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='pfunc' type-id='type-id-18' visibility='default' filepath='./Include/object.h' line='231' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyType_Slot' type-id='type-id-577' filepath='./Include/object.h' line='232' column='1' id='type-id-576'/> + <pointer-type-def type-id='type-id-576' size-in-bits='64' id='type-id-575'/> + <typedef-decl name='PyType_Spec' type-id='type-id-574' filepath='./Include/object.h' line='240' column='1' id='type-id-573'/> + <pointer-type-def type-id='type-id-573' size-in-bits='64' id='type-id-578'/> + <function-decl name='PyType_FromSpec' mangled-name='PyType_FromSpec' filepath='Objects/typeobject.c' line='3637' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_FromSpec'> + <parameter type-id='type-id-578' name='spec' filepath='Objects/typeobject.c' line='3637' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_FromModuleAndSpec' mangled-name='PyType_FromModuleAndSpec' filepath='Objects/typeobject.c' line='3369' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_FromModuleAndSpec'> + <parameter type-id='type-id-14' name='module' filepath='Objects/typeobject.c' line='3369' column='1'/> + <parameter type-id='type-id-578' name='spec' filepath='Objects/typeobject.c' line='3369' column='1'/> + <parameter type-id='type-id-14' name='bases' filepath='Objects/typeobject.c' line='3369' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_FromSpecWithBases' mangled-name='PyType_FromSpecWithBases' filepath='Objects/typeobject.c' line='3363' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_FromSpecWithBases'> + <parameter type-id='type-id-578' name='spec' filepath='Objects/typeobject.c' line='3363' column='1'/> + <parameter type-id='type-id-14' name='bases' filepath='Objects/typeobject.c' line='3363' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyType_CalculateMetaclass' mangled-name='_PyType_CalculateMetaclass' filepath='Objects/typeobject.c' line='2472' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyType_CalculateMetaclass'> + <parameter type-id='type-id-74' name='metatype' filepath='Objects/typeobject.c' line='2472' column='1'/> + <parameter type-id='type-id-14' name='bases' filepath='Objects/typeobject.c' line='2472' column='1'/> + <return type-id='type-id-74'/> + </function-decl> + <function-decl name='PyType_SUPPORTS_WEAKREFS' mangled-name='PyType_SUPPORTS_WEAKREFS' filepath='Objects/typeobject.c' line='2464' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_SUPPORTS_WEAKREFS'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='6467' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyType_GetFlags' mangled-name='PyType_GetFlags' filepath='Objects/typeobject.c' line='2457' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GetFlags'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='2457' column='1'/> + <return type-id='type-id-16'/> + </function-decl> + <function-decl name='_PyObject_LookupSpecialId' mangled-name='_PyObject_LookupSpecialId' filepath='Objects/typeobject.c' line='1594' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_LookupSpecialId'> + <parameter type-id='type-id-14' name='self' filepath='Objects/typeobject.c' line='1594' column='1'/> + <parameter type-id='type-id-499' name='attrid' filepath='Objects/typeobject.c' line='1594' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyObject_LookupSpecial' mangled-name='_PyObject_LookupSpecial' filepath='Objects/typeobject.c' line='1578' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_LookupSpecial'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1282' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1282' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_IsSubtype' mangled-name='PyType_IsSubtype' filepath='Objects/typeobject.c' line='1540' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_IsSubtype'> + <parameter type-id='type-id-74' name='a' filepath='Objects/typeobject.c' line='1540' column='1'/> + <parameter type-id='type-id-74' name='b' filepath='Objects/typeobject.c' line='1540' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyType_GenericNew' mangled-name='PyType_GenericNew' filepath='Objects/typeobject.c' line='1169' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GenericNew'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='1169' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/typeobject.c' line='1169' column='1'/> + <parameter type-id='type-id-14' name='kwds' filepath='Objects/typeobject.c' line='1169' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyType_GenericAlloc' mangled-name='PyType_GenericAlloc' filepath='Objects/typeobject.c' line='1155' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_GenericAlloc'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='1155' column='1'/> + <parameter type-id='type-id-36' name='nitems' filepath='Objects/typeobject.c' line='1155' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyType_Name' mangled-name='_PyType_Name' filepath='Objects/typeobject.c' line='450' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyType_Name'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='450' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyType_Modified' mangled-name='PyType_Modified' filepath='Objects/typeobject.c' line='284' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_Modified'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='284' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyType_ClearCache' mangled-name='PyType_ClearCache' filepath='Objects/typeobject.c' line='265' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyType_ClearCache'> + <return type-id='type-id-105'/> + </function-decl> + <function-decl name='_PyType_GetTextSignatureFromInternalDoc' mangled-name='_PyType_GetTextSignatureFromInternalDoc' filepath='Objects/typeobject.c' line='181' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyType_GetTextSignatureFromInternalDoc'> + <parameter type-id='type-id-3' name='name' filepath='Objects/typeobject.c' line='181' column='1'/> + <parameter type-id='type-id-3' name='internal_doc' filepath='Objects/typeobject.c' line='181' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyType_GetDocFromInternalDoc' mangled-name='_PyType_GetDocFromInternalDoc' filepath='Objects/typeobject.c' line='169' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyType_GetDocFromInternalDoc'> + <parameter type-id='type-id-3' name='name' filepath='Objects/typeobject.c' line='169' column='1'/> + <parameter type-id='type-id-3' name='internal_doc' filepath='Objects/typeobject.c' line='169' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyType_CheckConsistency' mangled-name='_PyType_CheckConsistency' filepath='Objects/typeobject.c' line='122' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyType_CheckConsistency'> + <parameter type-id='type-id-74' name='type' filepath='Objects/typeobject.c' line='122' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/unicodeobject.c' comp-dir-path='/src' language='LANG_C99'> + + <array-type-def dimensions='1' type-id='type-id-527' size-in-bits='infinite' id='type-id-579'> + <subrange length='infinite' id='type-id-6'/> + + </array-type-def> + <qualified-type-def type-id='type-id-579' const='yes' id='type-id-580'/> + <var-decl name='_Py_ascii_whitespace' type-id='type-id-580' mangled-name='_Py_ascii_whitespace' visibility='default' filepath='./Include/cpython/unicodeobject.h' line='1029' column='1' elf-symbol-id='_Py_ascii_whitespace'/> + <var-decl name='PyUnicode_Type' type-id='type-id-112' mangled-name='PyUnicode_Type' visibility='default' filepath='./Include/unicodeobject.h' line='111' column='1' elf-symbol-id='PyUnicode_Type'/> + <var-decl name='PyUnicodeIter_Type' type-id='type-id-112' mangled-name='PyUnicodeIter_Type' visibility='default' filepath='./Include/unicodeobject.h' line='112' column='1' elf-symbol-id='PyUnicodeIter_Type'/> + <var-decl name='_PyUnicodeASCIIIter_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_unicodeobject.h' line='24' column='1'/> + <function-decl name='PyInit__string' mangled-name='PyInit__string' filepath='Objects/unicodeobject.c' line='16182' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__string'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_InternFromString' mangled-name='PyUnicode_InternFromString' filepath='Objects/unicodeobject.c' line='15605' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_InternFromString'> + <parameter type-id='type-id-3' name='cp' filepath='Objects/unicodeobject.c' line='15605' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_InternImmortal' mangled-name='PyUnicode_InternImmortal' filepath='Objects/unicodeobject.c' line='15586' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_InternImmortal'> + <parameter type-id='type-id-22' name='p' filepath='Objects/unicodeobject.c' line='15586' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyUnicode_InternInPlace' mangled-name='PyUnicode_InternInPlace' filepath='Objects/unicodeobject.c' line='15531' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_InternInPlace'> + <parameter type-id='type-id-22' name='p' filepath='Objects/unicodeobject.c' line='15531' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyUnicode_Format' mangled-name='PyUnicode_Format' filepath='Objects/unicodeobject.c' line='15187' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Format'> + <parameter type-id='type-id-14' name='format' filepath='Objects/unicodeobject.c' line='15187' column='1'/> + <parameter type-id='type-id-14' name='args' filepath='Objects/unicodeobject.c' line='15187' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_FormatLong' mangled-name='_PyUnicode_FormatLong' filepath='Objects/unicodeobject.c' line='14425' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_FormatLong'> + <parameter type-id='type-id-14' name='val' filepath='Objects/unicodeobject.c' line='14425' column='1'/> + <parameter type-id='type-id-8' name='alt' filepath='Objects/unicodeobject.c' line='14425' column='1'/> + <parameter type-id='type-id-8' name='prec' filepath='Objects/unicodeobject.c' line='14425' column='1'/> + <parameter type-id='type-id-8' name='type' filepath='Objects/unicodeobject.c' line='14425' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_Dealloc' mangled-name='_PyUnicodeWriter_Dealloc' filepath='Objects/unicodeobject.c' line='14066' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_Dealloc'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='14066' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_Finish' mangled-name='_PyUnicodeWriter_Finish' filepath='Objects/unicodeobject.c' line='14034' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_Finish'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='14034' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_WriteLatin1String' mangled-name='_PyUnicodeWriter_WriteLatin1String' filepath='Objects/unicodeobject.c' line='14020' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_WriteLatin1String'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='14020' column='1'/> + <parameter type-id='type-id-3' name='str' filepath='Objects/unicodeobject.c' line='14021' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/unicodeobject.c' line='14021' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_WriteASCIIString' mangled-name='_PyUnicodeWriter_WriteASCIIString' filepath='Objects/unicodeobject.c' line='13960' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_WriteASCIIString'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='13960' column='1'/> + <parameter type-id='type-id-3' name='ascii' filepath='Objects/unicodeobject.c' line='13961' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/unicodeobject.c' line='13961' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_WriteSubstring' mangled-name='_PyUnicodeWriter_WriteSubstring' filepath='Objects/unicodeobject.c' line='13925' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_WriteSubstring'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='13925' column='1'/> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='13925' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='13926' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/unicodeobject.c' line='13926' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_WriteStr' mangled-name='_PyUnicodeWriter_WriteStr' filepath='Objects/unicodeobject.c' line='13894' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_WriteStr'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='13894' column='1'/> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='13894' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_WriteChar' mangled-name='_PyUnicodeWriter_WriteChar' filepath='Objects/unicodeobject.c' line='13888' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_WriteChar'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='13888' column='1'/> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodeobject.c' line='13888' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_PrepareKindInternal' mangled-name='_PyUnicodeWriter_PrepareKindInternal' filepath='Objects/unicodeobject.c' line='13856' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_PrepareKindInternal'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='13856' column='1'/> + <parameter type-id='type-id-523' name='kind' filepath='Objects/unicodeobject.c' line='13857' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_PrepareInternal' mangled-name='_PyUnicodeWriter_PrepareInternal' filepath='Objects/unicodeobject.c' line='13779' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_PrepareInternal'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='13779' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Objects/unicodeobject.c' line='13780' column='1'/> + <parameter type-id='type-id-524' name='maxchar' filepath='Objects/unicodeobject.c' line='13780' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicodeWriter_Init' mangled-name='_PyUnicodeWriter_Init' filepath='Objects/unicodeobject.c' line='13755' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicodeWriter_Init'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='13755' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyUnicode_RSplit' mangled-name='PyUnicode_RSplit' filepath='Objects/unicodeobject.c' line='13338' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_RSplit'> + <parameter type-id='type-id-14' name='s' filepath='Objects/unicodeobject.c' line='13338' column='1'/> + <parameter type-id='type-id-14' name='sep' filepath='Objects/unicodeobject.c' line='13338' column='1'/> + <parameter type-id='type-id-36' name='maxsplit' filepath='Objects/unicodeobject.c' line='13338' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_RPartition' mangled-name='PyUnicode_RPartition' filepath='Objects/unicodeobject.c' line='13244' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_RPartition'> + <parameter type-id='type-id-14' name='str_obj' filepath='Objects/unicodeobject.c' line='13244' column='1'/> + <parameter type-id='type-id-14' name='sep_obj' filepath='Objects/unicodeobject.c' line='13244' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Partition' mangled-name='PyUnicode_Partition' filepath='Objects/unicodeobject.c' line='13192' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Partition'> + <parameter type-id='type-id-14' name='str_obj' filepath='Objects/unicodeobject.c' line='13244' column='1'/> + <parameter type-id='type-id-14' name='sep_obj' filepath='Objects/unicodeobject.c' line='13244' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Split' mangled-name='PyUnicode_Split' filepath='Objects/unicodeobject.c' line='13147' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Split'> + <parameter type-id='type-id-14' name='s' filepath='Objects/unicodeobject.c' line='13338' column='1'/> + <parameter type-id='type-id-14' name='sep' filepath='Objects/unicodeobject.c' line='13338' column='1'/> + <parameter type-id='type-id-36' name='maxsplit' filepath='Objects/unicodeobject.c' line='13338' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Replace' mangled-name='PyUnicode_Replace' filepath='Objects/unicodeobject.c' line='12795' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Replace'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='12795' column='1'/> + <parameter type-id='type-id-14' name='substr' filepath='Objects/unicodeobject.c' line='12796' column='1'/> + <parameter type-id='type-id-14' name='replstr' filepath='Objects/unicodeobject.c' line='12797' column='1'/> + <parameter type-id='type-id-36' name='maxcount' filepath='Objects/unicodeobject.c' line='12798' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Substring' mangled-name='PyUnicode_Substring' filepath='Objects/unicodeobject.c' line='12560' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Substring'> + <parameter type-id='type-id-14' name='self' filepath='Objects/unicodeobject.c' line='12560' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='12560' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/unicodeobject.c' line='12560' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_XStrip' mangled-name='_PyUnicode_XStrip' filepath='Objects/unicodeobject.c' line='12510' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_XStrip'> + <parameter type-id='type-id-14' name='self' filepath='Objects/unicodeobject.c' line='12510' column='1'/> + <parameter type-id='type-id-8' name='striptype' filepath='Objects/unicodeobject.c' line='12510' column='1'/> + <parameter type-id='type-id-14' name='sepobj' filepath='Objects/unicodeobject.c' line='12510' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_IsIdentifier' mangled-name='PyUnicode_IsIdentifier' filepath='Objects/unicodeobject.c' line='12324' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_IsIdentifier'> + <parameter type-id='type-id-14' name='self' filepath='Objects/unicodeobject.c' line='12324' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ScanIdentifier' mangled-name='_PyUnicode_ScanIdentifier' filepath='Objects/unicodeobject.c' line='12287' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ScanIdentifier'> + <parameter type-id='type-id-14' name='self' filepath='Objects/unicodeobject.c' line='12287' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyUnicode_AppendAndDel' mangled-name='PyUnicode_AppendAndDel' filepath='Objects/unicodeobject.c' line='11559' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AppendAndDel'> + <parameter type-id='type-id-22' name='pv' filepath='Objects/bytesobject.c' line='3033' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/bytesobject.c' line='3033' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyUnicode_Append' mangled-name='PyUnicode_Append' filepath='Objects/unicodeobject.c' line='11476' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Append'> + <parameter type-id='type-id-22' name='p_left' filepath='Objects/unicodeobject.c' line='11476' column='1'/> + <parameter type-id='type-id-14' name='right' filepath='Objects/unicodeobject.c' line='11476' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyUnicode_Concat' mangled-name='PyUnicode_Concat' filepath='Objects/unicodeobject.c' line='11425' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Concat'> + <parameter type-id='type-id-14' name='left' filepath='Objects/unicodeobject.c' line='11425' column='1'/> + <parameter type-id='type-id-14' name='right' filepath='Objects/unicodeobject.c' line='11425' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Contains' mangled-name='PyUnicode_Contains' filepath='Objects/unicodeobject.c' line='11362' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Contains'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='11362' column='1'/> + <parameter type-id='type-id-14' name='substr' filepath='Objects/unicodeobject.c' line='11362' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_EQ' mangled-name='_PyUnicode_EQ' filepath='Objects/unicodeobject.c' line='11356' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_EQ'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_RichCompare' mangled-name='PyUnicode_RichCompare' filepath='Objects/unicodeobject.c' line='11317' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_RichCompare'> + <parameter type-id='type-id-14' name='left' filepath='Objects/unicodeobject.c' line='11317' column='1'/> + <parameter type-id='type-id-14' name='right' filepath='Objects/unicodeobject.c' line='11317' column='1'/> + <parameter type-id='type-id-8' name='op' filepath='Objects/unicodeobject.c' line='11317' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_EqualToASCIIId' mangled-name='_PyUnicode_EqualToASCIIId' filepath='Objects/unicodeobject.c' line='11273' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_EqualToASCIIId'> + <parameter type-id='type-id-14' name='left' filepath='Objects/unicodeobject.c' line='11273' column='1'/> + <parameter type-id='type-id-499' name='right' filepath='Objects/unicodeobject.c' line='11273' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_EqualToASCIIString' mangled-name='_PyUnicode_EqualToASCIIString' filepath='Objects/unicodeobject.c' line='11250' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_EqualToASCIIString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2378' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2378' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_CompareWithASCIIString' mangled-name='PyUnicode_CompareWithASCIIString' filepath='Objects/unicodeobject.c' line='11171' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_CompareWithASCIIString'> + <parameter type-id='type-id-14' name='uni' filepath='Objects/unicodeobject.c' line='11171' column='1'/> + <parameter type-id='type-id-3' name='str' filepath='Objects/unicodeobject.c' line='11171' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_Compare' mangled-name='PyUnicode_Compare' filepath='Objects/unicodeobject.c' line='11150' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Compare'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_Equal' mangled-name='_PyUnicode_Equal' filepath='Objects/unicodeobject.c' line='11135' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_Equal'> + <parameter type-id='type-id-14' name='derived' filepath='Objects/abstract.c' line='2784' column='1'/> + <parameter type-id='type-id-14' name='cls' filepath='Objects/abstract.c' line='2784' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_Splitlines' mangled-name='PyUnicode_Splitlines' filepath='Objects/unicodeobject.c' line='10325' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Splitlines'> + <parameter type-id='type-id-14' name='string' filepath='Objects/unicodeobject.c' line='10325' column='1'/> + <parameter type-id='type-id-8' name='keepends' filepath='Objects/unicodeobject.c' line='10325' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Fill' mangled-name='PyUnicode_Fill' filepath='Objects/unicodeobject.c' line='10249' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Fill'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='10249' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='10249' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Objects/unicodeobject.c' line='10249' column='1'/> + <parameter type-id='type-id-524' name='fill_char' filepath='Objects/unicodeobject.c' line='10250' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PyUnicode_FastFill' mangled-name='_PyUnicode_FastFill' filepath='Objects/unicodeobject.c' line='10235' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_FastFill'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='10235' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='10235' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Objects/unicodeobject.c' line='10235' column='1'/> + <parameter type-id='type-id-524' name='fill_char' filepath='Objects/unicodeobject.c' line='10236' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyUnicode_JoinArray' mangled-name='_PyUnicode_JoinArray' filepath='Objects/unicodeobject.c' line='10063' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_JoinArray'> + <parameter type-id='type-id-14' name='separator' filepath='Objects/unicodeobject.c' line='10063' column='1'/> + <parameter type-id='type-id-200' name='items' filepath='Objects/unicodeobject.c' line='10063' column='1'/> + <parameter type-id='type-id-36' name='seqlen' filepath='Objects/unicodeobject.c' line='10063' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Join' mangled-name='PyUnicode_Join' filepath='Objects/unicodeobject.c' line='10039' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Join'> + <parameter type-id='type-id-14' name='func' filepath='Objects/call.c' line='368' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Objects/call.c' line='368' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Tailmatch' mangled-name='PyUnicode_Tailmatch' filepath='Objects/unicodeobject.c' line='9792' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Tailmatch'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='9792' column='1'/> + <parameter type-id='type-id-14' name='substr' filepath='Objects/unicodeobject.c' line='9793' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='9794' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/unicodeobject.c' line='9795' column='1'/> + <parameter type-id='type-id-8' name='direction' filepath='Objects/unicodeobject.c' line='9796' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyUnicode_FindChar' mangled-name='PyUnicode_FindChar' filepath='Objects/unicodeobject.c' line='9703' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FindChar'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='9703' column='1'/> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodeobject.c' line='9703' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='9704' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/unicodeobject.c' line='9704' column='1'/> + <parameter type-id='type-id-8' name='direction' filepath='Objects/unicodeobject.c' line='9705' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyUnicode_Find' mangled-name='PyUnicode_Find' filepath='Objects/unicodeobject.c' line='9690' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Find'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='9792' column='1'/> + <parameter type-id='type-id-14' name='substr' filepath='Objects/unicodeobject.c' line='9793' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='9794' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/unicodeobject.c' line='9795' column='1'/> + <parameter type-id='type-id-8' name='direction' filepath='Objects/unicodeobject.c' line='9796' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyUnicode_Count' mangled-name='PyUnicode_Count' filepath='Objects/unicodeobject.c' line='9616' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Count'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='9616' column='1'/> + <parameter type-id='type-id-14' name='substr' filepath='Objects/unicodeobject.c' line='9617' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='9618' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/unicodeobject.c' line='9619' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <pointer-type-def type-id='type-id-524' size-in-bits='64' id='type-id-581'/> + <function-decl name='_PyUnicode_InsertThousandsGrouping' mangled-name='_PyUnicode_InsertThousandsGrouping' filepath='Objects/unicodeobject.c' line='9496' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_InsertThousandsGrouping'> + <parameter type-id='type-id-525' name='writer' filepath='Objects/unicodeobject.c' line='9497' column='1'/> + <parameter type-id='type-id-36' name='n_buffer' filepath='Objects/unicodeobject.c' line='9498' column='1'/> + <parameter type-id='type-id-14' name='digits' filepath='Objects/unicodeobject.c' line='9499' column='1'/> + <parameter type-id='type-id-36' name='d_pos' filepath='Objects/unicodeobject.c' line='9500' column='1'/> + <parameter type-id='type-id-36' name='n_digits' filepath='Objects/unicodeobject.c' line='9501' column='1'/> + <parameter type-id='type-id-36' name='min_width' filepath='Objects/unicodeobject.c' line='9502' column='1'/> + <parameter type-id='type-id-3' name='grouping' filepath='Objects/unicodeobject.c' line='9503' column='1'/> + <parameter type-id='type-id-14' name='thousands_sep' filepath='Objects/unicodeobject.c' line='9504' column='1'/> + <parameter type-id='type-id-581' name='maxchar' filepath='Objects/unicodeobject.c' line='9505' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PyUnicode_TransformDecimalAndSpaceToASCII' mangled-name='_PyUnicode_TransformDecimalAndSpaceToASCII' filepath='Objects/unicodeobject.c' line='9321' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_TransformDecimalAndSpaceToASCII'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='9321' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Translate' mangled-name='PyUnicode_Translate' filepath='Objects/unicodeobject.c' line='9311' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Translate'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='9311' column='1'/> + <parameter type-id='type-id-14' name='mapping' filepath='Objects/unicodeobject.c' line='9312' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='9313' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsCharmapString' mangled-name='PyUnicode_AsCharmapString' filepath='Objects/unicodeobject.c' line='8887' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsCharmapString'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_EncodeCharmap' mangled-name='_PyUnicode_EncodeCharmap' filepath='Objects/unicodeobject.c' line='8816' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_EncodeCharmap'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='8816' column='1'/> + <parameter type-id='type-id-14' name='mapping' filepath='Objects/unicodeobject.c' line='8817' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='8818' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_BuildEncodingMap' mangled-name='PyUnicode_BuildEncodingMap' filepath='Objects/unicodeobject.c' line='8403' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_BuildEncodingMap'> + <parameter type-id='type-id-14' name='string' filepath='Objects/unicodeobject.c' line='8403' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeCharmap' mangled-name='PyUnicode_DecodeCharmap' filepath='Objects/unicodeobject.c' line='8327' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeCharmap'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='8327' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='8328' column='1'/> + <parameter type-id='type-id-14' name='mapping' filepath='Objects/unicodeobject.c' line='8329' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='8330' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsASCIIString' mangled-name='PyUnicode_AsASCIIString' filepath='Objects/unicodeobject.c' line='7373' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsASCIIString'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_AsASCIIString' mangled-name='_PyUnicode_AsASCIIString' filepath='Objects/unicodeobject.c' line='7356' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_AsASCIIString'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeASCII' mangled-name='PyUnicode_DecodeASCII' filepath='Objects/unicodeobject.c' line='7257' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeASCII'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='7257' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='7258' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='7259' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsLatin1String' mangled-name='PyUnicode_AsLatin1String' filepath='Objects/unicodeobject.c' line='7249' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsLatin1String'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_AsLatin1String' mangled-name='_PyUnicode_AsLatin1String' filepath='Objects/unicodeobject.c' line='7230' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_AsLatin1String'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeLatin1' mangled-name='PyUnicode_DecodeLatin1' filepath='Objects/unicodeobject.c' line='6937' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeLatin1'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6937' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6938' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6939' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsRawUnicodeEscapeString' mangled-name='PyUnicode_AsRawUnicodeEscapeString' filepath='Objects/unicodeobject.c' line='6856' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsRawUnicodeEscapeString'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='6856' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeRawUnicodeEscape' mangled-name='PyUnicode_DecodeRawUnicodeEscape' filepath='Objects/unicodeobject.c' line='6847' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeRawUnicodeEscape'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6937' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6938' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6939' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_DecodeRawUnicodeEscapeStateful' mangled-name='_PyUnicode_DecodeRawUnicodeEscapeStateful' filepath='Objects/unicodeobject.c' line='6711' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_DecodeRawUnicodeEscapeStateful'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6711' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6712' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6713' column='1'/> + <parameter type-id='type-id-168' name='consumed' filepath='Objects/unicodeobject.c' line='6714' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsUnicodeEscapeString' mangled-name='PyUnicode_AsUnicodeEscapeString' filepath='Objects/unicodeobject.c' line='6591' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUnicodeEscapeString'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='6856' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUnicodeEscape' mangled-name='PyUnicode_DecodeUnicodeEscape' filepath='Objects/unicodeobject.c' line='6581' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUnicodeEscape'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6937' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6938' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6939' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_DecodeUnicodeEscapeStateful' mangled-name='_PyUnicode_DecodeUnicodeEscapeStateful' filepath='Objects/unicodeobject.c' line='6545' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_DecodeUnicodeEscapeStateful'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6545' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6546' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6547' column='1'/> + <parameter type-id='type-id-168' name='consumed' filepath='Objects/unicodeobject.c' line='6548' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_DecodeUnicodeEscapeInternal' mangled-name='_PyUnicode_DecodeUnicodeEscapeInternal' filepath='Objects/unicodeobject.c' line='6301' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_DecodeUnicodeEscapeInternal'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6301' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6302' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6303' column='1'/> + <parameter type-id='type-id-168' name='consumed' filepath='Objects/unicodeobject.c' line='6304' column='1'/> + <parameter type-id='type-id-483' name='first_invalid_escape' filepath='Objects/unicodeobject.c' line='6305' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsUTF16String' mangled-name='PyUnicode_AsUTF16String' filepath='Objects/unicodeobject.c' line='6291' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUTF16String'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_EncodeUTF16' mangled-name='_PyUnicode_EncodeUTF16' filepath='Objects/unicodeobject.c' line='6123' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_EncodeUTF16'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='6123' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6124' column='1'/> + <parameter type-id='type-id-8' name='byteorder' filepath='Objects/unicodeobject.c' line='6125' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF16Stateful' mangled-name='PyUnicode_DecodeUTF16Stateful' filepath='Objects/unicodeobject.c' line='5968' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF16Stateful'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='5968' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='5969' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='5970' column='1'/> + <parameter type-id='type-id-501' name='byteorder' filepath='Objects/unicodeobject.c' line='5971' column='1'/> + <parameter type-id='type-id-168' name='consumed' filepath='Objects/unicodeobject.c' line='5972' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF16' mangled-name='PyUnicode_DecodeUTF16' filepath='Objects/unicodeobject.c' line='5959' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF16'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='5959' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='5960' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='5961' column='1'/> + <parameter type-id='type-id-501' name='byteorder' filepath='Objects/unicodeobject.c' line='5962' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsUTF32String' mangled-name='PyUnicode_AsUTF32String' filepath='Objects/unicodeobject.c' line='5951' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUTF32String'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_EncodeUTF32' mangled-name='_PyUnicode_EncodeUTF32' filepath='Objects/unicodeobject.c' line='5802' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_EncodeUTF32'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='5802' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='5803' column='1'/> + <parameter type-id='type-id-8' name='byteorder' filepath='Objects/unicodeobject.c' line='5804' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF32Stateful' mangled-name='PyUnicode_DecodeUTF32Stateful' filepath='Objects/unicodeobject.c' line='5657' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF32Stateful'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='5657' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='5658' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='5659' column='1'/> + <parameter type-id='type-id-501' name='byteorder' filepath='Objects/unicodeobject.c' line='5660' column='1'/> + <parameter type-id='type-id-168' name='consumed' filepath='Objects/unicodeobject.c' line='5661' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF32' mangled-name='PyUnicode_DecodeUTF32' filepath='Objects/unicodeobject.c' line='5648' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF32'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='5959' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='5960' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='5961' column='1'/> + <parameter type-id='type-id-501' name='byteorder' filepath='Objects/unicodeobject.c' line='5962' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsUTF8String' mangled-name='PyUnicode_AsUTF8String' filepath='Objects/unicodeobject.c' line='5640' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUTF8String'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_AsUTF8String' mangled-name='_PyUnicode_AsUTF8String' filepath='Objects/unicodeobject.c' line='5633' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_AsUTF8String'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <pointer-type-def type-id='type-id-54' size-in-bits='64' id='type-id-582'/> + <function-decl name='_Py_EncodeUTF8Ex' mangled-name='_Py_EncodeUTF8Ex' filepath='Objects/unicodeobject.c' line='5403' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_EncodeUTF8Ex'> + <parameter type-id='type-id-545' name='text' filepath='Objects/unicodeobject.c' line='5403' column='1'/> + <parameter type-id='type-id-494' name='str' filepath='Objects/unicodeobject.c' line='5403' column='1'/> + <parameter type-id='type-id-582' name='error_pos' filepath='Objects/unicodeobject.c' line='5403' column='1'/> + <parameter type-id='type-id-483' name='reason' filepath='Objects/unicodeobject.c' line='5404' column='1'/> + <parameter type-id='type-id-8' name='raw_malloc' filepath='Objects/unicodeobject.c' line='5404' column='1'/> + <parameter type-id='type-id-386' name='errors' filepath='Objects/unicodeobject.c' line='5404' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_DecodeUTF8_surrogateescape' mangled-name='_Py_DecodeUTF8_surrogateescape' filepath='Objects/unicodeobject.c' line='5373' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DecodeUTF8_surrogateescape'> + <parameter type-id='type-id-3' name='arg' filepath='Objects/unicodeobject.c' line='5373' column='1'/> + <parameter type-id='type-id-36' name='arglen' filepath='Objects/unicodeobject.c' line='5373' column='1'/> + <parameter type-id='type-id-582' name='wlen' filepath='Objects/unicodeobject.c' line='5374' column='1'/> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='_Py_DecodeUTF8Ex' mangled-name='_Py_DecodeUTF8Ex' filepath='Objects/unicodeobject.c' line='5264' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DecodeUTF8Ex'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='5264' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='5264' column='1'/> + <parameter type-id='type-id-374' name='wstr' filepath='Objects/unicodeobject.c' line='5264' column='1'/> + <parameter type-id='type-id-582' name='wlen' filepath='Objects/unicodeobject.c' line='5264' column='1'/> + <parameter type-id='type-id-483' name='reason' filepath='Objects/unicodeobject.c' line='5265' column='1'/> + <parameter type-id='type-id-386' name='errors' filepath='Objects/unicodeobject.c' line='5265' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF8Stateful' mangled-name='PyUnicode_DecodeUTF8Stateful' filepath='Objects/unicodeobject.c' line='5242' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF8Stateful'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='5242' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='5243' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='5244' column='1'/> + <parameter type-id='type-id-168' name='consumed' filepath='Objects/unicodeobject.c' line='5245' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF8' mangled-name='PyUnicode_DecodeUTF8' filepath='Objects/unicodeobject.c' line='5007' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF8'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6937' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6938' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6939' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_EncodeUTF7' mangled-name='_PyUnicode_EncodeUTF7' filepath='Objects/unicodeobject.c' line='4897' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_EncodeUTF7'> + <parameter type-id='type-id-14' name='str' filepath='Objects/unicodeobject.c' line='4897' column='1'/> + <parameter type-id='type-id-8' name='base64SetO' filepath='Objects/unicodeobject.c' line='4898' column='1'/> + <parameter type-id='type-id-8' name='base64WhiteSpace' filepath='Objects/unicodeobject.c' line='4899' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='4900' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF7Stateful' mangled-name='PyUnicode_DecodeUTF7Stateful' filepath='Objects/unicodeobject.c' line='4699' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF7Stateful'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='4699' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='4700' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='4701' column='1'/> + <parameter type-id='type-id-168' name='consumed' filepath='Objects/unicodeobject.c' line='4702' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeUTF7' mangled-name='PyUnicode_DecodeUTF7' filepath='Objects/unicodeobject.c' line='4684' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeUTF7'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='6937' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='6938' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='6939' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_GetDefaultEncoding' mangled-name='PyUnicode_GetDefaultEncoding' filepath='Objects/unicodeobject.c' line='4335' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_GetDefaultEncoding'> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyUnicode_WriteChar' mangled-name='PyUnicode_WriteChar' filepath='Objects/unicodeobject.c' line='4312' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_WriteChar'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='4312' column='1'/> + <parameter type-id='type-id-36' name='index' filepath='Objects/unicodeobject.c' line='4312' column='1'/> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodeobject.c' line='4312' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_ReadChar' mangled-name='PyUnicode_ReadChar' filepath='Objects/unicodeobject.c' line='4290' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_ReadChar'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='4290' column='1'/> + <parameter type-id='type-id-36' name='index' filepath='Objects/unicodeobject.c' line='4290' column='1'/> + <return type-id='type-id-524'/> + </function-decl> + <function-decl name='PyUnicode_GetLength' mangled-name='PyUnicode_GetLength' filepath='Objects/unicodeobject.c' line='4278' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_GetLength'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2335' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyUnicode_GetSize' mangled-name='PyUnicode_GetSize' filepath='Objects/unicodeobject.c' line='4259' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_GetSize'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='4259' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <typedef-decl name='Py_UNICODE' type-id='type-id-282' filepath='./Include/cpython/unicodeobject.h' line='10' column='1' id='type-id-583'/> + <qualified-type-def type-id='type-id-583' const='yes' id='type-id-584'/> + <pointer-type-def type-id='type-id-584' size-in-bits='64' id='type-id-585'/> + <function-decl name='_PyUnicode_AsUnicode' mangled-name='_PyUnicode_AsUnicode' filepath='Objects/unicodeobject.c' line='4244' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_AsUnicode'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='4244' column='1'/> + <return type-id='type-id-585'/> + </function-decl> + <pointer-type-def type-id='type-id-583' size-in-bits='64' id='type-id-586'/> + <function-decl name='PyUnicode_AsUnicode' mangled-name='PyUnicode_AsUnicode' filepath='Objects/unicodeobject.c' line='4238' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUnicode'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='4238' column='1'/> + <return type-id='type-id-586'/> + </function-decl> + <function-decl name='PyUnicode_AsUnicodeAndSize' mangled-name='PyUnicode_AsUnicodeAndSize' filepath='Objects/unicodeobject.c' line='4199' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUnicodeAndSize'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='4199' column='1'/> + <parameter type-id='type-id-168' name='size' filepath='Objects/unicodeobject.c' line='4199' column='1'/> + <return type-id='type-id-586'/> + </function-decl> + <function-decl name='PyUnicode_AsUTF8' mangled-name='PyUnicode_AsUTF8' filepath='Objects/unicodeobject.c' line='4193' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUTF8'> + <parameter type-id='type-id-14' name='ob' filepath='Objects/exceptions.c' line='421' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyUnicode_AsUTF8AndSize' mangled-name='PyUnicode_AsUTF8AndSize' filepath='Objects/unicodeobject.c' line='4172' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUTF8AndSize'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='4172' column='1'/> + <parameter type-id='type-id-168' name='psize' filepath='Objects/unicodeobject.c' line='4172' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyUnicode_FSDecoder' mangled-name='PyUnicode_FSDecoder' filepath='Objects/unicodeobject.c' line='4099' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FSDecoder'> + <parameter type-id='type-id-14' name='arg' filepath='Objects/unicodeobject.c' line='4099' column='1'/> + <parameter type-id='type-id-18' name='addr' filepath='Objects/unicodeobject.c' line='4099' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_FSConverter' mangled-name='PyUnicode_FSConverter' filepath='Objects/unicodeobject.c' line='4059' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FSConverter'> + <parameter type-id='type-id-14' name='arg' filepath='Objects/unicodeobject.c' line='4059' column='1'/> + <parameter type-id='type-id-18' name='addr' filepath='Objects/unicodeobject.c' line='4059' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_DecodeFSDefaultAndSize' mangled-name='PyUnicode_DecodeFSDefaultAndSize' filepath='Objects/unicodeobject.c' line='4023' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeFSDefaultAndSize'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='4023' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='4023' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeFSDefault' mangled-name='PyUnicode_DecodeFSDefault' filepath='Objects/unicodeobject.c' line='4017' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeFSDefault'> + <parameter type-id='type-id-3' name='cp' filepath='Objects/unicodeobject.c' line='15605' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeLocale' mangled-name='PyUnicode_DecodeLocale' filepath='Objects/unicodeobject.c' line='4008' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeLocale'> + <parameter type-id='type-id-3' name='name' filepath='Objects/typeobject.c' line='181' column='1'/> + <parameter type-id='type-id-3' name='internal_doc' filepath='Objects/typeobject.c' line='181' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_DecodeLocaleAndSize' mangled-name='PyUnicode_DecodeLocaleAndSize' filepath='Objects/unicodeobject.c' line='4000' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_DecodeLocaleAndSize'> + <parameter type-id='type-id-3' name='str' filepath='Objects/unicodeobject.c' line='4000' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Objects/unicodeobject.c' line='4000' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='4001' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsEncodedUnicode' mangled-name='PyUnicode_AsEncodedUnicode' filepath='Objects/unicodeobject.c' line='3920' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsEncodedUnicode'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3920' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/unicodeobject.c' line='3921' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3922' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsEncodedString' mangled-name='PyUnicode_AsEncodedString' filepath='Objects/unicodeobject.c' line='3820' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsEncodedString'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3820' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/unicodeobject.c' line='3821' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3822' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_EncodeFSDefault' mangled-name='PyUnicode_EncodeFSDefault' filepath='Objects/unicodeobject.c' line='3786' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_EncodeFSDefault'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2791' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_EncodeLocale' mangled-name='PyUnicode_EncodeLocale' filepath='Objects/unicodeobject.c' line='3779' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_EncodeLocale'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3779' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3779' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsEncodedObject' mangled-name='PyUnicode_AsEncodedObject' filepath='Objects/unicodeobject.c' line='3697' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsEncodedObject'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3920' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/unicodeobject.c' line='3921' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3922' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsDecodedUnicode' mangled-name='PyUnicode_AsDecodedUnicode' filepath='Objects/unicodeobject.c' line='3658' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsDecodedUnicode'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3920' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/unicodeobject.c' line='3921' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3922' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsDecodedObject' mangled-name='PyUnicode_AsDecodedObject' filepath='Objects/unicodeobject.c' line='3636' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsDecodedObject'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3636' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/unicodeobject.c' line='3637' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3638' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Decode' mangled-name='PyUnicode_Decode' filepath='Objects/unicodeobject.c' line='3546' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Decode'> + <parameter type-id='type-id-3' name='s' filepath='Objects/unicodeobject.c' line='3546' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='3547' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/unicodeobject.c' line='3548' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3549' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromEncodedObject' mangled-name='PyUnicode_FromEncodedObject' filepath='Objects/unicodeobject.c' line='3444' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromEncodedObject'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/unicodeobject.c' line='3444' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Objects/unicodeobject.c' line='3445' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='3446' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromObject' mangled-name='PyUnicode_FromObject' filepath='Objects/unicodeobject.c' line='3422' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromOrdinal' mangled-name='PyUnicode_FromOrdinal' filepath='Objects/unicodeobject.c' line='3410' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromOrdinal'> + <parameter type-id='type-id-8' name='ordinal' filepath='Objects/unicodeobject.c' line='3410' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_WideCharString_Opt_Converter' mangled-name='_PyUnicode_WideCharString_Opt_Converter' filepath='Objects/unicodeobject.c' line='3374' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_WideCharString_Opt_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_WideCharString_Converter' mangled-name='_PyUnicode_WideCharString_Converter' filepath='Objects/unicodeobject.c' line='3342' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_WideCharString_Converter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_AsWideCharString' mangled-name='PyUnicode_AsWideCharString' filepath='Objects/unicodeobject.c' line='3294' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsWideCharString'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3294' column='1'/> + <parameter type-id='type-id-168' name='size' filepath='Objects/unicodeobject.c' line='3295' column='1'/> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='PyUnicode_AsWideChar' mangled-name='PyUnicode_AsWideChar' filepath='Objects/unicodeobject.c' line='3252' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsWideChar'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='3252' column='1'/> + <parameter type-id='type-id-281' name='w' filepath='Objects/unicodeobject.c' line='3253' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='3254' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyUnicode_FromFormat' mangled-name='PyUnicode_FromFormat' filepath='Objects/unicodeobject.c' line='3142' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromFormat'> + <parameter type-id='type-id-3' name='format' filepath='Objects/bytesobject.c' line='375' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromFormatV' mangled-name='PyUnicode_FromFormatV' filepath='Objects/unicodeobject.c' line='3085' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromFormatV'> + <parameter type-id='type-id-3' name='format' filepath='Objects/unicodeobject.c' line='3085' column='1'/> + <parameter type-id='type-id-496' name='vargs' filepath='Objects/unicodeobject.c' line='3085' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_AsUCS4Copy' mangled-name='PyUnicode_AsUCS4Copy' filepath='Objects/unicodeobject.c' line='2709' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUCS4Copy'> + <parameter type-id='type-id-14' name='string' filepath='Objects/unicodeobject.c' line='2709' column='1'/> + <return type-id='type-id-581'/> + </function-decl> + <function-decl name='PyUnicode_AsUCS4' mangled-name='PyUnicode_AsUCS4' filepath='Objects/unicodeobject.c' line='2698' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_AsUCS4'> + <parameter type-id='type-id-14' name='string' filepath='Objects/unicodeobject.c' line='2698' column='1'/> + <parameter type-id='type-id-581' name='target' filepath='Objects/unicodeobject.c' line='2698' column='1'/> + <parameter type-id='type-id-36' name='targetsize' filepath='Objects/unicodeobject.c' line='2698' column='1'/> + <parameter type-id='type-id-8' name='copy_null' filepath='Objects/unicodeobject.c' line='2699' column='1'/> + <return type-id='type-id-581'/> + </function-decl> + <function-decl name='_PyUnicode_Copy' mangled-name='_PyUnicode_Copy' filepath='Objects/unicodeobject.c' line='2575' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_Copy'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_FindMaxChar' mangled-name='_PyUnicode_FindMaxChar' filepath='Objects/unicodeobject.c' line='2492' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_FindMaxChar'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='2492' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Objects/unicodeobject.c' line='2492' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Objects/unicodeobject.c' line='2492' column='1'/> + <return type-id='type-id-524'/> + </function-decl> + <function-decl name='PyUnicode_FromKindAndData' mangled-name='PyUnicode_FromKindAndData' filepath='Objects/unicodeobject.c' line='2472' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromKindAndData'> + <parameter type-id='type-id-8' name='kind' filepath='Objects/unicodeobject.c' line='2472' column='1'/> + <parameter type-id='type-id-18' name='buffer' filepath='Objects/unicodeobject.c' line='2472' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='2472' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_FromASCII' mangled-name='_PyUnicode_FromASCII' filepath='Objects/unicodeobject.c' line='2361' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_FromASCII'> + <parameter type-id='type-id-3' name='bytes' filepath='Objects/bytearrayobject.c' line='108' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytearrayobject.c' line='108' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_FromId' mangled-name='_PyUnicode_FromId' filepath='Objects/unicodeobject.c' line='2282' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_FromId'> + <parameter type-id='type-id-499' name='id' filepath='Objects/unicodeobject.c' line='2282' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromString' mangled-name='PyUnicode_FromString' filepath='Objects/unicodeobject.c' line='2270' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromString'> + <parameter type-id='type-id-3' name='cp' filepath='Objects/unicodeobject.c' line='15605' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromStringAndSize' mangled-name='PyUnicode_FromStringAndSize' filepath='Objects/unicodeobject.c' line='2247' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromStringAndSize'> + <parameter type-id='type-id-3' name='u' filepath='Objects/unicodeobject.c' line='2247' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='2247' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromWideChar' mangled-name='PyUnicode_FromWideChar' filepath='Objects/unicodeobject.c' line='2165' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromWideChar'> + <parameter type-id='type-id-545' name='u' filepath='Objects/unicodeobject.c' line='2165' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='2165' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_FromUnicode' mangled-name='PyUnicode_FromUnicode' filepath='Objects/unicodeobject.c' line='2143' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_FromUnicode'> + <parameter type-id='type-id-585' name='u' filepath='Objects/unicodeobject.c' line='2143' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='2143' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyUnicode_Resize' mangled-name='PyUnicode_Resize' filepath='Objects/unicodeobject.c' line='2042' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_Resize'> + <parameter type-id='type-id-22' name='p_unicode' filepath='Objects/unicodeobject.c' line='2042' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Objects/unicodeobject.c' line='2042' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_Ready' mangled-name='_PyUnicode_Ready' filepath='Objects/unicodeobject.c' line='1780' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_Ready'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='1780' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyUnicode_CopyCharacters' mangled-name='PyUnicode_CopyCharacters' filepath='Objects/unicodeobject.c' line='1679' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_CopyCharacters'> + <parameter type-id='type-id-14' name='to' filepath='Objects/unicodeobject.c' line='1679' column='1'/> + <parameter type-id='type-id-36' name='to_start' filepath='Objects/unicodeobject.c' line='1679' column='1'/> + <parameter type-id='type-id-14' name='from' filepath='Objects/unicodeobject.c' line='1680' column='1'/> + <parameter type-id='type-id-36' name='from_start' filepath='Objects/unicodeobject.c' line='1680' column='1'/> + <parameter type-id='type-id-36' name='how_many' filepath='Objects/unicodeobject.c' line='1681' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PyUnicode_FastCopyCharacters' mangled-name='_PyUnicode_FastCopyCharacters' filepath='Objects/unicodeobject.c' line='1671' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_FastCopyCharacters'> + <parameter type-id='type-id-14' name='to' filepath='Objects/unicodeobject.c' line='1672' column='1'/> + <parameter type-id='type-id-36' name='to_start' filepath='Objects/unicodeobject.c' line='1672' column='1'/> + <parameter type-id='type-id-14' name='from' filepath='Objects/unicodeobject.c' line='1673' column='1'/> + <parameter type-id='type-id-36' name='from_start' filepath='Objects/unicodeobject.c' line='1673' column='1'/> + <parameter type-id='type-id-36' name='how_many' filepath='Objects/unicodeobject.c' line='1673' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyUnicode_New' mangled-name='PyUnicode_New' filepath='Objects/unicodeobject.c' line='1366' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyUnicode_New'> + <parameter type-id='type-id-36' name='size' filepath='Objects/unicodeobject.c' line='1366' column='1'/> + <parameter type-id='type-id-524' name='maxchar' filepath='Objects/unicodeobject.c' line='1366' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyUnicode_CheckConsistency' mangled-name='_PyUnicode_CheckConsistency' filepath='Objects/unicodeobject.c' line='501' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_CheckConsistency'> + <parameter type-id='type-id-14' name='op' filepath='Objects/unicodeobject.c' line='501' column='1'/> + <parameter type-id='type-id-8' name='check_content' filepath='Objects/unicodeobject.c' line='501' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_GetErrorHandler' mangled-name='_Py_GetErrorHandler' filepath='Objects/unicodeobject.c' line='397' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetErrorHandler'> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='397' column='1'/> + <return type-id='type-id-386'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/unicodectype.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyUnicode_IsAlpha' mangled-name='_PyUnicode_IsAlpha' filepath='Objects/unicodectype.c' line='289' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsAlpha'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsCaseIgnorable' mangled-name='_PyUnicode_IsCaseIgnorable' filepath='Objects/unicodectype.c' line='279' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsCaseIgnorable'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsCased' mangled-name='_PyUnicode_IsCased' filepath='Objects/unicodectype.c' line='272' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsCased'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToFoldedFull' mangled-name='_PyUnicode_ToFoldedFull' filepath='Objects/unicodectype.c' line='257' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToFoldedFull'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='257' column='1'/> + <parameter type-id='type-id-581' name='res' filepath='Objects/unicodectype.c' line='257' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToUpperFull' mangled-name='_PyUnicode_ToUpperFull' filepath='Objects/unicodectype.c' line='241' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToUpperFull'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='257' column='1'/> + <parameter type-id='type-id-581' name='res' filepath='Objects/unicodectype.c' line='257' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToTitleFull' mangled-name='_PyUnicode_ToTitleFull' filepath='Objects/unicodectype.c' line='225' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToTitleFull'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='257' column='1'/> + <parameter type-id='type-id-581' name='res' filepath='Objects/unicodectype.c' line='257' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToLowerFull' mangled-name='_PyUnicode_ToLowerFull' filepath='Objects/unicodectype.c' line='209' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToLowerFull'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='257' column='1'/> + <parameter type-id='type-id-581' name='res' filepath='Objects/unicodectype.c' line='257' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToLowercase' mangled-name='_PyUnicode_ToLowercase' filepath='Objects/unicodectype.c' line='200' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToLowercase'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='200' column='1'/> + <return type-id='type-id-524'/> + </function-decl> + <function-decl name='_PyUnicode_ToUppercase' mangled-name='_PyUnicode_ToUppercase' filepath='Objects/unicodectype.c' line='188' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToUppercase'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='200' column='1'/> + <return type-id='type-id-524'/> + </function-decl> + <function-decl name='_PyUnicode_IsUppercase' mangled-name='_PyUnicode_IsUppercase' filepath='Objects/unicodectype.c' line='178' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsUppercase'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsLowercase' mangled-name='_PyUnicode_IsLowercase' filepath='Objects/unicodectype.c' line='168' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsLowercase'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsPrintable' mangled-name='_PyUnicode_IsPrintable' filepath='Objects/unicodectype.c' line='158' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsPrintable'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsNumeric' mangled-name='_PyUnicode_IsNumeric' filepath='Objects/unicodectype.c' line='138' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsNumeric'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsDigit' mangled-name='_PyUnicode_IsDigit' filepath='Objects/unicodectype.c' line='128' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsDigit'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='128' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToDigit' mangled-name='_PyUnicode_ToDigit' filepath='Objects/unicodectype.c' line='121' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToDigit'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsDecimalDigit' mangled-name='_PyUnicode_IsDecimalDigit' filepath='Objects/unicodectype.c' line='111' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsDecimalDigit'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='128' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToDecimalDigit' mangled-name='_PyUnicode_ToDecimalDigit' filepath='Objects/unicodectype.c' line='104' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToDecimalDigit'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsXidContinue' mangled-name='_PyUnicode_IsXidContinue' filepath='Objects/unicodectype.c' line='94' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsXidContinue'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsXidStart' mangled-name='_PyUnicode_IsXidStart' filepath='Objects/unicodectype.c' line='84' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsXidStart'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsTitlecase' mangled-name='_PyUnicode_IsTitlecase' filepath='Objects/unicodectype.c' line='74' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsTitlecase'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='289' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToTitlecase' mangled-name='_PyUnicode_ToTitlecase' filepath='Objects/unicodectype.c' line='62' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToTitlecase'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodectype.c' line='200' column='1'/> + <return type-id='type-id-524'/> + </function-decl> + <qualified-type-def type-id='type-id-524' const='yes' id='type-id-587'/> + <function-decl name='_PyUnicode_IsLinebreak' mangled-name='_PyUnicode_IsLinebreak' filepath='Objects/unicodetype_db.h' line='6295' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsLinebreak'> + <parameter type-id='type-id-587' name='ch' filepath='Objects/unicodetype_db.h' line='6295' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_IsWhitespace' mangled-name='_PyUnicode_IsWhitespace' filepath='Objects/unicodetype_db.h' line='6254' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_IsWhitespace'> + <parameter type-id='type-id-587' name='ch' filepath='Objects/unicodetype_db.h' line='6295' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_ToNumeric' mangled-name='_PyUnicode_ToNumeric' filepath='Objects/unicodetype_db.h' line='4223' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_ToNumeric'> + <parameter type-id='type-id-524' name='ch' filepath='Objects/unicodetype_db.h' line='4223' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/unionobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyUnion_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_unionobject.h' line='11' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Objects/weakrefobject.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyWeakref_RefType' type-id='type-id-112' mangled-name='_PyWeakref_RefType' visibility='default' filepath='./Include/weakrefobject.h' line='11' column='1' elf-symbol-id='_PyWeakref_RefType'/> + <var-decl name='_PyWeakref_ProxyType' type-id='type-id-112' mangled-name='_PyWeakref_ProxyType' visibility='default' filepath='./Include/weakrefobject.h' line='12' column='1' elf-symbol-id='_PyWeakref_ProxyType'/> + <var-decl name='_PyWeakref_CallableProxyType' type-id='type-id-112' mangled-name='_PyWeakref_CallableProxyType' visibility='default' filepath='./Include/weakrefobject.h' line='13' column='1' elf-symbol-id='_PyWeakref_CallableProxyType'/> + <function-decl name='PyObject_ClearWeakRefs' mangled-name='PyObject_ClearWeakRefs' filepath='Objects/weakrefobject.c' line='945' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_ClearWeakRefs'> + <parameter type-id='type-id-14' name='object' filepath='Objects/weakrefobject.c' line='945' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyWeakref_GetObject' mangled-name='PyWeakref_GetObject' filepath='Objects/weakrefobject.c' line='915' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyWeakref_GetObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyWeakref_NewProxy' mangled-name='PyWeakref_NewProxy' filepath='Objects/weakrefobject.c' line='848' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyWeakref_NewProxy'> + <parameter type-id='type-id-14' name='ob' filepath='Objects/weakrefobject.c' line='848' column='1'/> + <parameter type-id='type-id-14' name='callback' filepath='Objects/weakrefobject.c' line='848' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyWeakref_NewRef' mangled-name='PyWeakref_NewRef' filepath='Objects/weakrefobject.c' line='789' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyWeakref_NewRef'> + <parameter type-id='type-id-14' name='ob' filepath='Objects/weakrefobject.c' line='789' column='1'/> + <parameter type-id='type-id-14' name='callback' filepath='Objects/weakrefobject.c' line='789' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <class-decl name='_PyWeakReference' size-in-bits='512' is-struct='yes' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='8' column='1' id='type-id-588'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='9' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='wr_object' type-id='type-id-14' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='wr_callback' type-id='type-id-14' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='18' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='hash' type-id='type-id-159' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='23' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='wr_prev' type-id='type-id-589' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='30' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='wr_next' type-id='type-id-589' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='31' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='vectorcall' type-id='type-id-106' visibility='default' filepath='./Include/cpython/weakrefobject.h' line='32' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyWeakReference' type-id='type-id-588' filepath='./Include/weakrefobject.h' line='9' column='1' id='type-id-590'/> + <pointer-type-def type-id='type-id-590' size-in-bits='64' id='type-id-589'/> + <function-decl name='_PyWeakref_ClearRef' mangled-name='_PyWeakref_ClearRef' filepath='Objects/weakrefobject.c' line='93' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyWeakref_ClearRef'> + <parameter type-id='type-id-589' name='self' filepath='Objects/weakrefobject.c' line='93' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyWeakref_GetWeakrefCount' mangled-name='_PyWeakref_GetWeakrefCount' filepath='Objects/weakrefobject.c' line='11' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyWeakref_GetWeakrefCount'> + <parameter type-id='type-id-589' name='head' filepath='Objects/weakrefobject.c' line='11' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/_warnings.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyWarnings_Init' mangled-name='_PyWarnings_Init' filepath='Python/_warnings.c' line='1405' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyWarnings_Init'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_WarnExplicitFormat' mangled-name='PyErr_WarnExplicitFormat' filepath='Python/_warnings.c' line='1257' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_WarnExplicitFormat'> + <parameter type-id='type-id-14' name='category' filepath='Python/_warnings.c' line='1257' column='1'/> + <parameter type-id='type-id-3' name='filename_str' filepath='Python/_warnings.c' line='1258' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/_warnings.c' line='1258' column='1'/> + <parameter type-id='type-id-3' name='module_str' filepath='Python/_warnings.c' line='1259' column='1'/> + <parameter type-id='type-id-14' name='registry' filepath='Python/_warnings.c' line='1259' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/_warnings.c' line='1260' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_WarnExplicit' mangled-name='PyErr_WarnExplicit' filepath='Python/_warnings.c' line='1229' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_WarnExplicit'> + <parameter type-id='type-id-14' name='category' filepath='Python/_warnings.c' line='1229' column='1'/> + <parameter type-id='type-id-3' name='text' filepath='Python/_warnings.c' line='1229' column='1'/> + <parameter type-id='type-id-3' name='filename_str' filepath='Python/_warnings.c' line='1230' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/_warnings.c' line='1230' column='1'/> + <parameter type-id='type-id-3' name='module_str' filepath='Python/_warnings.c' line='1231' column='1'/> + <parameter type-id='type-id-14' name='registry' filepath='Python/_warnings.c' line='1231' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_WarnExplicitObject' mangled-name='PyErr_WarnExplicitObject' filepath='Python/_warnings.c' line='1209' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_WarnExplicitObject'> + <parameter type-id='type-id-14' name='category' filepath='Python/_warnings.c' line='1209' column='1'/> + <parameter type-id='type-id-14' name='message' filepath='Python/_warnings.c' line='1209' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/_warnings.c' line='1210' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/_warnings.c' line='1210' column='1'/> + <parameter type-id='type-id-14' name='module' filepath='Python/_warnings.c' line='1211' column='1'/> + <parameter type-id='type-id-14' name='registry' filepath='Python/_warnings.c' line='1211' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_WarnEx' mangled-name='PyErr_WarnEx' filepath='Python/_warnings.c' line='1185' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_WarnEx'> + <parameter type-id='type-id-14' name='category' filepath='Python/_warnings.c' line='1185' column='1'/> + <parameter type-id='type-id-3' name='text' filepath='Python/_warnings.c' line='1185' column='1'/> + <parameter type-id='type-id-36' name='stack_level' filepath='Python/_warnings.c' line='1185' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_ResourceWarning' mangled-name='PyErr_ResourceWarning' filepath='Python/_warnings.c' line='1166' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_ResourceWarning'> + <parameter type-id='type-id-14' name='source' filepath='Python/_warnings.c' line='1166' column='1'/> + <parameter type-id='type-id-36' name='stack_level' filepath='Python/_warnings.c' line='1166' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/_warnings.c' line='1167' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_WarnFormat' mangled-name='PyErr_WarnFormat' filepath='Python/_warnings.c' line='1132' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_WarnFormat'> + <parameter type-id='type-id-14' name='source' filepath='Python/_warnings.c' line='1166' column='1'/> + <parameter type-id='type-id-36' name='stack_level' filepath='Python/_warnings.c' line='1166' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/_warnings.c' line='1167' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/Python-ast.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__ast' mangled-name='PyInit__ast' filepath='Python/Python-ast.c' line='12305' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__ast'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/Python-tokenize.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__tokenize' mangled-name='PyInit__tokenize' filepath='Python/Python-tokenize.c' line='191' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__tokenize'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/bltinmodule.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyFilter_Type' type-id='type-id-112' mangled-name='PyFilter_Type' visibility='default' filepath='./Include/bltinmodule.h' line='7' column='1' elf-symbol-id='PyFilter_Type'/> + <var-decl name='PyMap_Type' type-id='type-id-112' mangled-name='PyMap_Type' visibility='default' filepath='./Include/bltinmodule.h' line='8' column='1' elf-symbol-id='PyMap_Type'/> + <var-decl name='PyZip_Type' type-id='type-id-112' mangled-name='PyZip_Type' visibility='default' filepath='./Include/bltinmodule.h' line='9' column='1' elf-symbol-id='PyZip_Type'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/ceval.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='Py_LeaveRecursiveCall' mangled-name='Py_LeaveRecursiveCall' filepath='Python/ceval.c' line='7954' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_LeaveRecursiveCall'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_EnterRecursiveCall' mangled-name='Py_EnterRecursiveCall' filepath='Python/ceval.c' line='7947' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_EnterRecursiveCall'> + <parameter type-id='type-id-3' name='where' filepath='Python/ceval.c' line='7947' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyEval_RequestCodeExtraIndex' mangled-name='_PyEval_RequestCodeExtraIndex' filepath='Python/ceval.c' line='7866' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_RequestCodeExtraIndex'> + <parameter type-id='type-id-104' name='free' filepath='Python/ceval.c' line='7866' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_PyEval_SliceIndexNotNone' mangled-name='_PyEval_SliceIndexNotNone' filepath='Python/ceval.c' line='7386' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_SliceIndexNotNone'> + <parameter type-id='type-id-14' name='exc' filepath='Objects/exceptions.c' line='2704' column='1'/> + <parameter type-id='type-id-168' name='end' filepath='Objects/exceptions.c' line='2704' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyEval_SliceIndex' mangled-name='_PyEval_SliceIndex' filepath='Python/ceval.c' line='7364' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_SliceIndex'> + <parameter type-id='type-id-14' name='v' filepath='Python/ceval.c' line='7364' column='1'/> + <parameter type-id='type-id-168' name='pi' filepath='Python/ceval.c' line='7364' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyEval_GetFuncDesc' mangled-name='PyEval_GetFuncDesc' filepath='Python/ceval.c' line='7237' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_GetFuncDesc'> + <parameter type-id='type-id-14' name='ob' filepath='Objects/exceptions.c' line='421' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyEval_GetFuncName' mangled-name='PyEval_GetFuncName' filepath='Python/ceval.c' line='7224' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_GetFuncName'> + <parameter type-id='type-id-14' name='ob' filepath='Objects/exceptions.c' line='421' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-591' visibility='default' filepath='./Include/cpython/compile.h' line='26' column='1' id='type-id-592'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='cf_flags' type-id='type-id-8' visibility='default' filepath='./Include/cpython/compile.h' line='27' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='cf_feature_version' type-id='type-id-8' visibility='default' filepath='./Include/cpython/compile.h' line='28' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyCompilerFlags' type-id='type-id-592' filepath='./Include/cpython/compile.h' line='29' column='1' id='type-id-591'/> + <pointer-type-def type-id='type-id-591' size-in-bits='64' id='type-id-593'/> + <function-decl name='PyEval_MergeCompilerFlags' mangled-name='PyEval_MergeCompilerFlags' filepath='Python/ceval.c' line='7205' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_MergeCompilerFlags'> + <parameter type-id='type-id-593' name='cf' filepath='Python/ceval.c' line='7205' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyEval_GetGlobals' mangled-name='PyEval_GetGlobals' filepath='Python/ceval.c' line='7194' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_GetGlobals'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_GetLocals' mangled-name='PyEval_GetLocals' filepath='Python/ceval.c' line='7175' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_GetLocals'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyEval_GetBuiltinId' mangled-name='_PyEval_GetBuiltinId' filepath='Python/ceval.c' line='7169' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_GetBuiltinId'> + <parameter type-id='type-id-499' name='name' filepath='Python/ceval.c' line='7169' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyEval_GetBuiltin' mangled-name='_PyEval_GetBuiltin' filepath='Python/ceval.c' line='7155' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_GetBuiltin'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_GetBuiltins' mangled-name='PyEval_GetBuiltins' filepath='Python/ceval.c' line='7147' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_GetBuiltins'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_GetFrame' mangled-name='PyEval_GetFrame' filepath='Python/ceval.c' line='7123' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_GetFrame'> + <return type-id='type-id-438'/> + </function-decl> + <function-decl name='PyEval_SetTrace' mangled-name='PyEval_SetTrace' filepath='Python/ceval.c' line='7043' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_SetTrace'> + <parameter type-id='type-id-13' name='func' filepath='Python/ceval.c' line='7043' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Python/ceval.c' line='7043' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <class-decl name='_ts' size-in-bits='2880' is-struct='yes' visibility='default' filepath='./Include/cpython/pystate.h' line='82' column='1' id='type-id-594'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='prev' type-id='type-id-10' visibility='default' filepath='./Include/cpython/pystate.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='next' type-id='type-id-10' visibility='default' filepath='./Include/cpython/pystate.h' line='86' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='interp' type-id='type-id-11' visibility='default' filepath='./Include/cpython/pystate.h' line='87' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='_initialized' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='_static' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='96' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='recursion_remaining' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='98' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='recursion_limit' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='99' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='recursion_headroom' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='352'> + <var-decl name='tracing' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='105' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='tracing_what' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='106' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='cframe' type-id='type-id-595' visibility='default' filepath='./Include/cpython/pystate.h' line='110' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='c_profilefunc' type-id='type-id-13' visibility='default' filepath='./Include/cpython/pystate.h' line='112' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='c_tracefunc' type-id='type-id-13' visibility='default' filepath='./Include/cpython/pystate.h' line='113' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='c_profileobj' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='c_traceobj' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='115' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='curexc_type' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='118' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='curexc_value' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='119' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='curexc_traceback' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='120' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='exc_info' type-id='type-id-15' visibility='default' filepath='./Include/cpython/pystate.h' line='125' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1024'> + <var-decl name='dict' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='127' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1088'> + <var-decl name='gilstate_counter' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='129' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1152'> + <var-decl name='async_exc' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='131' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1216'> + <var-decl name='thread_id' type-id='type-id-16' visibility='default' filepath='./Include/cpython/pystate.h' line='132' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1280'> + <var-decl name='native_thread_id' type-id='type-id-16' visibility='default' filepath='./Include/cpython/pystate.h' line='138' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1344'> + <var-decl name='trash_delete_nesting' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='140' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1408'> + <var-decl name='trash_delete_later' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='141' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1472'> + <var-decl name='on_delete' type-id='type-id-17' visibility='default' filepath='./Include/cpython/pystate.h' line='166' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1536'> + <var-decl name='on_delete_data' type-id='type-id-18' visibility='default' filepath='./Include/cpython/pystate.h' line='167' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1600'> + <var-decl name='coroutine_origin_tracking_depth' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pystate.h' line='169' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1664'> + <var-decl name='async_gen_firstiter' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='171' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1728'> + <var-decl name='async_gen_finalizer' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='172' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1792'> + <var-decl name='context' type-id='type-id-14' visibility='default' filepath='./Include/cpython/pystate.h' line='174' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1856'> + <var-decl name='context_ver' type-id='type-id-19' visibility='default' filepath='./Include/cpython/pystate.h' line='175' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1920'> + <var-decl name='id' type-id='type-id-19' visibility='default' filepath='./Include/cpython/pystate.h' line='178' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='1984'> + <var-decl name='trace_info' type-id='type-id-20' visibility='default' filepath='./Include/cpython/pystate.h' line='180' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2368'> + <var-decl name='datastack_chunk' type-id='type-id-21' visibility='default' filepath='./Include/cpython/pystate.h' line='182' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2432'> + <var-decl name='datastack_top' type-id='type-id-22' visibility='default' filepath='./Include/cpython/pystate.h' line='183' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2496'> + <var-decl name='datastack_limit' type-id='type-id-22' visibility='default' filepath='./Include/cpython/pystate.h' line='184' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2560'> + <var-decl name='exc_state' type-id='type-id-23' visibility='default' filepath='./Include/cpython/pystate.h' line='199' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='2688'> + <var-decl name='root_cframe' type-id='type-id-24' visibility='default' filepath='./Include/cpython/pystate.h' line='202' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-24' size-in-bits='64' id='type-id-595'/> + <function-decl name='_PyEval_SetTrace' mangled-name='_PyEval_SetTrace' filepath='Python/ceval.c' line='7000' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_SetTrace'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='7000' column='1'/> + <parameter type-id='type-id-13' name='func' filepath='Python/ceval.c' line='7000' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Python/ceval.c' line='7000' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyEval_SetProfile' mangled-name='PyEval_SetProfile' filepath='Python/ceval.c' line='6990' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_SetProfile'> + <parameter type-id='type-id-13' name='func' filepath='Python/ceval.c' line='7043' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Python/ceval.c' line='7043' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyEval_SetProfile' mangled-name='_PyEval_SetProfile' filepath='Python/ceval.c' line='6948' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_SetProfile'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='7000' column='1'/> + <parameter type-id='type-id-13' name='func' filepath='Python/ceval.c' line='7000' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Python/ceval.c' line='7000' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThreadState_LeaveTracing' mangled-name='PyThreadState_LeaveTracing' filepath='Python/ceval.c' line='6852' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_LeaveTracing'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2291' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThreadState_EnterTracing' mangled-name='PyThreadState_EnterTracing' filepath='Python/ceval.c' line='6846' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_EnterTracing'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2291' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_EvalCodeEx' mangled-name='PyEval_EvalCodeEx' filepath='Python/ceval.c' line='6449' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_EvalCodeEx'> + <parameter type-id='type-id-14' name='_co' filepath='Python/ceval.c' line='6449' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Python/ceval.c' line='6449' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Python/ceval.c' line='6449' column='1'/> + <parameter type-id='type-id-200' name='args' filepath='Python/ceval.c' line='6450' column='1'/> + <parameter type-id='type-id-8' name='argcount' filepath='Python/ceval.c' line='6450' column='1'/> + <parameter type-id='type-id-200' name='kws' filepath='Python/ceval.c' line='6451' column='1'/> + <parameter type-id='type-id-8' name='kwcount' filepath='Python/ceval.c' line='6451' column='1'/> + <parameter type-id='type-id-200' name='defs' filepath='Python/ceval.c' line='6452' column='1'/> + <parameter type-id='type-id-8' name='defcount' filepath='Python/ceval.c' line='6452' column='1'/> + <parameter type-id='type-id-14' name='kwdefs' filepath='Python/ceval.c' line='6453' column='1'/> + <parameter type-id='type-id-14' name='closure' filepath='Python/ceval.c' line='6453' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <typedef-decl name='_PyInterpreterFrame' type-id='type-id-375' filepath='./Include/internal/pycore_frame.h' line='67' column='1' id='type-id-596'/> + <pointer-type-def type-id='type-id-596' size-in-bits='64' id='type-id-597'/> + <function-decl name='_PyEval_EvalFrameDefault' mangled-name='_PyEval_EvalFrameDefault' filepath='Python/ceval.c' line='1647' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_EvalFrameDefault'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='1647' column='1'/> + <parameter type-id='type-id-597' name='frame' filepath='Python/ceval.c' line='1647' column='1'/> + <parameter type-id='type-id-8' name='throwflag' filepath='Python/ceval.c' line='1647' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_EvalFrameEx' mangled-name='PyEval_EvalFrameEx' filepath='Python/ceval.c' line='1171' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_EvalFrameEx'> + <parameter type-id='type-id-438' name='f' filepath='Python/ceval.c' line='1171' column='1'/> + <parameter type-id='type-id-8' name='throwflag' filepath='Python/ceval.c' line='1171' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_EvalFrame' mangled-name='PyEval_EvalFrame' filepath='Python/ceval.c' line='1163' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_EvalFrame'> + <parameter type-id='type-id-438' name='frame' filepath='Objects/frameobject.c' line='1207' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyEval_EvalCode' mangled-name='PyEval_EvalCode' filepath='Python/ceval.c' line='1130' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_EvalCode'> + <parameter type-id='type-id-14' name='co' filepath='Python/ceval.c' line='1130' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Python/ceval.c' line='1130' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Python/ceval.c' line='1130' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_CheckRecursiveCall' mangled-name='_Py_CheckRecursiveCall' filepath='Python/ceval.c' line='833' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_CheckRecursiveCall'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='833' column='1'/> + <parameter type-id='type-id-3' name='where' filepath='Python/ceval.c' line='833' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_SetRecursionLimit' mangled-name='Py_SetRecursionLimit' filepath='Python/ceval.c' line='819' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_SetRecursionLimit'> + <parameter type-id='type-id-8' name='new_limit' filepath='Python/ceval.c' line='819' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_GetRecursionLimit' mangled-name='Py_GetRecursionLimit' filepath='Python/ceval.c' line='812' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetRecursionLimit'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_MakePendingCalls' mangled-name='Py_MakePendingCalls' filepath='Python/ceval.c' line='762' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_MakePendingCalls'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_AddPendingCall' mangled-name='Py_AddPendingCall' filepath='Python/ceval.c' line='641' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_AddPendingCall'> + <parameter type-id='type-id-364' name='func' filepath='Python/ceval.c' line='641' column='1'/> + <parameter type-id='type-id-18' name='arg' filepath='Python/ceval.c' line='641' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyEval_AddPendingCall' mangled-name='_PyEval_AddPendingCall' filepath='Python/ceval.c' line='622' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_AddPendingCall'> + <parameter type-id='type-id-11' name='interp' filepath='Python/ceval.c' line='622' column='1'/> + <parameter type-id='type-id-364' name='func' filepath='Python/ceval.c' line='623' column='1'/> + <parameter type-id='type-id-18' name='arg' filepath='Python/ceval.c' line='623' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyEval_SignalReceived' mangled-name='_PyEval_SignalReceived' filepath='Python/ceval.c' line='565' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_SignalReceived'> + <parameter type-id='type-id-11' name='interp' filepath='Python/ceval.c' line='565' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_RestoreThread' mangled-name='PyEval_RestoreThread' filepath='Python/ceval.c' line='531' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_RestoreThread'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='531' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_SaveThread' mangled-name='PyEval_SaveThread' filepath='Python/ceval.c' line='517' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_SaveThread'> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='_PyEval_SignalAsyncExc' mangled-name='_PyEval_SignalAsyncExc' filepath='Python/ceval.c' line='511' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_SignalAsyncExc'> + <parameter type-id='type-id-11' name='interp' filepath='Python/ceval.c' line='511' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_ReleaseThread' mangled-name='PyEval_ReleaseThread' filepath='Python/ceval.c' line='465' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_ReleaseThread'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='465' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_AcquireThread' mangled-name='PyEval_AcquireThread' filepath='Python/ceval.c' line='452' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_AcquireThread'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='531' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_ReleaseLock' mangled-name='PyEval_ReleaseLock' filepath='Python/ceval.c' line='431' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_ReleaseLock'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_AcquireLock' mangled-name='PyEval_AcquireLock' filepath='Python/ceval.c' line='421' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_AcquireLock'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_InitThreads' mangled-name='PyEval_InitThreads' filepath='Python/ceval.c' line='407' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_InitThreads'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyEval_ThreadsInitialized' mangled-name='PyEval_ThreadsInitialized' filepath='Python/ceval.c' line='357' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyEval_ThreadsInitialized'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_FatalError_TstateNULL' mangled-name='_Py_FatalError_TstateNULL' filepath='Python/ceval.c' line='342' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_FatalError_TstateNULL'> + <parameter type-id='type-id-3' name='func' filepath='Python/ceval.c' line='342' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyEval_GetSwitchInterval' mangled-name='_PyEval_GetSwitchInterval' filepath='Python/ceval_gil.h' line='327' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_GetSwitchInterval'> + <return type-id='type-id-16'/> + </function-decl> + <function-decl name='_PyEval_SetSwitchInterval' mangled-name='_PyEval_SetSwitchInterval' filepath='Python/ceval_gil.h' line='321' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyEval_SetSwitchInterval'> + <parameter type-id='type-id-16' name='microseconds' filepath='Python/ceval_gil.h' line='321' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/codecs.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='Py_hexdigits' type-id='type-id-3' mangled-name='Py_hexdigits' visibility='default' filepath='./Include/codecs.h' line='242' column='1' elf-symbol-id='Py_hexdigits'/> + <function-decl name='PyCodec_NameReplaceErrors' mangled-name='PyCodec_NameReplaceErrors' filepath='Python/codecs.c' line='959' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_NameReplaceErrors'> + <parameter type-id='type-id-14' name='exc' filepath='Python/codecs.c' line='959' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_BackslashReplaceErrors' mangled-name='PyCodec_BackslashReplaceErrors' filepath='Python/codecs.c' line='850' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_BackslashReplaceErrors'> + <parameter type-id='type-id-14' name='exc' filepath='Python/codecs.c' line='850' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_XMLCharRefReplaceErrors' mangled-name='PyCodec_XMLCharRefReplaceErrors' filepath='Python/codecs.c' line='752' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_XMLCharRefReplaceErrors'> + <parameter type-id='type-id-14' name='exc' filepath='Python/codecs.c' line='959' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_ReplaceErrors' mangled-name='PyCodec_ReplaceErrors' filepath='Python/codecs.c' line='699' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_ReplaceErrors'> + <parameter type-id='type-id-14' name='o' filepath='Objects/dictobject.c' line='3013' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_IgnoreErrors' mangled-name='PyCodec_IgnoreErrors' filepath='Python/codecs.c' line='675' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_IgnoreErrors'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_StrictErrors' mangled-name='PyCodec_StrictErrors' filepath='Python/codecs.c' line='665' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_StrictErrors'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_LookupError' mangled-name='PyCodec_LookupError' filepath='Python/codecs.c' line='638' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_LookupError'> + <parameter type-id='type-id-3' name='str' filepath='Objects/bytesobject.c' line='147' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_RegisterError' mangled-name='PyCodec_RegisterError' filepath='Python/codecs.c' line='622' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_RegisterError'> + <parameter type-id='type-id-3' name='name' filepath='Python/codecs.c' line='622' column='1'/> + <parameter type-id='type-id-14' name='error' filepath='Python/codecs.c' line='622' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyCodec_DecodeText' mangled-name='_PyCodec_DecodeText' filepath='Python/codecs.c' line='603' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCodec_DecodeText'> + <parameter type-id='type-id-14' name='object' filepath='Python/codecs.c' line='603' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='604' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='605' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyCodec_EncodeText' mangled-name='_PyCodec_EncodeText' filepath='Python/codecs.c' line='590' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCodec_EncodeText'> + <parameter type-id='type-id-14' name='object' filepath='Python/codecs.c' line='603' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='604' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='605' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyCodec_LookupTextEncoding' mangled-name='_PyCodec_LookupTextEncoding' filepath='Python/codecs.c' line='522' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCodec_LookupTextEncoding'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='522' column='1'/> + <parameter type-id='type-id-3' name='alternate_command' filepath='Python/codecs.c' line='523' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_Decode' mangled-name='PyCodec_Decode' filepath='Python/codecs.c' line='508' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_Decode'> + <parameter type-id='type-id-14' name='object' filepath='Python/codecs.c' line='603' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='604' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='605' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_Encode' mangled-name='PyCodec_Encode' filepath='Python/codecs.c' line='495' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_Encode'> + <parameter type-id='type-id-14' name='object' filepath='Python/codecs.c' line='603' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='604' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='605' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_StreamWriter' mangled-name='PyCodec_StreamWriter' filepath='Python/codecs.c' line='380' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_StreamWriter'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='380' column='1'/> + <parameter type-id='type-id-14' name='stream' filepath='Python/codecs.c' line='381' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='382' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_StreamReader' mangled-name='PyCodec_StreamReader' filepath='Python/codecs.c' line='373' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_StreamReader'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='380' column='1'/> + <parameter type-id='type-id-14' name='stream' filepath='Python/codecs.c' line='381' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='382' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_IncrementalDecoder' mangled-name='PyCodec_IncrementalDecoder' filepath='Python/codecs.c' line='367' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_IncrementalDecoder'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='367' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='368' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_IncrementalEncoder' mangled-name='PyCodec_IncrementalEncoder' filepath='Python/codecs.c' line='361' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_IncrementalEncoder'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='367' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='368' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_Decoder' mangled-name='PyCodec_Decoder' filepath='Python/codecs.c' line='356' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_Decoder'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_Encoder' mangled-name='PyCodec_Encoder' filepath='Python/codecs.c' line='351' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_Encoder'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyCodecInfo_GetIncrementalEncoder' mangled-name='_PyCodecInfo_GetIncrementalEncoder' filepath='Python/codecs.c' line='337' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCodecInfo_GetIncrementalEncoder'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyCodecInfo_GetIncrementalDecoder' mangled-name='_PyCodecInfo_GetIncrementalDecoder' filepath='Python/codecs.c' line='330' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCodecInfo_GetIncrementalDecoder'> + <parameter type-id='type-id-14' name='unicode' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Objects/unicodeobject.c' line='7356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_KnownEncoding' mangled-name='PyCodec_KnownEncoding' filepath='Python/codecs.c' line='214' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_KnownEncoding'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='214' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyCodec_Lookup' mangled-name='_PyCodec_Lookup' filepath='Python/codecs.c' line='127' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCodec_Lookup'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='127' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCodec_Unregister' mangled-name='PyCodec_Unregister' filepath='Python/codecs.c' line='55' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_Unregister'> + <parameter type-id='type-id-14' name='search_function' filepath='Python/codecs.c' line='55' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCodec_Register' mangled-name='PyCodec_Register' filepath='Python/codecs.c' line='35' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCodec_Register'> + <parameter type-id='type-id-14' name='search_function' filepath='Python/codecs.c' line='35' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/compile.c' comp-dir-path='/src' language='LANG_C99'> + + <array-type-def dimensions='1' type-id='type-id-451' size-in-bits='2048' id='type-id-598'> + <subrange length='256' type-id='type-id-16' id='type-id-264'/> + + </array-type-def> + <qualified-type-def type-id='type-id-598' const='yes' id='type-id-599'/> + <var-decl name='_PyOpcode_Caches' type-id='type-id-599' visibility='default' filepath='./Include/internal/pycore_opcode.h' line='15' column='1'/> + <var-decl name='_PyOpcode_Deopt' type-id='type-id-599' visibility='default' filepath='./Include/internal/pycore_opcode.h' line='17' column='1'/> + <function-decl name='PyCode_Optimize' mangled-name='PyCode_Optimize' filepath='Python/compile.c' line='9389' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCode_Optimize'> + <parameter type-id='type-id-14' name='code' filepath='Python/compile.c' line='9389' column='1'/> + <parameter type-id='type-id-14' name='_unused_consts' filepath='Python/compile.c' line='9389' column='1'/> + <parameter type-id='type-id-14' name='_unused_names' filepath='Python/compile.c' line='9390' column='1'/> + <parameter type-id='type-id-14' name='_unused_lnotab_obj' filepath='Python/compile.c' line='9390' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyCompile_OpcodeStackEffect' mangled-name='PyCompile_OpcodeStackEffect' filepath='Python/compile.c' line='1206' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCompile_OpcodeStackEffect'> + <parameter type-id='type-id-8' name='c1' filepath='Parser/token.c' line='110' column='1'/> + <parameter type-id='type-id-8' name='c2' filepath='Parser/token.c' line='110' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyCompile_OpcodeStackEffectWithJump' mangled-name='PyCompile_OpcodeStackEffectWithJump' filepath='Python/compile.c' line='1200' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyCompile_OpcodeStackEffectWithJump'> + <parameter type-id='type-id-8' name='c1' filepath='Parser/token.c' line='194' column='1'/> + <parameter type-id='type-id-8' name='c2' filepath='Parser/token.c' line='194' column='1'/> + <parameter type-id='type-id-8' name='c3' filepath='Parser/token.c' line='194' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <class-decl name='_mod' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='153' column='1' id='type-id-600'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='kind' type-id='type-id-601' visibility='default' filepath='./Include/internal/pycore_ast.h' line='154' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='v' type-id='type-id-602' visibility='default' filepath='./Include/internal/pycore_ast.h' line='174' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_mod_kind' filepath='./Include/internal/pycore_ast.h' line='151' column='1' id='type-id-601'> + <underlying-type type-id='type-id-126'/> + <enumerator name='Module_kind' value='1'/> + <enumerator name='Interactive_kind' value='2'/> + <enumerator name='Expression_kind' value='3'/> + <enumerator name='FunctionType_kind' value='4'/> + </enum-decl> + <union-decl name='__anonymous_union__' size-in-bits='128' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='155' column='1' id='type-id-602'> + <data-member access='private'> + <var-decl name='Module' type-id='type-id-603' visibility='default' filepath='./Include/internal/pycore_ast.h' line='159' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Interactive' type-id='type-id-604' visibility='default' filepath='./Include/internal/pycore_ast.h' line='163' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Expression' type-id='type-id-605' visibility='default' filepath='./Include/internal/pycore_ast.h' line='167' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='FunctionType' type-id='type-id-606' visibility='default' filepath='./Include/internal/pycore_ast.h' line='172' column='1'/> + </data-member> + </union-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='156' column='1' id='type-id-603'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='157' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='type_ignores' type-id='type-id-608' visibility='default' filepath='./Include/internal/pycore_ast.h' line='158' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-609' visibility='default' filepath='./Include/internal/pycore_ast.h' line='62' column='1' id='type-id-610'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='63' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='63' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-611' visibility='default' filepath='./Include/internal/pycore_ast.h' line='64' column='1'/> + </data-member> + </class-decl> + <class-decl name='_stmt' size-in-bits='576' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='185' column='1' id='type-id-612'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='kind' type-id='type-id-613' visibility='default' filepath='./Include/internal/pycore_ast.h' line='186' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='v' type-id='type-id-614' visibility='default' filepath='./Include/internal/pycore_ast.h' line='332' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='333' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='480'> + <var-decl name='col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='334' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='335' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='544'> + <var-decl name='end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='336' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_stmt_kind' filepath='./Include/internal/pycore_ast.h' line='177' column='1' id='type-id-613'> + <underlying-type type-id='type-id-126'/> + <enumerator name='FunctionDef_kind' value='1'/> + <enumerator name='AsyncFunctionDef_kind' value='2'/> + <enumerator name='ClassDef_kind' value='3'/> + <enumerator name='Return_kind' value='4'/> + <enumerator name='Delete_kind' value='5'/> + <enumerator name='Assign_kind' value='6'/> + <enumerator name='AugAssign_kind' value='7'/> + <enumerator name='AnnAssign_kind' value='8'/> + <enumerator name='For_kind' value='9'/> + <enumerator name='AsyncFor_kind' value='10'/> + <enumerator name='While_kind' value='11'/> + <enumerator name='If_kind' value='12'/> + <enumerator name='With_kind' value='13'/> + <enumerator name='AsyncWith_kind' value='14'/> + <enumerator name='Match_kind' value='15'/> + <enumerator name='Raise_kind' value='16'/> + <enumerator name='Try_kind' value='17'/> + <enumerator name='TryStar_kind' value='18'/> + <enumerator name='Assert_kind' value='19'/> + <enumerator name='Import_kind' value='20'/> + <enumerator name='ImportFrom_kind' value='21'/> + <enumerator name='Global_kind' value='22'/> + <enumerator name='Nonlocal_kind' value='23'/> + <enumerator name='Expr_kind' value='24'/> + <enumerator name='Pass_kind' value='25'/> + <enumerator name='Break_kind' value='26'/> + <enumerator name='Continue_kind' value='27'/> + </enum-decl> + <union-decl name='__anonymous_union__' size-in-bits='384' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='187' column='1' id='type-id-614'> + <data-member access='private'> + <var-decl name='FunctionDef' type-id='type-id-615' visibility='default' filepath='./Include/internal/pycore_ast.h' line='195' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='AsyncFunctionDef' type-id='type-id-615' visibility='default' filepath='./Include/internal/pycore_ast.h' line='204' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='ClassDef' type-id='type-id-616' visibility='default' filepath='./Include/internal/pycore_ast.h' line='212' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Return' type-id='type-id-617' visibility='default' filepath='./Include/internal/pycore_ast.h' line='216' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Delete' type-id='type-id-618' visibility='default' filepath='./Include/internal/pycore_ast.h' line='220' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Assign' type-id='type-id-619' visibility='default' filepath='./Include/internal/pycore_ast.h' line='226' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='AugAssign' type-id='type-id-620' visibility='default' filepath='./Include/internal/pycore_ast.h' line='232' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='AnnAssign' type-id='type-id-621' visibility='default' filepath='./Include/internal/pycore_ast.h' line='239' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='For' type-id='type-id-622' visibility='default' filepath='./Include/internal/pycore_ast.h' line='247' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='AsyncFor' type-id='type-id-622' visibility='default' filepath='./Include/internal/pycore_ast.h' line='255' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='While' type-id='type-id-623' visibility='default' filepath='./Include/internal/pycore_ast.h' line='261' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='If' type-id='type-id-623' visibility='default' filepath='./Include/internal/pycore_ast.h' line='267' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='With' type-id='type-id-624' visibility='default' filepath='./Include/internal/pycore_ast.h' line='273' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='AsyncWith' type-id='type-id-624' visibility='default' filepath='./Include/internal/pycore_ast.h' line='279' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Match' type-id='type-id-625' visibility='default' filepath='./Include/internal/pycore_ast.h' line='284' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Raise' type-id='type-id-626' visibility='default' filepath='./Include/internal/pycore_ast.h' line='289' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Try' type-id='type-id-627' visibility='default' filepath='./Include/internal/pycore_ast.h' line='296' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='TryStar' type-id='type-id-627' visibility='default' filepath='./Include/internal/pycore_ast.h' line='303' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Assert' type-id='type-id-628' visibility='default' filepath='./Include/internal/pycore_ast.h' line='308' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Import' type-id='type-id-629' visibility='default' filepath='./Include/internal/pycore_ast.h' line='312' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='ImportFrom' type-id='type-id-630' visibility='default' filepath='./Include/internal/pycore_ast.h' line='318' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Global' type-id='type-id-631' visibility='default' filepath='./Include/internal/pycore_ast.h' line='322' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Nonlocal' type-id='type-id-631' visibility='default' filepath='./Include/internal/pycore_ast.h' line='326' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Expr' type-id='type-id-617' visibility='default' filepath='./Include/internal/pycore_ast.h' line='330' column='1'/> + </data-member> + </union-decl> + <class-decl name='__anonymous_struct__' size-in-bits='384' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='188' column='1' id='type-id-615'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='189' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='args' type-id='type-id-633' visibility='default' filepath='./Include/internal/pycore_ast.h' line='190' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='191' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='decorator_list' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='192' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='returns' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='193' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='type_comment' type-id='type-id-636' visibility='default' filepath='./Include/internal/pycore_ast.h' line='194' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='identifier' type-id='type-id-14' filepath='./Include/internal/pycore_asdl.h' line='13' column='1' id='type-id-632'/> + <class-decl name='_arguments' size-in-bits='448' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='520' column='1' id='type-id-637'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='posonlyargs' type-id='type-id-638' visibility='default' filepath='./Include/internal/pycore_ast.h' line='521' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='args' type-id='type-id-638' visibility='default' filepath='./Include/internal/pycore_ast.h' line='522' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='vararg' type-id='type-id-639' visibility='default' filepath='./Include/internal/pycore_ast.h' line='523' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='kwonlyargs' type-id='type-id-638' visibility='default' filepath='./Include/internal/pycore_ast.h' line='524' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='kw_defaults' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='525' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='kwarg' type-id='type-id-639' visibility='default' filepath='./Include/internal/pycore_ast.h' line='526' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='defaults' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='527' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-640' visibility='default' filepath='./Include/internal/pycore_ast.h' line='99' column='1' id='type-id-641'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='100' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-642' visibility='default' filepath='./Include/internal/pycore_ast.h' line='101' column='1'/> + </data-member> + </class-decl> + <class-decl name='_arg' size-in-bits='320' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='530' column='1' id='type-id-643'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='arg' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='531' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='annotation' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='532' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='type_comment' type-id='type-id-636' visibility='default' filepath='./Include/internal/pycore_ast.h' line='533' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='534' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='535' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='536' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='537' column='1'/> + </data-member> + </class-decl> + <class-decl name='_expr' size-in-bits='384' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='347' column='1' id='type-id-644'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='kind' type-id='type-id-645' visibility='default' filepath='./Include/internal/pycore_ast.h' line='348' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='v' type-id='type-id-646' visibility='default' filepath='./Include/internal/pycore_ast.h' line='489' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='490' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='491' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='492' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='352'> + <var-decl name='end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='493' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_expr_kind' filepath='./Include/internal/pycore_ast.h' line='339' column='1' id='type-id-645'> + <underlying-type type-id='type-id-126'/> + <enumerator name='BoolOp_kind' value='1'/> + <enumerator name='NamedExpr_kind' value='2'/> + <enumerator name='BinOp_kind' value='3'/> + <enumerator name='UnaryOp_kind' value='4'/> + <enumerator name='Lambda_kind' value='5'/> + <enumerator name='IfExp_kind' value='6'/> + <enumerator name='Dict_kind' value='7'/> + <enumerator name='Set_kind' value='8'/> + <enumerator name='ListComp_kind' value='9'/> + <enumerator name='SetComp_kind' value='10'/> + <enumerator name='DictComp_kind' value='11'/> + <enumerator name='GeneratorExp_kind' value='12'/> + <enumerator name='Await_kind' value='13'/> + <enumerator name='Yield_kind' value='14'/> + <enumerator name='YieldFrom_kind' value='15'/> + <enumerator name='Compare_kind' value='16'/> + <enumerator name='Call_kind' value='17'/> + <enumerator name='FormattedValue_kind' value='18'/> + <enumerator name='JoinedStr_kind' value='19'/> + <enumerator name='Constant_kind' value='20'/> + <enumerator name='Attribute_kind' value='21'/> + <enumerator name='Subscript_kind' value='22'/> + <enumerator name='Starred_kind' value='23'/> + <enumerator name='Name_kind' value='24'/> + <enumerator name='List_kind' value='25'/> + <enumerator name='Tuple_kind' value='26'/> + <enumerator name='Slice_kind' value='27'/> + </enum-decl> + <union-decl name='__anonymous_union__' size-in-bits='192' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='349' column='1' id='type-id-646'> + <data-member access='private'> + <var-decl name='BoolOp' type-id='type-id-647' visibility='default' filepath='./Include/internal/pycore_ast.h' line='353' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='NamedExpr' type-id='type-id-648' visibility='default' filepath='./Include/internal/pycore_ast.h' line='358' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='BinOp' type-id='type-id-649' visibility='default' filepath='./Include/internal/pycore_ast.h' line='364' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='UnaryOp' type-id='type-id-650' visibility='default' filepath='./Include/internal/pycore_ast.h' line='369' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Lambda' type-id='type-id-651' visibility='default' filepath='./Include/internal/pycore_ast.h' line='374' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='IfExp' type-id='type-id-652' visibility='default' filepath='./Include/internal/pycore_ast.h' line='380' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Dict' type-id='type-id-653' visibility='default' filepath='./Include/internal/pycore_ast.h' line='385' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Set' type-id='type-id-654' visibility='default' filepath='./Include/internal/pycore_ast.h' line='389' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='ListComp' type-id='type-id-655' visibility='default' filepath='./Include/internal/pycore_ast.h' line='394' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='SetComp' type-id='type-id-655' visibility='default' filepath='./Include/internal/pycore_ast.h' line='399' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='DictComp' type-id='type-id-656' visibility='default' filepath='./Include/internal/pycore_ast.h' line='405' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='GeneratorExp' type-id='type-id-655' visibility='default' filepath='./Include/internal/pycore_ast.h' line='410' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Await' type-id='type-id-617' visibility='default' filepath='./Include/internal/pycore_ast.h' line='414' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Yield' type-id='type-id-617' visibility='default' filepath='./Include/internal/pycore_ast.h' line='418' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='YieldFrom' type-id='type-id-617' visibility='default' filepath='./Include/internal/pycore_ast.h' line='422' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Compare' type-id='type-id-657' visibility='default' filepath='./Include/internal/pycore_ast.h' line='428' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Call' type-id='type-id-658' visibility='default' filepath='./Include/internal/pycore_ast.h' line='434' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='FormattedValue' type-id='type-id-659' visibility='default' filepath='./Include/internal/pycore_ast.h' line='440' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='JoinedStr' type-id='type-id-660' visibility='default' filepath='./Include/internal/pycore_ast.h' line='444' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Constant' type-id='type-id-661' visibility='default' filepath='./Include/internal/pycore_ast.h' line='449' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Attribute' type-id='type-id-662' visibility='default' filepath='./Include/internal/pycore_ast.h' line='455' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Subscript' type-id='type-id-663' visibility='default' filepath='./Include/internal/pycore_ast.h' line='461' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Starred' type-id='type-id-664' visibility='default' filepath='./Include/internal/pycore_ast.h' line='466' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Name' type-id='type-id-665' visibility='default' filepath='./Include/internal/pycore_ast.h' line='471' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='List' type-id='type-id-666' visibility='default' filepath='./Include/internal/pycore_ast.h' line='476' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Tuple' type-id='type-id-666' visibility='default' filepath='./Include/internal/pycore_ast.h' line='481' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='Slice' type-id='type-id-667' visibility='default' filepath='./Include/internal/pycore_ast.h' line='487' column='1'/> + </data-member> + </union-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='350' column='1' id='type-id-647'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='op' type-id='type-id-668' visibility='default' filepath='./Include/internal/pycore_ast.h' line='351' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='values' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='352' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_boolop' filepath='./Include/internal/pycore_ast.h' line='23' column='1' id='type-id-669'> + <underlying-type type-id='type-id-126'/> + <enumerator name='And' value='1'/> + <enumerator name='Or' value='2'/> + </enum-decl> + <typedef-decl name='boolop_ty' type-id='type-id-669' filepath='./Include/internal/pycore_ast.h' line='23' column='1' id='type-id-668'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-670' visibility='default' filepath='./Include/internal/pycore_ast.h' line='69' column='1' id='type-id-671'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-672' visibility='default' filepath='./Include/internal/pycore_ast.h' line='71' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-644' size-in-bits='64' id='type-id-673'/> + <typedef-decl name='expr_ty' type-id='type-id-673' filepath='./Include/internal/pycore_ast.h' line='19' column='1' id='type-id-635'/> + + <array-type-def dimensions='1' type-id='type-id-635' size-in-bits='64' id='type-id-672'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_expr_seq' type-id='type-id-671' filepath='./Include/internal/pycore_ast.h' line='72' column='1' id='type-id-670'/> + <pointer-type-def type-id='type-id-670' size-in-bits='64' id='type-id-634'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='355' column='1' id='type-id-648'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='target' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='356' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='357' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='360' column='1' id='type-id-649'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='left' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='361' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='op' type-id='type-id-674' visibility='default' filepath='./Include/internal/pycore_ast.h' line='362' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='right' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='363' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_operator' filepath='./Include/internal/pycore_ast.h' line='25' column='1' id='type-id-675'> + <underlying-type type-id='type-id-126'/> + <enumerator name='Add' value='1'/> + <enumerator name='Sub' value='2'/> + <enumerator name='Mult' value='3'/> + <enumerator name='MatMult' value='4'/> + <enumerator name='Div' value='5'/> + <enumerator name='Mod' value='6'/> + <enumerator name='Pow' value='7'/> + <enumerator name='LShift' value='8'/> + <enumerator name='RShift' value='9'/> + <enumerator name='BitOr' value='10'/> + <enumerator name='BitXor' value='11'/> + <enumerator name='BitAnd' value='12'/> + <enumerator name='FloorDiv' value='13'/> + </enum-decl> + <typedef-decl name='operator_ty' type-id='type-id-675' filepath='./Include/internal/pycore_ast.h' line='27' column='1' id='type-id-674'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='366' column='1' id='type-id-650'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='op' type-id='type-id-676' visibility='default' filepath='./Include/internal/pycore_ast.h' line='367' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='operand' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='368' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_unaryop' filepath='./Include/internal/pycore_ast.h' line='29' column='1' id='type-id-677'> + <underlying-type type-id='type-id-126'/> + <enumerator name='Invert' value='1'/> + <enumerator name='Not' value='2'/> + <enumerator name='UAdd' value='3'/> + <enumerator name='USub' value='4'/> + </enum-decl> + <typedef-decl name='unaryop_ty' type-id='type-id-677' filepath='./Include/internal/pycore_ast.h' line='29' column='1' id='type-id-676'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='371' column='1' id='type-id-651'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='args' type-id='type-id-633' visibility='default' filepath='./Include/internal/pycore_ast.h' line='372' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='body' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='373' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-637' size-in-bits='64' id='type-id-678'/> + <typedef-decl name='arguments_ty' type-id='type-id-678' filepath='./Include/internal/pycore_ast.h' line='38' column='1' id='type-id-633'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='376' column='1' id='type-id-652'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='test' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='377' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='body' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='378' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='orelse' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='379' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='382' column='1' id='type-id-653'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='keys' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='383' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='values' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='384' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='387' column='1' id='type-id-654'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='elts' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='388' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='391' column='1' id='type-id-655'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='elt' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='392' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='generators' type-id='type-id-679' visibility='default' filepath='./Include/internal/pycore_ast.h' line='393' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-680' visibility='default' filepath='./Include/internal/pycore_ast.h' line='76' column='1' id='type-id-681'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='77' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-682' visibility='default' filepath='./Include/internal/pycore_ast.h' line='78' column='1'/> + </data-member> + </class-decl> + <class-decl name='_comprehension' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='496' column='1' id='type-id-683'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='target' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='497' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='iter' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='498' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ifs' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='499' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='is_async' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='500' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-683' size-in-bits='64' id='type-id-684'/> + <typedef-decl name='comprehension_ty' type-id='type-id-684' filepath='./Include/internal/pycore_ast.h' line='34' column='1' id='type-id-685'/> + + <array-type-def dimensions='1' type-id='type-id-685' size-in-bits='64' id='type-id-682'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_comprehension_seq' type-id='type-id-681' filepath='./Include/internal/pycore_ast.h' line='79' column='1' id='type-id-680'/> + <pointer-type-def type-id='type-id-680' size-in-bits='64' id='type-id-679'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='401' column='1' id='type-id-656'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='key' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='402' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='403' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='generators' type-id='type-id-679' visibility='default' filepath='./Include/internal/pycore_ast.h' line='404' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='412' column='1' id='type-id-617'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='413' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='424' column='1' id='type-id-657'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='left' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='425' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ops' type-id='type-id-686' visibility='default' filepath='./Include/internal/pycore_ast.h' line='426' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='comparators' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='427' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-687' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='42' column='1' id='type-id-688'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='43' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='43' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-689' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='44' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-8' size-in-bits='32' id='type-id-689'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_int_seq' type-id='type-id-688' filepath='./Include/internal/pycore_asdl.h' line='45' column='1' id='type-id-687'/> + <pointer-type-def type-id='type-id-687' size-in-bits='64' id='type-id-686'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='430' column='1' id='type-id-658'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='func' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='431' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='args' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='432' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='keywords' type-id='type-id-690' visibility='default' filepath='./Include/internal/pycore_ast.h' line='433' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-691' visibility='default' filepath='./Include/internal/pycore_ast.h' line='106' column='1' id='type-id-692'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='107' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='107' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-693' visibility='default' filepath='./Include/internal/pycore_ast.h' line='108' column='1'/> + </data-member> + </class-decl> + <class-decl name='_keyword' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='540' column='1' id='type-id-694'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='arg' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='541' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='542' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='543' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='544' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='545' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='546' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-694' size-in-bits='64' id='type-id-695'/> + <typedef-decl name='keyword_ty' type-id='type-id-695' filepath='./Include/internal/pycore_ast.h' line='42' column='1' id='type-id-696'/> + + <array-type-def dimensions='1' type-id='type-id-696' size-in-bits='64' id='type-id-693'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_keyword_seq' type-id='type-id-692' filepath='./Include/internal/pycore_ast.h' line='109' column='1' id='type-id-691'/> + <pointer-type-def type-id='type-id-691' size-in-bits='64' id='type-id-690'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='436' column='1' id='type-id-659'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='437' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='conversion' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='438' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='format_spec' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='439' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='442' column='1' id='type-id-660'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='values' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='443' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='446' column='1' id='type-id-661'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value' type-id='type-id-697' visibility='default' filepath='./Include/internal/pycore_ast.h' line='447' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='kind' type-id='type-id-636' visibility='default' filepath='./Include/internal/pycore_ast.h' line='448' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='constant' type-id='type-id-14' filepath='./Include/internal/pycore_asdl.h' line='16' column='1' id='type-id-697'/> + <typedef-decl name='string' type-id='type-id-14' filepath='./Include/internal/pycore_asdl.h' line='14' column='1' id='type-id-636'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='451' column='1' id='type-id-662'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='452' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='attr' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='453' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ctx' type-id='type-id-698' visibility='default' filepath='./Include/internal/pycore_ast.h' line='454' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_expr_context' filepath='./Include/internal/pycore_ast.h' line='21' column='1' id='type-id-699'> + <underlying-type type-id='type-id-126'/> + <enumerator name='Load' value='1'/> + <enumerator name='Store' value='2'/> + <enumerator name='Del' value='3'/> + </enum-decl> + <typedef-decl name='expr_context_ty' type-id='type-id-699' filepath='./Include/internal/pycore_ast.h' line='21' column='1' id='type-id-698'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='457' column='1' id='type-id-663'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='458' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='slice' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='459' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ctx' type-id='type-id-698' visibility='default' filepath='./Include/internal/pycore_ast.h' line='460' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='463' column='1' id='type-id-664'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='464' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ctx' type-id='type-id-698' visibility='default' filepath='./Include/internal/pycore_ast.h' line='465' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='468' column='1' id='type-id-665'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='id' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='469' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ctx' type-id='type-id-698' visibility='default' filepath='./Include/internal/pycore_ast.h' line='470' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='473' column='1' id='type-id-666'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='elts' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='474' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ctx' type-id='type-id-698' visibility='default' filepath='./Include/internal/pycore_ast.h' line='475' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='483' column='1' id='type-id-667'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='lower' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='484' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='upper' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='485' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='step' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='486' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-643' size-in-bits='64' id='type-id-700'/> + <typedef-decl name='arg_ty' type-id='type-id-700' filepath='./Include/internal/pycore_ast.h' line='40' column='1' id='type-id-639'/> + + <array-type-def dimensions='1' type-id='type-id-639' size-in-bits='64' id='type-id-642'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_arg_seq' type-id='type-id-641' filepath='./Include/internal/pycore_ast.h' line='102' column='1' id='type-id-640'/> + <pointer-type-def type-id='type-id-640' size-in-bits='64' id='type-id-638'/> + <typedef-decl name='asdl_stmt_seq' type-id='type-id-610' filepath='./Include/internal/pycore_ast.h' line='65' column='1' id='type-id-609'/> + <pointer-type-def type-id='type-id-609' size-in-bits='64' id='type-id-607'/> + <class-decl name='__anonymous_struct__' size-in-bits='320' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='206' column='1' id='type-id-616'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='207' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='bases' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='208' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='keywords' type-id='type-id-690' visibility='default' filepath='./Include/internal/pycore_ast.h' line='209' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='210' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='decorator_list' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='211' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='218' column='1' id='type-id-618'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='targets' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='219' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='222' column='1' id='type-id-619'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='targets' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='223' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='224' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='type_comment' type-id='type-id-636' visibility='default' filepath='./Include/internal/pycore_ast.h' line='225' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='228' column='1' id='type-id-620'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='target' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='229' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='op' type-id='type-id-674' visibility='default' filepath='./Include/internal/pycore_ast.h' line='230' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='231' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='234' column='1' id='type-id-621'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='target' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='235' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='annotation' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='236' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='value' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='237' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='simple' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='238' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='320' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='241' column='1' id='type-id-622'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='target' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='242' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='iter' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='243' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='244' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='orelse' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='245' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='type_comment' type-id='type-id-636' visibility='default' filepath='./Include/internal/pycore_ast.h' line='246' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='257' column='1' id='type-id-623'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='test' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='258' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='259' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='orelse' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='260' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='269' column='1' id='type-id-624'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='items' type-id='type-id-701' visibility='default' filepath='./Include/internal/pycore_ast.h' line='270' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='271' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='type_comment' type-id='type-id-636' visibility='default' filepath='./Include/internal/pycore_ast.h' line='272' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-702' visibility='default' filepath='./Include/internal/pycore_ast.h' line='120' column='1' id='type-id-703'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='121' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='121' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-704' visibility='default' filepath='./Include/internal/pycore_ast.h' line='122' column='1'/> + </data-member> + </class-decl> + <class-decl name='_withitem' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='558' column='1' id='type-id-705'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='context_expr' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='559' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='optional_vars' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='560' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-705' size-in-bits='64' id='type-id-706'/> + <typedef-decl name='withitem_ty' type-id='type-id-706' filepath='./Include/internal/pycore_ast.h' line='46' column='1' id='type-id-707'/> + + <array-type-def dimensions='1' type-id='type-id-707' size-in-bits='64' id='type-id-704'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_withitem_seq' type-id='type-id-703' filepath='./Include/internal/pycore_ast.h' line='123' column='1' id='type-id-702'/> + <pointer-type-def type-id='type-id-702' size-in-bits='64' id='type-id-701'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='281' column='1' id='type-id-625'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='subject' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='282' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='cases' type-id='type-id-708' visibility='default' filepath='./Include/internal/pycore_ast.h' line='283' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-709' visibility='default' filepath='./Include/internal/pycore_ast.h' line='127' column='1' id='type-id-710'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='128' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='128' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-711' visibility='default' filepath='./Include/internal/pycore_ast.h' line='129' column='1'/> + </data-member> + </class-decl> + <class-decl name='_match_case' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='563' column='1' id='type-id-712'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='pattern' type-id='type-id-713' visibility='default' filepath='./Include/internal/pycore_ast.h' line='564' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='guard' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='565' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='566' column='1'/> + </data-member> + </class-decl> + <class-decl name='_pattern' size-in-bits='448' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='573' column='1' id='type-id-714'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='kind' type-id='type-id-715' visibility='default' filepath='./Include/internal/pycore_ast.h' line='574' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='v' type-id='type-id-716' visibility='default' filepath='./Include/internal/pycore_ast.h' line='614' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='615' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='352'> + <var-decl name='col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='616' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='617' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='416'> + <var-decl name='end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='618' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_pattern_kind' filepath='./Include/internal/pycore_ast.h' line='569' column='1' id='type-id-715'> + <underlying-type type-id='type-id-126'/> + <enumerator name='MatchValue_kind' value='1'/> + <enumerator name='MatchSingleton_kind' value='2'/> + <enumerator name='MatchSequence_kind' value='3'/> + <enumerator name='MatchMapping_kind' value='4'/> + <enumerator name='MatchClass_kind' value='5'/> + <enumerator name='MatchStar_kind' value='6'/> + <enumerator name='MatchAs_kind' value='7'/> + <enumerator name='MatchOr_kind' value='8'/> + </enum-decl> + <union-decl name='__anonymous_union__' size-in-bits='256' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='575' column='1' id='type-id-716'> + <data-member access='private'> + <var-decl name='MatchValue' type-id='type-id-617' visibility='default' filepath='./Include/internal/pycore_ast.h' line='578' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='MatchSingleton' type-id='type-id-717' visibility='default' filepath='./Include/internal/pycore_ast.h' line='582' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='MatchSequence' type-id='type-id-718' visibility='default' filepath='./Include/internal/pycore_ast.h' line='586' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='MatchMapping' type-id='type-id-719' visibility='default' filepath='./Include/internal/pycore_ast.h' line='592' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='MatchClass' type-id='type-id-720' visibility='default' filepath='./Include/internal/pycore_ast.h' line='599' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='MatchStar' type-id='type-id-721' visibility='default' filepath='./Include/internal/pycore_ast.h' line='603' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='MatchAs' type-id='type-id-722' visibility='default' filepath='./Include/internal/pycore_ast.h' line='608' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='MatchOr' type-id='type-id-718' visibility='default' filepath='./Include/internal/pycore_ast.h' line='612' column='1'/> + </data-member> + </union-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='580' column='1' id='type-id-717'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='value' type-id='type-id-697' visibility='default' filepath='./Include/internal/pycore_ast.h' line='581' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='584' column='1' id='type-id-718'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='patterns' type-id='type-id-723' visibility='default' filepath='./Include/internal/pycore_ast.h' line='585' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-724' visibility='default' filepath='./Include/internal/pycore_ast.h' line='135' column='1' id='type-id-725'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='136' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='136' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-726' visibility='default' filepath='./Include/internal/pycore_ast.h' line='137' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-714' size-in-bits='64' id='type-id-727'/> + <typedef-decl name='pattern_ty' type-id='type-id-727' filepath='./Include/internal/pycore_ast.h' line='50' column='1' id='type-id-713'/> + + <array-type-def dimensions='1' type-id='type-id-713' size-in-bits='64' id='type-id-726'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_pattern_seq' type-id='type-id-725' filepath='./Include/internal/pycore_ast.h' line='138' column='1' id='type-id-724'/> + <pointer-type-def type-id='type-id-724' size-in-bits='64' id='type-id-723'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='588' column='1' id='type-id-719'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='keys' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='589' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='patterns' type-id='type-id-723' visibility='default' filepath='./Include/internal/pycore_ast.h' line='590' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='rest' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='591' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='594' column='1' id='type-id-720'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='cls' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='595' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='patterns' type-id='type-id-723' visibility='default' filepath='./Include/internal/pycore_ast.h' line='596' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='kwd_attrs' type-id='type-id-728' visibility='default' filepath='./Include/internal/pycore_ast.h' line='597' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='kwd_patterns' type-id='type-id-723' visibility='default' filepath='./Include/internal/pycore_ast.h' line='598' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-729' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='37' column='1' id='type-id-730'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-360' visibility='default' filepath='./Include/internal/pycore_asdl.h' line='39' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='asdl_identifier_seq' type-id='type-id-730' filepath='./Include/internal/pycore_asdl.h' line='40' column='1' id='type-id-729'/> + <pointer-type-def type-id='type-id-729' size-in-bits='64' id='type-id-728'/> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='601' column='1' id='type-id-721'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='602' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='605' column='1' id='type-id-722'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='pattern' type-id='type-id-713' visibility='default' filepath='./Include/internal/pycore_ast.h' line='606' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='name' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='607' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-712' size-in-bits='64' id='type-id-731'/> + <typedef-decl name='match_case_ty' type-id='type-id-731' filepath='./Include/internal/pycore_ast.h' line='48' column='1' id='type-id-732'/> + + <array-type-def dimensions='1' type-id='type-id-732' size-in-bits='64' id='type-id-711'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_match_case_seq' type-id='type-id-710' filepath='./Include/internal/pycore_ast.h' line='130' column='1' id='type-id-709'/> + <pointer-type-def type-id='type-id-709' size-in-bits='64' id='type-id-708'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='286' column='1' id='type-id-626'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='exc' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='287' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='cause' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='288' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='291' column='1' id='type-id-627'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='292' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='handlers' type-id='type-id-733' visibility='default' filepath='./Include/internal/pycore_ast.h' line='293' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='orelse' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='294' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='finalbody' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='295' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-734' visibility='default' filepath='./Include/internal/pycore_ast.h' line='84' column='1' id='type-id-735'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='85' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-736' visibility='default' filepath='./Include/internal/pycore_ast.h' line='86' column='1'/> + </data-member> + </class-decl> + <class-decl name='_excepthandler' size-in-bits='384' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='504' column='1' id='type-id-737'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='kind' type-id='type-id-738' visibility='default' filepath='./Include/internal/pycore_ast.h' line='505' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='v' type-id='type-id-739' visibility='default' filepath='./Include/internal/pycore_ast.h' line='513' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='514' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='515' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='516' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='352'> + <var-decl name='end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='517' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_excepthandler_kind' filepath='./Include/internal/pycore_ast.h' line='503' column='1' id='type-id-738'> + <underlying-type type-id='type-id-126'/> + <enumerator name='ExceptHandler_kind' value='1'/> + </enum-decl> + <union-decl name='__anonymous_union__' size-in-bits='192' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='506' column='1' id='type-id-739'> + <data-member access='private'> + <var-decl name='ExceptHandler' type-id='type-id-740' visibility='default' filepath='./Include/internal/pycore_ast.h' line='511' column='1'/> + </data-member> + </union-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='507' column='1' id='type-id-740'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='type' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='508' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='name' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='509' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='510' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-737' size-in-bits='64' id='type-id-741'/> + <typedef-decl name='excepthandler_ty' type-id='type-id-741' filepath='./Include/internal/pycore_ast.h' line='36' column='1' id='type-id-742'/> + + <array-type-def dimensions='1' type-id='type-id-742' size-in-bits='64' id='type-id-736'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_excepthandler_seq' type-id='type-id-735' filepath='./Include/internal/pycore_ast.h' line='87' column='1' id='type-id-734'/> + <pointer-type-def type-id='type-id-734' size-in-bits='64' id='type-id-733'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='305' column='1' id='type-id-628'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='test' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='306' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='msg' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='307' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='310' column='1' id='type-id-629'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='names' type-id='type-id-743' visibility='default' filepath='./Include/internal/pycore_ast.h' line='311' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-744' visibility='default' filepath='./Include/internal/pycore_ast.h' line='113' column='1' id='type-id-745'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='114' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-746' visibility='default' filepath='./Include/internal/pycore_ast.h' line='115' column='1'/> + </data-member> + </class-decl> + <class-decl name='_alias' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='549' column='1' id='type-id-747'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='550' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='asname' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='551' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='552' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='553' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='554' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='555' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-747' size-in-bits='64' id='type-id-748'/> + <typedef-decl name='alias_ty' type-id='type-id-748' filepath='./Include/internal/pycore_ast.h' line='44' column='1' id='type-id-749'/> + + <array-type-def dimensions='1' type-id='type-id-749' size-in-bits='64' id='type-id-746'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_alias_seq' type-id='type-id-745' filepath='./Include/internal/pycore_ast.h' line='116' column='1' id='type-id-744'/> + <pointer-type-def type-id='type-id-744' size-in-bits='64' id='type-id-743'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='314' column='1' id='type-id-630'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='module' type-id='type-id-632' visibility='default' filepath='./Include/internal/pycore_ast.h' line='315' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='names' type-id='type-id-743' visibility='default' filepath='./Include/internal/pycore_ast.h' line='316' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='level' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='317' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='320' column='1' id='type-id-631'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='names' type-id='type-id-728' visibility='default' filepath='./Include/internal/pycore_ast.h' line='321' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-612' size-in-bits='64' id='type-id-750'/> + <typedef-decl name='stmt_ty' type-id='type-id-750' filepath='./Include/internal/pycore_ast.h' line='17' column='1' id='type-id-751'/> + + <array-type-def dimensions='1' type-id='type-id-751' size-in-bits='64' id='type-id-611'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-752' visibility='default' filepath='./Include/internal/pycore_ast.h' line='142' column='1' id='type-id-753'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='size' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_ast.h' line='143' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='elements' type-id='type-id-482' visibility='default' filepath='./Include/internal/pycore_ast.h' line='143' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='typed_elements' type-id='type-id-754' visibility='default' filepath='./Include/internal/pycore_ast.h' line='144' column='1'/> + </data-member> + </class-decl> + <class-decl name='_type_ignore' size-in-bits='192' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='622' column='1' id='type-id-755'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='kind' type-id='type-id-756' visibility='default' filepath='./Include/internal/pycore_ast.h' line='623' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='v' type-id='type-id-757' visibility='default' filepath='./Include/internal/pycore_ast.h' line='630' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_type_ignore_kind' filepath='./Include/internal/pycore_ast.h' line='621' column='1' id='type-id-756'> + <underlying-type type-id='type-id-126'/> + <enumerator name='TypeIgnore_kind' value='1'/> + </enum-decl> + <union-decl name='__anonymous_union__' size-in-bits='128' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='624' column='1' id='type-id-757'> + <data-member access='private'> + <var-decl name='TypeIgnore' type-id='type-id-758' visibility='default' filepath='./Include/internal/pycore_ast.h' line='628' column='1'/> + </data-member> + </union-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='625' column='1' id='type-id-758'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_ast.h' line='626' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='tag' type-id='type-id-636' visibility='default' filepath='./Include/internal/pycore_ast.h' line='627' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-755' size-in-bits='64' id='type-id-759'/> + <typedef-decl name='type_ignore_ty' type-id='type-id-759' filepath='./Include/internal/pycore_ast.h' line='52' column='1' id='type-id-760'/> + + <array-type-def dimensions='1' type-id='type-id-760' size-in-bits='64' id='type-id-754'> + <subrange length='1' type-id='type-id-16' id='type-id-258'/> + + </array-type-def> + <typedef-decl name='asdl_type_ignore_seq' type-id='type-id-753' filepath='./Include/internal/pycore_ast.h' line='145' column='1' id='type-id-752'/> + <pointer-type-def type-id='type-id-752' size-in-bits='64' id='type-id-608'/> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='161' column='1' id='type-id-604'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='body' type-id='type-id-607' visibility='default' filepath='./Include/internal/pycore_ast.h' line='162' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='165' column='1' id='type-id-605'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='body' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='166' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/internal/pycore_ast.h' line='169' column='1' id='type-id-606'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='argtypes' type-id='type-id-634' visibility='default' filepath='./Include/internal/pycore_ast.h' line='170' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='returns' type-id='type-id-635' visibility='default' filepath='./Include/internal/pycore_ast.h' line='171' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-600' size-in-bits='64' id='type-id-761'/> + <typedef-decl name='mod_ty' type-id='type-id-761' filepath='./Include/internal/pycore_ast.h' line='15' column='1' id='type-id-762'/> + <class-decl name='_arena' size-in-bits='192' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-763'/> + <typedef-decl name='PyArena' type-id='type-id-763' filepath='./Include/internal/pycore_pyarena.h' line='14' column='1' id='type-id-764'/> + <pointer-type-def type-id='type-id-764' size-in-bits='64' id='type-id-765'/> + <function-decl name='_PyAST_Compile' mangled-name='_PyAST_Compile' filepath='Python/compile.c' line='541' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyAST_Compile'> + <parameter type-id='type-id-762' name='mod' filepath='Python/compile.c' line='541' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/compile.c' line='541' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/compile.c' line='541' column='1'/> + <parameter type-id='type-id-8' name='optimize' filepath='Python/compile.c' line='542' column='1'/> + <parameter type-id='type-id-765' name='arena' filepath='Python/compile.c' line='542' column='1'/> + <return type-id='type-id-444'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/context.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyContext_Type' type-id='type-id-112' mangled-name='PyContext_Type' visibility='default' filepath='./Include/cpython/context.h' line='8' column='1' elf-symbol-id='PyContext_Type'/> + <var-decl name='PyContextVar_Type' type-id='type-id-112' mangled-name='PyContextVar_Type' visibility='default' filepath='./Include/cpython/context.h' line='11' column='1' elf-symbol-id='PyContextVar_Type'/> + <var-decl name='PyContextToken_Type' type-id='type-id-112' mangled-name='PyContextToken_Type' visibility='default' filepath='./Include/cpython/context.h' line='14' column='1' elf-symbol-id='PyContextToken_Type'/> + <var-decl name='_PyContextTokenMissing_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_context.h' line='11' column='1'/> + <function-decl name='PyContextVar_Reset' mangled-name='PyContextVar_Reset' filepath='Python/context.c' line='295' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContextVar_Reset'> + <parameter type-id='type-id-14' name='ovar' filepath='Python/context.c' line='295' column='1'/> + <parameter type-id='type-id-14' name='otok' filepath='Python/context.c' line='295' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyContextVar_Set' mangled-name='PyContextVar_Set' filepath='Python/context.c' line='259' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContextVar_Set'> + <parameter type-id='type-id-14' name='ovar' filepath='Python/context.c' line='259' column='1'/> + <parameter type-id='type-id-14' name='val' filepath='Python/context.c' line='259' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyContextVar_Get' mangled-name='PyContextVar_Get' filepath='Python/context.c' line='196' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContextVar_Get'> + <parameter type-id='type-id-14' name='ovar' filepath='Python/context.c' line='196' column='1'/> + <parameter type-id='type-id-14' name='def' filepath='Python/context.c' line='196' column='1'/> + <parameter type-id='type-id-22' name='val' filepath='Python/context.c' line='196' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyContextVar_New' mangled-name='PyContextVar_New' filepath='Python/context.c' line='183' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContextVar_New'> + <parameter type-id='type-id-3' name='name' filepath='Python/context.c' line='183' column='1'/> + <parameter type-id='type-id-14' name='def' filepath='Python/context.c' line='183' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyContext_Exit' mangled-name='PyContext_Exit' filepath='Python/context.c' line='174' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContext_Exit'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyContext_Enter' mangled-name='PyContext_Enter' filepath='Python/context.c' line='136' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContext_Enter'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyContext_CopyCurrent' mangled-name='PyContext_CopyCurrent' filepath='Python/context.c' line='101' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContext_CopyCurrent'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyContext_Copy' mangled-name='PyContext_Copy' filepath='Python/context.c' line='92' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContext_Copy'> + <parameter type-id='type-id-14' name='item' filepath='Objects/abstract.c' line='1408' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyContext_New' mangled-name='PyContext_New' filepath='Python/context.c' line='85' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyContext_New'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyContext_NewHamtForTests' mangled-name='_PyContext_NewHamtForTests' filepath='Python/context.c' line='78' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyContext_NewHamtForTests'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/errors.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyErr_ProgramTextObject' mangled-name='PyErr_ProgramTextObject' filepath='Python/errors.c' line='1828' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_ProgramTextObject'> + <parameter type-id='type-id-14' name='filename' filepath='Python/errors.c' line='1828' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1828' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyErr_ProgramDecodedTextObject' mangled-name='_PyErr_ProgramDecodedTextObject' filepath='Python/errors.c' line='1812' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_ProgramDecodedTextObject'> + <parameter type-id='type-id-14' name='filename' filepath='Python/errors.c' line='1812' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1812' column='1'/> + <parameter type-id='type-id-3' name='encoding' filepath='Python/errors.c' line='1812' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_ProgramText' mangled-name='PyErr_ProgramText' filepath='Python/errors.c' line='1795' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_ProgramText'> + <parameter type-id='type-id-3' name='filename' filepath='Python/errors.c' line='1795' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1795' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SyntaxLocationEx' mangled-name='PyErr_SyntaxLocationEx' filepath='Python/errors.c' line='1730' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SyntaxLocationEx'> + <parameter type-id='type-id-3' name='filename' filepath='Python/errors.c' line='1730' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1730' column='1'/> + <parameter type-id='type-id-8' name='col_offset' filepath='Python/errors.c' line='1730' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_RangedSyntaxLocationObject' mangled-name='PyErr_RangedSyntaxLocationObject' filepath='Python/errors.c' line='1724' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_RangedSyntaxLocationObject'> + <parameter type-id='type-id-14' name='filename' filepath='Python/errors.c' line='1724' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1724' column='1'/> + <parameter type-id='type-id-8' name='col_offset' filepath='Python/errors.c' line='1724' column='1'/> + <parameter type-id='type-id-8' name='end_lineno' filepath='Python/errors.c' line='1725' column='1'/> + <parameter type-id='type-id-8' name='end_col_offset' filepath='Python/errors.c' line='1725' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SyntaxLocationObject' mangled-name='PyErr_SyntaxLocationObject' filepath='Python/errors.c' line='1719' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SyntaxLocationObject'> + <parameter type-id='type-id-14' name='filename' filepath='Python/errors.c' line='1719' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1719' column='1'/> + <parameter type-id='type-id-8' name='col_offset' filepath='Python/errors.c' line='1719' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SyntaxLocation' mangled-name='PyErr_SyntaxLocation' filepath='Python/errors.c' line='1599' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SyntaxLocation'> + <parameter type-id='type-id-3' name='filename' filepath='Python/errors.c' line='1599' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1599' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_WriteUnraisable' mangled-name='PyErr_WriteUnraisable' filepath='Python/errors.c' line='1592' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_WriteUnraisable'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2016' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_WriteUnraisableMsg' mangled-name='_PyErr_WriteUnraisableMsg' filepath='Python/errors.c' line='1489' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_WriteUnraisableMsg'> + <parameter type-id='type-id-3' name='err_msg_str' filepath='Python/errors.c' line='1489' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/errors.c' line='1489' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_NewExceptionWithDoc' mangled-name='PyErr_NewExceptionWithDoc' filepath='Python/errors.c' line='1184' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_NewExceptionWithDoc'> + <parameter type-id='type-id-3' name='name' filepath='Python/errors.c' line='1184' column='1'/> + <parameter type-id='type-id-3' name='doc' filepath='Python/errors.c' line='1184' column='1'/> + <parameter type-id='type-id-14' name='base' filepath='Python/errors.c' line='1185' column='1'/> + <parameter type-id='type-id-14' name='dict' filepath='Python/errors.c' line='1185' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_NewException' mangled-name='PyErr_NewException' filepath='Python/errors.c' line='1127' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_NewException'> + <parameter type-id='type-id-3' name='name' filepath='Python/errors.c' line='1127' column='1'/> + <parameter type-id='type-id-14' name='base' filepath='Python/errors.c' line='1127' column='1'/> + <parameter type-id='type-id-14' name='dict' filepath='Python/errors.c' line='1127' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_Format' mangled-name='PyErr_Format' filepath='Python/errors.c' line='1111' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_Format'> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='1111' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/errors.c' line='1111' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyErr_Format' mangled-name='_PyErr_Format' filepath='Python/errors.c' line='1095' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_Format'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='1095' column='1'/> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='1095' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/errors.c' line='1096' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_FormatV' mangled-name='PyErr_FormatV' filepath='Python/errors.c' line='1087' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_FormatV'> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='1087' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/errors.c' line='1087' column='1'/> + <parameter type-id='type-id-496' name='vargs' filepath='Python/errors.c' line='1087' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_BadInternalCall' mangled-name='PyErr_BadInternalCall' filepath='Python/errors.c' line='1058' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_BadInternalCall'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_BadInternalCall' mangled-name='_PyErr_BadInternalCall' filepath='Python/errors.c' line='1046' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_BadInternalCall'> + <parameter type-id='type-id-3' name='filename' filepath='Python/errors.c' line='1046' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/errors.c' line='1046' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SetImportError' mangled-name='PyErr_SetImportError' filepath='Python/errors.c' line='1040' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetImportError'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1311' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1311' column='1'/> + <parameter type-id='type-id-14' name='z' filepath='Objects/abstract.c' line='1311' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SetImportErrorSubclass' mangled-name='PyErr_SetImportErrorSubclass' filepath='Python/errors.c' line='987' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetImportErrorSubclass'> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='987' column='1'/> + <parameter type-id='type-id-14' name='msg' filepath='Python/errors.c' line='987' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Python/errors.c' line='988' column='1'/> + <parameter type-id='type-id-14' name='path' filepath='Python/errors.c' line='988' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SetFromErrno' mangled-name='PyErr_SetFromErrno' filepath='Python/errors.c' line='862' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetFromErrno'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2462' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SetFromErrnoWithFilename' mangled-name='PyErr_SetFromErrnoWithFilename' filepath='Python/errors.c' line='853' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetFromErrnoWithFilename'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2342' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2342' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SetFromErrnoWithFilenameObjects' mangled-name='PyErr_SetFromErrnoWithFilenameObjects' filepath='Python/errors.c' line='754' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetFromErrnoWithFilenameObjects'> + <parameter type-id='type-id-14' name='co' filepath='Python/ceval.c' line='1130' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Python/ceval.c' line='1130' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Python/ceval.c' line='1130' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SetFromErrnoWithFilenameObject' mangled-name='PyErr_SetFromErrnoWithFilenameObject' filepath='Python/errors.c' line='748' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetFromErrnoWithFilenameObject'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1256' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1256' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_NoMemory' mangled-name='PyErr_NoMemory' filepath='Python/errors.c' line='741' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_NoMemory'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyErr_NoMemory' mangled-name='_PyErr_NoMemory' filepath='Python/errors.c' line='728' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_NoMemory'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='728' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_BadArgument' mangled-name='PyErr_BadArgument' filepath='Python/errors.c' line='719' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_BadArgument'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyErr_FormatFromCause' mangled-name='_PyErr_FormatFromCause' filepath='Python/errors.c' line='702' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_FormatFromCause'> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='1111' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/errors.c' line='1111' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyErr_FormatFromCauseTstate' mangled-name='_PyErr_FormatFromCauseTstate' filepath='Python/errors.c' line='687' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_FormatFromCauseTstate'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='1095' column='1'/> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='1095' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/errors.c' line='1096' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyErr_ChainStackItem' mangled-name='_PyErr_ChainStackItem' filepath='Python/errors.c' line='619' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_ChainStackItem'> + <parameter type-id='type-id-15' name='exc_info' filepath='Python/errors.c' line='619' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_ChainExceptions' mangled-name='_PyErr_ChainExceptions' filepath='Python/errors.c' line='577' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_ChainExceptions'> + <parameter type-id='type-id-14' name='typ' filepath='Python/errors.c' line='577' column='1'/> + <parameter type-id='type-id-14' name='val' filepath='Python/errors.c' line='577' column='1'/> + <parameter type-id='type-id-14' name='tb' filepath='Python/errors.c' line='577' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_StackItemToExcInfoTuple' mangled-name='_PyErr_StackItemToExcInfoTuple' filepath='Python/errors.c' line='552' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_StackItemToExcInfoTuple'> + <parameter type-id='type-id-15' name='err_info' filepath='Python/errors.c' line='552' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SetExcInfo' mangled-name='PyErr_SetExcInfo' filepath='Python/errors.c' line='541' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetExcInfo'> + <parameter type-id='type-id-14' name='type' filepath='Python/errors.c' line='541' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/errors.c' line='541' column='1'/> + <parameter type-id='type-id-14' name='traceback' filepath='Python/errors.c' line='541' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_GetExcInfo' mangled-name='PyErr_GetExcInfo' filepath='Python/errors.c' line='534' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_GetExcInfo'> + <parameter type-id='type-id-22' name='p_type' filepath='Python/errors.c' line='534' column='1'/> + <parameter type-id='type-id-22' name='p_value' filepath='Python/errors.c' line='534' column='1'/> + <parameter type-id='type-id-22' name='p_traceback' filepath='Python/errors.c' line='534' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SetHandledException' mangled-name='PyErr_SetHandledException' filepath='Python/errors.c' line='527' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetHandledException'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='578' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_SetHandledException' mangled-name='_PyErr_SetHandledException' filepath='Python/errors.c' line='521' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_SetHandledException'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='521' column='1'/> + <parameter type-id='type-id-14' name='exc' filepath='Python/errors.c' line='521' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_GetHandledException' mangled-name='PyErr_GetHandledException' filepath='Python/errors.c' line='514' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_GetHandledException'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyErr_GetHandledException' mangled-name='_PyErr_GetHandledException' filepath='Python/errors.c' line='503' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_GetHandledException'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='503' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyErr_GetExcInfo' mangled-name='_PyErr_GetExcInfo' filepath='Python/errors.c' line='488' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_GetExcInfo'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='488' column='1'/> + <parameter type-id='type-id-22' name='p_type' filepath='Python/errors.c' line='489' column='1'/> + <parameter type-id='type-id-22' name='p_value' filepath='Python/errors.c' line='489' column='1'/> + <parameter type-id='type-id-22' name='p_traceback' filepath='Python/errors.c' line='489' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_Clear' mangled-name='PyErr_Clear' filepath='Python/errors.c' line='453' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_Clear'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_Clear' mangled-name='_PyErr_Clear' filepath='Python/errors.c' line='446' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_Clear'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2291' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_Fetch' mangled-name='PyErr_Fetch' filepath='Python/errors.c' line='438' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_Fetch'> + <parameter type-id='type-id-22' name='p_type' filepath='Python/errors.c' line='534' column='1'/> + <parameter type-id='type-id-22' name='p_value' filepath='Python/errors.c' line='534' column='1'/> + <parameter type-id='type-id-22' name='p_traceback' filepath='Python/errors.c' line='534' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_Fetch' mangled-name='_PyErr_Fetch' filepath='Python/errors.c' line='424' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_Fetch'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='424' column='1'/> + <parameter type-id='type-id-22' name='p_type' filepath='Python/errors.c' line='424' column='1'/> + <parameter type-id='type-id-22' name='p_value' filepath='Python/errors.c' line='424' column='1'/> + <parameter type-id='type-id-22' name='p_traceback' filepath='Python/errors.c' line='425' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_NormalizeException' mangled-name='PyErr_NormalizeException' filepath='Python/errors.c' line='416' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_NormalizeException'> + <parameter type-id='type-id-22' name='p_type' filepath='Python/errors.c' line='534' column='1'/> + <parameter type-id='type-id-22' name='p_value' filepath='Python/errors.c' line='534' column='1'/> + <parameter type-id='type-id-22' name='p_traceback' filepath='Python/errors.c' line='534' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_NormalizeException' mangled-name='_PyErr_NormalizeException' filepath='Python/errors.c' line='309' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_NormalizeException'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='309' column='1'/> + <parameter type-id='type-id-22' name='exc' filepath='Python/errors.c' line='309' column='1'/> + <parameter type-id='type-id-22' name='val' filepath='Python/errors.c' line='310' column='1'/> + <parameter type-id='type-id-22' name='tb' filepath='Python/errors.c' line='310' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_ExceptionMatches' mangled-name='PyErr_ExceptionMatches' filepath='Python/errors.c' line='291' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_ExceptionMatches'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyErr_ExceptionMatches' mangled-name='_PyErr_ExceptionMatches' filepath='Python/errors.c' line='284' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_ExceptionMatches'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2277' column='1'/> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2277' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_GivenExceptionMatches' mangled-name='PyErr_GivenExceptionMatches' filepath='Python/errors.c' line='252' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_GivenExceptionMatches'> + <parameter type-id='type-id-14' name='op' filepath='Objects/funcobject.c' line='319' column='1'/> + <parameter type-id='type-id-14' name='annotations' filepath='Objects/funcobject.c' line='319' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_Occurred' mangled-name='PyErr_Occurred' filepath='Python/errors.c' line='241' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_Occurred'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_SetString' mangled-name='PyErr_SetString' filepath='Python/errors.c' line='233' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetString'> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='233' column='1'/> + <parameter type-id='type-id-3' name='string' filepath='Python/errors.c' line='233' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_SetString' mangled-name='_PyErr_SetString' filepath='Python/errors.c' line='224' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_SetString'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='224' column='1'/> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='224' column='1'/> + <parameter type-id='type-id-3' name='string' filepath='Python/errors.c' line='225' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SetNone' mangled-name='PyErr_SetNone' filepath='Python/errors.c' line='216' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetNone'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='578' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_SetNone' mangled-name='_PyErr_SetNone' filepath='Python/errors.c' line='209' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_SetNone'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='209' column='1'/> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='209' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_SetKeyError' mangled-name='_PyErr_SetKeyError' filepath='Python/errors.c' line='196' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_SetKeyError'> + <parameter type-id='type-id-14' name='op' filepath='Objects/object.c' line='2366' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SetObject' mangled-name='PyErr_SetObject' filepath='Python/errors.c' line='186' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetObject'> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='186' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/errors.c' line='186' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_SetObject' mangled-name='_PyErr_SetObject' filepath='Python/errors.c' line='108' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_SetObject'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='108' column='1'/> + <parameter type-id='type-id-14' name='exception' filepath='Python/errors.c' line='108' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/errors.c' line='108' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_GetTopmostException' mangled-name='_PyErr_GetTopmostException' filepath='Python/errors.c' line='68' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_GetTopmostException'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='68' column='1'/> + <return type-id='type-id-15'/> + </function-decl> + <function-decl name='PyErr_Restore' mangled-name='PyErr_Restore' filepath='Python/errors.c' line='60' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_Restore'> + <parameter type-id='type-id-14' name='type' filepath='Python/errors.c' line='60' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/errors.c' line='60' column='1'/> + <parameter type-id='type-id-14' name='traceback' filepath='Python/errors.c' line='60' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_Restore' mangled-name='_PyErr_Restore' filepath='Python/errors.c' line='32' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_Restore'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/errors.c' line='32' column='1'/> + <parameter type-id='type-id-14' name='type' filepath='Python/errors.c' line='32' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/errors.c' line='32' column='1'/> + <parameter type-id='type-id-14' name='traceback' filepath='Python/errors.c' line='33' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/frozenmain.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='Py_FrozenMain' mangled-name='Py_FrozenMain' filepath='Python/frozenmain.c' line='16' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_FrozenMain'> + <parameter type-id='type-id-8' name='argc' filepath='Python/frozenmain.c' line='16' column='1'/> + <parameter type-id='type-id-494' name='argv' filepath='Python/frozenmain.c' line='16' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/getargs.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyArg_NoKwnames' mangled-name='_PyArg_NoKwnames' filepath='Python/getargs.c' line='2921' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_NoKwnames'> + <parameter type-id='type-id-3' name='funcname' filepath='Python/getargs.c' line='2921' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Python/getargs.c' line='2921' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_NoPositional' mangled-name='_PyArg_NoPositional' filepath='Python/getargs.c' line='2904' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_NoPositional'> + <parameter type-id='type-id-3' name='funcname' filepath='Python/getargs.c' line='2921' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Python/getargs.c' line='2921' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_NoKeywords' mangled-name='_PyArg_NoKeywords' filepath='Python/getargs.c' line='2885' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_NoKeywords'> + <parameter type-id='type-id-3' name='funcname' filepath='Python/getargs.c' line='2921' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Python/getargs.c' line='2921' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_UnpackStack' mangled-name='_PyArg_UnpackStack' filepath='Python/getargs.c' line='2858' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_UnpackStack'> + <parameter type-id='type-id-200' name='args' filepath='Python/getargs.c' line='2858' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='2858' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/getargs.c' line='2858' column='1'/> + <parameter type-id='type-id-36' name='min' filepath='Python/getargs.c' line='2859' column='1'/> + <parameter type-id='type-id-36' name='max' filepath='Python/getargs.c' line='2859' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyArg_UnpackTuple' mangled-name='PyArg_UnpackTuple' filepath='Python/getargs.c' line='2832' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyArg_UnpackTuple'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='2832' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/getargs.c' line='2832' column='1'/> + <parameter type-id='type-id-36' name='min' filepath='Python/getargs.c' line='2832' column='1'/> + <parameter type-id='type-id-36' name='max' filepath='Python/getargs.c' line='2832' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_CheckPositional' mangled-name='_PyArg_CheckPositional' filepath='Python/getargs.c' line='2770' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_CheckPositional'> + <parameter type-id='type-id-3' name='name' filepath='Python/getargs.c' line='2770' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='2770' column='1'/> + <parameter type-id='type-id-36' name='min' filepath='Python/getargs.c' line='2771' column='1'/> + <parameter type-id='type-id-36' name='max' filepath='Python/getargs.c' line='2771' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <class-decl name='_PyArg_Parser' size-in-bits='512' is-struct='yes' visibility='default' filepath='./Include/cpython/modsupport.h' line='51' column='1' id='type-id-766'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='format' type-id='type-id-3' visibility='default' filepath='./Include/cpython/modsupport.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='keywords' type-id='type-id-767' visibility='default' filepath='./Include/cpython/modsupport.h' line='53' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='fname' type-id='type-id-3' visibility='default' filepath='./Include/cpython/modsupport.h' line='54' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='custom_msg' type-id='type-id-3' visibility='default' filepath='./Include/cpython/modsupport.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='pos' type-id='type-id-8' visibility='default' filepath='./Include/cpython/modsupport.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='min' type-id='type-id-8' visibility='default' filepath='./Include/cpython/modsupport.h' line='57' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='max' type-id='type-id-8' visibility='default' filepath='./Include/cpython/modsupport.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='kwtuple' type-id='type-id-14' visibility='default' filepath='./Include/cpython/modsupport.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='next' type-id='type-id-768' visibility='default' filepath='./Include/cpython/modsupport.h' line='60' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-4' size-in-bits='64' id='type-id-767'/> + <pointer-type-def type-id='type-id-766' size-in-bits='64' id='type-id-768'/> + <function-decl name='_PyArg_UnpackKeywordsWithVararg' mangled-name='_PyArg_UnpackKeywordsWithVararg' filepath='Python/getargs.c' line='2470' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_UnpackKeywordsWithVararg'> + <parameter type-id='type-id-200' name='args' filepath='Python/getargs.c' line='2470' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='2470' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Python/getargs.c' line='2471' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Python/getargs.c' line='2471' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='2472' column='1'/> + <parameter type-id='type-id-8' name='minpos' filepath='Python/getargs.c' line='2473' column='1'/> + <parameter type-id='type-id-8' name='maxpos' filepath='Python/getargs.c' line='2473' column='1'/> + <parameter type-id='type-id-8' name='minkw' filepath='Python/getargs.c' line='2473' column='1'/> + <parameter type-id='type-id-8' name='vararg' filepath='Python/getargs.c' line='2474' column='1'/> + <parameter type-id='type-id-22' name='buf' filepath='Python/getargs.c' line='2474' column='1'/> + <return type-id='type-id-200'/> + </function-decl> + <function-decl name='_PyArg_UnpackKeywords' mangled-name='_PyArg_UnpackKeywords' filepath='Python/getargs.c' line='2269' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_UnpackKeywords'> + <parameter type-id='type-id-200' name='args' filepath='Python/getargs.c' line='2269' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='2269' column='1'/> + <parameter type-id='type-id-14' name='kwargs' filepath='Python/getargs.c' line='2270' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Python/getargs.c' line='2270' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='2271' column='1'/> + <parameter type-id='type-id-8' name='minpos' filepath='Python/getargs.c' line='2272' column='1'/> + <parameter type-id='type-id-8' name='maxpos' filepath='Python/getargs.c' line='2272' column='1'/> + <parameter type-id='type-id-8' name='minkw' filepath='Python/getargs.c' line='2272' column='1'/> + <parameter type-id='type-id-22' name='buf' filepath='Python/getargs.c' line='2273' column='1'/> + <return type-id='type-id-200'/> + </function-decl> + <function-decl name='PyArg_ValidateKeywordArguments' mangled-name='PyArg_ValidateKeywordArguments' filepath='Python/getargs.c' line='1558' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyArg_ValidateKeywordArguments'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_VaParseTupleAndKeywordsFast_SizeT' mangled-name='_PyArg_VaParseTupleAndKeywordsFast_SizeT' filepath='Python/getargs.c' line='1544' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_VaParseTupleAndKeywordsFast_SizeT'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1544' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1544' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='1545' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/getargs.c' line='1545' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_VaParseTupleAndKeywordsFast' mangled-name='_PyArg_VaParseTupleAndKeywordsFast' filepath='Python/getargs.c' line='1530' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_VaParseTupleAndKeywordsFast'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1544' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1544' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='1545' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/getargs.c' line='1545' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseStackAndKeywords_SizeT' mangled-name='_PyArg_ParseStackAndKeywords_SizeT' filepath='Python/getargs.c' line='1516' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseStackAndKeywords_SizeT'> + <parameter type-id='type-id-200' name='args' filepath='Python/getargs.c' line='1516' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='1516' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Python/getargs.c' line='1516' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='1517' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseStackAndKeywords' mangled-name='_PyArg_ParseStackAndKeywords' filepath='Python/getargs.c' line='1503' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseStackAndKeywords'> + <parameter type-id='type-id-200' name='args' filepath='Python/getargs.c' line='1516' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='1516' column='1'/> + <parameter type-id='type-id-14' name='kwnames' filepath='Python/getargs.c' line='1516' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='1517' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseTupleAndKeywordsFast_SizeT' mangled-name='_PyArg_ParseTupleAndKeywordsFast_SizeT' filepath='Python/getargs.c' line='1490' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseTupleAndKeywordsFast_SizeT'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1490' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1490' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='1491' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseTupleAndKeywordsFast' mangled-name='_PyArg_ParseTupleAndKeywordsFast' filepath='Python/getargs.c' line='1477' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseTupleAndKeywordsFast'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1490' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1490' column='1'/> + <parameter type-id='type-id-768' name='parser' filepath='Python/getargs.c' line='1491' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_VaParseTupleAndKeywords_SizeT' mangled-name='_PyArg_VaParseTupleAndKeywords_SizeT' filepath='Python/getargs.c' line='1451' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_VaParseTupleAndKeywords_SizeT'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1451' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1452' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='1453' column='1'/> + <parameter type-id='type-id-494' name='kwlist' filepath='Python/getargs.c' line='1454' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/getargs.c' line='1454' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyArg_VaParseTupleAndKeywords' mangled-name='PyArg_VaParseTupleAndKeywords' filepath='Python/getargs.c' line='1426' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyArg_VaParseTupleAndKeywords'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1451' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1452' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='1453' column='1'/> + <parameter type-id='type-id-494' name='kwlist' filepath='Python/getargs.c' line='1454' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/getargs.c' line='1454' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseTupleAndKeywords_SizeT' mangled-name='_PyArg_ParseTupleAndKeywords_SizeT' filepath='Python/getargs.c' line='1400' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseTupleAndKeywords_SizeT'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1400' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1401' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='1402' column='1'/> + <parameter type-id='type-id-494' name='kwlist' filepath='Python/getargs.c' line='1403' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyArg_ParseTupleAndKeywords' mangled-name='PyArg_ParseTupleAndKeywords' filepath='Python/getargs.c' line='1376' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyArg_ParseTupleAndKeywords'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='1400' column='1'/> + <parameter type-id='type-id-14' name='keywords' filepath='Python/getargs.c' line='1401' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='1402' column='1'/> + <parameter type-id='type-id-494' name='kwlist' filepath='Python/getargs.c' line='1403' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_BadArgument' mangled-name='_PyArg_BadArgument' filepath='Python/getargs.c' line='618' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_BadArgument'> + <parameter type-id='type-id-3' name='fname' filepath='Python/getargs.c' line='618' column='1'/> + <parameter type-id='type-id-3' name='displayname' filepath='Python/getargs.c' line='618' column='1'/> + <parameter type-id='type-id-3' name='expected' filepath='Python/getargs.c' line='619' column='1'/> + <parameter type-id='type-id-14' name='arg' filepath='Python/getargs.c' line='619' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyArg_VaParse_SizeT' mangled-name='_PyArg_VaParse_SizeT' filepath='Python/getargs.c' line='187' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_VaParse_SizeT'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='187' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='187' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/getargs.c' line='187' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyArg_VaParse' mangled-name='PyArg_VaParse' filepath='Python/getargs.c' line='174' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyArg_VaParse'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='187' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='187' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/getargs.c' line='187' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseStack_SizeT' mangled-name='_PyArg_ParseStack_SizeT' filepath='Python/getargs.c' line='161' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseStack_SizeT'> + <parameter type-id='type-id-200' name='args' filepath='Python/getargs.c' line='161' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='161' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='161' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseStack' mangled-name='_PyArg_ParseStack' filepath='Python/getargs.c' line='149' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseStack'> + <parameter type-id='type-id-200' name='args' filepath='Python/getargs.c' line='161' column='1'/> + <parameter type-id='type-id-36' name='nargs' filepath='Python/getargs.c' line='161' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='161' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_ParseTuple_SizeT' mangled-name='_PyArg_ParseTuple_SizeT' filepath='Python/getargs.c' line='136' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_ParseTuple_SizeT'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='136' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='136' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyArg_ParseTuple' mangled-name='PyArg_ParseTuple' filepath='Python/getargs.c' line='124' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyArg_ParseTuple'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='136' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='136' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArg_Parse_SizeT' mangled-name='_PyArg_Parse_SizeT' filepath='Python/getargs.c' line='111' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArg_Parse_SizeT'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='136' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='136' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyArg_Parse' mangled-name='PyArg_Parse' filepath='Python/getargs.c' line='99' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyArg_Parse'> + <parameter type-id='type-id-14' name='args' filepath='Python/getargs.c' line='136' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/getargs.c' line='136' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/getcompiler.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='Py_GetCompiler' mangled-name='Py_GetCompiler' filepath='Python/getcompiler.c' line='24' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetCompiler'> + <return type-id='type-id-3'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/getcopyright.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='Py_GetCopyright' mangled-name='Py_GetCopyright' filepath='Python/getcopyright.c' line='20' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetCopyright'> + <return type-id='type-id-3'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Python/getplatform.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='Py_GetPlatform' mangled-name='Py_GetPlatform' filepath='./Python/getplatform.c' line='9' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetPlatform'> + <return type-id='type-id-3'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/getversion.c' comp-dir-path='/src' language='LANG_C99'> + <qualified-type-def type-id='type-id-16' const='yes' id='type-id-769'/> + <var-decl name='Py_Version' type-id='type-id-769' mangled-name='Py_Version' visibility='default' filepath='./Include/pylifecycle.h' line='66' column='1' elf-symbol-id='Py_Version'/> + <function-decl name='Py_GetVersion' mangled-name='Py_GetVersion' filepath='Python/getversion.c' line='9' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetVersion'> + <return type-id='type-id-3'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/hamt.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyHamtItems_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='29' column='1'/> + <var-decl name='_PyHamtKeys_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='27' column='1'/> + <var-decl name='_PyHamtValues_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='28' column='1'/> + <var-decl name='_PyHamt_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='23' column='1'/> + <var-decl name='_PyHamt_ArrayNode_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='24' column='1'/> + <var-decl name='_PyHamt_BitmapNode_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='25' column='1'/> + <var-decl name='_PyHamt_CollisionNode_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_hamt.h' line='26' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/hashtable.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='_Py_hashtable_t' size-in-bits='640' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='60' column='1' id='type-id-770'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='nentries' type-id='type-id-54' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='nbuckets' type-id='type-id-54' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='62' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='buckets' type-id='type-id-771' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='63' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='get_entry_func' type-id='type-id-772' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='65' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='hash_func' type-id='type-id-773' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='66' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='compare_func' type-id='type-id-774' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='key_destroy_func' type-id='type-id-775' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='value_destroy_func' type-id='type-id-775' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='alloc' type-id='type-id-776' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='70' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-777' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='17' column='1' id='type-id-778'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='head' type-id='type-id-779' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='18' column='1'/> + </data-member> + </class-decl> + <class-decl name='_Py_slist_item_s' size-in-bits='64' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='13' column='1' id='type-id-780'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='next' type-id='type-id-781' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='14' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-780' size-in-bits='64' id='type-id-781'/> + <typedef-decl name='_Py_slist_item_t' type-id='type-id-780' filepath='./Include/internal/pycore_hashtable.h' line='15' column='1' id='type-id-782'/> + <pointer-type-def type-id='type-id-782' size-in-bits='64' id='type-id-779'/> + <typedef-decl name='_Py_slist_t' type-id='type-id-778' filepath='./Include/internal/pycore_hashtable.h' line='19' column='1' id='type-id-777'/> + <pointer-type-def type-id='type-id-777' size-in-bits='64' id='type-id-771'/> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-783' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='28' column='1' id='type-id-784'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_Py_slist_item' type-id='type-id-782' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='30' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='key_hash' type-id='type-id-785' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='key' type-id='type-id-18' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='value' type-id='type-id-18' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='34' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='Py_uhash_t' type-id='type-id-54' filepath='./Include/pyport.h' line='148' column='1' id='type-id-785'/> + <typedef-decl name='_Py_hashtable_entry_t' type-id='type-id-784' filepath='./Include/internal/pycore_hashtable.h' line='35' column='1' id='type-id-783'/> + <pointer-type-def type-id='type-id-783' size-in-bits='64' id='type-id-786'/> + <typedef-decl name='_Py_hashtable_t' type-id='type-id-770' filepath='./Include/internal/pycore_hashtable.h' line='42' column='1' id='type-id-787'/> + <pointer-type-def type-id='type-id-787' size-in-bits='64' id='type-id-788'/> + <pointer-type-def type-id='type-id-789' size-in-bits='64' id='type-id-790'/> + <typedef-decl name='_Py_hashtable_get_entry_func' type-id='type-id-790' filepath='./Include/internal/pycore_hashtable.h' line='47' column='1' id='type-id-772'/> + <pointer-type-def type-id='type-id-791' size-in-bits='64' id='type-id-792'/> + <typedef-decl name='_Py_hashtable_hash_func' type-id='type-id-792' filepath='./Include/internal/pycore_hashtable.h' line='44' column='1' id='type-id-773'/> + <pointer-type-def type-id='type-id-793' size-in-bits='64' id='type-id-794'/> + <typedef-decl name='_Py_hashtable_compare_func' type-id='type-id-794' filepath='./Include/internal/pycore_hashtable.h' line='45' column='1' id='type-id-774'/> + <typedef-decl name='_Py_hashtable_destroy_func' type-id='type-id-17' filepath='./Include/internal/pycore_hashtable.h' line='46' column='1' id='type-id-775'/> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-776' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='50' column='1' id='type-id-795'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='malloc' type-id='type-id-796' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='free' type-id='type-id-17' visibility='default' filepath='./Include/internal/pycore_hashtable.h' line='55' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-797' size-in-bits='64' id='type-id-796'/> + <typedef-decl name='_Py_hashtable_allocator_t' type-id='type-id-795' filepath='./Include/internal/pycore_hashtable.h' line='56' column='1' id='type-id-776'/> + <function-decl name='_Py_hashtable_destroy' mangled-name='_Py_hashtable_destroy' filepath='Python/hashtable.c' line='404' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_destroy'> + <parameter type-id='type-id-788' name='ht' filepath='Python/hashtable.c' line='404' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_hashtable_clear' mangled-name='_Py_hashtable_clear' filepath='Python/hashtable.c' line='385' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_clear'> + <parameter type-id='type-id-788' name='ht' filepath='Python/hashtable.c' line='404' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_hashtable_new' mangled-name='_Py_hashtable_new' filepath='Python/hashtable.c' line='363' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_new'> + <parameter type-id='type-id-773' name='hash_func' filepath='Python/hashtable.c' line='363' column='1'/> + <parameter type-id='type-id-774' name='compare_func' filepath='Python/hashtable.c' line='364' column='1'/> + <return type-id='type-id-788'/> + </function-decl> + <pointer-type-def type-id='type-id-776' size-in-bits='64' id='type-id-798'/> + <function-decl name='_Py_hashtable_new_full' mangled-name='_Py_hashtable_new_full' filepath='Python/hashtable.c' line='316' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_new_full'> + <parameter type-id='type-id-773' name='hash_func' filepath='Python/hashtable.c' line='316' column='1'/> + <parameter type-id='type-id-774' name='compare_func' filepath='Python/hashtable.c' line='317' column='1'/> + <parameter type-id='type-id-775' name='key_destroy_func' filepath='Python/hashtable.c' line='318' column='1'/> + <parameter type-id='type-id-775' name='value_destroy_func' filepath='Python/hashtable.c' line='319' column='1'/> + <parameter type-id='type-id-798' name='allocator' filepath='Python/hashtable.c' line='320' column='1'/> + <return type-id='type-id-788'/> + </function-decl> + <pointer-type-def type-id='type-id-799' size-in-bits='64' id='type-id-800'/> + <typedef-decl name='_Py_hashtable_foreach_func' type-id='type-id-800' filepath='./Include/internal/pycore_hashtable.h' line='96' column='1' id='type-id-801'/> + <function-decl name='_Py_hashtable_foreach' mangled-name='_Py_hashtable_foreach' filepath='Python/hashtable.c' line='261' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_foreach'> + <parameter type-id='type-id-788' name='ht' filepath='Python/hashtable.c' line='261' column='1'/> + <parameter type-id='type-id-801' name='func' filepath='Python/hashtable.c' line='262' column='1'/> + <parameter type-id='type-id-18' name='user_data' filepath='Python/hashtable.c' line='263' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_hashtable_get' mangled-name='_Py_hashtable_get' filepath='Python/hashtable.c' line='248' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_get'> + <parameter type-id='type-id-788' name='ht' filepath='Python/hashtable.c' line='248' column='1'/> + <parameter type-id='type-id-18' name='key' filepath='Python/hashtable.c' line='248' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='_Py_hashtable_set' mangled-name='_Py_hashtable_set' filepath='Python/hashtable.c' line='209' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_set'> + <parameter type-id='type-id-788' name='ht' filepath='Python/hashtable.c' line='209' column='1'/> + <parameter type-id='type-id-18' name='key' filepath='Python/hashtable.c' line='209' column='1'/> + <parameter type-id='type-id-18' name='value' filepath='Python/hashtable.c' line='209' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_hashtable_steal' mangled-name='_Py_hashtable_steal' filepath='Python/hashtable.c' line='174' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_steal'> + <parameter type-id='type-id-788' name='ht' filepath='Python/hashtable.c' line='174' column='1'/> + <parameter type-id='type-id-18' name='key' filepath='Python/hashtable.c' line='174' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <qualified-type-def type-id='type-id-787' const='yes' id='type-id-802'/> + <pointer-type-def type-id='type-id-802' size-in-bits='64' id='type-id-803'/> + <function-decl name='_Py_hashtable_size' mangled-name='_Py_hashtable_size' filepath='Python/hashtable.c' line='120' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_size'> + <parameter type-id='type-id-803' name='ht' filepath='Python/hashtable.c' line='120' column='1'/> + <return type-id='type-id-54'/> + </function-decl> + <function-decl name='_Py_hashtable_compare_direct' mangled-name='_Py_hashtable_compare_direct' filepath='Python/hashtable.c' line='99' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_compare_direct'> + <parameter type-id='type-id-18' name='key1' filepath='Python/hashtable.c' line='99' column='1'/> + <parameter type-id='type-id-18' name='key2' filepath='Python/hashtable.c' line='99' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_hashtable_hash_ptr' mangled-name='_Py_hashtable_hash_ptr' filepath='Python/hashtable.c' line='92' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_hashtable_hash_ptr'> + <parameter type-id='type-id-18' name='key' filepath='Python/hashtable.c' line='92' column='1'/> + <return type-id='type-id-785'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-789'> + <parameter type-id='type-id-788'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-786'/> + </function-type> + <function-type size-in-bits='64' id='type-id-799'> + <parameter type-id='type-id-788'/> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-793'> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-8'/> + </function-type> + <function-type size-in-bits='64' id='type-id-791'> + <parameter type-id='type-id-18'/> + <return type-id='type-id-785'/> + </function-type> + <function-type size-in-bits='64' id='type-id-797'> + <parameter type-id='type-id-54'/> + <return type-id='type-id-18'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/import.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='_inittab' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/cpython/import.h' line='24' column='1' id='type-id-804'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/cpython/import.h' line='25' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='initfunc' type-id='type-id-534' visibility='default' filepath='./Include/cpython/import.h' line='26' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-804' size-in-bits='64' id='type-id-805'/> + <var-decl name='PyImport_Inittab' type-id='type-id-805' mangled-name='PyImport_Inittab' visibility='default' filepath='./Include/cpython/import.h' line='28' column='1' elf-symbol-id='PyImport_Inittab'/> + <function-decl name='_PyImport_GetModuleAttrString' mangled-name='_PyImport_GetModuleAttrString' filepath='Python/import.c' line='2649' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_GetModuleAttrString'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='522' column='1'/> + <parameter type-id='type-id-3' name='alternate_command' filepath='Python/codecs.c' line='523' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyImport_GetModuleAttr' mangled-name='_PyImport_GetModuleAttr' filepath='Python/import.c' line='2637' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_GetModuleAttr'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='1071' column='1'/> + <parameter type-id='type-id-14' name='w' filepath='Objects/abstract.c' line='1071' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_AppendInittab' mangled-name='PyImport_AppendInittab' filepath='Python/import.c' line='2623' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_AppendInittab'> + <parameter type-id='type-id-3' name='name' filepath='Python/import.c' line='2623' column='1'/> + <parameter type-id='type-id-534' name='initfunc' filepath='Python/import.c' line='2623' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyImport_ExtendInittab' mangled-name='PyImport_ExtendInittab' filepath='Python/import.c' line='2577' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ExtendInittab'> + <parameter type-id='type-id-805' name='newtab' filepath='Python/import.c' line='2577' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyInit__imp' mangled-name='PyInit__imp' filepath='Python/import.c' line='2516' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__imp'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_Import' mangled-name='PyImport_Import' filepath='Python/import.c' line='1975' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_Import'> + <parameter type-id='type-id-14' name='module_name' filepath='Python/import.c' line='1975' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ReloadModule' mangled-name='PyImport_ReloadModule' filepath='Python/import.c' line='1944' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ReloadModule'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ImportModuleLevel' mangled-name='PyImport_ImportModuleLevel' filepath='Python/import.c' line='1926' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ImportModuleLevel'> + <parameter type-id='type-id-3' name='name' filepath='Python/import.c' line='1926' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Python/import.c' line='1926' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Python/import.c' line='1926' column='1'/> + <parameter type-id='type-id-14' name='fromlist' filepath='Python/import.c' line='1927' column='1'/> + <parameter type-id='type-id-8' name='level' filepath='Python/import.c' line='1927' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ImportModuleLevelObject' mangled-name='PyImport_ImportModuleLevelObject' filepath='Python/import.c' line='1775' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ImportModuleLevelObject'> + <parameter type-id='type-id-14' name='name' filepath='Python/import.c' line='1775' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Python/import.c' line='1775' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Python/import.c' line='1776' column='1'/> + <parameter type-id='type-id-14' name='fromlist' filepath='Python/import.c' line='1776' column='1'/> + <parameter type-id='type-id-8' name='level' filepath='Python/import.c' line='1777' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_GetModule' mangled-name='PyImport_GetModule' filepath='Python/import.c' line='1758' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_GetModule'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ImportModuleNoBlock' mangled-name='PyImport_ImportModuleNoBlock' filepath='Python/import.c' line='1468' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ImportModuleNoBlock'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='356' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ImportModule' mangled-name='PyImport_ImportModule' filepath='Python/import.c' line='1444' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ImportModule'> + <parameter type-id='type-id-3' name='str' filepath='Objects/bytesobject.c' line='147' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ImportFrozenModule' mangled-name='PyImport_ImportFrozenModule' filepath='Python/import.c' line='1427' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ImportFrozenModule'> + <parameter type-id='type-id-3' name='name' filepath='Python/import.c' line='1427' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyImport_ImportFrozenModuleObject' mangled-name='PyImport_ImportFrozenModuleObject' filepath='Python/import.c' line='1350' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ImportFrozenModuleObject'> + <parameter type-id='type-id-14' name='name' filepath='Python/import.c' line='1350' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyImport_GetImporter' mangled-name='PyImport_GetImporter' filepath='Python/import.c' line='950' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_GetImporter'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2817' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ExecCodeModuleObject' mangled-name='PyImport_ExecCodeModuleObject' filepath='Python/import.c' line='782' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ExecCodeModuleObject'> + <parameter type-id='type-id-14' name='name' filepath='Python/import.c' line='782' column='1'/> + <parameter type-id='type-id-14' name='co' filepath='Python/import.c' line='782' column='1'/> + <parameter type-id='type-id-14' name='pathname' filepath='Python/import.c' line='782' column='1'/> + <parameter type-id='type-id-14' name='cpathname' filepath='Python/import.c' line='783' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ExecCodeModuleWithPathnames' mangled-name='PyImport_ExecCodeModuleWithPathnames' filepath='Python/import.c' line='680' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ExecCodeModuleWithPathnames'> + <parameter type-id='type-id-3' name='name' filepath='Python/import.c' line='680' column='1'/> + <parameter type-id='type-id-14' name='co' filepath='Python/import.c' line='680' column='1'/> + <parameter type-id='type-id-3' name='pathname' filepath='Python/import.c' line='681' column='1'/> + <parameter type-id='type-id-3' name='cpathname' filepath='Python/import.c' line='682' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ExecCodeModuleEx' mangled-name='PyImport_ExecCodeModuleEx' filepath='Python/import.c' line='673' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ExecCodeModuleEx'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='380' column='1'/> + <parameter type-id='type-id-14' name='stream' filepath='Python/codecs.c' line='381' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/codecs.c' line='382' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_ExecCodeModule' mangled-name='PyImport_ExecCodeModule' filepath='Python/import.c' line='666' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_ExecCodeModule'> + <parameter type-id='type-id-3' name='name' filepath='Python/import.c' line='666' column='1'/> + <parameter type-id='type-id-14' name='co' filepath='Python/import.c' line='666' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_AddModule' mangled-name='PyImport_AddModule' filepath='Python/import.c' line='617' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_AddModule'> + <parameter type-id='type-id-3' name='str' filepath='Objects/bytesobject.c' line='147' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyImport_AddModuleObject' mangled-name='PyImport_AddModuleObject' filepath='Python/import.c' line='599' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_AddModuleObject'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2791' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyImport_FixupBuiltin' mangled-name='_PyImport_FixupBuiltin' filepath='Python/import.c' line='477' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_FixupBuiltin'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-3' name='key' filepath='Objects/abstract.c' line='2359' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Objects/abstract.c' line='2359' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyImport_FixupExtensionObject' mangled-name='_PyImport_FixupExtensionObject' filepath='Python/import.c' line='412' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_FixupExtensionObject'> + <parameter type-id='type-id-14' name='mod' filepath='Python/import.c' line='412' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='Python/import.c' line='412' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/import.c' line='413' column='1'/> + <parameter type-id='type-id-14' name='modules' filepath='Python/import.c' line='413' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyImport_GetMagicTag' mangled-name='PyImport_GetMagicTag' filepath='Python/import.c' line='389' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_GetMagicTag'> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='PyImport_GetMagicNumber' mangled-name='PyImport_GetMagicNumber' filepath='Python/import.c' line='367' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_GetMagicNumber'> + <return type-id='type-id-53'/> + </function-decl> + <function-decl name='_PyImport_SetModuleString' mangled-name='_PyImport_SetModuleString' filepath='Python/import.c' line='304' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_SetModuleString'> + <parameter type-id='type-id-3' name='name' filepath='Python/import.c' line='304' column='1'/> + <parameter type-id='type-id-14' name='m' filepath='Python/import.c' line='304' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyImport_SetModule' mangled-name='_PyImport_SetModule' filepath='Python/import.c' line='296' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_SetModule'> + <parameter type-id='type-id-14' name='od' filepath='Objects/odictobject.c' line='1624' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/odictobject.c' line='1624' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyImport_GetModuleId' mangled-name='_PyImport_GetModuleId' filepath='Python/import.c' line='286' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_GetModuleId'> + <parameter type-id='type-id-499' name='nameid' filepath='Python/import.c' line='286' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyImport_IsInitialized' mangled-name='_PyImport_IsInitialized' filepath='Python/import.c' line='278' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_IsInitialized'> + <parameter type-id='type-id-11' name='interp' filepath='Python/import.c' line='278' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyImport_GetModuleDict' mangled-name='PyImport_GetModuleDict' filepath='Python/import.c' line='264' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyImport_GetModuleDict'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyImport_ReleaseLock' mangled-name='_PyImport_ReleaseLock' filepath='Python/import.c' line='138' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_ReleaseLock'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyImport_AcquireLock' mangled-name='_PyImport_AcquireLock' filepath='Python/import.c' line='111' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyImport_AcquireLock'> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/initconfig.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='Py_UTF8Mode' type-id='type-id-8' mangled-name='Py_UTF8Mode' visibility='default' filepath='./Include/fileobject.h' line='29' column='1' elf-symbol-id='Py_UTF8Mode'/> + <var-decl name='Py_DebugFlag' type-id='type-id-8' mangled-name='Py_DebugFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='8' column='1' elf-symbol-id='Py_DebugFlag'/> + <var-decl name='Py_VerboseFlag' type-id='type-id-8' mangled-name='Py_VerboseFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='9' column='1' elf-symbol-id='Py_VerboseFlag'/> + <var-decl name='Py_QuietFlag' type-id='type-id-8' mangled-name='Py_QuietFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='10' column='1' elf-symbol-id='Py_QuietFlag'/> + <var-decl name='Py_InteractiveFlag' type-id='type-id-8' mangled-name='Py_InteractiveFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='11' column='1' elf-symbol-id='Py_InteractiveFlag'/> + <var-decl name='Py_InspectFlag' type-id='type-id-8' mangled-name='Py_InspectFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='12' column='1' elf-symbol-id='Py_InspectFlag'/> + <var-decl name='Py_OptimizeFlag' type-id='type-id-8' mangled-name='Py_OptimizeFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='13' column='1' elf-symbol-id='Py_OptimizeFlag'/> + <var-decl name='Py_NoSiteFlag' type-id='type-id-8' mangled-name='Py_NoSiteFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='14' column='1' elf-symbol-id='Py_NoSiteFlag'/> + <var-decl name='Py_BytesWarningFlag' type-id='type-id-8' mangled-name='Py_BytesWarningFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='15' column='1' elf-symbol-id='Py_BytesWarningFlag'/> + <var-decl name='Py_FrozenFlag' type-id='type-id-8' mangled-name='Py_FrozenFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='16' column='1' elf-symbol-id='Py_FrozenFlag'/> + <var-decl name='Py_IgnoreEnvironmentFlag' type-id='type-id-8' mangled-name='Py_IgnoreEnvironmentFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='17' column='1' elf-symbol-id='Py_IgnoreEnvironmentFlag'/> + <var-decl name='Py_DontWriteBytecodeFlag' type-id='type-id-8' mangled-name='Py_DontWriteBytecodeFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='18' column='1' elf-symbol-id='Py_DontWriteBytecodeFlag'/> + <var-decl name='Py_NoUserSiteDirectory' type-id='type-id-8' mangled-name='Py_NoUserSiteDirectory' visibility='default' filepath='./Include/cpython/pydebug.h' line='19' column='1' elf-symbol-id='Py_NoUserSiteDirectory'/> + <var-decl name='Py_UnbufferedStdioFlag' type-id='type-id-8' mangled-name='Py_UnbufferedStdioFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='20' column='1' elf-symbol-id='Py_UnbufferedStdioFlag'/> + <var-decl name='Py_HashRandomizationFlag' type-id='type-id-8' mangled-name='Py_HashRandomizationFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='21' column='1' elf-symbol-id='Py_HashRandomizationFlag'/> + <var-decl name='Py_IsolatedFlag' type-id='type-id-8' mangled-name='Py_IsolatedFlag' visibility='default' filepath='./Include/cpython/pydebug.h' line='22' column='1' elf-symbol-id='Py_IsolatedFlag'/> + <function-decl name='_Py_GetConfigsAsDict' mangled-name='_Py_GetConfigsAsDict' filepath='Python/initconfig.c' line='2967' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetConfigsAsDict'> + <return type-id='type-id-14'/> + </function-decl> + <class-decl name='__anonymous_struct__' size-in-bits='256' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-806' visibility='default' filepath='./Include/cpython/initconfig.h' line='10' column='1' id='type-id-807'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='_type' type-id='type-id-808' visibility='default' filepath='./Include/cpython/initconfig.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='func' type-id='type-id-3' visibility='default' filepath='./Include/cpython/initconfig.h' line='16' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='err_msg' type-id='type-id-3' visibility='default' filepath='./Include/cpython/initconfig.h' line='17' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='exitcode' type-id='type-id-8' visibility='default' filepath='./Include/cpython/initconfig.h' line='18' column='1'/> + </data-member> + </class-decl> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/cpython/initconfig.h' line='11' column='1' id='type-id-808'> + <underlying-type type-id='type-id-126'/> + <enumerator name='_PyStatus_TYPE_OK' value='0'/> + <enumerator name='_PyStatus_TYPE_ERROR' value='1'/> + <enumerator name='_PyStatus_TYPE_EXIT' value='2'/> + </enum-decl> + <typedef-decl name='PyStatus' type-id='type-id-807' filepath='./Include/cpython/initconfig.h' line='19' column='1' id='type-id-806'/> + <pointer-type-def type-id='type-id-34' size-in-bits='64' id='type-id-809'/> + <function-decl name='PyConfig_Read' mangled-name='PyConfig_Read' filepath='Python/initconfig.c' line='2960' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_Read'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='2960' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <pointer-type-def type-id='type-id-372' size-in-bits='64' id='type-id-810'/> + <function-decl name='PyConfig_SetWideStringList' mangled-name='PyConfig_SetWideStringList' filepath='Python/initconfig.c' line='2876' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_SetWideStringList'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='2876' column='1'/> + <parameter type-id='type-id-810' name='list' filepath='Python/initconfig.c' line='2876' column='1'/> + <parameter type-id='type-id-36' name='length' filepath='Python/initconfig.c' line='2877' column='1'/> + <parameter type-id='type-id-374' name='items' filepath='Python/initconfig.c' line='2877' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <qualified-type-def type-id='type-id-281' const='yes' id='type-id-811'/> + <pointer-type-def type-id='type-id-811' size-in-bits='64' id='type-id-812'/> + <function-decl name='PyConfig_SetArgv' mangled-name='PyConfig_SetArgv' filepath='Python/initconfig.c' line='2864' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_SetArgv'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='2864' column='1'/> + <parameter type-id='type-id-36' name='argc' filepath='Python/initconfig.c' line='2864' column='1'/> + <parameter type-id='type-id-812' name='argv' filepath='Python/initconfig.c' line='2864' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyConfig_SetBytesArgv' mangled-name='PyConfig_SetBytesArgv' filepath='Python/initconfig.c' line='2852' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_SetBytesArgv'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='2852' column='1'/> + <parameter type-id='type-id-36' name='argc' filepath='Python/initconfig.c' line='2852' column='1'/> + <parameter type-id='type-id-477' name='argv' filepath='Python/initconfig.c' line='2852' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='_PyConfig_FromDict' mangled-name='_PyConfig_FromDict' filepath='Python/initconfig.c' line='1270' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyConfig_FromDict'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='1270' column='1'/> + <parameter type-id='type-id-14' name='dict' filepath='Python/initconfig.c' line='1270' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <qualified-type-def type-id='type-id-34' const='yes' id='type-id-813'/> + <pointer-type-def type-id='type-id-813' size-in-bits='64' id='type-id-814'/> + <function-decl name='_PyConfig_AsDict' mangled-name='_PyConfig_AsDict' filepath='Python/initconfig.c' line='1003' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyConfig_AsDict'> + <parameter type-id='type-id-814' name='config' filepath='Python/initconfig.c' line='1003' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyConfig_SetBytesString' mangled-name='PyConfig_SetBytesString' filepath='Python/initconfig.c' line='895' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_SetBytesString'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='895' column='1'/> + <parameter type-id='type-id-374' name='config_str' filepath='Python/initconfig.c' line='895' column='1'/> + <parameter type-id='type-id-3' name='str' filepath='Python/initconfig.c' line='896' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyConfig_SetString' mangled-name='PyConfig_SetString' filepath='Python/initconfig.c' line='833' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_SetString'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='833' column='1'/> + <parameter type-id='type-id-374' name='config_str' filepath='Python/initconfig.c' line='833' column='1'/> + <parameter type-id='type-id-545' name='str' filepath='Python/initconfig.c' line='833' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyConfig_InitIsolatedConfig' mangled-name='PyConfig_InitIsolatedConfig' filepath='Python/initconfig.c' line='810' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_InitIsolatedConfig'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='810' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyConfig_InitPythonConfig' mangled-name='PyConfig_InitPythonConfig' filepath='Python/initconfig.c' line='799' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_InitPythonConfig'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='810' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyConfig_InitCompatConfig' mangled-name='_PyConfig_InitCompatConfig' filepath='Python/initconfig.c' line='727' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyConfig_InitCompatConfig'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='810' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyConfig_Clear' mangled-name='PyConfig_Clear' filepath='Python/initconfig.c' line='684' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyConfig_Clear'> + <parameter type-id='type-id-809' name='config' filepath='Python/initconfig.c' line='810' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <pointer-type-def type-id='type-id-374' size-in-bits='64' id='type-id-815'/> + <function-decl name='Py_GetArgcArgv' mangled-name='Py_GetArgcArgv' filepath='Python/initconfig.c' line='609' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetArgcArgv'> + <parameter type-id='type-id-501' name='argc' filepath='Python/initconfig.c' line='609' column='1'/> + <parameter type-id='type-id-815' name='argv' filepath='Python/initconfig.c' line='609' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_ClearArgcArgv' mangled-name='_Py_ClearArgcArgv' filepath='Python/initconfig.c' line='580' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_ClearArgcArgv'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_ClearStandardStreamEncoding' mangled-name='_Py_ClearStandardStreamEncoding' filepath='Python/initconfig.c' line='553' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_ClearStandardStreamEncoding'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_SetStandardStreamEncoding' mangled-name='Py_SetStandardStreamEncoding' filepath='Python/initconfig.c' line='498' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_SetStandardStreamEncoding'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/initconfig.c' line='498' column='1'/> + <parameter type-id='type-id-3' name='errors' filepath='Python/initconfig.c' line='498' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <qualified-type-def type-id='type-id-372' const='yes' id='type-id-816'/> + <pointer-type-def type-id='type-id-816' size-in-bits='64' id='type-id-817'/> + <function-decl name='_PyWideStringList_AsList' mangled-name='_PyWideStringList_AsList' filepath='Python/initconfig.c' line='467' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyWideStringList_AsList'> + <parameter type-id='type-id-817' name='list' filepath='Python/initconfig.c' line='467' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyWideStringList_Extend' mangled-name='_PyWideStringList_Extend' filepath='Python/initconfig.c' line='442' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyWideStringList_Extend'> + <parameter type-id='type-id-810' name='list' filepath='Python/initconfig.c' line='442' column='1'/> + <parameter type-id='type-id-817' name='list2' filepath='Python/initconfig.c' line='442' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyWideStringList_Append' mangled-name='PyWideStringList_Append' filepath='Python/initconfig.c' line='435' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyWideStringList_Append'> + <parameter type-id='type-id-810' name='list' filepath='Python/initconfig.c' line='435' column='1'/> + <parameter type-id='type-id-545' name='item' filepath='Python/initconfig.c' line='435' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyWideStringList_Insert' mangled-name='PyWideStringList_Insert' filepath='Python/initconfig.c' line='394' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyWideStringList_Insert'> + <parameter type-id='type-id-810' name='list' filepath='Python/initconfig.c' line='394' column='1'/> + <parameter type-id='type-id-36' name='index' filepath='Python/initconfig.c' line='395' column='1'/> + <parameter type-id='type-id-545' name='item' filepath='Python/initconfig.c' line='395' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='_PyWideStringList_Copy' mangled-name='_PyWideStringList_Copy' filepath='Python/initconfig.c' line='359' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyWideStringList_Copy'> + <parameter type-id='type-id-810' name='list' filepath='Python/initconfig.c' line='359' column='1'/> + <parameter type-id='type-id-817' name='list2' filepath='Python/initconfig.c' line='359' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyWideStringList_Clear' mangled-name='_PyWideStringList_Clear' filepath='Python/initconfig.c' line='346' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyWideStringList_Clear'> + <parameter type-id='type-id-810' name='list' filepath='Python/initconfig.c' line='346' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyStatus_Exception' mangled-name='PyStatus_Exception' filepath='Python/initconfig.c' line='306' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStatus_Exception'> + <parameter type-id='type-id-806' name='status' filepath='Python/initconfig.c' line='306' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyStatus_IsExit' mangled-name='PyStatus_IsExit' filepath='Python/initconfig.c' line='303' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStatus_IsExit'> + <parameter type-id='type-id-806' name='status' filepath='Python/initconfig.c' line='306' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyStatus_IsError' mangled-name='PyStatus_IsError' filepath='Python/initconfig.c' line='300' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStatus_IsError'> + <parameter type-id='type-id-806' name='status' filepath='Python/initconfig.c' line='306' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyStatus_Exit' mangled-name='PyStatus_Exit' filepath='Python/initconfig.c' line='296' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStatus_Exit'> + <parameter type-id='type-id-8' name='exitcode' filepath='Python/initconfig.c' line='296' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyStatus_NoMemory' mangled-name='PyStatus_NoMemory' filepath='Python/initconfig.c' line='293' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStatus_NoMemory'> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyStatus_Error' mangled-name='PyStatus_Error' filepath='Python/initconfig.c' line='286' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStatus_Error'> + <parameter type-id='type-id-3' name='err_msg' filepath='Python/initconfig.c' line='286' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='PyStatus_Ok' mangled-name='PyStatus_Ok' filepath='Python/initconfig.c' line='283' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyStatus_Ok'> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='Py_GETENV' mangled-name='Py_GETENV' filepath='Python/initconfig.c' line='273' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GETENV'> + <parameter type-id='type-id-3' name='name' filepath='Python/initconfig.c' line='273' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/marshal.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyMarshal_Init' mangled-name='PyMarshal_Init' filepath='Python/marshal.c' line='1893' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_Init'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMarshal_WriteObjectToString' mangled-name='PyMarshal_WriteObjectToString' filepath='Python/marshal.c' line='1644' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_WriteObjectToString'> + <parameter type-id='type-id-14' name='x' filepath='Python/marshal.c' line='1644' column='1'/> + <parameter type-id='type-id-8' name='version' filepath='Python/marshal.c' line='1644' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMarshal_ReadObjectFromString' mangled-name='PyMarshal_ReadObjectFromString' filepath='Python/marshal.c' line='1623' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_ReadObjectFromString'> + <parameter type-id='type-id-3' name='bytes' filepath='Objects/bytearrayobject.c' line='108' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Objects/bytearrayobject.c' line='108' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMarshal_ReadObjectFromFile' mangled-name='PyMarshal_ReadObjectFromFile' filepath='Python/marshal.c' line='1603' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_ReadObjectFromFile'> + <parameter type-id='type-id-473' name='fp' filepath='Python/marshal.c' line='1603' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMarshal_ReadLastObjectFromFile' mangled-name='PyMarshal_ReadLastObjectFromFile' filepath='Python/marshal.c' line='1578' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_ReadLastObjectFromFile'> + <parameter type-id='type-id-473' name='fp' filepath='Python/marshal.c' line='1578' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyMarshal_ReadLongFromFile' mangled-name='PyMarshal_ReadLongFromFile' filepath='Python/marshal.c' line='1542' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_ReadLongFromFile'> + <parameter type-id='type-id-473' name='fp' filepath='Python/marshal.c' line='1542' column='1'/> + <return type-id='type-id-53'/> + </function-decl> + <function-decl name='PyMarshal_ReadShortFromFile' mangled-name='PyMarshal_ReadShortFromFile' filepath='Python/marshal.c' line='1526' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_ReadShortFromFile'> + <parameter type-id='type-id-473' name='fp' filepath='Python/marshal.c' line='1526' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyMarshal_WriteObjectToFile' mangled-name='PyMarshal_WriteObjectToFile' filepath='Python/marshal.c' line='641' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_WriteObjectToFile'> + <parameter type-id='type-id-14' name='x' filepath='Python/marshal.c' line='641' column='1'/> + <parameter type-id='type-id-473' name='fp' filepath='Python/marshal.c' line='641' column='1'/> + <parameter type-id='type-id-8' name='version' filepath='Python/marshal.c' line='641' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyMarshal_WriteLongToFile' mangled-name='PyMarshal_WriteLongToFile' filepath='Python/marshal.c' line='626' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMarshal_WriteLongToFile'> + <parameter type-id='type-id-53' name='x' filepath='Python/marshal.c' line='626' column='1'/> + <parameter type-id='type-id-473' name='fp' filepath='Python/marshal.c' line='626' column='1'/> + <parameter type-id='type-id-8' name='version' filepath='Python/marshal.c' line='626' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/modsupport.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_Py_PackageContext' type-id='type-id-3' mangled-name='_Py_PackageContext' visibility='default' filepath='./Include/cpython/modsupport.h' line='107' column='1' elf-symbol-id='_Py_PackageContext'/> + <function-decl name='PyModule_AddType' mangled-name='PyModule_AddType' filepath='Python/modsupport.c' line='704' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_AddType'> + <parameter type-id='type-id-14' name='module' filepath='Python/modsupport.c' line='704' column='1'/> + <parameter type-id='type-id-74' name='type' filepath='Python/modsupport.c' line='704' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyModule_AddStringConstant' mangled-name='PyModule_AddStringConstant' filepath='Python/modsupport.c' line='692' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_AddStringConstant'> + <parameter type-id='type-id-14' name='m' filepath='Python/modsupport.c' line='692' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/modsupport.c' line='692' column='1'/> + <parameter type-id='type-id-3' name='value' filepath='Python/modsupport.c' line='692' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyModule_AddIntConstant' mangled-name='PyModule_AddIntConstant' filepath='Python/modsupport.c' line='680' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_AddIntConstant'> + <parameter type-id='type-id-14' name='m' filepath='Python/modsupport.c' line='680' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/modsupport.c' line='680' column='1'/> + <parameter type-id='type-id-53' name='value' filepath='Python/modsupport.c' line='680' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyModule_AddObject' mangled-name='PyModule_AddObject' filepath='Python/modsupport.c' line='670' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_AddObject'> + <parameter type-id='type-id-14' name='mod' filepath='Python/modsupport.c' line='670' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/modsupport.c' line='670' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/modsupport.c' line='670' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyModule_AddObjectRef' mangled-name='PyModule_AddObjectRef' filepath='Python/modsupport.c' line='637' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyModule_AddObjectRef'> + <parameter type-id='type-id-14' name='mod' filepath='Python/modsupport.c' line='670' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/modsupport.c' line='670' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/modsupport.c' line='670' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_VaBuildStack_SizeT' mangled-name='_Py_VaBuildStack_SizeT' filepath='Python/modsupport.c' line='581' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_VaBuildStack_SizeT'> + <parameter type-id='type-id-22' name='small_stack' filepath='Python/modsupport.c' line='581' column='1'/> + <parameter type-id='type-id-36' name='small_stack_len' filepath='Python/modsupport.c' line='581' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/modsupport.c' line='582' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/modsupport.c' line='582' column='1'/> + <parameter type-id='type-id-168' name='p_nargs' filepath='Python/modsupport.c' line='582' column='1'/> + <return type-id='type-id-22'/> + </function-decl> + <function-decl name='_Py_VaBuildStack' mangled-name='_Py_VaBuildStack' filepath='Python/modsupport.c' line='574' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_VaBuildStack'> + <parameter type-id='type-id-22' name='small_stack' filepath='Python/modsupport.c' line='581' column='1'/> + <parameter type-id='type-id-36' name='small_stack_len' filepath='Python/modsupport.c' line='581' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/modsupport.c' line='582' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/modsupport.c' line='582' column='1'/> + <parameter type-id='type-id-168' name='p_nargs' filepath='Python/modsupport.c' line='582' column='1'/> + <return type-id='type-id-22'/> + </function-decl> + <function-decl name='_Py_VaBuildValue_SizeT' mangled-name='_Py_VaBuildValue_SizeT' filepath='Python/modsupport.c' line='545' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_VaBuildValue_SizeT'> + <parameter type-id='type-id-3' name='format' filepath='Python/modsupport.c' line='545' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/modsupport.c' line='545' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='Py_VaBuildValue' mangled-name='Py_VaBuildValue' filepath='Python/modsupport.c' line='539' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_VaBuildValue'> + <parameter type-id='type-id-3' name='format' filepath='Python/modsupport.c' line='545' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/modsupport.c' line='545' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_BuildValue_SizeT' mangled-name='_Py_BuildValue_SizeT' filepath='Python/modsupport.c' line='528' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_BuildValue_SizeT'> + <parameter type-id='type-id-3' name='format' filepath='Objects/bytesobject.c' line='375' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='Py_BuildValue' mangled-name='Py_BuildValue' filepath='Python/modsupport.c' line='517' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_BuildValue'> + <parameter type-id='type-id-3' name='format' filepath='Objects/bytesobject.c' line='375' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_convert_optional_to_ssize_t' mangled-name='_Py_convert_optional_to_ssize_t' filepath='Python/modsupport.c' line='18' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_convert_optional_to_ssize_t'> + <parameter type-id='type-id-14' name='o' filepath='Objects/capsule.c' line='181' column='1'/> + <parameter type-id='type-id-18' name='context' filepath='Objects/capsule.c' line='181' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/mysnprintf.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyOS_vsnprintf' mangled-name='PyOS_vsnprintf' filepath='Python/mysnprintf.c' line='52' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_vsnprintf'> + <parameter type-id='type-id-115' name='str' filepath='Python/mysnprintf.c' line='52' column='1'/> + <parameter type-id='type-id-54' name='size' filepath='Python/mysnprintf.c' line='52' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/mysnprintf.c' line='52' column='1'/> + <parameter type-id='type-id-496' name='va' filepath='Python/mysnprintf.c' line='52' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyOS_snprintf' mangled-name='PyOS_snprintf' filepath='Python/mysnprintf.c' line='40' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_snprintf'> + <parameter type-id='type-id-115' name='str' filepath='Python/mysnprintf.c' line='40' column='1'/> + <parameter type-id='type-id-54' name='size' filepath='Python/mysnprintf.c' line='40' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/mysnprintf.c' line='40' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/mystrtoul.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyOS_strtol' mangled-name='PyOS_strtol' filepath='Python/mystrtoul.c' line='263' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_strtol'> + <parameter type-id='type-id-3' name='str' filepath='Python/mystrtoul.c' line='263' column='1'/> + <parameter type-id='type-id-494' name='ptr' filepath='Python/mystrtoul.c' line='263' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Python/mystrtoul.c' line='263' column='1'/> + <return type-id='type-id-53'/> + </function-decl> + <function-decl name='PyOS_strtoul' mangled-name='PyOS_strtoul' filepath='Python/mystrtoul.c' line='95' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_strtoul'> + <parameter type-id='type-id-3' name='str' filepath='Python/mystrtoul.c' line='95' column='1'/> + <parameter type-id='type-id-494' name='ptr' filepath='Python/mystrtoul.c' line='95' column='1'/> + <parameter type-id='type-id-8' name='base' filepath='Python/mystrtoul.c' line='95' column='1'/> + <return type-id='type-id-16'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pathconfig.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='Py_GetProgramName' mangled-name='Py_GetProgramName' filepath='Python/pathconfig.c' line='369' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetProgramName'> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='Py_GetPythonHome' mangled-name='Py_GetPythonHome' filepath='Python/pathconfig.c' line='362' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetPythonHome'> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='Py_GetProgramFullPath' mangled-name='Py_GetProgramFullPath' filepath='Python/pathconfig.c' line='355' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetProgramFullPath'> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='Py_GetExecPrefix' mangled-name='Py_GetExecPrefix' filepath='Python/pathconfig.c' line='348' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetExecPrefix'> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='Py_GetPrefix' mangled-name='Py_GetPrefix' filepath='Python/pathconfig.c' line='341' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetPrefix'> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='Py_GetPath' mangled-name='Py_GetPath' filepath='Python/pathconfig.c' line='318' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_GetPath'> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='_Py_SetProgramFullPath' mangled-name='_Py_SetProgramFullPath' filepath='Python/pathconfig.c' line='297' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_SetProgramFullPath'> + <parameter type-id='type-id-545' name='program_full_path' filepath='Python/pathconfig.c' line='297' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_SetProgramName' mangled-name='Py_SetProgramName' filepath='Python/pathconfig.c' line='277' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_SetProgramName'> + <parameter type-id='type-id-545' name='program_full_path' filepath='Python/pathconfig.c' line='297' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_SetPythonHome' mangled-name='Py_SetPythonHome' filepath='Python/pathconfig.c' line='256' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_SetPythonHome'> + <parameter type-id='type-id-545' name='program_full_path' filepath='Python/pathconfig.c' line='297' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_SetPath' mangled-name='Py_SetPath' filepath='Python/pathconfig.c' line='215' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_SetPath'> + <parameter type-id='type-id-545' name='path' filepath='Python/pathconfig.c' line='215' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyPathConfig_ClearGlobal' mangled-name='_PyPathConfig_ClearGlobal' filepath='Python/pathconfig.c' line='57' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyPathConfig_ClearGlobal'> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/preconfig.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='Py_FileSystemDefaultEncoding' type-id='type-id-3' mangled-name='Py_FileSystemDefaultEncoding' visibility='default' filepath='./Include/fileobject.h' line='22' column='1' elf-symbol-id='Py_FileSystemDefaultEncoding'/> + <var-decl name='Py_HasFileSystemDefaultEncoding' type-id='type-id-8' mangled-name='Py_HasFileSystemDefaultEncoding' visibility='default' filepath='./Include/fileobject.h' line='26' column='1' elf-symbol-id='Py_HasFileSystemDefaultEncoding'/> + <var-decl name='Py_FileSystemDefaultEncodeErrors' type-id='type-id-3' mangled-name='Py_FileSystemDefaultEncodeErrors' visibility='default' filepath='./Include/fileobject.h' line='24' column='1' elf-symbol-id='Py_FileSystemDefaultEncodeErrors'/> + <var-decl name='_Py_HasFileSystemDefaultEncodeErrors' type-id='type-id-8' mangled-name='_Py_HasFileSystemDefaultEncodeErrors' visibility='default' filepath='./Include/internal/pycore_fileutils.h' line='178' column='1' elf-symbol-id='_Py_HasFileSystemDefaultEncodeErrors'/> + <function-decl name='_Py_get_xoption' mangled-name='_Py_get_xoption' filepath='Python/preconfig.c' line='569' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_get_xoption'> + <parameter type-id='type-id-817' name='xoptions' filepath='Python/preconfig.c' line='569' column='1'/> + <parameter type-id='type-id-545' name='name' filepath='Python/preconfig.c' line='569' column='1'/> + <return type-id='type-id-545'/> + </function-decl> + <function-decl name='_Py_get_env_flag' mangled-name='_Py_get_env_flag' filepath='Python/preconfig.c' line='551' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_get_env_flag'> + <parameter type-id='type-id-8' name='use_environment' filepath='Python/preconfig.c' line='551' column='1'/> + <parameter type-id='type-id-501' name='flag' filepath='Python/preconfig.c' line='551' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/preconfig.c' line='551' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_str_to_int' mangled-name='_Py_str_to_int' filepath='Python/preconfig.c' line='533' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_str_to_int'> + <parameter type-id='type-id-3' name='str' filepath='Python/preconfig.c' line='533' column='1'/> + <parameter type-id='type-id-501' name='result' filepath='Python/preconfig.c' line='533' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_GetEnv' mangled-name='_Py_GetEnv' filepath='Python/preconfig.c' line='514' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetEnv'> + <parameter type-id='type-id-8' name='use_environment' filepath='Python/preconfig.c' line='514' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/preconfig.c' line='514' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <pointer-type-def type-id='type-id-63' size-in-bits='64' id='type-id-818'/> + <function-decl name='PyPreConfig_InitIsolatedConfig' mangled-name='PyPreConfig_InitIsolatedConfig' filepath='Python/preconfig.c' line='326' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyPreConfig_InitIsolatedConfig'> + <parameter type-id='type-id-818' name='config' filepath='Python/preconfig.c' line='326' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyPreConfig_InitPythonConfig' mangled-name='PyPreConfig_InitPythonConfig' filepath='Python/preconfig.c' line='305' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyPreConfig_InitPythonConfig'> + <parameter type-id='type-id-818' name='config' filepath='Python/preconfig.c' line='326' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyPreConfig_InitCompatConfig' mangled-name='_PyPreConfig_InitCompatConfig' filepath='Python/preconfig.c' line='277' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyPreConfig_InitCompatConfig'> + <parameter type-id='type-id-818' name='config' filepath='Python/preconfig.c' line='326' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <class-decl name='_PyArgv' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_initconfig.h' line='66' column='1' id='type-id-819'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='argc' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_initconfig.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='use_bytes_argv' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_initconfig.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='bytes_argv' type-id='type-id-477' visibility='default' filepath='./Include/internal/pycore_initconfig.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='wchar_argv' type-id='type-id-812' visibility='default' filepath='./Include/internal/pycore_initconfig.h' line='70' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='_PyArgv' type-id='type-id-819' filepath='./Include/internal/pycore_initconfig.h' line='71' column='1' id='type-id-820'/> + <qualified-type-def type-id='type-id-820' const='yes' id='type-id-821'/> + <pointer-type-def type-id='type-id-821' size-in-bits='64' id='type-id-822'/> + <function-decl name='_PyArgv_AsWstrList' mangled-name='_PyArgv_AsWstrList' filepath='Python/preconfig.c' line='72' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArgv_AsWstrList'> + <parameter type-id='type-id-822' name='args' filepath='Python/preconfig.c' line='72' column='1'/> + <parameter type-id='type-id-810' name='list' filepath='Python/preconfig.c' line='72' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pyarena.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='_arena' size-in-bits='192' is-struct='yes' visibility='default' filepath='Python/pyarena.c' line='46' column='1' id='type-id-763'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='a_head' type-id='type-id-823' visibility='default' filepath='Python/pyarena.c' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='a_cur' type-id='type-id-823' visibility='default' filepath='Python/pyarena.c' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='a_objects' type-id='type-id-14' visibility='default' filepath='Python/pyarena.c' line='64' column='1'/> + </data-member> + </class-decl> + <class-decl name='_block' size-in-bits='256' is-struct='yes' visibility='default' filepath='Python/pyarena.c' line='17' column='1' id='type-id-824'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ab_size' type-id='type-id-54' visibility='default' filepath='Python/pyarena.c' line='22' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='ab_offset' type-id='type-id-54' visibility='default' filepath='Python/pyarena.c' line='27' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ab_next' type-id='type-id-825' visibility='default' filepath='Python/pyarena.c' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ab_mem' type-id='type-id-18' visibility='default' filepath='Python/pyarena.c' line='38' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-824' size-in-bits='64' id='type-id-825'/> + <typedef-decl name='block' type-id='type-id-824' filepath='Python/pyarena.c' line='39' column='1' id='type-id-826'/> + <pointer-type-def type-id='type-id-826' size-in-bits='64' id='type-id-823'/> + <function-decl name='_PyArena_AddPyObject' mangled-name='_PyArena_AddPyObject' filepath='Python/pyarena.c' line='204' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArena_AddPyObject'> + <parameter type-id='type-id-765' name='arena' filepath='Python/pyarena.c' line='204' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/pyarena.c' line='204' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyArena_Malloc' mangled-name='_PyArena_Malloc' filepath='Python/pyarena.c' line='181' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArena_Malloc'> + <parameter type-id='type-id-765' name='arena' filepath='Python/pyarena.c' line='181' column='1'/> + <parameter type-id='type-id-54' name='size' filepath='Python/pyarena.c' line='181' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='_PyArena_Free' mangled-name='_PyArena_Free' filepath='Python/pyarena.c' line='158' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArena_Free'> + <parameter type-id='type-id-765' name='arena' filepath='Python/pyarena.c' line='158' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyArena_New' mangled-name='_PyArena_New' filepath='Python/pyarena.c' line='129' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyArena_New'> + <return type-id='type-id-765'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pyctype.c' comp-dir-path='/src' language='LANG_C99'> + <qualified-type-def type-id='type-id-105' const='yes' id='type-id-827'/> + + <array-type-def dimensions='1' type-id='type-id-827' size-in-bits='8192' id='type-id-828'> + <subrange length='256' type-id='type-id-16' id='type-id-264'/> + + </array-type-def> + <qualified-type-def type-id='type-id-828' const='yes' id='type-id-829'/> + <var-decl name='_Py_ctype_table' type-id='type-id-829' mangled-name='_Py_ctype_table' visibility='default' filepath='./Include/cpython/pyctype.h' line='16' column='1' elf-symbol-id='_Py_ctype_table'/> + + <array-type-def dimensions='1' type-id='type-id-527' size-in-bits='2048' id='type-id-830'> + <subrange length='256' type-id='type-id-16' id='type-id-264'/> + + </array-type-def> + <qualified-type-def type-id='type-id-830' const='yes' id='type-id-831'/> + <var-decl name='_Py_ctype_tolower' type-id='type-id-831' mangled-name='_Py_ctype_tolower' visibility='default' filepath='./Include/cpython/pyctype.h' line='29' column='1' elf-symbol-id='_Py_ctype_tolower'/> + <var-decl name='_Py_ctype_toupper' type-id='type-id-831' mangled-name='_Py_ctype_toupper' visibility='default' filepath='./Include/cpython/pyctype.h' line='30' column='1' elf-symbol-id='_Py_ctype_toupper'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pyhash.c' comp-dir-path='/src' language='LANG_C99'> + <union-decl name='__anonymous_union__' size-in-bits='192' is-anonymous='yes' visibility='default' filepath='./Include/pyhash.h' line='55' column='1' id='type-id-832'> + <data-member access='private'> + <var-decl name='uc' type-id='type-id-833' visibility='default' filepath='./Include/pyhash.h' line='57' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='fnv' type-id='type-id-834' visibility='default' filepath='./Include/pyhash.h' line='62' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='siphash' type-id='type-id-835' visibility='default' filepath='./Include/pyhash.h' line='67' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='djbx33a' type-id='type-id-836' visibility='default' filepath='./Include/pyhash.h' line='72' column='1'/> + </data-member> + <data-member access='private'> + <var-decl name='expat' type-id='type-id-837' visibility='default' filepath='./Include/pyhash.h' line='76' column='1'/> + </data-member> + </union-decl> + + <array-type-def dimensions='1' type-id='type-id-283' size-in-bits='192' id='type-id-833'> + <subrange length='24' type-id='type-id-16' id='type-id-296'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/pyhash.h' line='59' column='1' id='type-id-834'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='prefix' type-id='type-id-159' visibility='default' filepath='./Include/pyhash.h' line='60' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='suffix' type-id='type-id-159' visibility='default' filepath='./Include/pyhash.h' line='61' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='128' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/pyhash.h' line='64' column='1' id='type-id-835'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='k0' type-id='type-id-19' visibility='default' filepath='./Include/pyhash.h' line='65' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='k1' type-id='type-id-19' visibility='default' filepath='./Include/pyhash.h' line='66' column='1'/> + </data-member> + </class-decl> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/pyhash.h' line='69' column='1' id='type-id-836'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='padding' type-id='type-id-838' visibility='default' filepath='./Include/pyhash.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='suffix' type-id='type-id-159' visibility='default' filepath='./Include/pyhash.h' line='71' column='1'/> + </data-member> + </class-decl> + + <array-type-def dimensions='1' type-id='type-id-283' size-in-bits='128' id='type-id-838'> + <subrange length='16' type-id='type-id-16' id='type-id-326'/> + + </array-type-def> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' visibility='default' filepath='./Include/pyhash.h' line='73' column='1' id='type-id-837'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='padding' type-id='type-id-838' visibility='default' filepath='./Include/pyhash.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='hashsalt' type-id='type-id-159' visibility='default' filepath='./Include/pyhash.h' line='75' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='_Py_HashSecret_t' type-id='type-id-832' filepath='./Include/pyhash.h' line='77' column='1' id='type-id-839'/> + <var-decl name='_Py_HashSecret' type-id='type-id-839' mangled-name='_Py_HashSecret' visibility='default' filepath='./Include/pyhash.h' line='78' column='1' elf-symbol-id='_Py_HashSecret'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-840' visibility='default' filepath='./Include/pyhash.h' line='86' column='1' id='type-id-841'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='hash' type-id='type-id-842' visibility='default' filepath='./Include/pyhash.h' line='87' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/pyhash.h' line='88' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='hash_bits' type-id='type-id-843' visibility='default' filepath='./Include/pyhash.h' line='89' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='seed_bits' type-id='type-id-843' visibility='default' filepath='./Include/pyhash.h' line='90' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-844' size-in-bits='64' id='type-id-845'/> + <qualified-type-def type-id='type-id-845' const='yes' id='type-id-842'/> + <qualified-type-def type-id='type-id-8' const='yes' id='type-id-843'/> + <typedef-decl name='PyHash_FuncDef' type-id='type-id-841' filepath='./Include/pyhash.h' line='91' column='1' id='type-id-840'/> + <pointer-type-def type-id='type-id-840' size-in-bits='64' id='type-id-846'/> + <function-decl name='PyHash_GetFuncDef' mangled-name='PyHash_GetFuncDef' filepath='Python/pyhash.c' line='221' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyHash_GetFuncDef'> + <return type-id='type-id-846'/> + </function-decl> + <function-decl name='_Py_HashBytes' mangled-name='_Py_HashBytes' filepath='Python/pyhash.c' line='158' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_HashBytes'> + <parameter type-id='type-id-18' name='src' filepath='Python/pyhash.c' line='158' column='1'/> + <parameter type-id='type-id-36' name='len' filepath='Python/pyhash.c' line='158' column='1'/> + <return type-id='type-id-159'/> + </function-decl> + <function-decl name='_Py_HashPointer' mangled-name='_Py_HashPointer' filepath='Python/pyhash.c' line='148' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_HashPointer'> + <parameter type-id='type-id-18' name='p' filepath='Python/pyhash.c' line='148' column='1'/> + <return type-id='type-id-159'/> + </function-decl> + <function-decl name='_Py_HashPointerRaw' mangled-name='_Py_HashPointerRaw' filepath='Python/pyhash.c' line='138' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_HashPointerRaw'> + <parameter type-id='type-id-18' name='p' filepath='Python/pyhash.c' line='148' column='1'/> + <return type-id='type-id-159'/> + </function-decl> + <function-decl name='_Py_HashDouble' mangled-name='_Py_HashDouble' filepath='Python/pyhash.c' line='92' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_HashDouble'> + <parameter type-id='type-id-14' name='inst' filepath='Python/pyhash.c' line='92' column='1'/> + <parameter type-id='type-id-391' name='v' filepath='Python/pyhash.c' line='92' column='1'/> + <return type-id='type-id-159'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-844'> + <parameter type-id='type-id-18'/> + <parameter type-id='type-id-36'/> + <return type-id='type-id-159'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pylifecycle.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_Py_UnhandledKeyboardInterrupt' type-id='type-id-8' mangled-name='_Py_UnhandledKeyboardInterrupt' visibility='default' filepath='./Include/internal/pycore_pylifecycle.h' line='19' column='1' elf-symbol-id='_Py_UnhandledKeyboardInterrupt'/> + <typedef-decl name='_PyRuntimeState' type-id='type-id-56' filepath='./Include/internal/pycore_runtime.h' line='147' column='1' id='type-id-847'/> + <var-decl name='_PyRuntime' type-id='type-id-847' mangled-name='_PyRuntime' visibility='default' filepath='./Include/internal/pycore_runtime.h' line='152' column='1' elf-symbol-id='_PyRuntime'/> + <pointer-type-def type-id='type-id-848' size-in-bits='64' id='type-id-849'/> + <typedef-decl name='PyOS_sighandler_t' type-id='type-id-849' filepath='./Include/pylifecycle.h' line='61' column='1' id='type-id-850'/> + <function-decl name='PyOS_setsig' mangled-name='PyOS_setsig' filepath='Python/pylifecycle.c' line='3022' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_setsig'> + <parameter type-id='type-id-8' name='sig' filepath='Python/pylifecycle.c' line='3022' column='1'/> + <parameter type-id='type-id-850' name='handler' filepath='Python/pylifecycle.c' line='3022' column='1'/> + <return type-id='type-id-850'/> + </function-decl> + <function-decl name='PyOS_getsig' mangled-name='PyOS_getsig' filepath='Python/pylifecycle.c' line='2983' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_getsig'> + <parameter type-id='type-id-8' name='sig' filepath='Python/pylifecycle.c' line='2983' column='1'/> + <return type-id='type-id-850'/> + </function-decl> + <function-decl name='_Py_FdIsInteractive' mangled-name='_Py_FdIsInteractive' filepath='Python/pylifecycle.c' line='2966' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_FdIsInteractive'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pylifecycle.c' line='2966' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/pylifecycle.c' line='2966' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_FdIsInteractive' mangled-name='Py_FdIsInteractive' filepath='Python/pylifecycle.c' line='2953' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_FdIsInteractive'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_Exit' mangled-name='Py_Exit' filepath='Python/pylifecycle.c' line='2936' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_Exit'> + <parameter type-id='type-id-8' name='sts' filepath='Python/pylifecycle.c' line='2936' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_AtExit' mangled-name='Py_AtExit' filepath='Python/pylifecycle.c' line='2911' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_AtExit'> + <parameter type-id='type-id-211' name='func' filepath='Python/pylifecycle.c' line='2911' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_ExitStatusException' mangled-name='Py_ExitStatusException' filepath='Python/pylifecycle.c' line='2870' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_ExitStatusException'> + <parameter type-id='type-id-806' name='status' filepath='Python/pylifecycle.c' line='2870' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_FatalRefcountErrorFunc' mangled-name='_Py_FatalRefcountErrorFunc' filepath='Python/pylifecycle.c' line='2860' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_FatalRefcountErrorFunc'> + <parameter type-id='type-id-3' name='func' filepath='Python/pylifecycle.c' line='2860' column='1'/> + <parameter type-id='type-id-3' name='msg' filepath='Python/pylifecycle.c' line='2860' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_FatalErrorFormat' mangled-name='_Py_FatalErrorFormat' filepath='Python/pylifecycle.c' line='2826' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_FatalErrorFormat'> + <parameter type-id='type-id-3' name='func' filepath='Python/pylifecycle.c' line='2826' column='1'/> + <parameter type-id='type-id-3' name='format' filepath='Python/pylifecycle.c' line='2826' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_FatalErrorFunc' mangled-name='_Py_FatalErrorFunc' filepath='Python/pylifecycle.c' line='2819' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_FatalErrorFunc'> + <parameter type-id='type-id-3' name='func' filepath='Python/pylifecycle.c' line='2860' column='1'/> + <parameter type-id='type-id-3' name='msg' filepath='Python/pylifecycle.c' line='2860' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_FatalError' mangled-name='Py_FatalError' filepath='Python/pylifecycle.c' line='2812' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_FatalError'> + <parameter type-id='type-id-3' name='func' filepath='Python/ceval.c' line='342' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_DumpExtensionModules' mangled-name='_Py_DumpExtensionModules' filepath='Python/pylifecycle.c' line='2639' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DumpExtensionModules'> + <parameter type-id='type-id-8' name='fd' filepath='Python/pylifecycle.c' line='2639' column='1'/> + <parameter type-id='type-id-11' name='interp' filepath='Python/pylifecycle.c' line='2639' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_EndInterpreter' mangled-name='Py_EndInterpreter' filepath='Python/pylifecycle.c' line='2068' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_EndInterpreter'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/ceval.c' line='531' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_NewInterpreter' mangled-name='Py_NewInterpreter' filepath='Python/pylifecycle.c' line='2050' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_NewInterpreter'> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='_Py_NewInterpreter' mangled-name='_Py_NewInterpreter' filepath='Python/pylifecycle.c' line='2038' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_NewInterpreter'> + <parameter type-id='type-id-8' name='isolated_subinterpreter' filepath='Python/pylifecycle.c' line='2038' column='1'/> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='Py_Finalize' mangled-name='Py_Finalize' filepath='Python/pylifecycle.c' line='1934' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_Finalize'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_FinalizeEx' mangled-name='Py_FinalizeEx' filepath='Python/pylifecycle.c' line='1749' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_FinalizeEx'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_InitializeMain' mangled-name='_Py_InitializeMain' filepath='Python/pylifecycle.c' line='1305' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_InitializeMain'> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='Py_Initialize' mangled-name='Py_Initialize' filepath='Python/pylifecycle.c' line='1298' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_Initialize'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_InitializeEx' mangled-name='Py_InitializeEx' filepath='Python/pylifecycle.c' line='1271' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_InitializeEx'> + <parameter type-id='type-id-8' name='install_sigs' filepath='Python/pylifecycle.c' line='1271' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='Py_InitializeFromConfig' mangled-name='Py_InitializeFromConfig' filepath='Python/pylifecycle.c' line='1238' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_InitializeFromConfig'> + <parameter type-id='type-id-814' name='config' filepath='Python/pylifecycle.c' line='1238' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='_Py_PreInitializeFromConfig' mangled-name='_Py_PreInitializeFromConfig' filepath='Python/pylifecycle.c' line='982' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_PreInitializeFromConfig'> + <parameter type-id='type-id-814' name='config' filepath='Python/pylifecycle.c' line='982' column='1'/> + <parameter type-id='type-id-822' name='args' filepath='Python/pylifecycle.c' line='983' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <qualified-type-def type-id='type-id-63' const='yes' id='type-id-851'/> + <pointer-type-def type-id='type-id-851' size-in-bits='64' id='type-id-852'/> + <function-decl name='Py_PreInitialize' mangled-name='Py_PreInitialize' filepath='Python/pylifecycle.c' line='975' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_PreInitialize'> + <parameter type-id='type-id-852' name='src_config' filepath='Python/pylifecycle.c' line='975' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='Py_PreInitializeFromArgs' mangled-name='Py_PreInitializeFromArgs' filepath='Python/pylifecycle.c' line='967' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_PreInitializeFromArgs'> + <parameter type-id='type-id-852' name='src_config' filepath='Python/pylifecycle.c' line='967' column='1'/> + <parameter type-id='type-id-36' name='argc' filepath='Python/pylifecycle.c' line='967' column='1'/> + <parameter type-id='type-id-374' name='argv' filepath='Python/pylifecycle.c' line='967' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='Py_PreInitializeFromBytesArgs' mangled-name='Py_PreInitializeFromBytesArgs' filepath='Python/pylifecycle.c' line='959' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_PreInitializeFromBytesArgs'> + <parameter type-id='type-id-852' name='src_config' filepath='Python/pylifecycle.c' line='959' column='1'/> + <parameter type-id='type-id-36' name='argc' filepath='Python/pylifecycle.c' line='959' column='1'/> + <parameter type-id='type-id-494' name='argv' filepath='Python/pylifecycle.c' line='959' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='_Py_PreInitializeFromPyArgv' mangled-name='_Py_PreInitializeFromPyArgv' filepath='Python/pylifecycle.c' line='912' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_PreInitializeFromPyArgv'> + <parameter type-id='type-id-852' name='src_config' filepath='Python/pylifecycle.c' line='912' column='1'/> + <parameter type-id='type-id-822' name='args' filepath='Python/pylifecycle.c' line='912' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='_PyInterpreterState_SetConfig' mangled-name='_PyInterpreterState_SetConfig' filepath='Python/pylifecycle.c' line='492' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_SetConfig'> + <parameter type-id='type-id-814' name='src_config' filepath='Python/pylifecycle.c' line='492' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_SetLocaleFromEnv' mangled-name='_Py_SetLocaleFromEnv' filepath='Python/pylifecycle.c' line='404' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_SetLocaleFromEnv'> + <parameter type-id='type-id-8' name='category' filepath='Python/pylifecycle.c' line='404' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='_Py_CoerceLegacyLocale' mangled-name='_Py_CoerceLegacyLocale' filepath='Python/pylifecycle.c' line='354' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_CoerceLegacyLocale'> + <parameter type-id='type-id-8' name='warn' filepath='Python/pylifecycle.c' line='354' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_IsLocaleCoercionTarget' mangled-name='_Py_IsLocaleCoercionTarget' filepath='Python/pylifecycle.c' line='312' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_IsLocaleCoercionTarget'> + <parameter type-id='type-id-3' name='encoding' filepath='Python/codecs.c' line='214' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_LegacyLocaleDetected' mangled-name='_Py_LegacyLocaleDetected' filepath='Python/pylifecycle.c' line='257' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_LegacyLocaleDetected'> + <parameter type-id='type-id-8' name='warn' filepath='Python/pylifecycle.c' line='257' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_IsInitialized' mangled-name='Py_IsInitialized' filepath='Python/pylifecycle.c' line='157' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_IsInitialized'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_IsCoreInitialized' mangled-name='_Py_IsCoreInitialized' filepath='Python/pylifecycle.c' line='151' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_IsCoreInitialized'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_IsFinalizing' mangled-name='_Py_IsFinalizing' filepath='Python/pylifecycle.c' line='135' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_IsFinalizing'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyRuntime_Finalize' mangled-name='_PyRuntime_Finalize' filepath='Python/pylifecycle.c' line='128' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyRuntime_Finalize'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyRuntime_Initialize' mangled-name='_PyRuntime_Initialize' filepath='Python/pylifecycle.c' line='111' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyRuntime_Initialize'> + <return type-id='type-id-806'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-848'> + <parameter type-id='type-id-8'/> + <return type-id='type-id-70'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pystate.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_Py_GetConfig' mangled-name='_Py_GetConfig' filepath='Python/pystate.c' line='2135' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetConfig'> + <return type-id='type-id-814'/> + </function-decl> + <function-decl name='_PyInterpreterState_GetConfigCopy' mangled-name='_PyInterpreterState_GetConfigCopy' filepath='Python/pystate.c' line='2121' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_GetConfigCopy'> + <parameter type-id='type-id-809' name='config' filepath='Python/pystate.c' line='2121' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyInterpreterState_GetConfig' mangled-name='_PyInterpreterState_GetConfig' filepath='Python/pystate.c' line='2114' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_GetConfig'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='2114' column='1'/> + <return type-id='type-id-814'/> + </function-decl> + <function-decl name='_PyInterpreterState_SetEvalFrameFunc' mangled-name='_PyInterpreterState_SetEvalFrameFunc' filepath='Python/pystate.c' line='2101' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_SetEvalFrameFunc'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='2101' column='1'/> + <parameter type-id='type-id-35' name='eval_frame' filepath='Python/pystate.c' line='2102' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyInterpreterState_GetEvalFrameFunc' mangled-name='_PyInterpreterState_GetEvalFrameFunc' filepath='Python/pystate.c' line='2091' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_GetEvalFrameFunc'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='2091' column='1'/> + <return type-id='type-id-35'/> + </function-decl> + <function-decl name='_PyCrossInterpreterData_Lookup' mangled-name='_PyCrossInterpreterData_Lookup' filepath='Python/pystate.c' line='1941' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCrossInterpreterData_Lookup'> + <parameter type-id='type-id-14' name='obj' filepath='Python/pystate.c' line='1941' column='1'/> + <return type-id='type-id-75'/> + </function-decl> + <function-decl name='_PyCrossInterpreterData_RegisterClass' mangled-name='_PyCrossInterpreterData_RegisterClass' filepath='Python/pystate.c' line='1911' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCrossInterpreterData_RegisterClass'> + <parameter type-id='type-id-74' name='cls' filepath='Python/pystate.c' line='1911' column='1'/> + <parameter type-id='type-id-75' name='getdata' filepath='Python/pystate.c' line='1912' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyCrossInterpreterData_NewObject' mangled-name='_PyCrossInterpreterData_NewObject' filepath='Python/pystate.c' line='1881' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCrossInterpreterData_NewObject'> + <parameter type-id='type-id-206' name='data' filepath='Python/pystate.c' line='1881' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyCrossInterpreterData_Release' mangled-name='_PyCrossInterpreterData_Release' filepath='Python/pystate.c' line='1858' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyCrossInterpreterData_Release'> + <parameter type-id='type-id-206' name='data' filepath='Python/pystate.c' line='1858' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyObject_GetCrossInterpreterData' mangled-name='_PyObject_GetCrossInterpreterData' filepath='Python/pystate.c' line='1786' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GetCrossInterpreterData'> + <parameter type-id='type-id-14' name='obj' filepath='Python/pystate.c' line='1786' column='1'/> + <parameter type-id='type-id-206' name='data' filepath='Python/pystate.c' line='1786' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyObject_CheckCrossInterpreterData' mangled-name='_PyObject_CheckCrossInterpreterData' filepath='Python/pystate.c' line='1754' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_CheckCrossInterpreterData'> + <parameter type-id='type-id-14' name='obj' filepath='Objects/abstract.c' line='2845' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/pystate.h' line='77' column='1' id='type-id-853'> + <underlying-type type-id='type-id-126'/> + <enumerator name='PyGILState_LOCKED' value='0'/> + <enumerator name='PyGILState_UNLOCKED' value='1'/> + </enum-decl> + <typedef-decl name='PyGILState_STATE' type-id='type-id-853' filepath='./Include/pystate.h' line='78' column='1' id='type-id-854'/> + <function-decl name='PyGILState_Release' mangled-name='PyGILState_Release' filepath='Python/pystate.c' line='1689' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGILState_Release'> + <parameter type-id='type-id-854' name='oldstate' filepath='Python/pystate.c' line='1689' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyGILState_Ensure' mangled-name='PyGILState_Ensure' filepath='Python/pystate.c' line='1641' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGILState_Ensure'> + <return type-id='type-id-854'/> + </function-decl> + <function-decl name='PyGILState_Check' mangled-name='PyGILState_Check' filepath='Python/pystate.c' line='1621' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGILState_Check'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyGILState_GetThisThreadState' mangled-name='PyGILState_GetThisThreadState' filepath='Python/pystate.c' line='1615' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGILState_GetThisThreadState'> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='_PyGILState_GetInterpreterStateUnsafe' mangled-name='_PyGILState_GetInterpreterStateUnsafe' filepath='Python/pystate.c' line='1528' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyGILState_GetInterpreterStateUnsafe'> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='_PyThread_CurrentExceptions' mangled-name='_PyThread_CurrentExceptions' filepath='Python/pystate.c' line='1410' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThread_CurrentExceptions'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyThread_CurrentFrames' mangled-name='_PyThread_CurrentFrames' filepath='Python/pystate.c' line='1360' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThread_CurrentFrames'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyThreadState_Next' mangled-name='PyThreadState_Next' filepath='Python/pystate.c' line='1350' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_Next'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1350' column='1'/> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='PyInterpreterState_ThreadHead' mangled-name='PyInterpreterState_ThreadHead' filepath='Python/pystate.c' line='1345' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_ThreadHead'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='1345' column='1'/> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='PyInterpreterState_Next' mangled-name='PyInterpreterState_Next' filepath='Python/pystate.c' line='1340' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_Next'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='1340' column='1'/> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='PyInterpreterState_Main' mangled-name='PyInterpreterState_Main' filepath='Python/pystate.c' line='1334' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_Main'> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='PyInterpreterState_Head' mangled-name='PyInterpreterState_Head' filepath='Python/pystate.c' line='1328' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_Head'> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='PyThreadState_SetAsyncExc' mangled-name='PyThreadState_SetAsyncExc' filepath='Python/pystate.c' line='1287' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_SetAsyncExc'> + <parameter type-id='type-id-16' name='id' filepath='Python/pystate.c' line='1287' column='1'/> + <parameter type-id='type-id-14' name='exc' filepath='Python/pystate.c' line='1287' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThreadState_GetID' mangled-name='PyThreadState_GetID' filepath='Python/pystate.c' line='1271' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_GetID'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1271' column='1'/> + <return type-id='type-id-19'/> + </function-decl> + <function-decl name='PyThreadState_GetFrame' mangled-name='PyThreadState_GetFrame' filepath='Python/pystate.c' line='1255' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_GetFrame'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1255' column='1'/> + <return type-id='type-id-438'/> + </function-decl> + <function-decl name='PyThreadState_GetInterpreter' mangled-name='PyThreadState_GetInterpreter' filepath='Python/pystate.c' line='1247' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_GetInterpreter'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1247' column='1'/> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='PyThreadState_GetDict' mangled-name='PyThreadState_GetDict' filepath='Python/pystate.c' line='1236' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_GetDict'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyThreadState_GetDict' mangled-name='_PyThreadState_GetDict' filepath='Python/pystate.c' line='1222' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_GetDict'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1222' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyThreadState_Swap' mangled-name='PyThreadState_Swap' filepath='Python/pystate.c' line='1210' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_Swap'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1350' column='1'/> + <return type-id='type-id-10'/> + </function-decl> + <pointer-type-def type-id='type-id-62' size-in-bits='64' id='type-id-855'/> + <function-decl name='_PyThreadState_Swap' mangled-name='_PyThreadState_Swap' filepath='Python/pystate.c' line='1185' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_Swap'> + <parameter type-id='type-id-855' name='gilstate' filepath='Python/pystate.c' line='1185' column='1'/> + <parameter type-id='type-id-10' name='newts' filepath='Python/pystate.c' line='1185' column='1'/> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='PyThreadState_Get' mangled-name='PyThreadState_Get' filepath='Python/pystate.c' line='1176' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_Get'> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='_PyThreadState_UncheckedGet' mangled-name='_PyThreadState_UncheckedGet' filepath='Python/pystate.c' line='1169' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_UncheckedGet'> + <return type-id='type-id-10'/> + </function-decl> + <pointer-type-def type-id='type-id-847' size-in-bits='64' id='type-id-856'/> + <function-decl name='_PyThreadState_DeleteExcept' mangled-name='_PyThreadState_DeleteExcept' filepath='Python/pystate.c' line='1134' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_DeleteExcept'> + <parameter type-id='type-id-856' name='runtime' filepath='Python/pystate.c' line='1134' column='1'/> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1134' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThreadState_DeleteCurrent' mangled-name='PyThreadState_DeleteCurrent' filepath='Python/pystate.c' line='1118' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_DeleteCurrent'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyThreadState_DeleteCurrent' mangled-name='_PyThreadState_DeleteCurrent' filepath='Python/pystate.c' line='1107' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_DeleteCurrent'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='1107' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThreadState_Delete' mangled-name='PyThreadState_Delete' filepath='Python/pystate.c' line='1100' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_Delete'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2291' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThreadState_Clear' mangled-name='PyThreadState_Clear' filepath='Python/pystate.c' line='998' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_Clear'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='998' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyState_RemoveModule' mangled-name='PyState_RemoveModule' filepath='Python/pystate.c' line='941' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyState_RemoveModule'> + <parameter type-id='type-id-539' name='def' filepath='Python/pystate.c' line='941' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyState_AddModule' mangled-name='PyState_AddModule' filepath='Python/pystate.c' line='920' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyState_AddModule'> + <parameter type-id='type-id-14' name='module' filepath='Python/pystate.c' line='920' column='1'/> + <parameter type-id='type-id-539' name='def' filepath='Python/pystate.c' line='920' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyState_AddModule' mangled-name='_PyState_AddModule' filepath='Python/pystate.c' line='887' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyState_AddModule'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='887' column='1'/> + <parameter type-id='type-id-14' name='module' filepath='Python/pystate.c' line='887' column='1'/> + <parameter type-id='type-id-539' name='def' filepath='Python/pystate.c' line='887' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyState_FindModule' mangled-name='PyState_FindModule' filepath='Python/pystate.c' line='868' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyState_FindModule'> + <parameter type-id='type-id-539' name='module' filepath='Python/pystate.c' line='868' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyThreadState_SetCurrent' mangled-name='_PyThreadState_SetCurrent' filepath='Python/pystate.c' line='862' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_SetCurrent'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2291' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyThreadState_Init' mangled-name='_PyThreadState_Init' filepath='Python/pystate.c' line='856' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_Init'> + <parameter type-id='type-id-10' name='tstate' filepath='Python/pystate.c' line='856' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyThreadState_Prealloc' mangled-name='_PyThreadState_Prealloc' filepath='Python/pystate.c' line='848' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThreadState_Prealloc'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='1345' column='1'/> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='PyThreadState_New' mangled-name='PyThreadState_New' filepath='Python/pystate.c' line='840' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThreadState_New'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='840' column='1'/> + <return type-id='type-id-10'/> + </function-decl> + <function-decl name='PyInterpreterState_GetDict' mangled-name='PyInterpreterState_GetDict' filepath='Python/pystate.c' line='700' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_GetDict'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='700' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyInterpreterState_GetMainModule' mangled-name='_PyInterpreterState_GetMainModule' filepath='Python/pystate.c' line='690' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_GetMainModule'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='700' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyInterpreterState_RequireIDRef' mangled-name='_PyInterpreterState_RequireIDRef' filepath='Python/pystate.c' line='684' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_RequireIDRef'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='684' column='1'/> + <parameter type-id='type-id-8' name='required' filepath='Python/pystate.c' line='684' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyInterpreterState_RequiresIDRef' mangled-name='_PyInterpreterState_RequiresIDRef' filepath='Python/pystate.c' line='678' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_RequiresIDRef'> + <parameter type-id='type-id-11' name='interp' filepath='Python/import.c' line='278' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyInterpreterState_IDDecref' mangled-name='_PyInterpreterState_IDDecref' filepath='Python/pystate.c' line='656' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_IDDecref'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='656' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyInterpreterState_IDIncref' mangled-name='_PyInterpreterState_IDIncref' filepath='Python/pystate.c' line='642' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_IDIncref'> + <parameter type-id='type-id-11' name='interp' filepath='Python/import.c' line='278' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyInterpreterState_IDInitref' mangled-name='_PyInterpreterState_IDInitref' filepath='Python/pystate.c' line='625' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_IDInitref'> + <parameter type-id='type-id-11' name='interp' filepath='Python/import.c' line='278' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyInterpreterState_LookUpID' mangled-name='_PyInterpreterState_LookUpID' filepath='Python/pystate.c' line='607' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_LookUpID'> + <parameter type-id='type-id-29' name='requested_id' filepath='Python/pystate.c' line='607' column='1'/> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='PyInterpreterState_GetID' mangled-name='PyInterpreterState_GetID' filepath='Python/pystate.c' line='579' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_GetID'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='579' column='1'/> + <return type-id='type-id-29'/> + </function-decl> + <function-decl name='PyInterpreterState_Get' mangled-name='PyInterpreterState_Get' filepath='Python/pystate.c' line='566' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_Get'> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='PyInterpreterState_Delete' mangled-name='PyInterpreterState_Delete' filepath='Python/pystate.c' line='477' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_Delete'> + <parameter type-id='type-id-11' name='interp' filepath='Python/pystate.c' line='477' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyInterpreterState_Clear' mangled-name='PyInterpreterState_Clear' filepath='Python/pystate.c' line='446' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_Clear'> + <parameter type-id='type-id-11' name='interp' filepath='Python/ceval.c' line='565' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyInterpreterState_New' mangled-name='PyInterpreterState_New' filepath='Python/pystate.c' line='302' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInterpreterState_New'> + <return type-id='type-id-11'/> + </function-decl> + <function-decl name='_PyInterpreterState_Enable' mangled-name='_PyInterpreterState_Enable' filepath='Python/pystate.c' line='226' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyInterpreterState_Enable'> + <parameter type-id='type-id-856' name='runtime' filepath='Python/pystate.c' line='226' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + <function-decl name='_PyRuntimeState_Fini' mangled-name='_PyRuntimeState_Fini' filepath='Python/pystate.c' line='161' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyRuntimeState_Fini'> + <parameter type-id='type-id-856' name='runtime' filepath='Python/pystate.c' line='161' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyRuntimeState_Init' mangled-name='_PyRuntimeState_Init' filepath='Python/pystate.c' line='132' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyRuntimeState_Init'> + <parameter type-id='type-id-856' name='runtime' filepath='Python/pystate.c' line='132' column='1'/> + <return type-id='type-id-806'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pythonrun.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyRun_InteractiveLoop' mangled-name='PyRun_InteractiveLoop' filepath='Python/pythonrun.c' line='2005' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_InteractiveLoop'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_InteractiveOne' mangled-name='PyRun_InteractiveOne' filepath='Python/pythonrun.c' line='1998' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_InteractiveOne'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_CompileStringFlags' mangled-name='Py_CompileStringFlags' filepath='Python/pythonrun.c' line='1990' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_CompileStringFlags'> + <parameter type-id='type-id-3' name='str' filepath='Python/pythonrun.c' line='1990' column='1'/> + <parameter type-id='type-id-3' name='p' filepath='Python/pythonrun.c' line='1990' column='1'/> + <parameter type-id='type-id-8' name='s' filepath='Python/pythonrun.c' line='1990' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='1991' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='Py_CompileString' mangled-name='Py_CompileString' filepath='Python/pythonrun.c' line='1983' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_CompileString'> + <parameter type-id='type-id-3' name='str' filepath='Python/pythonrun.c' line='1983' column='1'/> + <parameter type-id='type-id-3' name='p' filepath='Python/pythonrun.c' line='1983' column='1'/> + <parameter type-id='type-id-8' name='s' filepath='Python/pythonrun.c' line='1983' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyRun_SimpleString' mangled-name='PyRun_SimpleString' filepath='Python/pythonrun.c' line='1976' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_SimpleString'> + <parameter type-id='type-id-3' name='where' filepath='Python/ceval.c' line='7947' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_String' mangled-name='PyRun_String' filepath='Python/pythonrun.c' line='1969' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_String'> + <parameter type-id='type-id-3' name='str' filepath='Python/pythonrun.c' line='1969' column='1'/> + <parameter type-id='type-id-8' name='s' filepath='Python/pythonrun.c' line='1969' column='1'/> + <parameter type-id='type-id-14' name='g' filepath='Python/pythonrun.c' line='1969' column='1'/> + <parameter type-id='type-id-14' name='l' filepath='Python/pythonrun.c' line='1969' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyRun_SimpleFileEx' mangled-name='PyRun_SimpleFileEx' filepath='Python/pythonrun.c' line='1961' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_SimpleFileEx'> + <parameter type-id='type-id-473' name='f' filepath='Python/pythonrun.c' line='1961' column='1'/> + <parameter type-id='type-id-3' name='p' filepath='Python/pythonrun.c' line='1961' column='1'/> + <parameter type-id='type-id-8' name='c' filepath='Python/pythonrun.c' line='1961' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_SimpleFile' mangled-name='PyRun_SimpleFile' filepath='Python/pythonrun.c' line='1954' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_SimpleFile'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_FileFlags' mangled-name='PyRun_FileFlags' filepath='Python/pythonrun.c' line='1946' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_FileFlags'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='1946' column='1'/> + <parameter type-id='type-id-3' name='p' filepath='Python/pythonrun.c' line='1946' column='1'/> + <parameter type-id='type-id-8' name='s' filepath='Python/pythonrun.c' line='1946' column='1'/> + <parameter type-id='type-id-14' name='g' filepath='Python/pythonrun.c' line='1946' column='1'/> + <parameter type-id='type-id-14' name='l' filepath='Python/pythonrun.c' line='1946' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='1947' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyRun_FileEx' mangled-name='PyRun_FileEx' filepath='Python/pythonrun.c' line='1939' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_FileEx'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='1939' column='1'/> + <parameter type-id='type-id-3' name='p' filepath='Python/pythonrun.c' line='1939' column='1'/> + <parameter type-id='type-id-8' name='s' filepath='Python/pythonrun.c' line='1939' column='1'/> + <parameter type-id='type-id-14' name='g' filepath='Python/pythonrun.c' line='1939' column='1'/> + <parameter type-id='type-id-14' name='l' filepath='Python/pythonrun.c' line='1939' column='1'/> + <parameter type-id='type-id-8' name='c' filepath='Python/pythonrun.c' line='1939' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyRun_File' mangled-name='PyRun_File' filepath='Python/pythonrun.c' line='1932' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_File'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='1932' column='1'/> + <parameter type-id='type-id-3' name='p' filepath='Python/pythonrun.c' line='1932' column='1'/> + <parameter type-id='type-id-8' name='s' filepath='Python/pythonrun.c' line='1932' column='1'/> + <parameter type-id='type-id-14' name='g' filepath='Python/pythonrun.c' line='1932' column='1'/> + <parameter type-id='type-id-14' name='l' filepath='Python/pythonrun.c' line='1932' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyRun_AnyFileFlags' mangled-name='PyRun_AnyFileFlags' filepath='Python/pythonrun.c' line='1925' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_AnyFileFlags'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='1925' column='1'/> + <parameter type-id='type-id-3' name='name' filepath='Python/pythonrun.c' line='1925' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='1925' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_AnyFileEx' mangled-name='PyRun_AnyFileEx' filepath='Python/pythonrun.c' line='1918' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_AnyFileEx'> + <parameter type-id='type-id-473' name='f' filepath='Python/pythonrun.c' line='1961' column='1'/> + <parameter type-id='type-id-3' name='p' filepath='Python/pythonrun.c' line='1961' column='1'/> + <parameter type-id='type-id-8' name='c' filepath='Python/pythonrun.c' line='1961' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_AnyFile' mangled-name='PyRun_AnyFile' filepath='Python/pythonrun.c' line='1911' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_AnyFile'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pylifecycle.c' line='2953' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_SourceAsString' mangled-name='_Py_SourceAsString' filepath='Python/pythonrun.c' line='1822' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_SourceAsString'> + <parameter type-id='type-id-14' name='cmd' filepath='Python/pythonrun.c' line='1822' column='1'/> + <parameter type-id='type-id-3' name='funcname' filepath='Python/pythonrun.c' line='1822' column='1'/> + <parameter type-id='type-id-3' name='what' filepath='Python/pythonrun.c' line='1822' column='1'/> + <parameter type-id='type-id-593' name='cf' filepath='Python/pythonrun.c' line='1822' column='1'/> + <parameter type-id='type-id-22' name='cmd_copy' filepath='Python/pythonrun.c' line='1822' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='Py_CompileStringExFlags' mangled-name='Py_CompileStringExFlags' filepath='Python/pythonrun.c' line='1809' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_CompileStringExFlags'> + <parameter type-id='type-id-3' name='str' filepath='Python/pythonrun.c' line='1809' column='1'/> + <parameter type-id='type-id-3' name='filename_str' filepath='Python/pythonrun.c' line='1809' column='1'/> + <parameter type-id='type-id-8' name='start' filepath='Python/pythonrun.c' line='1809' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='1810' column='1'/> + <parameter type-id='type-id-8' name='optimize' filepath='Python/pythonrun.c' line='1810' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='Py_CompileStringObject' mangled-name='Py_CompileStringObject' filepath='Python/pythonrun.c' line='1784' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_CompileStringObject'> + <parameter type-id='type-id-3' name='str' filepath='Python/pythonrun.c' line='1784' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/pythonrun.c' line='1784' column='1'/> + <parameter type-id='type-id-8' name='start' filepath='Python/pythonrun.c' line='1784' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='1785' column='1'/> + <parameter type-id='type-id-8' name='optimize' filepath='Python/pythonrun.c' line='1785' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyRun_FileExFlags' mangled-name='PyRun_FileExFlags' filepath='Python/pythonrun.c' line='1642' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_FileExFlags'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='1642' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pythonrun.c' line='1642' column='1'/> + <parameter type-id='type-id-8' name='start' filepath='Python/pythonrun.c' line='1642' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Python/pythonrun.c' line='1642' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Python/pythonrun.c' line='1643' column='1'/> + <parameter type-id='type-id-8' name='closeit' filepath='Python/pythonrun.c' line='1643' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='1643' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyRun_StringFlags' mangled-name='PyRun_StringFlags' filepath='Python/pythonrun.c' line='1589' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_StringFlags'> + <parameter type-id='type-id-3' name='str' filepath='Python/pythonrun.c' line='1589' column='1'/> + <parameter type-id='type-id-8' name='start' filepath='Python/pythonrun.c' line='1589' column='1'/> + <parameter type-id='type-id-14' name='globals' filepath='Python/pythonrun.c' line='1589' column='1'/> + <parameter type-id='type-id-14' name='locals' filepath='Python/pythonrun.c' line='1590' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='1590' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyErr_Display' mangled-name='PyErr_Display' filepath='Python/pythonrun.c' line='1571' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_Display'> + <parameter type-id='type-id-14' name='exception' filepath='Python/pythonrun.c' line='1571' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/pythonrun.c' line='1571' column='1'/> + <parameter type-id='type-id-14' name='tb' filepath='Python/pythonrun.c' line='1571' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_Display' mangled-name='_PyErr_Display' filepath='Python/pythonrun.c' line='1524' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_Display'> + <parameter type-id='type-id-14' name='file' filepath='Python/pythonrun.c' line='1524' column='1'/> + <parameter type-id='type-id-14' name='exception' filepath='Python/pythonrun.c' line='1524' column='1'/> + <parameter type-id='type-id-14' name='value' filepath='Python/pythonrun.c' line='1524' column='1'/> + <parameter type-id='type-id-14' name='tb' filepath='Python/pythonrun.c' line='1524' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_Print' mangled-name='PyErr_Print' filepath='Python/pythonrun.c' line='880' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_Print'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_PrintEx' mangled-name='PyErr_PrintEx' filepath='Python/pythonrun.c' line='873' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_PrintEx'> + <parameter type-id='type-id-8' name='set_sys_last_vars' filepath='Python/pythonrun.c' line='873' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyErr_Print' mangled-name='_PyErr_Print' filepath='Python/pythonrun.c' line='867' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_Print'> + <parameter type-id='type-id-10' name='tstate' filepath='Objects/object.c' line='2291' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_HandleSystemExit' mangled-name='_Py_HandleSystemExit' filepath='Python/pythonrun.c' line='696' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_HandleSystemExit'> + <parameter type-id='type-id-501' name='exitcode_p' filepath='Python/pythonrun.c' line='696' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_SimpleStringFlags' mangled-name='PyRun_SimpleStringFlags' filepath='Python/pythonrun.c' line='480' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_SimpleStringFlags'> + <parameter type-id='type-id-3' name='command' filepath='Python/pythonrun.c' line='480' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='480' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_SimpleFileExFlags' mangled-name='PyRun_SimpleFileExFlags' filepath='Python/pythonrun.c' line='466' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_SimpleFileExFlags'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='466' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pythonrun.c' line='466' column='1'/> + <parameter type-id='type-id-8' name='closeit' filepath='Python/pythonrun.c' line='466' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='467' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyRun_SimpleFileObject' mangled-name='_PyRun_SimpleFileObject' filepath='Python/pythonrun.c' line='383' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyRun_SimpleFileObject'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='383' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/pythonrun.c' line='383' column='1'/> + <parameter type-id='type-id-8' name='closeit' filepath='Python/pythonrun.c' line='383' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='384' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_InteractiveOneFlags' mangled-name='PyRun_InteractiveOneFlags' filepath='Python/pythonrun.c' line='285' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_InteractiveOneFlags'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='285' column='1'/> + <parameter type-id='type-id-3' name='filename_str' filepath='Python/pythonrun.c' line='285' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='285' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_InteractiveOneObject' mangled-name='PyRun_InteractiveOneObject' filepath='Python/pythonrun.c' line='272' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_InteractiveOneObject'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='272' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/pythonrun.c' line='272' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='272' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_InteractiveLoopFlags' mangled-name='PyRun_InteractiveLoopFlags' filepath='Python/pythonrun.c' line='168' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_InteractiveLoopFlags'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='285' column='1'/> + <parameter type-id='type-id-3' name='filename_str' filepath='Python/pythonrun.c' line='285' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='285' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyRun_InteractiveLoopObject' mangled-name='_PyRun_InteractiveLoopObject' filepath='Python/pythonrun.c' line='112' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyRun_InteractiveLoopObject'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='112' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/pythonrun.c' line='112' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='112' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyRun_AnyFileExFlags' mangled-name='PyRun_AnyFileExFlags' filepath='Python/pythonrun.c' line='91' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyRun_AnyFileExFlags'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='466' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/pythonrun.c' line='466' column='1'/> + <parameter type-id='type-id-8' name='closeit' filepath='Python/pythonrun.c' line='466' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='467' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyRun_AnyFileObject' mangled-name='_PyRun_AnyFileObject' filepath='Python/pythonrun.c' line='58' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyRun_AnyFileObject'> + <parameter type-id='type-id-473' name='fp' filepath='Python/pythonrun.c' line='58' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/pythonrun.c' line='58' column='1'/> + <parameter type-id='type-id-8' name='closeit' filepath='Python/pythonrun.c' line='58' column='1'/> + <parameter type-id='type-id-593' name='flags' filepath='Python/pythonrun.c' line='59' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pytime.c' comp-dir-path='/src' language='LANG_C99'> + <typedef-decl name='_PyTime_t' type-id='type-id-29' filepath='./Include/cpython/pytime.h' line='59' column='1' id='type-id-857'/> + <function-decl name='_PyDeadline_Get' mangled-name='_PyDeadline_Get' filepath='Python/pytime.c' line='1347' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDeadline_Get'> + <parameter type-id='type-id-857' name='deadline' filepath='Python/pytime.c' line='1347' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <function-decl name='_PyDeadline_Init' mangled-name='_PyDeadline_Init' filepath='Python/pytime.c' line='1339' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyDeadline_Init'> + <parameter type-id='type-id-857' name='deadline' filepath='Python/pytime.c' line='1347' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <typedef-decl name='__time_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='160' column='1' id='type-id-858'/> + <typedef-decl name='time_t' type-id='type-id-858' filepath='/usr/include/x86_64-linux-gnu/bits/types/time_t.h' line='7' column='1' id='type-id-859'/> + <class-decl name='tm' size-in-bits='448' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='7' column='1' id='type-id-860'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='tm_sec' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='9' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='tm_min' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='10' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='tm_hour' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='11' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='tm_mday' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='12' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='tm_mon' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='13' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='tm_year' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='tm_wday' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='15' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='tm_yday' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='16' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='tm_isdst' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='17' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='tm_gmtoff' type-id='type-id-53' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='20' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='tm_zone' type-id='type-id-3' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h' line='21' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-860' size-in-bits='64' id='type-id-861'/> + <function-decl name='_PyTime_gmtime' mangled-name='_PyTime_gmtime' filepath='Python/pytime.c' line='1311' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_gmtime'> + <parameter type-id='type-id-859' name='t' filepath='Python/pytime.c' line='1311' column='1'/> + <parameter type-id='type-id-861' name='tm' filepath='Python/pytime.c' line='1311' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_localtime' mangled-name='_PyTime_localtime' filepath='Python/pytime.c' line='1272' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_localtime'> + <parameter type-id='type-id-859' name='t' filepath='Python/pytime.c' line='1311' column='1'/> + <parameter type-id='type-id-861' name='tm' filepath='Python/pytime.c' line='1311' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_GetPerfCounter' mangled-name='_PyTime_GetPerfCounter' filepath='Python/pytime.c' line='1253' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_GetPerfCounter'> + <return type-id='type-id-857'/> + </function-decl> + <pointer-type-def type-id='type-id-857' size-in-bits='64' id='type-id-862'/> + <class-decl name='__anonymous_struct__' size-in-bits='192' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-863' visibility='default' filepath='./Include/cpython/pytime.h' line='232' column='1' id='type-id-864'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='implementation' type-id='type-id-3' visibility='default' filepath='./Include/cpython/pytime.h' line='233' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='monotonic' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pytime.h' line='234' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='96'> + <var-decl name='adjustable' type-id='type-id-8' visibility='default' filepath='./Include/cpython/pytime.h' line='235' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='resolution' type-id='type-id-391' visibility='default' filepath='./Include/cpython/pytime.h' line='236' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='_Py_clock_info_t' type-id='type-id-864' filepath='./Include/cpython/pytime.h' line='237' column='1' id='type-id-863'/> + <pointer-type-def type-id='type-id-863' size-in-bits='64' id='type-id-865'/> + <function-decl name='_PyTime_GetPerfCounterWithInfo' mangled-name='_PyTime_GetPerfCounterWithInfo' filepath='Python/pytime.c' line='1242' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_GetPerfCounterWithInfo'> + <parameter type-id='type-id-862' name='t' filepath='Python/pytime.c' line='1242' column='1'/> + <parameter type-id='type-id-865' name='info' filepath='Python/pytime.c' line='1242' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_GetMonotonicClockWithInfo' mangled-name='_PyTime_GetMonotonicClockWithInfo' filepath='Python/pytime.c' line='1161' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_GetMonotonicClockWithInfo'> + <parameter type-id='type-id-862' name='t' filepath='Python/pytime.c' line='1242' column='1'/> + <parameter type-id='type-id-865' name='info' filepath='Python/pytime.c' line='1242' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_GetMonotonicClock' mangled-name='_PyTime_GetMonotonicClock' filepath='Python/pytime.c' line='1148' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_GetMonotonicClock'> + <return type-id='type-id-857'/> + </function-decl> + <function-decl name='_PyTime_GetSystemClockWithInfo' mangled-name='_PyTime_GetSystemClockWithInfo' filepath='Python/pytime.c' line='964' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_GetSystemClockWithInfo'> + <parameter type-id='type-id-862' name='t' filepath='Python/pytime.c' line='1242' column='1'/> + <parameter type-id='type-id-865' name='info' filepath='Python/pytime.c' line='1242' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_GetSystemClock' mangled-name='_PyTime_GetSystemClock' filepath='Python/pytime.c' line='951' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_GetSystemClock'> + <return type-id='type-id-857'/> + </function-decl> + <class-decl name='timespec' size-in-bits='128' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h' line='10' column='1' id='type-id-866'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='tv_sec' type-id='type-id-858' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h' line='12' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='tv_nsec' type-id='type-id-867' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h' line='16' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='__syscall_slong_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='196' column='1' id='type-id-867'/> + <pointer-type-def type-id='type-id-866' size-in-bits='64' id='type-id-868'/> + <function-decl name='_PyTime_AsTimespec' mangled-name='_PyTime_AsTimespec' filepath='Python/pytime.c' line='832' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsTimespec'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='832' column='1'/> + <parameter type-id='type-id-868' name='ts' filepath='Python/pytime.c' line='832' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_AsTimespec_clamp' mangled-name='_PyTime_AsTimespec_clamp' filepath='Python/pytime.c' line='826' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsTimespec_clamp'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='826' column='1'/> + <parameter type-id='type-id-868' name='ts' filepath='Python/pytime.c' line='826' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <pointer-type-def type-id='type-id-859' size-in-bits='64' id='type-id-869'/> + <enum-decl name='__anonymous_enum__' is-anonymous='yes' filepath='./Include/cpython/pytime.h' line='66' column='1' id='type-id-870'> + <underlying-type type-id='type-id-126'/> + <enumerator name='_PyTime_ROUND_FLOOR' value='0'/> + <enumerator name='_PyTime_ROUND_CEILING' value='1'/> + <enumerator name='_PyTime_ROUND_HALF_EVEN' value='2'/> + <enumerator name='_PyTime_ROUND_UP' value='3'/> + <enumerator name='_PyTime_ROUND_TIMEOUT' value='3'/> + </enum-decl> + <typedef-decl name='_PyTime_round_t' type-id='type-id-870' filepath='./Include/cpython/pytime.h' line='86' column='1' id='type-id-871'/> + <function-decl name='_PyTime_AsTimevalTime_t' mangled-name='_PyTime_AsTimevalTime_t' filepath='Python/pytime.c' line='787' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsTimevalTime_t'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='787' column='1'/> + <parameter type-id='type-id-869' name='p_secs' filepath='Python/pytime.c' line='787' column='1'/> + <parameter type-id='type-id-501' name='us' filepath='Python/pytime.c' line='787' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='788' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <class-decl name='timeval' size-in-bits='128' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h' line='8' column='1' id='type-id-872'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='tv_sec' type-id='type-id-858' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h' line='10' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='tv_usec' type-id='type-id-873' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h' line='11' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='__suseconds_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='162' column='1' id='type-id-873'/> + <pointer-type-def type-id='type-id-872' size-in-bits='64' id='type-id-874'/> + <function-decl name='_PyTime_AsTimeval_clamp' mangled-name='_PyTime_AsTimeval_clamp' filepath='Python/pytime.c' line='780' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsTimeval_clamp'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='780' column='1'/> + <parameter type-id='type-id-874' name='tv' filepath='Python/pytime.c' line='780' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='780' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyTime_AsTimeval' mangled-name='_PyTime_AsTimeval' filepath='Python/pytime.c' line='773' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsTimeval'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='773' column='1'/> + <parameter type-id='type-id-874' name='tv' filepath='Python/pytime.c' line='773' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='773' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_AsMilliseconds' mangled-name='_PyTime_AsMilliseconds' filepath='Python/pytime.c' line='723' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsMilliseconds'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='723' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='723' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <function-decl name='_PyTime_AsMicroseconds' mangled-name='_PyTime_AsMicroseconds' filepath='Python/pytime.c' line='715' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsMicroseconds'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='723' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='723' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <function-decl name='_PyTime_AsNanoseconds' mangled-name='_PyTime_AsNanoseconds' filepath='Python/pytime.c' line='698' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsNanoseconds'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='698' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <function-decl name='_PyTime_AsNanosecondsObject' mangled-name='_PyTime_AsNanosecondsObject' filepath='Python/pytime.c' line='593' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsNanosecondsObject'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='593' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyTime_AsSecondsDouble' mangled-name='_PyTime_AsSecondsDouble' filepath='Python/pytime.c' line='572' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_AsSecondsDouble'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='572' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='_PyTime_FromMillisecondsObject' mangled-name='_PyTime_FromMillisecondsObject' filepath='Python/pytime.c' line='565' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_FromMillisecondsObject'> + <parameter type-id='type-id-862' name='tp' filepath='Python/pytime.c' line='565' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/pytime.c' line='565' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='565' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_FromSecondsObject' mangled-name='_PyTime_FromSecondsObject' filepath='Python/pytime.c' line='558' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_FromSecondsObject'> + <parameter type-id='type-id-862' name='tp' filepath='Python/pytime.c' line='565' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/pytime.c' line='565' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='565' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_FromTimeval' mangled-name='_PyTime_FromTimeval' filepath='Python/pytime.c' line='491' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_FromTimeval'> + <parameter type-id='type-id-862' name='tp' filepath='Python/pytime.c' line='491' column='1'/> + <parameter type-id='type-id-874' name='tv' filepath='Python/pytime.c' line='491' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_FromTimespec' mangled-name='_PyTime_FromTimespec' filepath='Python/pytime.c' line='460' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_FromTimespec'> + <parameter type-id='type-id-862' name='tp' filepath='Python/pytime.c' line='460' column='1'/> + <parameter type-id='type-id-868' name='ts' filepath='Python/pytime.c' line='460' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_FromNanosecondsObject' mangled-name='_PyTime_FromNanosecondsObject' filepath='Python/pytime.c' line='410' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_FromNanosecondsObject'> + <parameter type-id='type-id-862' name='tp' filepath='Python/pytime.c' line='410' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/pytime.c' line='410' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_FromNanoseconds' mangled-name='_PyTime_FromNanoseconds' filepath='Python/pytime.c' line='403' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_FromNanoseconds'> + <parameter type-id='type-id-857' name='t' filepath='Python/pytime.c' line='698' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <function-decl name='_PyTime_FromSeconds' mangled-name='_PyTime_FromSeconds' filepath='Python/pytime.c' line='386' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_FromSeconds'> + <parameter type-id='type-id-8' name='seconds' filepath='Python/pytime.c' line='386' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <pointer-type-def type-id='type-id-53' size-in-bits='64' id='type-id-875'/> + <function-decl name='_PyTime_ObjectToTimeval' mangled-name='_PyTime_ObjectToTimeval' filepath='Python/pytime.c' line='378' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_ObjectToTimeval'> + <parameter type-id='type-id-14' name='obj' filepath='Python/pytime.c' line='378' column='1'/> + <parameter type-id='type-id-869' name='sec' filepath='Python/pytime.c' line='378' column='1'/> + <parameter type-id='type-id-875' name='usec' filepath='Python/pytime.c' line='378' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='379' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_ObjectToTimespec' mangled-name='_PyTime_ObjectToTimespec' filepath='Python/pytime.c' line='370' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_ObjectToTimespec'> + <parameter type-id='type-id-14' name='obj' filepath='Python/pytime.c' line='378' column='1'/> + <parameter type-id='type-id-869' name='sec' filepath='Python/pytime.c' line='378' column='1'/> + <parameter type-id='type-id-875' name='usec' filepath='Python/pytime.c' line='378' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='379' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTime_ObjectToTime_t' mangled-name='_PyTime_ObjectToTime_t' filepath='Python/pytime.c' line='336' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_ObjectToTime_t'> + <parameter type-id='type-id-14' name='obj' filepath='Python/pytime.c' line='336' column='1'/> + <parameter type-id='type-id-869' name='sec' filepath='Python/pytime.c' line='336' column='1'/> + <parameter type-id='type-id-871' name='round' filepath='Python/pytime.c' line='336' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_FromTime_t' mangled-name='_PyLong_FromTime_t' filepath='Python/pytime.c' line='182' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FromTime_t'> + <parameter type-id='type-id-859' name='t' filepath='Python/pytime.c' line='182' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_AsTime_t' mangled-name='_PyLong_AsTime_t' filepath='Python/pytime.c' line='162' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_AsTime_t'> + <parameter type-id='type-id-14' name='obj' filepath='Python/pytime.c' line='162' column='1'/> + <return type-id='type-id-859'/> + </function-decl> + <function-decl name='_PyTime_MulDiv' mangled-name='_PyTime_MulDiv' filepath='Python/pytime.c' line='145' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_MulDiv'> + <parameter type-id='type-id-857' name='ticks' filepath='Python/pytime.c' line='145' column='1'/> + <parameter type-id='type-id-857' name='mul' filepath='Python/pytime.c' line='145' column='1'/> + <parameter type-id='type-id-857' name='div' filepath='Python/pytime.c' line='145' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + <function-decl name='_PyTime_Add' mangled-name='_PyTime_Add' filepath='Python/pytime.c' line='97' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTime_Add'> + <parameter type-id='type-id-857' name='t1' filepath='Python/pytime.c' line='97' column='1'/> + <parameter type-id='type-id-857' name='t2' filepath='Python/pytime.c' line='97' column='1'/> + <return type-id='type-id-857'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/bootstrap_hash.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyOS_URandomNonblock' mangled-name='_PyOS_URandomNonblock' filepath='Python/bootstrap_hash.c' line='541' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyOS_URandomNonblock'> + <parameter type-id='type-id-18' name='buffer' filepath='Python/bootstrap_hash.c' line='541' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Python/bootstrap_hash.c' line='541' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyOS_URandom' mangled-name='_PyOS_URandom' filepath='Python/bootstrap_hash.c' line='527' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyOS_URandom'> + <parameter type-id='type-id-18' name='buffer' filepath='Python/bootstrap_hash.c' line='541' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Python/bootstrap_hash.c' line='541' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/specialize.c' comp-dir-path='/src' language='LANG_C99'> + + <array-type-def dimensions='1' type-id='type-id-285' size-in-bits='2048' id='type-id-876'> + <subrange length='256' type-id='type-id-16' id='type-id-264'/> + + </array-type-def> + <var-decl name='_PyOpcode_Adaptive' type-id='type-id-876' visibility='default' filepath='./Include/internal/pycore_code.h' line='113' column='1'/> + <var-decl name='_Py_QuickenedCount' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_code.h' line='115' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/structmember.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyMember_SetOne' mangled-name='PyMember_SetOne' filepath='Python/structmember.c' line='105' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMember_SetOne'> + <parameter type-id='type-id-115' name='addr' filepath='Python/structmember.c' line='105' column='1'/> + <parameter type-id='type-id-97' name='l' filepath='Python/structmember.c' line='105' column='1'/> + <parameter type-id='type-id-14' name='v' filepath='Python/structmember.c' line='105' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyMember_GetOne' mangled-name='PyMember_GetOne' filepath='Python/structmember.c' line='8' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyMember_GetOne'> + <parameter type-id='type-id-3' name='obj_addr' filepath='Python/structmember.c' line='8' column='1'/> + <parameter type-id='type-id-97' name='l' filepath='Python/structmember.c' line='8' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/symtable.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PySTEntry_Type' type-id='type-id-112' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='78' column='1'/> + <class-decl name='_symtable_entry' size-in-bits='960' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='44' column='1' id='type-id-877'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ob_base' type-id='type-id-108' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='45' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='ste_id' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='46' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='ste_symbols' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='47' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='ste_name' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='48' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='ste_varnames' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='49' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='ste_children' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='50' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='ste_directives' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='51' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='ste_type' type-id='type-id-878' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='52' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='544'> + <var-decl name='ste_nested' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='53' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='31'> + <var-decl name='ste_free' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='54' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='30'> + <var-decl name='ste_child_free' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='29'> + <var-decl name='ste_generator' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='57' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28'> + <var-decl name='ste_coroutine' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='58' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='608'> + <var-decl name='ste_comprehension' type-id='type-id-879' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='59' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='31'> + <var-decl name='ste_varargs' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='60' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='30'> + <var-decl name='ste_varkeywords' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='29'> + <var-decl name='ste_returns_value' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='62' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='28'> + <var-decl name='ste_needs_class_closure' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='27'> + <var-decl name='ste_comp_iter_target' type-id='type-id-105' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='672'> + <var-decl name='ste_comp_iter_expr' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='ste_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='736'> + <var-decl name='ste_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='768'> + <var-decl name='ste_end_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='71' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='800'> + <var-decl name='ste_end_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='72' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='ste_opt_lineno' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='73' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='864'> + <var-decl name='ste_opt_col_offset' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='896'> + <var-decl name='ste_table' type-id='type-id-880' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='75' column='1'/> + </data-member> + </class-decl> + <enum-decl name='_block_type' filepath='./Include/internal/pycore_symtable.h' line='13' column='1' id='type-id-881'> + <underlying-type type-id='type-id-126'/> + <enumerator name='FunctionBlock' value='0'/> + <enumerator name='ClassBlock' value='1'/> + <enumerator name='ModuleBlock' value='2'/> + <enumerator name='AnnotationBlock' value='3'/> + </enum-decl> + <typedef-decl name='_Py_block_ty' type-id='type-id-881' filepath='./Include/internal/pycore_symtable.h' line='14' column='1' id='type-id-878'/> + <enum-decl name='_comprehension_type' filepath='./Include/internal/pycore_symtable.h' line='16' column='1' id='type-id-882'> + <underlying-type type-id='type-id-126'/> + <enumerator name='NoComprehension' value='0'/> + <enumerator name='ListComprehension' value='1'/> + <enumerator name='DictComprehension' value='2'/> + <enumerator name='SetComprehension' value='3'/> + <enumerator name='GeneratorExpression' value='4'/> + </enum-decl> + <typedef-decl name='_Py_comprehension_ty' type-id='type-id-882' filepath='./Include/internal/pycore_symtable.h' line='21' column='1' id='type-id-879'/> + <class-decl name='symtable' size-in-bits='640' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='25' column='1' id='type-id-883'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='st_filename' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='26' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='st_cur' type-id='type-id-884' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='28' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='st_top' type-id='type-id-884' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='29' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='st_blocks' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='30' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='st_stack' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='st_global' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='st_nblocks' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='st_private' type-id='type-id-14' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='st_future' type-id='type-id-885' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='38' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='recursion_depth' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='40' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='608'> + <var-decl name='recursion_limit' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_symtable.h' line='41' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-877' size-in-bits='64' id='type-id-884'/> + <class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' naming-typedef-id='type-id-886' visibility='default' filepath='./Include/cpython/compile.h' line='36' column='1' id='type-id-887'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='ff_features' type-id='type-id-8' visibility='default' filepath='./Include/cpython/compile.h' line='37' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='32'> + <var-decl name='ff_lineno' type-id='type-id-8' visibility='default' filepath='./Include/cpython/compile.h' line='38' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='PyFutureFeatures' type-id='type-id-887' filepath='./Include/cpython/compile.h' line='39' column='1' id='type-id-886'/> + <pointer-type-def type-id='type-id-886' size-in-bits='64' id='type-id-885'/> + <pointer-type-def type-id='type-id-883' size-in-bits='64' id='type-id-880'/> + <typedef-decl name='PySTEntryObject' type-id='type-id-877' filepath='./Include/internal/pycore_symtable.h' line='76' column='1' id='type-id-888'/> + <pointer-type-def type-id='type-id-888' size-in-bits='64' id='type-id-889'/> + <function-decl name='PySymtable_Lookup' mangled-name='PySymtable_Lookup' filepath='Python/symtable.c' line='373' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySymtable_Lookup'> + <parameter type-id='type-id-880' name='st' filepath='Python/symtable.c' line='373' column='1'/> + <parameter type-id='type-id-18' name='key' filepath='Python/symtable.c' line='373' column='1'/> + <return type-id='type-id-889'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Python/sysmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PySys_FormatStderr' mangled-name='PySys_FormatStderr' filepath='./Python/sysmodule.c' line='3462' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_FormatStderr'> + <parameter type-id='type-id-3' name='format' filepath='./Python/sysmodule.c' line='3462' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_FormatStdout' mangled-name='PySys_FormatStdout' filepath='./Python/sysmodule.c' line='3452' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_FormatStdout'> + <parameter type-id='type-id-3' name='format' filepath='./Python/sysmodule.c' line='3462' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_WriteStderr' mangled-name='PySys_WriteStderr' filepath='./Python/sysmodule.c' line='3419' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_WriteStderr'> + <parameter type-id='type-id-3' name='format' filepath='./Python/sysmodule.c' line='3462' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_WriteStdout' mangled-name='PySys_WriteStdout' filepath='./Python/sysmodule.c' line='3409' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_WriteStdout'> + <parameter type-id='type-id-3' name='format' filepath='./Python/sysmodule.c' line='3462' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_SetArgv' mangled-name='PySys_SetArgv' filepath='./Python/sysmodule.c' line='3313' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_SetArgv'> + <parameter type-id='type-id-8' name='argc' filepath='./Python/sysmodule.c' line='3313' column='1'/> + <parameter type-id='type-id-374' name='argv' filepath='./Python/sysmodule.c' line='3313' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_SetArgvEx' mangled-name='PySys_SetArgvEx' filepath='./Python/sysmodule.c' line='3269' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_SetArgvEx'> + <parameter type-id='type-id-8' name='argc' filepath='./Python/sysmodule.c' line='3269' column='1'/> + <parameter type-id='type-id-374' name='argv' filepath='./Python/sysmodule.c' line='3269' column='1'/> + <parameter type-id='type-id-8' name='updatepath' filepath='./Python/sysmodule.c' line='3269' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_SetPath' mangled-name='PySys_SetPath' filepath='./Python/sysmodule.c' line='3237' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_SetPath'> + <parameter type-id='type-id-545' name='program_full_path' filepath='Python/pathconfig.c' line='297' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_GetXOptions' mangled-name='PySys_GetXOptions' filepath='./Python/sysmodule.c' line='2361' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_GetXOptions'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PySys_AddXOption' mangled-name='PySys_AddXOption' filepath='./Python/sysmodule.c' line='2347' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_AddXOption'> + <parameter type-id='type-id-545' name='s' filepath='./Python/sysmodule.c' line='2347' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_HasWarnOptions' mangled-name='PySys_HasWarnOptions' filepath='./Python/sysmodule.c' line='2273' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_HasWarnOptions'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySys_AddWarnOption' mangled-name='PySys_AddWarnOption' filepath='./Python/sysmodule.c' line='2254' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_AddWarnOption'> + <parameter type-id='type-id-545' name='path' filepath='Python/pathconfig.c' line='215' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_AddWarnOptionUnicode' mangled-name='PySys_AddWarnOptionUnicode' filepath='./Python/sysmodule.c' line='2242' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_AddWarnOptionUnicode'> + <parameter type-id='type-id-14' name='m' filepath='Objects/moduleobject.c' line='578' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PySys_ResetWarnOptions' mangled-name='PySys_ResetWarnOptions' filepath='./Python/sysmodule.c' line='2214' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_ResetWarnOptions'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PySys_GetSizeOf' mangled-name='_PySys_GetSizeOf' filepath='./Python/sysmodule.c' line='1624' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySys_GetSizeOf'> + <parameter type-id='type-id-14' name='vv' filepath='Objects/longobject.c' line='664' column='1'/> + <return type-id='type-id-54'/> + </function-decl> + <function-decl name='PySys_AddAuditHook' mangled-name='PySys_AddAuditHook' filepath='./Python/sysmodule.c' line='360' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_AddAuditHook'> + <parameter type-id='type-id-242' name='hook' filepath='./Python/sysmodule.c' line='360' column='1'/> + <parameter type-id='type-id-18' name='userData' filepath='./Python/sysmodule.c' line='360' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySys_Audit' mangled-name='PySys_Audit' filepath='./Python/sysmodule.c' line='306' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_Audit'> + <parameter type-id='type-id-3' name='event' filepath='./Python/sysmodule.c' line='306' column='1'/> + <parameter type-id='type-id-3' name='argFormat' filepath='./Python/sysmodule.c' line='306' column='1'/> + <parameter is-variadic='yes'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySys_SetObject' mangled-name='PySys_SetObject' filepath='./Python/sysmodule.c' line='140' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_SetObject'> + <parameter type-id='type-id-3' name='name' filepath='Python/codecs.c' line='622' column='1'/> + <parameter type-id='type-id-14' name='error' filepath='Python/codecs.c' line='622' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PySys_GetObject' mangled-name='PySys_GetObject' filepath='./Python/sysmodule.c' line='89' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PySys_GetObject'> + <parameter type-id='type-id-3' name='name' filepath='./Python/sysmodule.c' line='89' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PySys_GetAttr' mangled-name='_PySys_GetAttr' filepath='./Python/sysmodule.c' line='63' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PySys_GetAttr'> + <parameter type-id='type-id-10' name='tstate' filepath='./Python/sysmodule.c' line='63' column='1'/> + <parameter type-id='type-id-14' name='name' filepath='./Python/sysmodule.c' line='63' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/thread.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyThread_GetInfo' mangled-name='PyThread_GetInfo' filepath='Python/thread.c' line='185' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_GetInfo'> + <return type-id='type-id-14'/> + </function-decl> + <pointer-type-def type-id='type-id-237' size-in-bits='64' id='type-id-890'/> + <function-decl name='PyThread_tss_is_created' mangled-name='PyThread_tss_is_created' filepath='Python/thread.c' line='156' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_tss_is_created'> + <parameter type-id='type-id-890' name='key' filepath='Python/thread.c' line='156' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThread_tss_free' mangled-name='PyThread_tss_free' filepath='Python/thread.c' line='147' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_tss_free'> + <parameter type-id='type-id-890' name='key' filepath='Python/thread.c' line='147' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThread_tss_alloc' mangled-name='PyThread_tss_alloc' filepath='Python/thread.c' line='136' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_tss_alloc'> + <return type-id='type-id-890'/> + </function-decl> + <function-decl name='PyThread_set_stacksize' mangled-name='PyThread_set_stacksize' filepath='Python/thread.c' line='120' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_set_stacksize'> + <parameter type-id='type-id-54' name='size' filepath='Python/thread.c' line='120' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThread_get_stacksize' mangled-name='PyThread_get_stacksize' filepath='Python/thread.c' line='109' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_get_stacksize'> + <return type-id='type-id-54'/> + </function-decl> + <function-decl name='PyThread_tss_get' mangled-name='PyThread_tss_get' filepath='Python/thread_pthread.h' line='922' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_tss_get'> + <parameter type-id='type-id-890' name='key' filepath='Python/thread_pthread.h' line='922' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyThread_tss_set' mangled-name='PyThread_tss_set' filepath='Python/thread_pthread.h' line='914' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_tss_set'> + <parameter type-id='type-id-890' name='key' filepath='Python/thread_pthread.h' line='914' column='1'/> + <parameter type-id='type-id-18' name='value' filepath='Python/thread_pthread.h' line='914' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThread_tss_delete' mangled-name='PyThread_tss_delete' filepath='Python/thread_pthread.h' line='900' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_tss_delete'> + <parameter type-id='type-id-890' name='key' filepath='Python/thread.c' line='147' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThread_tss_create' mangled-name='PyThread_tss_create' filepath='Python/thread_pthread.h' line='883' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_tss_create'> + <parameter type-id='type-id-890' name='key' filepath='Python/thread_pthread.h' line='883' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThread_ReInitTLS' mangled-name='PyThread_ReInitTLS' filepath='Python/thread_pthread.h' line='872' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_ReInitTLS'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThread_get_key_value' mangled-name='PyThread_get_key_value' filepath='Python/thread_pthread.h' line='861' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_get_key_value'> + <parameter type-id='type-id-8' name='key' filepath='Python/thread_pthread.h' line='861' column='1'/> + <return type-id='type-id-18'/> + </function-decl> + <function-decl name='PyThread_set_key_value' mangled-name='PyThread_set_key_value' filepath='Python/thread_pthread.h' line='850' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_set_key_value'> + <parameter type-id='type-id-8' name='key' filepath='Python/thread_pthread.h' line='850' column='1'/> + <parameter type-id='type-id-18' name='value' filepath='Python/thread_pthread.h' line='850' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThread_delete_key_value' mangled-name='PyThread_delete_key_value' filepath='Python/thread_pthread.h' line='842' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_delete_key_value'> + <parameter type-id='type-id-8' name='sts' filepath='Python/pylifecycle.c' line='2936' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThread_delete_key' mangled-name='PyThread_delete_key' filepath='Python/thread_pthread.h' line='834' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_delete_key'> + <parameter type-id='type-id-8' name='sts' filepath='Python/pylifecycle.c' line='2936' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThread_create_key' mangled-name='PyThread_create_key' filepath='Python/thread_pthread.h' line='814' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_create_key'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThread_acquire_lock' mangled-name='PyThread_acquire_lock' filepath='Python/thread_pthread.h' line='747' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_acquire_lock'> + <parameter type-id='type-id-30' name='lock' filepath='Python/thread_pthread.h' line='747' column='1'/> + <parameter type-id='type-id-8' name='waitflag' filepath='Python/thread_pthread.h' line='747' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <pointer-type-def type-id='type-id-30' size-in-bits='64' id='type-id-891'/> + <function-decl name='_PyThread_at_fork_reinit' mangled-name='_PyThread_at_fork_reinit' filepath='Python/thread_pthread.h' line='727' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyThread_at_fork_reinit'> + <parameter type-id='type-id-891' name='lock' filepath='Python/thread_pthread.h' line='727' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyThread_release_lock' mangled-name='PyThread_release_lock' filepath='Python/thread_pthread.h' line='553' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_release_lock'> + <parameter type-id='type-id-30' name='lock' filepath='Python/thread_pthread.h' line='553' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <enum-decl name='PyLockStatus' filepath='./Include/pythread.h' line='12' column='1' id='type-id-892'> + <underlying-type type-id='type-id-126'/> + <enumerator name='PY_LOCK_FAILURE' value='0'/> + <enumerator name='PY_LOCK_ACQUIRED' value='1'/> + <enumerator name='PY_LOCK_INTR' value='2'/> + </enum-decl> + <typedef-decl name='PyLockStatus' type-id='type-id-892' filepath='./Include/pythread.h' line='16' column='1' id='type-id-893'/> + <function-decl name='PyThread_acquire_lock_timed' mangled-name='PyThread_acquire_lock_timed' filepath='Python/thread_pthread.h' line='430' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_acquire_lock_timed'> + <parameter type-id='type-id-30' name='lock' filepath='Python/thread_pthread.h' line='430' column='1'/> + <parameter type-id='type-id-222' name='microseconds' filepath='Python/thread_pthread.h' line='430' column='1'/> + <parameter type-id='type-id-8' name='intr_flag' filepath='Python/thread_pthread.h' line='431' column='1'/> + <return type-id='type-id-893'/> + </function-decl> + <function-decl name='PyThread_free_lock' mangled-name='PyThread_free_lock' filepath='Python/thread_pthread.h' line='400' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_free_lock'> + <parameter type-id='type-id-30' name='lock' filepath='Python/thread_pthread.h' line='553' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThread_allocate_lock' mangled-name='PyThread_allocate_lock' filepath='Python/thread_pthread.h' line='374' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_allocate_lock'> + <return type-id='type-id-30'/> + </function-decl> + <function-decl name='PyThread_exit_thread' mangled-name='PyThread_exit_thread' filepath='Python/thread_pthread.h' line='359' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_exit_thread'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyThread_get_thread_native_id' mangled-name='PyThread_get_thread_native_id' filepath='Python/thread_pthread.h' line='331' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_get_thread_native_id'> + <return type-id='type-id-16'/> + </function-decl> + <function-decl name='PyThread_get_thread_ident' mangled-name='PyThread_get_thread_ident' filepath='Python/thread_pthread.h' line='320' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_get_thread_ident'> + <return type-id='type-id-16'/> + </function-decl> + <function-decl name='PyThread_start_new_thread' mangled-name='PyThread_start_new_thread' filepath='Python/thread_pthread.h' line='244' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_start_new_thread'> + <parameter type-id='type-id-17' name='func' filepath='Python/thread_pthread.h' line='244' column='1'/> + <parameter type-id='type-id-18' name='arg' filepath='Python/thread_pthread.h' line='244' column='1'/> + <return type-id='type-id-16'/> + </function-decl> + <function-decl name='PyThread_init_thread' mangled-name='PyThread_init_thread' filepath='Python/thread.c' line='58' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyThread_init_thread'> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/traceback.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyTraceBack_Type' type-id='type-id-112' mangled-name='PyTraceBack_Type' visibility='default' filepath='./Include/traceback.h' line='13' column='1' elf-symbol-id='PyTraceBack_Type'/> + <function-decl name='_Py_DumpTracebackThreads' mangled-name='_Py_DumpTracebackThreads' filepath='Python/traceback.c' line='1283' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DumpTracebackThreads'> + <parameter type-id='type-id-8' name='fd' filepath='Python/traceback.c' line='1283' column='1'/> + <parameter type-id='type-id-11' name='interp' filepath='Python/traceback.c' line='1283' column='1'/> + <parameter type-id='type-id-10' name='current_tstate' filepath='Python/traceback.c' line='1284' column='1'/> + <return type-id='type-id-3'/> + </function-decl> + <function-decl name='_Py_DumpTraceback' mangled-name='_Py_DumpTraceback' filepath='Python/traceback.c' line='1253' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DumpTraceback'> + <parameter type-id='type-id-8' name='fd' filepath='Python/traceback.c' line='1253' column='1'/> + <parameter type-id='type-id-10' name='tstate' filepath='Python/traceback.c' line='1253' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_DumpASCII' mangled-name='_Py_DumpASCII' filepath='Python/traceback.c' line='1084' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DumpASCII'> + <parameter type-id='type-id-8' name='fd' filepath='Python/traceback.c' line='1084' column='1'/> + <parameter type-id='type-id-14' name='text' filepath='Python/traceback.c' line='1084' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_DumpHexadecimal' mangled-name='_Py_DumpHexadecimal' filepath='Python/traceback.c' line='1061' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DumpHexadecimal'> + <parameter type-id='type-id-8' name='fd' filepath='Python/traceback.c' line='1061' column='1'/> + <parameter type-id='type-id-358' name='value' filepath='Python/traceback.c' line='1061' column='1'/> + <parameter type-id='type-id-36' name='width' filepath='Python/traceback.c' line='1061' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_DumpDecimal' mangled-name='_Py_DumpDecimal' filepath='Python/traceback.c' line='1037' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DumpDecimal'> + <parameter type-id='type-id-8' name='fd' filepath='Python/traceback.c' line='1037' column='1'/> + <parameter type-id='type-id-54' name='value' filepath='Python/traceback.c' line='1037' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyTraceBack_Print' mangled-name='PyTraceBack_Print' filepath='Python/traceback.c' line='1021' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTraceBack_Print'> + <parameter type-id='type-id-14' name='op' filepath='Objects/dictobject.c' line='3691' column='1'/> + <parameter type-id='type-id-14' name='key' filepath='Objects/dictobject.c' line='3691' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTraceBack_Print_Indented' mangled-name='_PyTraceBack_Print_Indented' filepath='Python/traceback.c' line='981' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTraceBack_Print_Indented'> + <parameter type-id='type-id-14' name='v' filepath='Python/traceback.c' line='981' column='1'/> + <parameter type-id='type-id-8' name='indent' filepath='Python/traceback.c' line='981' column='1'/> + <parameter type-id='type-id-3' name='margin' filepath='Python/traceback.c' line='981' column='1'/> + <parameter type-id='type-id-3' name='header_margin' filepath='Python/traceback.c' line='982' column='1'/> + <parameter type-id='type-id-3' name='header' filepath='Python/traceback.c' line='982' column='1'/> + <parameter type-id='type-id-14' name='f' filepath='Python/traceback.c' line='982' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_DisplaySourceLine' mangled-name='_Py_DisplaySourceLine' filepath='Python/traceback.c' line='578' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DisplaySourceLine'> + <parameter type-id='type-id-14' name='f' filepath='Python/traceback.c' line='578' column='1'/> + <parameter type-id='type-id-14' name='filename' filepath='Python/traceback.c' line='578' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/traceback.c' line='578' column='1'/> + <parameter type-id='type-id-8' name='indent' filepath='Python/traceback.c' line='578' column='1'/> + <parameter type-id='type-id-501' name='truncation' filepath='Python/traceback.c' line='579' column='1'/> + <parameter type-id='type-id-22' name='line' filepath='Python/traceback.c' line='579' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_WriteIndentedMargin' mangled-name='_Py_WriteIndentedMargin' filepath='Python/traceback.c' line='406' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_WriteIndentedMargin'> + <parameter type-id='type-id-8' name='indent' filepath='Python/traceback.c' line='406' column='1'/> + <parameter type-id='type-id-3' name='margin' filepath='Python/traceback.c' line='406' column='1'/> + <parameter type-id='type-id-14' name='f' filepath='Python/traceback.c' line='406' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_WriteIndent' mangled-name='_Py_WriteIndent' filepath='Python/traceback.c' line='386' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_WriteIndent'> + <parameter type-id='type-id-8' name='indent' filepath='Python/traceback.c' line='386' column='1'/> + <parameter type-id='type-id-14' name='f' filepath='Python/traceback.c' line='386' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTraceback_Add' mangled-name='_PyTraceback_Add' filepath='Python/traceback.c' line='264' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTraceback_Add'> + <parameter type-id='type-id-3' name='funcname' filepath='Python/traceback.c' line='264' column='1'/> + <parameter type-id='type-id-3' name='filename' filepath='Python/traceback.c' line='264' column='1'/> + <parameter type-id='type-id-8' name='lineno' filepath='Python/traceback.c' line='264' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyTraceBack_Here' mangled-name='PyTraceBack_Here' filepath='Python/traceback.c' line='249' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTraceBack_Here'> + <parameter type-id='type-id-438' name='frame' filepath='Python/traceback.c' line='249' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyTraceBack_FromFrame' mangled-name='_PyTraceBack_FromFrame' filepath='Python/traceback.c' line='238' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTraceBack_FromFrame'> + <parameter type-id='type-id-14' name='tb_next' filepath='Python/traceback.c' line='238' column='1'/> + <parameter type-id='type-id-438' name='frame' filepath='Python/traceback.c' line='238' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/getopt.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyOS_opterr' type-id='type-id-8' visibility='default' filepath='./Include/internal/pycore_getopt.h' line='8' column='1'/> + <var-decl name='_PyOS_optind' type-id='type-id-36' visibility='default' filepath='./Include/internal/pycore_getopt.h' line='9' column='1'/> + <var-decl name='_PyOS_optarg' type-id='type-id-545' visibility='default' filepath='./Include/internal/pycore_getopt.h' line='10' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pystrcmp.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyOS_mystricmp' mangled-name='PyOS_mystricmp' filepath='Python/pystrcmp.c' line='22' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_mystricmp'> + <parameter type-id='type-id-3' name='s1' filepath='Python/pystrcmp.c' line='22' column='1'/> + <parameter type-id='type-id-3' name='s2' filepath='Python/pystrcmp.c' line='22' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyOS_mystrnicmp' mangled-name='PyOS_mystrnicmp' filepath='Python/pystrcmp.c' line='7' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_mystrnicmp'> + <parameter type-id='type-id-3' name='s1' filepath='Python/pystrcmp.c' line='7' column='1'/> + <parameter type-id='type-id-3' name='s2' filepath='Python/pystrcmp.c' line='7' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Python/pystrcmp.c' line='7' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pystrtod.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyOS_double_to_string' mangled-name='PyOS_double_to_string' filepath='Python/pystrtod.c' line='1259' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_double_to_string'> + <parameter type-id='type-id-391' name='val' filepath='Python/pystrtod.c' line='1259' column='1'/> + <parameter type-id='type-id-1' name='format_code' filepath='Python/pystrtod.c' line='1260' column='1'/> + <parameter type-id='type-id-8' name='precision' filepath='Python/pystrtod.c' line='1261' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Python/pystrtod.c' line='1262' column='1'/> + <parameter type-id='type-id-501' name='type' filepath='Python/pystrtod.c' line='1263' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <pointer-type-def type-id='type-id-894' size-in-bits='64' id='type-id-895'/> + <function-decl name='_Py_string_to_number_with_underscores' mangled-name='_Py_string_to_number_with_underscores' filepath='Python/pystrtod.c' line='383' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_string_to_number_with_underscores'> + <parameter type-id='type-id-3' name='s' filepath='Python/pystrtod.c' line='384' column='1'/> + <parameter type-id='type-id-36' name='orig_len' filepath='Python/pystrtod.c' line='384' column='1'/> + <parameter type-id='type-id-3' name='what' filepath='Python/pystrtod.c' line='384' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/pystrtod.c' line='384' column='1'/> + <parameter type-id='type-id-18' name='arg' filepath='Python/pystrtod.c' line='384' column='1'/> + <parameter type-id='type-id-895' name='innerfunc' filepath='Python/pystrtod.c' line='385' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyOS_string_to_double' mangled-name='PyOS_string_to_double' filepath='Python/pystrtod.c' line='337' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_string_to_double'> + <parameter type-id='type-id-3' name='s' filepath='Python/pystrtod.c' line='337' column='1'/> + <parameter type-id='type-id-494' name='endptr' filepath='Python/pystrtod.c' line='338' column='1'/> + <parameter type-id='type-id-14' name='overflow_exception' filepath='Python/pystrtod.c' line='339' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='_Py_parse_inf_or_nan' mangled-name='_Py_parse_inf_or_nan' filepath='Python/pystrtod.c' line='30' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_parse_inf_or_nan'> + <parameter type-id='type-id-3' name='p' filepath='Python/pystrtod.c' line='30' column='1'/> + <parameter type-id='type-id-494' name='endptr' filepath='Python/pystrtod.c' line='30' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-type size-in-bits='64' id='type-id-894'> + <parameter type-id='type-id-3'/> + <parameter type-id='type-id-36'/> + <parameter type-id='type-id-18'/> + <return type-id='type-id-14'/> + </function-type> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/pystrhex.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_Py_strhex_bytes_with_sep' mangled-name='_Py_strhex_bytes_with_sep' filepath='Python/pystrhex.c' line='170' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_strhex_bytes_with_sep'> + <parameter type-id='type-id-3' name='argbuf' filepath='Python/pystrhex.c' line='170' column='1'/> + <parameter type-id='type-id-480' name='arglen' filepath='Python/pystrhex.c' line='170' column='1'/> + <parameter type-id='type-id-14' name='sep' filepath='Python/pystrhex.c' line='171' column='1'/> + <parameter type-id='type-id-843' name='bytes_per_group' filepath='Python/pystrhex.c' line='171' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_strhex_with_sep' mangled-name='_Py_strhex_with_sep' filepath='Python/pystrhex.c' line='162' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_strhex_with_sep'> + <parameter type-id='type-id-3' name='argbuf' filepath='Python/pystrhex.c' line='170' column='1'/> + <parameter type-id='type-id-480' name='arglen' filepath='Python/pystrhex.c' line='170' column='1'/> + <parameter type-id='type-id-14' name='sep' filepath='Python/pystrhex.c' line='171' column='1'/> + <parameter type-id='type-id-843' name='bytes_per_group' filepath='Python/pystrhex.c' line='171' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_strhex_bytes' mangled-name='_Py_strhex_bytes' filepath='Python/pystrhex.c' line='155' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_strhex_bytes'> + <parameter type-id='type-id-3' name='argbuf' filepath='Python/pystrhex.c' line='155' column='1'/> + <parameter type-id='type-id-480' name='arglen' filepath='Python/pystrhex.c' line='155' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_strhex' mangled-name='_Py_strhex' filepath='Python/pystrhex.c' line='148' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_strhex'> + <parameter type-id='type-id-3' name='argbuf' filepath='Python/pystrhex.c' line='155' column='1'/> + <parameter type-id='type-id-480' name='arglen' filepath='Python/pystrhex.c' line='155' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/dtoa.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_Py_dg_dtoa' mangled-name='_Py_dg_dtoa' filepath='Python/dtoa.c' line='2248' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_dg_dtoa'> + <parameter type-id='type-id-391' name='dd' filepath='Python/dtoa.c' line='2248' column='1'/> + <parameter type-id='type-id-8' name='mode' filepath='Python/dtoa.c' line='2248' column='1'/> + <parameter type-id='type-id-8' name='ndigits' filepath='Python/dtoa.c' line='2248' column='1'/> + <parameter type-id='type-id-501' name='decpt' filepath='Python/dtoa.c' line='2249' column='1'/> + <parameter type-id='type-id-501' name='sign' filepath='Python/dtoa.c' line='2249' column='1'/> + <parameter type-id='type-id-494' name='rve' filepath='Python/dtoa.c' line='2249' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='_Py_dg_freedtoa' mangled-name='_Py_dg_freedtoa' filepath='Python/dtoa.c' line='2202' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_dg_freedtoa'> + <parameter type-id='type-id-115' name='s' filepath='Python/dtoa.c' line='2202' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_dg_strtod' mangled-name='_Py_dg_strtod' filepath='Python/dtoa.c' line='1439' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_dg_strtod'> + <parameter type-id='type-id-3' name='s00' filepath='Python/dtoa.c' line='1439' column='1'/> + <parameter type-id='type-id-494' name='se' filepath='Python/dtoa.c' line='1439' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='_Py_dg_infinity' mangled-name='_Py_dg_infinity' filepath='Python/dtoa.c' line='1430' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_dg_infinity'> + <parameter type-id='type-id-8' name='sign' filepath='Python/dtoa.c' line='1430' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + <function-decl name='_Py_dg_stdnan' mangled-name='_Py_dg_stdnan' filepath='Python/dtoa.c' line='1416' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_dg_stdnan'> + <parameter type-id='type-id-8' name='sign' filepath='Python/dtoa.c' line='1430' column='1'/> + <return type-id='type-id-391'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/formatter_unicode.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyFloat_FormatAdvancedWriter' mangled-name='_PyFloat_FormatAdvancedWriter' filepath='Python/formatter_unicode.c' line='1549' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyFloat_FormatAdvancedWriter'> + <parameter type-id='type-id-525' name='writer' filepath='Python/formatter_unicode.c' line='1549' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/formatter_unicode.c' line='1550' column='1'/> + <parameter type-id='type-id-14' name='format_spec' filepath='Python/formatter_unicode.c' line='1551' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Python/formatter_unicode.c' line='1552' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Python/formatter_unicode.c' line='1552' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_FormatAdvancedWriter' mangled-name='_PyLong_FormatAdvancedWriter' filepath='Python/formatter_unicode.c' line='1487' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FormatAdvancedWriter'> + <parameter type-id='type-id-525' name='writer' filepath='Python/formatter_unicode.c' line='1487' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/formatter_unicode.c' line='1488' column='1'/> + <parameter type-id='type-id-14' name='format_spec' filepath='Python/formatter_unicode.c' line='1489' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Python/formatter_unicode.c' line='1490' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Python/formatter_unicode.c' line='1490' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyUnicode_FormatAdvancedWriter' mangled-name='_PyUnicode_FormatAdvancedWriter' filepath='Python/formatter_unicode.c' line='1451' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyUnicode_FormatAdvancedWriter'> + <parameter type-id='type-id-525' name='writer' filepath='Python/formatter_unicode.c' line='1549' column='1'/> + <parameter type-id='type-id-14' name='obj' filepath='Python/formatter_unicode.c' line='1550' column='1'/> + <parameter type-id='type-id-14' name='format_spec' filepath='Python/formatter_unicode.c' line='1551' column='1'/> + <parameter type-id='type-id-36' name='start' filepath='Python/formatter_unicode.c' line='1552' column='1'/> + <parameter type-id='type-id-36' name='end' filepath='Python/formatter_unicode.c' line='1552' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/fileutils.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_Py_closerange' mangled-name='_Py_closerange' filepath='Python/fileutils.c' line='2622' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_closerange'> + <parameter type-id='type-id-8' name='first' filepath='Python/fileutils.c' line='2622' column='1'/> + <parameter type-id='type-id-8' name='last' filepath='Python/fileutils.c' line='2622' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <class-decl name='lconv' size-in-bits='768' is-struct='yes' visibility='default' filepath='/usr/include/locale.h' line='51' column='1' id='type-id-896'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='decimal_point' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='55' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='thousands_sep' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='56' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='grouping' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='62' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='int_curr_symbol' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='68' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='currency_symbol' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='mon_decimal_point' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='70' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='mon_thousands_sep' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='71' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='mon_grouping' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='72' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='positive_sign' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='73' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='negative_sign' type-id='type-id-115' visibility='default' filepath='/usr/include/locale.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='640'> + <var-decl name='int_frac_digits' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='75' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='648'> + <var-decl name='frac_digits' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='76' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='656'> + <var-decl name='p_cs_precedes' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='664'> + <var-decl name='p_sep_by_space' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='672'> + <var-decl name='n_cs_precedes' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='82' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='680'> + <var-decl name='n_sep_by_space' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='84' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='688'> + <var-decl name='p_sign_posn' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='91' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='696'> + <var-decl name='n_sign_posn' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='92' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='int_p_cs_precedes' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='95' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='712'> + <var-decl name='int_p_sep_by_space' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='97' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='720'> + <var-decl name='int_n_cs_precedes' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='99' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='728'> + <var-decl name='int_n_sep_by_space' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='101' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='736'> + <var-decl name='int_p_sign_posn' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='108' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='744'> + <var-decl name='int_n_sign_posn' type-id='type-id-1' visibility='default' filepath='/usr/include/locale.h' line='109' column='1'/> + </data-member> + </class-decl> + <pointer-type-def type-id='type-id-896' size-in-bits='64' id='type-id-897'/> + <function-decl name='_Py_GetLocaleconvNumeric' mangled-name='_Py_GetLocaleconvNumeric' filepath='Python/fileutils.c' line='2506' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetLocaleconvNumeric'> + <parameter type-id='type-id-897' name='lc' filepath='Python/fileutils.c' line='2506' column='1'/> + <parameter type-id='type-id-22' name='decimal_point' filepath='Python/fileutils.c' line='2507' column='1'/> + <parameter type-id='type-id-22' name='thousands_sep' filepath='Python/fileutils.c' line='2507' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_set_blocking' mangled-name='_Py_set_blocking' filepath='Python/fileutils.c' line='2429' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_set_blocking'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='2429' column='1'/> + <parameter type-id='type-id-8' name='blocking' filepath='Python/fileutils.c' line='2429' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_get_blocking' mangled-name='_Py_get_blocking' filepath='Python/fileutils.c' line='2408' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_get_blocking'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='2408' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_dup' mangled-name='_Py_dup' filepath='Python/fileutils.c' line='2342' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_dup'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='2342' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_wgetcwd' mangled-name='_Py_wgetcwd' filepath='Python/fileutils.c' line='2310' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_wgetcwd'> + <parameter type-id='type-id-281' name='buf' filepath='Python/fileutils.c' line='2310' column='1'/> + <parameter type-id='type-id-54' name='buflen' filepath='Python/fileutils.c' line='2310' column='1'/> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='_Py_normpath' mangled-name='_Py_normpath' filepath='Python/fileutils.c' line='2181' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_normpath'> + <parameter type-id='type-id-281' name='path' filepath='Python/fileutils.c' line='2181' column='1'/> + <parameter type-id='type-id-36' name='size' filepath='Python/fileutils.c' line='2181' column='1'/> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='_Py_wrealpath' mangled-name='_Py_wrealpath' filepath='Python/fileutils.c' line='1967' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_wrealpath'> + <parameter type-id='type-id-545' name='path' filepath='Python/fileutils.c' line='1967' column='1'/> + <parameter type-id='type-id-281' name='resolved_path' filepath='Python/fileutils.c' line='1968' column='1'/> + <parameter type-id='type-id-54' name='resolved_path_len' filepath='Python/fileutils.c' line='1968' column='1'/> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='_Py_wreadlink' mangled-name='_Py_wreadlink' filepath='Python/fileutils.c' line='1918' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_wreadlink'> + <parameter type-id='type-id-545' name='path' filepath='Python/fileutils.c' line='1918' column='1'/> + <parameter type-id='type-id-281' name='buf' filepath='Python/fileutils.c' line='1918' column='1'/> + <parameter type-id='type-id-54' name='buflen' filepath='Python/fileutils.c' line='1918' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_write_noraise' mangled-name='_Py_write_noraise' filepath='Python/fileutils.c' line='1905' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_write_noraise'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='1905' column='1'/> + <parameter type-id='type-id-18' name='buf' filepath='Python/fileutils.c' line='1905' column='1'/> + <parameter type-id='type-id-54' name='count' filepath='Python/fileutils.c' line='1905' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_Py_write' mangled-name='_Py_write' filepath='Python/fileutils.c' line='1885' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_write'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='1905' column='1'/> + <parameter type-id='type-id-18' name='buf' filepath='Python/fileutils.c' line='1905' column='1'/> + <parameter type-id='type-id-54' name='count' filepath='Python/fileutils.c' line='1905' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_Py_read' mangled-name='_Py_read' filepath='Python/fileutils.c' line='1746' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_read'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='1746' column='1'/> + <parameter type-id='type-id-18' name='buf' filepath='Python/fileutils.c' line='1746' column='1'/> + <parameter type-id='type-id-54' name='count' filepath='Python/fileutils.c' line='1746' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='_Py_fopen_obj' mangled-name='_Py_fopen_obj' filepath='Python/fileutils.c' line='1647' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_fopen_obj'> + <parameter type-id='type-id-14' name='path' filepath='Python/fileutils.c' line='1647' column='1'/> + <parameter type-id='type-id-3' name='mode' filepath='Python/fileutils.c' line='1647' column='1'/> + <return type-id='type-id-473'/> + </function-decl> + <function-decl name='_Py_wfopen' mangled-name='_Py_wfopen' filepath='Python/fileutils.c' line='1599' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_wfopen'> + <parameter type-id='type-id-545' name='path' filepath='Python/fileutils.c' line='1599' column='1'/> + <parameter type-id='type-id-545' name='mode' filepath='Python/fileutils.c' line='1599' column='1'/> + <return type-id='type-id-473'/> + </function-decl> + <function-decl name='_Py_open_noraise' mangled-name='_Py_open_noraise' filepath='Python/fileutils.c' line='1587' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_open_noraise'> + <parameter type-id='type-id-3' name='pathname' filepath='Python/fileutils.c' line='1587' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Python/fileutils.c' line='1587' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_open' mangled-name='_Py_open' filepath='Python/fileutils.c' line='1573' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_open'> + <parameter type-id='type-id-3' name='pathname' filepath='Python/fileutils.c' line='1587' column='1'/> + <parameter type-id='type-id-8' name='flags' filepath='Python/fileutils.c' line='1587' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_set_inheritable_async_safe' mangled-name='_Py_set_inheritable_async_safe' filepath='Python/fileutils.c' line='1496' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_set_inheritable_async_safe'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='1496' column='1'/> + <parameter type-id='type-id-8' name='inheritable' filepath='Python/fileutils.c' line='1496' column='1'/> + <parameter type-id='type-id-501' name='atomic_flag_works' filepath='Python/fileutils.c' line='1496' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_set_inheritable' mangled-name='_Py_set_inheritable' filepath='Python/fileutils.c' line='1487' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_set_inheritable'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='1496' column='1'/> + <parameter type-id='type-id-8' name='inheritable' filepath='Python/fileutils.c' line='1496' column='1'/> + <parameter type-id='type-id-501' name='atomic_flag_works' filepath='Python/fileutils.c' line='1496' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_get_inheritable' mangled-name='_Py_get_inheritable' filepath='Python/fileutils.c' line='1321' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_get_inheritable'> + <parameter type-id='type-id-8' name='c1' filepath='Parser/token.c' line='79' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <class-decl name='stat' size-in-bits='1152' is-struct='yes' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='46' column='1' id='type-id-898'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='st_dev' type-id='type-id-899' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='48' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='st_ino' type-id='type-id-900' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='53' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='st_nlink' type-id='type-id-901' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='61' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='st_mode' type-id='type-id-902' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='62' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='224'> + <var-decl name='st_uid' type-id='type-id-903' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='64' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='256'> + <var-decl name='st_gid' type-id='type-id-904' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='65' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='288'> + <var-decl name='__pad0' type-id='type-id-8' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='67' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='320'> + <var-decl name='st_rdev' type-id='type-id-899' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='69' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='384'> + <var-decl name='st_size' type-id='type-id-460' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='74' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='448'> + <var-decl name='st_blksize' type-id='type-id-905' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='78' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='512'> + <var-decl name='st_blocks' type-id='type-id-906' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='80' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='576'> + <var-decl name='st_atim' type-id='type-id-866' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='91' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='704'> + <var-decl name='st_mtim' type-id='type-id-866' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='92' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='832'> + <var-decl name='st_ctim' type-id='type-id-866' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='93' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='960'> + <var-decl name='__glibc_reserved' type-id='type-id-907' visibility='default' filepath='/usr/include/x86_64-linux-gnu/bits/stat.h' line='106' column='1'/> + </data-member> + </class-decl> + <typedef-decl name='__dev_t' type-id='type-id-16' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='145' column='1' id='type-id-899'/> + <typedef-decl name='__ino_t' type-id='type-id-16' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='148' column='1' id='type-id-900'/> + <typedef-decl name='__nlink_t' type-id='type-id-16' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='151' column='1' id='type-id-901'/> + <typedef-decl name='__mode_t' type-id='type-id-105' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='150' column='1' id='type-id-902'/> + <typedef-decl name='__uid_t' type-id='type-id-105' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='146' column='1' id='type-id-903'/> + <typedef-decl name='__gid_t' type-id='type-id-105' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='147' column='1' id='type-id-904'/> + <typedef-decl name='__blksize_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='174' column='1' id='type-id-905'/> + <typedef-decl name='__blkcnt_t' type-id='type-id-53' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='179' column='1' id='type-id-906'/> + + <array-type-def dimensions='1' type-id='type-id-867' size-in-bits='192' id='type-id-907'> + <subrange length='3' type-id='type-id-16' id='type-id-293'/> + + </array-type-def> + <pointer-type-def type-id='type-id-898' size-in-bits='64' id='type-id-908'/> + <function-decl name='_Py_stat' mangled-name='_Py_stat' filepath='Python/fileutils.c' line='1242' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_stat'> + <parameter type-id='type-id-14' name='path' filepath='Python/fileutils.c' line='1242' column='1'/> + <parameter type-id='type-id-908' name='statbuf' filepath='Python/fileutils.c' line='1242' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_fstat' mangled-name='_Py_fstat' filepath='Python/fileutils.c' line='1189' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_fstat'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='1189' column='1'/> + <parameter type-id='type-id-908' name='status' filepath='Python/fileutils.c' line='1189' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_fstat_noraise' mangled-name='_Py_fstat_noraise' filepath='Python/fileutils.c' line='1122' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_fstat_noraise'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='1122' column='1'/> + <parameter type-id='type-id-908' name='status' filepath='Python/fileutils.c' line='1122' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_GetLocaleEncodingObject' mangled-name='_Py_GetLocaleEncodingObject' filepath='Python/fileutils.c' line='926' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetLocaleEncodingObject'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_GetLocaleEncoding' mangled-name='_Py_GetLocaleEncoding' filepath='Python/fileutils.c' line='890' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetLocaleEncoding'> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='_Py_EncodeLocaleEx' mangled-name='_Py_EncodeLocaleEx' filepath='Python/fileutils.c' line='869' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_EncodeLocaleEx'> + <parameter type-id='type-id-545' name='text' filepath='Python/fileutils.c' line='869' column='1'/> + <parameter type-id='type-id-494' name='str' filepath='Python/fileutils.c' line='869' column='1'/> + <parameter type-id='type-id-582' name='error_pos' filepath='Python/fileutils.c' line='870' column='1'/> + <parameter type-id='type-id-483' name='reason' filepath='Python/fileutils.c' line='870' column='1'/> + <parameter type-id='type-id-8' name='current_locale' filepath='Python/fileutils.c' line='871' column='1'/> + <parameter type-id='type-id-386' name='errors' filepath='Python/fileutils.c' line='871' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_EncodeLocaleRaw' mangled-name='_Py_EncodeLocaleRaw' filepath='Python/fileutils.c' line='862' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_EncodeLocaleRaw'> + <parameter type-id='type-id-545' name='text' filepath='Python/fileutils.c' line='862' column='1'/> + <parameter type-id='type-id-582' name='error_pos' filepath='Python/fileutils.c' line='862' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='Py_EncodeLocale' mangled-name='Py_EncodeLocale' filepath='Python/fileutils.c' line='853' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_EncodeLocale'> + <parameter type-id='type-id-545' name='text' filepath='Python/fileutils.c' line='862' column='1'/> + <parameter type-id='type-id-582' name='error_pos' filepath='Python/fileutils.c' line='862' column='1'/> + <return type-id='type-id-115'/> + </function-decl> + <function-decl name='Py_DecodeLocale' mangled-name='Py_DecodeLocale' filepath='Python/fileutils.c' line='651' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_DecodeLocale'> + <parameter type-id='type-id-3' name='arg' filepath='Python/fileutils.c' line='651' column='1'/> + <parameter type-id='type-id-582' name='wlen' filepath='Python/fileutils.c' line='651' column='1'/> + <return type-id='type-id-281'/> + </function-decl> + <function-decl name='_Py_DecodeLocaleEx' mangled-name='_Py_DecodeLocaleEx' filepath='Python/fileutils.c' line='589' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_DecodeLocaleEx'> + <parameter type-id='type-id-3' name='arg' filepath='Python/fileutils.c' line='589' column='1'/> + <parameter type-id='type-id-374' name='wstr' filepath='Python/fileutils.c' line='589' column='1'/> + <parameter type-id='type-id-582' name='wlen' filepath='Python/fileutils.c' line='589' column='1'/> + <parameter type-id='type-id-483' name='reason' filepath='Python/fileutils.c' line='590' column='1'/> + <parameter type-id='type-id-8' name='current_locale' filepath='Python/fileutils.c' line='591' column='1'/> + <parameter type-id='type-id-386' name='errors' filepath='Python/fileutils.c' line='591' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_ResetForceASCII' mangled-name='_Py_ResetForceASCII' filepath='Python/fileutils.c' line='308' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_ResetForceASCII'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_Py_GetForceASCII' mangled-name='_Py_GetForceASCII' filepath='Python/fileutils.c' line='298' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_GetForceASCII'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_device_encoding' mangled-name='_Py_device_encoding' filepath='Python/fileutils.c' line='69' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_device_encoding'> + <parameter type-id='type-id-8' name='fd' filepath='Python/fileutils.c' line='69' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/suggestions.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_Py_UTF8_Edit_Cost' mangled-name='_Py_UTF8_Edit_Cost' filepath='Python/suggestions.c' line='281' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_UTF8_Edit_Cost'> + <parameter type-id='type-id-14' name='a' filepath='Python/suggestions.c' line='281' column='1'/> + <parameter type-id='type-id-14' name='b' filepath='Python/suggestions.c' line='281' column='1'/> + <parameter type-id='type-id-36' name='max_cost' filepath='Python/suggestions.c' line='281' column='1'/> + <return type-id='type-id-36'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Python/dynload_shlib.c' comp-dir-path='/src' language='LANG_C99'> + + <array-type-def dimensions='1' type-id='type-id-3' size-in-bits='infinite' id='type-id-909'> + <subrange length='infinite' id='type-id-6'/> + + </array-type-def> + <var-decl name='_PyImport_DynLoadFiletab' type-id='type-id-909' visibility='default' filepath='./Python/importdl.h' line='9' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Modules/main.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='Py_BytesMain' mangled-name='Py_BytesMain' filepath='Modules/main.c' line='727' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_BytesMain'> + <parameter type-id='type-id-8' name='argc' filepath='Modules/main.c' line='727' column='1'/> + <parameter type-id='type-id-494' name='argv' filepath='Modules/main.c' line='727' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_Main' mangled-name='Py_Main' filepath='Modules/main.c' line='715' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_Main'> + <parameter type-id='type-id-8' name='argc' filepath='Modules/main.c' line='715' column='1'/> + <parameter type-id='type-id-374' name='argv' filepath='Modules/main.c' line='715' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='Py_RunMain' mangled-name='Py_RunMain' filepath='Modules/main.c' line='676' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='Py_RunMain'> + <return type-id='type-id-8'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Modules/gcmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyObject_GC_IsFinalized' mangled-name='PyObject_GC_IsFinalized' filepath='Modules/gcmodule.c' line='2369' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GC_IsFinalized'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GC_IsTracked' mangled-name='PyObject_GC_IsTracked' filepath='Modules/gcmodule.c' line='2360' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GC_IsTracked'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GC_Del' mangled-name='PyObject_GC_Del' filepath='Modules/gcmodule.c' line='2345' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GC_Del'> + <parameter type-id='type-id-18' name='op' filepath='Modules/gcmodule.c' line='2345' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='_PyObject_GC_Resize' mangled-name='_PyObject_GC_Resize' filepath='Modules/gcmodule.c' line='2327' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GC_Resize'> + <parameter type-id='type-id-541' name='op' filepath='Modules/gcmodule.c' line='2327' column='1'/> + <parameter type-id='type-id-36' name='nitems' filepath='Modules/gcmodule.c' line='2327' column='1'/> + <return type-id='type-id-541'/> + </function-decl> + <function-decl name='_PyObject_GC_NewVar' mangled-name='_PyObject_GC_NewVar' filepath='Modules/gcmodule.c' line='2307' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GC_NewVar'> + <parameter type-id='type-id-74' name='tp' filepath='Modules/gcmodule.c' line='2307' column='1'/> + <parameter type-id='type-id-36' name='nitems' filepath='Modules/gcmodule.c' line='2307' column='1'/> + <return type-id='type-id-541'/> + </function-decl> + <function-decl name='_PyObject_GC_New' mangled-name='_PyObject_GC_New' filepath='Modules/gcmodule.c' line='2295' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyObject_GC_New'> + <parameter type-id='type-id-74' name='tp' filepath='Modules/gcmodule.c' line='2295' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyObject_IS_GC' mangled-name='PyObject_IS_GC' filepath='Modules/gcmodule.c' line='2247' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_IS_GC'> + <parameter type-id='type-id-14' name='o' filepath='Objects/abstract.c' line='2303' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyObject_GC_UnTrack' mangled-name='PyObject_GC_UnTrack' filepath='Modules/gcmodule.c' line='2235' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GC_UnTrack'> + <parameter type-id='type-id-18' name='op_raw' filepath='Modules/gcmodule.c' line='2235' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyObject_GC_Track' mangled-name='PyObject_GC_Track' filepath='Modules/gcmodule.c' line='2216' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyObject_GC_Track'> + <parameter type-id='type-id-18' name='op_raw' filepath='Modules/gcmodule.c' line='2216' column='1'/> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyGC_Collect' mangled-name='PyGC_Collect' filepath='Modules/gcmodule.c' line='2068' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGC_Collect'> + <return type-id='type-id-36'/> + </function-decl> + <function-decl name='PyGC_IsEnabled' mangled-name='PyGC_IsEnabled' filepath='Modules/gcmodule.c' line='2060' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGC_IsEnabled'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyGC_Disable' mangled-name='PyGC_Disable' filepath='Modules/gcmodule.c' line='2051' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGC_Disable'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyGC_Enable' mangled-name='PyGC_Enable' filepath='Modules/gcmodule.c' line='2042' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyGC_Enable'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyInit_gc' mangled-name='PyInit_gc' filepath='Modules/gcmodule.c' line='2035' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_gc'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/atexitmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_atexit' mangled-name='PyInit_atexit' filepath='./Modules/atexitmodule.c' line='287' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_atexit'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/faulthandler.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_faulthandler' mangled-name='PyInit_faulthandler' filepath='./Modules/faulthandler.c' line='1333' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_faulthandler'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/posixmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_posix' mangled-name='PyInit_posix' filepath='./Modules/posixmodule.c' line='15942' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_posix'> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyOS_FSPath' mangled-name='PyOS_FSPath' filepath='./Modules/posixmodule.c' line='14469' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_FSPath'> + <parameter type-id='type-id-14' name='v' filepath='Objects/abstract.c' line='2122' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_Py_Sigset_Converter' mangled-name='_Py_Sigset_Converter' filepath='./Modules/posixmodule.c' line='1485' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_Sigset_Converter'> + <parameter type-id='type-id-14' name='obj' filepath='./Modules/posixmodule.c' line='1485' column='1'/> + <parameter type-id='type-id-18' name='addr' filepath='./Modules/posixmodule.c' line='1485' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <typedef-decl name='gid_t' type-id='type-id-904' filepath='/usr/include/x86_64-linux-gnu/sys/types.h' line='64' column='1' id='type-id-910'/> + <pointer-type-def type-id='type-id-910' size-in-bits='64' id='type-id-911'/> + <function-decl name='_Py_Gid_Converter' mangled-name='_Py_Gid_Converter' filepath='./Modules/posixmodule.c' line='773' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_Gid_Converter'> + <parameter type-id='type-id-14' name='obj' filepath='./Modules/posixmodule.c' line='773' column='1'/> + <parameter type-id='type-id-911' name='p' filepath='./Modules/posixmodule.c' line='773' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <typedef-decl name='uid_t' type-id='type-id-903' filepath='/usr/include/x86_64-linux-gnu/sys/types.h' line='79' column='1' id='type-id-912'/> + <pointer-type-def type-id='type-id-912' size-in-bits='64' id='type-id-913'/> + <function-decl name='_Py_Uid_Converter' mangled-name='_Py_Uid_Converter' filepath='./Modules/posixmodule.c' line='667' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_Uid_Converter'> + <parameter type-id='type-id-14' name='obj' filepath='./Modules/posixmodule.c' line='667' column='1'/> + <parameter type-id='type-id-913' name='p' filepath='./Modules/posixmodule.c' line='667' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyLong_FromGid' mangled-name='_PyLong_FromGid' filepath='./Modules/posixmodule.c' line='659' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FromGid'> + <parameter type-id='type-id-910' name='gid' filepath='./Modules/posixmodule.c' line='659' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='_PyLong_FromUid' mangled-name='_PyLong_FromUid' filepath='./Modules/posixmodule.c' line='651' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyLong_FromUid'> + <parameter type-id='type-id-912' name='uid' filepath='./Modules/posixmodule.c' line='651' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyOS_AfterFork' mangled-name='PyOS_AfterFork' filepath='./Modules/posixmodule.c' line='633' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_AfterFork'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyOS_AfterFork_Child' mangled-name='PyOS_AfterFork_Child' filepath='./Modules/posixmodule.c' line='573' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_AfterFork_Child'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyOS_AfterFork_Parent' mangled-name='PyOS_AfterFork_Parent' filepath='./Modules/posixmodule.c' line='564' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_AfterFork_Parent'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyOS_BeforeFork' mangled-name='PyOS_BeforeFork' filepath='./Modules/posixmodule.c' line='556' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_BeforeFork'> + <return type-id='type-id-70'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/signalmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyOS_IsMainThread' mangled-name='_PyOS_IsMainThread' filepath='./Modules/signalmodule.c' line='2070' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyOS_IsMainThread'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyOS_InterruptOccurred' mangled-name='PyOS_InterruptOccurred' filepath='./Modules/signalmodule.c' line='2037' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyOS_InterruptOccurred'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyOS_InterruptOccurred' mangled-name='_PyOS_InterruptOccurred' filepath='./Modules/signalmodule.c' line='2019' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyOS_InterruptOccurred'> + <parameter type-id='type-id-10' name='tstate' filepath='./Modules/signalmodule.c' line='2019' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_Py_RestoreSignals' mangled-name='_Py_RestoreSignals' filepath='./Modules/signalmodule.c' line='1965' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_RestoreSignals'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SetInterrupt' mangled-name='PyErr_SetInterrupt' filepath='./Modules/signalmodule.c' line='1927' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetInterrupt'> + <return type-id='type-id-70'/> + </function-decl> + <function-decl name='PyErr_SetInterruptEx' mangled-name='PyErr_SetInterruptEx' filepath='./Modules/signalmodule.c' line='1911' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_SetInterruptEx'> + <parameter type-id='type-id-8' name='signum' filepath='./Modules/signalmodule.c' line='1911' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyErr_CheckSignals' mangled-name='_PyErr_CheckSignals' filepath='./Modules/signalmodule.c' line='1899' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_CheckSignals'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='_PyErr_CheckSignalsTstate' mangled-name='_PyErr_CheckSignalsTstate' filepath='./Modules/signalmodule.c' line='1811' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyErr_CheckSignalsTstate'> + <parameter type-id='type-id-10' name='tstate' filepath='./Modules/signalmodule.c' line='1811' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyErr_CheckSignals' mangled-name='PyErr_CheckSignals' filepath='./Modules/signalmodule.c' line='1798' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyErr_CheckSignals'> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyInit__signal' mangled-name='PyInit__signal' filepath='./Modules/signalmodule.c' line='1758' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__signal'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_tracemalloc.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_PyTraceMalloc_GetTraceback' mangled-name='_PyTraceMalloc_GetTraceback' filepath='./Modules/_tracemalloc.c' line='1811' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_PyTraceMalloc_GetTraceback'> + <parameter type-id='type-id-105' name='domain' filepath='./Modules/_tracemalloc.c' line='1811' column='1'/> + <parameter type-id='type-id-358' name='ptr' filepath='./Modules/_tracemalloc.c' line='1811' column='1'/> + <return type-id='type-id-14'/> + </function-decl> + <function-decl name='PyTraceMalloc_Untrack' mangled-name='PyTraceMalloc_Untrack' filepath='./Modules/_tracemalloc.c' line='1752' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTraceMalloc_Untrack'> + <parameter type-id='type-id-105' name='domain' filepath='./Modules/_tracemalloc.c' line='1752' column='1'/> + <parameter type-id='type-id-358' name='ptr' filepath='./Modules/_tracemalloc.c' line='1752' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyTraceMalloc_Track' mangled-name='PyTraceMalloc_Track' filepath='./Modules/_tracemalloc.c' line='1729' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyTraceMalloc_Track'> + <parameter type-id='type-id-105' name='domain' filepath='./Modules/_tracemalloc.c' line='1729' column='1'/> + <parameter type-id='type-id-358' name='ptr' filepath='./Modules/_tracemalloc.c' line='1729' column='1'/> + <parameter type-id='type-id-54' name='size' filepath='./Modules/_tracemalloc.c' line='1730' column='1'/> + <return type-id='type-id-8'/> + </function-decl> + <function-decl name='PyInit__tracemalloc' mangled-name='PyInit__tracemalloc' filepath='./Modules/_tracemalloc.c' line='1694' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__tracemalloc'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_codecsmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__codecs' mangled-name='PyInit__codecs' filepath='./Modules/_codecsmodule.c' line='1067' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__codecs'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_collectionsmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__collections' mangled-name='PyInit__collections' filepath='./Modules/_collectionsmodule.c' line='2612' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__collections'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/errnomodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_errno' mangled-name='PyInit_errno' filepath='./Modules/errnomodule.c' line='960' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_errno'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_io/_iomodule.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='_PyIO_Module' type-id='type-id-538' visibility='default' filepath='./Modules/_io/_iomodule.h' line='140' column='1'/> + <function-decl name='PyInit__io' mangled-name='PyInit__io' filepath='./Modules/_io/_iomodule.c' line='681' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__io'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_io/iobase.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyIOBase_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='8' column='1'/> + <var-decl name='PyRawIOBase_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='9' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_io/fileio.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyFileIO_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='14' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_io/bytesio.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyBytesIO_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='15' column='1'/> + <var-decl name='_PyBytesIOBuffer_Type' type-id='type-id-112' mangled-name='_PyBytesIOBuffer_Type' visibility='default' filepath='./Modules/_io/_iomodule.h' line='158' column='1' elf-symbol-id='_PyBytesIOBuffer_Type'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_io/bufferedio.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyBufferedIOBase_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='10' column='1'/> + <var-decl name='PyBufferedReader_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='17' column='1'/> + <var-decl name='PyBufferedWriter_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='18' column='1'/> + <var-decl name='PyBufferedRWPair_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='19' column='1'/> + <var-decl name='PyBufferedRandom_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='20' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_io/textio.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyTextIOBase_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='11' column='1'/> + <var-decl name='PyIncrementalNewlineDecoder_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='22' column='1'/> + <var-decl name='PyTextIOWrapper_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='21' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_io/stringio.c' comp-dir-path='/src' language='LANG_C99'> + <var-decl name='PyStringIO_Type' type-id='type-id-112' visibility='default' filepath='./Modules/_io/_iomodule.h' line='16' column='1'/> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/itertoolsmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_itertools' mangled-name='PyInit_itertools' filepath='./Modules/itertoolsmodule.c' line='4901' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_itertools'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_sre/sre.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__sre' mangled-name='PyInit__sre' filepath='./Modules/_sre/sre.c' line='3036' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__sre'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_threadmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__thread' mangled-name='PyInit__thread' filepath='./Modules/_threadmodule.c' line='1700' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__thread'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/timemodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_time' mangled-name='PyInit_time' filepath='./Modules/timemodule.c' line='2111' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_time'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_weakref.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__weakref' mangled-name='PyInit__weakref' filepath='./Modules/_weakref.c' line='193' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__weakref'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_abc.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__abc' mangled-name='PyInit__abc' filepath='./Modules/_abc.c' line='967' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__abc'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_functoolsmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__functools' mangled-name='PyInit__functools' filepath='./Modules/_functoolsmodule.c' line='1535' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__functools'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_localemodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__locale' mangled-name='PyInit__locale' filepath='./Modules/_localemodule.c' line='913' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__locale'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_operator.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__operator' mangled-name='PyInit__operator' filepath='./Modules/_operator.c' line='1891' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__operator'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/_stat.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__stat' mangled-name='PyInit__stat' filepath='./Modules/_stat.c' line='630' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__stat'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/symtablemodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit__symtable' mangled-name='PyInit__symtable' filepath='./Modules/symtablemodule.c' line='123' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit__symtable'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/pwdmodule.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_pwd' mangled-name='PyInit_pwd' filepath='./Modules/pwdmodule.c' line='368' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_pwd'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/xxsubtype.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='PyInit_xxsubtype' mangled-name='PyInit_xxsubtype' filepath='./Modules/xxsubtype.c' line='313' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='PyInit_xxsubtype'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='./Modules/getpath.c' comp-dir-path='/src' language='LANG_C99'> + <function-decl name='_Py_Get_Getpath_CodeObject' mangled-name='_Py_Get_Getpath_CodeObject' filepath='./Modules/getpath.c' line='790' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Py_Get_Getpath_CodeObject'> + <return type-id='type-id-14'/> + </function-decl> + </abi-instr> + <abi-instr version='1.0' address-size='64' path='Python/frozen.c' comp-dir-path='/src' language='LANG_C99'> + <class-decl name='_frozen' size-in-bits='256' is-struct='yes' visibility='default' filepath='./Include/cpython/import.h' line='31' column='1' id='type-id-914'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/cpython/import.h' line='32' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='code' type-id='type-id-528' visibility='default' filepath='./Include/cpython/import.h' line='33' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='128'> + <var-decl name='size' type-id='type-id-8' visibility='default' filepath='./Include/cpython/import.h' line='34' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='160'> + <var-decl name='is_package' type-id='type-id-8' visibility='default' filepath='./Include/cpython/import.h' line='35' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='192'> + <var-decl name='get_code' type-id='type-id-534' visibility='default' filepath='./Include/cpython/import.h' line='36' column='1'/> + </data-member> + </class-decl> + <qualified-type-def type-id='type-id-914' const='yes' id='type-id-915'/> + <pointer-type-def type-id='type-id-915' size-in-bits='64' id='type-id-916'/> + <var-decl name='_PyImport_FrozenBootstrap' type-id='type-id-916' mangled-name='_PyImport_FrozenBootstrap' visibility='default' filepath='./Include/internal/pycore_import.h' line='18' column='1' elf-symbol-id='_PyImport_FrozenBootstrap'/> + <var-decl name='_PyImport_FrozenStdlib' type-id='type-id-916' mangled-name='_PyImport_FrozenStdlib' visibility='default' filepath='./Include/internal/pycore_import.h' line='19' column='1' elf-symbol-id='_PyImport_FrozenStdlib'/> + <var-decl name='_PyImport_FrozenTest' type-id='type-id-916' mangled-name='_PyImport_FrozenTest' visibility='default' filepath='./Include/internal/pycore_import.h' line='20' column='1' elf-symbol-id='_PyImport_FrozenTest'/> + <class-decl name='_module_alias' size-in-bits='128' is-struct='yes' visibility='default' filepath='./Include/internal/pycore_import.h' line='13' column='1' id='type-id-917'> + <data-member access='public' layout-offset-in-bits='0'> + <var-decl name='name' type-id='type-id-3' visibility='default' filepath='./Include/internal/pycore_import.h' line='14' column='1'/> + </data-member> + <data-member access='public' layout-offset-in-bits='64'> + <var-decl name='orig' type-id='type-id-3' visibility='default' filepath='./Include/internal/pycore_import.h' line='15' column='1'/> + </data-member> + </class-decl> + <qualified-type-def type-id='type-id-917' const='yes' id='type-id-918'/> + <pointer-type-def type-id='type-id-918' size-in-bits='64' id='type-id-919'/> + <var-decl name='_PyImport_FrozenAliases' type-id='type-id-919' visibility='default' filepath='./Include/internal/pycore_import.h' line='21' column='1'/> + <var-decl name='PyImport_FrozenModules' type-id='type-id-916' mangled-name='PyImport_FrozenModules' visibility='default' filepath='./Include/cpython/import.h' line='42' column='1' elf-symbol-id='PyImport_FrozenModules'/> + </abi-instr> +</abi-corpus>
diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat new file mode 100644 index 0000000..cbd22a3 --- /dev/null +++ b/Doc/data/refcounts.dat
@@ -0,0 +1,2995 @@ +# Created by Skip Montanaro <skip@mojam.com>. + +# Format: +# function ':' type ':' [param name] ':' [refcount effect] ':' [comment] +# If the param name slot is empty, that line corresponds to the function's +# return value, otherwise it's the type of the named parameter. + +# The first line of a function block gives type/refcount information for the +# function's return value. Successive lines with the same function name +# correspond to the function's parameter list and appear in the order the +# parameters appear in the function's prototype. + +# For readability, each function's lines are surrounded by a blank line. +# The blocks are sorted alphabetically by function name. + +# Refcount behavior is given for all PyObject* types: 0 (no change), +1 +# (increment) and -1 (decrement). A blank refcount field indicates the +# parameter or function value is not a PyObject* and is therefore not +# subject to reference counting. A special case for the value "null" +# (without quotes) is used for functions which return a PyObject* type but +# always return NULL. This is used by some of the PyErr_*() functions, in +# particular. + +# XXX NOTE: the 0/+1/-1 refcount information for arguments is +# confusing! Much more useful would be to indicate whether the +# function "steals" a reference to the argument or not. Take for +# example PyList_SetItem(list, i, item). This lists as a 0 change for +# both the list and the item arguments. However, in fact it steals a +# reference to the item argument! + +# The parameter names are as they appear in the API manual, not the source +# code. + +PyAnySet_Check:int::: +PyAnySet_Check:PyObject*:p:0: + +PyAnySet_CheckExact:int::: +PyAnySet_CheckExact:PyObject*:p:0: + +PyBool_Check:int::: +PyBool_Check:PyObject*:o:0: + +PyBool_FromLong:PyObject*::+1: +PyBool_FromLong:long:v:: + +PyBuffer_FillContiguousStrides:void::: +PyBuffer_FillContiguousStrides:int:ndims:: +PyBuffer_FillContiguousStrides:Py_ssize_t*:shape:: +PyBuffer_FillContiguousStrides:Py_ssize_t*:strides:: +PyBuffer_FillContiguousStrides:int:itemsize:: +PyBuffer_FillContiguousStrides:char:order:: + +PyBuffer_FillInfo:int::: +PyBuffer_FillInfo:Py_buffer*:view:: +PyBuffer_FillInfo:PyObject*:exporter:0: +PyBuffer_FillInfo:void*:buf:: +PyBuffer_FillInfo:Py_ssize_t:len:: +PyBuffer_FillInfo:int:readonly:: +PyBuffer_FillInfo:int:flags:: + +PyBuffer_IsContiguous:int::: +PyBuffer_IsContiguous:Py_buffer*:view:: +PyBuffer_IsContiguous:char:order:: + +PyBuffer_Release:void::: +PyBuffer_Release:Py_buffer*:view:: + +PyBuffer_ToContiguous:int::: +PyBuffer_ToContiguous:void*:buf:: +PyBuffer_ToContiguous:Py_buffer*:src:: +PyBuffer_ToContiguous:Py_ssize_t:len:: +PyBuffer_ToContiguous:char:order:: + +PyByteArray_AS_STRING:char*::: +PyByteArray_AS_STRING:PyObject*:bytearray:0: + +PyByteArray_AsString:char*::: +PyByteArray_AsString:PyObject*:bytearray:0: + +PyByteArray_Check:int::: +PyByteArray_Check:PyObject*:o:0: + +PyByteArray_CheckExact:int::: +PyByteArray_CheckExact:PyObject*:o:0: + +PyByteArray_Concat:PyObject*::+1: +PyByteArray_Concat:PyObject*:a:0: +PyByteArray_Concat:PyObject*:b:0: + +PyByteArray_FromObject:PyObject*::+1: +PyByteArray_FromObject:PyObject*:o:0: + +PyByteArray_FromStringAndSize:PyObject*::+1: +PyByteArray_FromStringAndSize:const char*:string:: +PyByteArray_FromStringAndSize:Py_ssize_t:len:: + +PyByteArray_GET_SIZE:Py_ssize_t::: +PyByteArray_GET_SIZE:PyObject*:bytearray:0: + +PyByteArray_Resize:int::: +PyByteArray_Resize:PyObject*:bytearray:0: +PyByteArray_Resize:Py_ssize_t:len:: + +PyByteArray_Size:Py_ssize_t::: +PyByteArray_Size:PyObject*:bytearray:0: + +PyBytes_AS_STRING:char*::: +PyBytes_AS_STRING:PyObject*:string:0: + +PyBytes_AsString:char*::: +PyBytes_AsString:PyObject*:o:0: + +PyBytes_AsStringAndSize:int::: +PyBytes_AsStringAndSize:PyObject*:obj:0: +PyBytes_AsStringAndSize:char**:buffer:: +PyBytes_AsStringAndSize:Py_ssize_t*:length:: + +PyBytes_Check:int::: +PyBytes_Check:PyObject*:o:0: + +PyBytes_CheckExact:int::: +PyBytes_CheckExact:PyObject*:o:0: + +PyBytes_Concat:void::: +PyBytes_Concat:PyObject**:bytes:0: +PyBytes_Concat:PyObject*:newpart:0: + +PyBytes_ConcatAndDel:void::: +PyBytes_ConcatAndDel:PyObject**:bytes:0: +PyBytes_ConcatAndDel:PyObject*:newpart:-1: + +PyBytes_FromString:PyObject*::+1: +PyBytes_FromString:const char*:v:: + +PyBytes_FromStringAndSize:PyObject*::+1: +PyBytes_FromStringAndSize:const char*:v:: +PyBytes_FromStringAndSize:Py_ssize_t:len:: + +PyBytes_FromFormat:PyObject*::+1: +PyBytes_FromFormat:const char*:format:: +PyBytes_FromFormat::...:: + +PyBytes_FromFormatV:PyObject*::+1: +PyBytes_FromFormatV:const char*:format:: +PyBytes_FromFormatV:va_list:vargs:: + +PyBytes_FromObject:PyObject*::+1: +PyBytes_FromObject:PyObject*:o:0: + +PyBytes_GET_SIZE:Py_ssize_t::: +PyBytes_GET_SIZE:PyObject*:o:0: + +PyBytes_Size:Py_ssize_t::: +PyBytes_Size:PyObject*:o:0: + +PyCapsule_CheckExact:int::: +PyCapsule_CheckExact:PyObject*:p:0: + +PyCapsule_GetContext:void *::: +PyCapsule_GetContext:PyObject*:self:0: + +PyCapsule_GetDestructor:void (*)(PyObject *)::: +PyCapsule_GetDestructor:PyObject*:self:0: + +PyCapsule_GetName:const char *::: +PyCapsule_GetName:PyObject*:self:0: + +PyCapsule_GetPointer:void*::: +PyCapsule_GetPointer:PyObject*:self:0: +PyCapsule_GetPointer:const char *:name:: + +PyCapsule_Import:void *::: +PyCapsule_Import:const char *:name:: +PyCapsule_Import:int:no_block:: + +PyCapsule_IsValid:int::: +PyCapsule_IsValid:PyObject*:capsule:0: +PyCapsule_IsValid:const char*:name:: + +PyCapsule_New:PyObject*::+1: +PyCapsule_New:void*:pointer:: +PyCapsule_New:const char *:name:: +PyCapsule_New::void (* destructor)(PyObject* ):: + +PyCapsule_SetContext:int::: +PyCapsule_SetContext:PyObject*:self:0: +PyCapsule_SetContext:void *:context:: + +PyCapsule_SetDestructor:int::: +PyCapsule_SetDestructor:PyObject*:self:0: +PyCapsule_SetDestructor:void (*)(PyObject *):destructor:: + +PyCapsule_SetName:int::: +PyCapsule_SetName:PyObject*:self:0: +PyCapsule_SetName:const char *:name:: + +PyCapsule_SetPointer:int::: +PyCapsule_SetPointer:PyObject*:self:0: +PyCapsule_SetPointer:void*:pointer:: + +PyCell_Check:int::: +PyCell_Check::ob:: + +PyCell_New:PyObject*::+1: +PyCell_New:PyObject*:ob:0: + +PyCell_GET:PyObject*::0: +PyCell_GET:PyObject*:ob:0: + +PyCell_Get:PyObject*::+1: +PyCell_Get:PyObject*:cell:0: + +PyCell_SET:void::: +PyCell_SET:PyObject*:cell:0: +PyCell_SET:PyObject*:value:0: + +PyCell_Set:int::: +PyCell_Set:PyObject*:cell:0: +PyCell_Set:PyObject*:value:0: + +PyCallIter_Check:int::: +PyCallIter_Check::op:: + +PyCallIter_New:PyObject*::+1: +PyCallIter_New:PyObject*:callable:+1: +PyCallIter_New:PyObject*:sentinel:+1: + +PyCallable_Check:int::: +PyCallable_Check:PyObject*:o:0: + +PyCode_Check:int::: +PyCode_Check:PyObject*:co:0: + +PyCode_GetNumFree:int::: +PyCode_GetNumFree:PyCodeObject*:co:0: + +PyCode_NewWithPosOnlyArgs:PyCodeObject*::+1: +PyCode_NewWithPosOnlyArgs:int:argcount:: +PyCode_NewWithPosOnlyArgs:int:posonlyargcount:: +PyCode_NewWithPosOnlyArgs:int:kwonlyargcount:: +PyCode_NewWithPosOnlyArgs:int:nlocals:: +PyCode_NewWithPosOnlyArgs:int:stacksize:: +PyCode_NewWithPosOnlyArgs:int:flags:: +PyCode_NewWithPosOnlyArgs:PyObject*:code:0: +PyCode_NewWithPosOnlyArgs:PyObject*:consts:0: +PyCode_NewWithPosOnlyArgs:PyObject*:names:0: +PyCode_NewWithPosOnlyArgs:PyObject*:varnames:0: +PyCode_NewWithPosOnlyArgs:PyObject*:freevars:0: +PyCode_NewWithPosOnlyArgs:PyObject*:cellvars:0: +PyCode_NewWithPosOnlyArgs:PyObject*:filename:0: +PyCode_NewWithPosOnlyArgs:PyObject*:name:0: +PyCode_NewWithPosOnlyArgs:int:firstlineno:: +PyCode_NewWithPosOnlyArgs:PyObject*:lnotab:0: + +PyCode_New:PyCodeObject*::+1: +PyCode_New:int:argcount:: +PyCode_New:int:kwonlyargcount:: +PyCode_New:int:nlocals:: +PyCode_New:int:stacksize:: +PyCode_New:int:flags:: +PyCode_New:PyObject*:code:0: +PyCode_New:PyObject*:consts:0: +PyCode_New:PyObject*:names:0: +PyCode_New:PyObject*:varnames:0: +PyCode_New:PyObject*:freevars:0: +PyCode_New:PyObject*:cellvars:0: +PyCode_New:PyObject*:filename:0: +PyCode_New:PyObject*:name:0: +PyCode_New:int:firstlineno:: +PyCode_New:PyObject*:lnotab:0: + +PyCode_NewEmpty:PyCodeObject*::+1: +PyCode_NewEmpty:const char*:filename:: +PyCode_NewEmpty:const char*:funcname:: +PyCode_NewEmpty:int:firstlineno:: + +PyCodec_Register:int::: +PyCodec_Register:PyObject*:search_function:+1: + +PyCodec_KnownEncoding:int::: +PyCodec_KnownEncoding:const char*:encoding:: + +PyCodec_Encode:PyObject*::+1: +PyCodec_Encode:PyObject*:object:0: +PyCodec_Encode:const char*:encoding:: +PyCodec_Encode:const char*:errors:: + +PyCodec_Decode:PyObject*::+1: +PyCodec_Decode:PyObject*:object:0: +PyCodec_Decode:const char*:encoding:: +PyCodec_Decode:const char*:errors:: + +PyCodec_Encoder:PyObject*::+1: +PyCodec_Encoder:const char*:encoding:: + +PyCodec_Decoder:PyObject*::+1: +PyCodec_Decoder:const char*:encoding:: + +PyCodec_IncrementalEncoder:PyObject*::+1: +PyCodec_IncrementalEncoder:const char*:encoding:: +PyCodec_IncrementalEncoder:const char*:errors:: + +PyCodec_IncrementalDecoder:PyObject*::+1: +PyCodec_IncrementalDecoder:const char*:encoding:: +PyCodec_IncrementalDecoder:const char*:errors:: + +PyCodec_StreamReader:PyObject*::+1: +PyCodec_StreamReader:const char*:encoding:: +PyCodec_StreamReader:PyObject*:stream:0: +PyCodec_StreamReader:const char*:errors:: + +PyCodec_StreamWriter:PyObject*::+1: +PyCodec_StreamWriter:const char*:encoding:: +PyCodec_StreamWriter:PyObject*:stream:0: +PyCodec_StreamWriter:const char*:errors:: + +PyCodec_RegisterError:int::: +PyCodec_RegisterError:const char*:name:: +PyCodec_RegisterError:PyObject*:error:+1: + +PyCodec_LookupError:PyObject*::+1: +PyCodec_LookupError:const char*:name:: + +PyCodec_StrictErrors:PyObject*::null: +PyCodec_StrictErrors:PyObject*:exc:0: + +PyCodec_IgnoreErrors:PyObject*::+1: +PyCodec_IgnoreErrors:PyObject*:exc:0: + +PyCodec_ReplaceErrors:PyObject*::+1: +PyCodec_ReplaceErrors:PyObject*:exc:0: + +PyCodec_XMLCharRefReplaceErrors:PyObject*::+1: +PyCodec_XMLCharRefReplaceErrors:PyObject*:exc:0: + +PyCodec_BackslashReplaceErrors:PyObject*::+1: +PyCodec_BackslashReplaceErrors:PyObject*:exc:0: + +PyCodec_NameReplaceErrors:PyObject*::+1: +PyCodec_NameReplaceErrors:PyObject*:exc:0: + +PyComplex_AsCComplex:Py_complex::: +PyComplex_AsCComplex:PyObject*:op:0: + +PyComplex_Check:int::: +PyComplex_Check:PyObject*:p:0: + +PyComplex_CheckExact:int::: +PyComplex_CheckExact:PyObject*:p:0: + +PyComplex_FromCComplex:PyObject*::+1: +PyComplex_FromCComplex::Py_complex v:: + +PyComplex_FromDoubles:PyObject*::+1: +PyComplex_FromDoubles::double real:: +PyComplex_FromDoubles::double imag:: + +PyComplex_ImagAsDouble:double::: +PyComplex_ImagAsDouble:PyObject*:op:0: + +PyComplex_RealAsDouble:double::: +PyComplex_RealAsDouble:PyObject*:op:0: + +PyContext_CheckExact:int::: +PyContext_CheckExact:PyObject*:o:0: + +PyContext_ClearFreeList:int::: + +PyContext_Copy:PyObject*::+1: +PyContext_Copy:PyObject*:ctx:0: + +PyContext_CopyCurrent:PyObject*::+1: + +PyContext_Enter:int::: +PyContext_Enter:PyObject*:ctx:+1: + +PyContext_Exit:int::: +PyContext_Exit:PyObject*:ctx:-1: + +PyContext_New:PyObject*::+1: + +PyContextToken_CheckExact:int::: +PyContextToken_CheckExact:PyObject*:o:0: + +PyContextVar_CheckExact:int::: +PyContextVar_CheckExact:PyObject*:o:0: + +PyContextVar_Get:int::: +PyContextVar_Get:PyObject*:var:0: +PyContextVar_Get:PyObject*:default_value:0: +PyContextVar_Get:PyObject**:value:+1:??? + +PyContextVar_New:PyObject*::+1: +PyContextVar_New:const char*:name:: +PyContextVar_New:PyObject*:def:+1: + +PyContextVar_Set:PyObject*::+1: +PyContextVar_Set:PyObject*:var:0: +PyContextVar_Set:PyObject*:value:+1: + +PyContextVar_Reset:int::: +PyContextVar_Reset:PyObject*:var:0: +PyContextVar_Reset:PyObject*:token:-1: + +PyDate_Check:int::: +PyDate_Check:PyObject*:ob:0: + +PyDate_CheckExact:int::: +PyDate_CheckExact:PyObject*:ob:0: + +PyDate_FromDate:PyObject*::+1: +PyDate_FromDate:int:year:: +PyDate_FromDate:int:month:: +PyDate_FromDate:int:day:: + +PyDate_FromTimestamp:PyObject*::+1: +PyDate_FromTimestamp:PyObject*:args:0: + +PyDateTime_Check:int::: +PyDateTime_Check:PyObject*:ob:0: + +PyDateTime_CheckExact:int::: +PyDateTime_CheckExact:PyObject*:ob:0: + +PyDateTime_FromDateAndTime:PyObject*::+1: +PyDateTime_FromDateAndTime:int:year:: +PyDateTime_FromDateAndTime:int:month:: +PyDateTime_FromDateAndTime:int:day:: +PyDateTime_FromDateAndTime:int:hour:: +PyDateTime_FromDateAndTime:int:minute:: +PyDateTime_FromDateAndTime:int:second:: +PyDateTime_FromDateAndTime:int:usecond:: + +PyDateTime_FromDateAndTimeAndFold:PyObject*::+1: +PyDateTime_FromDateAndTimeAndFold:int:year:: +PyDateTime_FromDateAndTimeAndFold:int:month:: +PyDateTime_FromDateAndTimeAndFold:int:day:: +PyDateTime_FromDateAndTimeAndFold:int:hour:: +PyDateTime_FromDateAndTimeAndFold:int:minute:: +PyDateTime_FromDateAndTimeAndFold:int:second:: +PyDateTime_FromDateAndTimeAndFold:int:usecond:: +PyDateTime_FromDateAndTimeAndFold:int:fold:: + +PyDateTime_FromTimestamp:PyObject*::+1: +PyDateTime_FromTimestamp:PyObject*:args:0: + +PyDelta_Check:int::: +PyDelta_Check:PyObject*:ob:0: + +PyDelta_CheckExact:int::: +PyDelta_CheckExact:PyObject*:ob:0: + +PyDelta_FromDSU:PyObject*::+1: +PyDelta_FromDSU:int:days:: +PyDelta_FromDSU:int:seconds:: +PyDelta_FromDSU:int:useconds:: + +PyTimeZone_FromOffset:PyObject*::+1: +PyTimeZone_FromOffset:PyObject*:offset:+1:Reference count not increased if offset is +00:00 + +PyTimeZone_FromOffsetAndName:PyObject*::+1: +PyTimeZone_FromOffsetAndName:PyObject*:offset:+1:Reference count not increased if offset is +00:00 and name == NULL +PyTimeZone_FromOffsetAndName:PyObject*:name:+1: + + +PyDescr_IsData:int::: +PyDescr_IsData:PyObject*:descr:0: + +PyDescr_NewClassMethod:PyObject*::+1: +PyDescr_NewClassMethod:PyTypeObject*:type:+1: +PyDescr_NewClassMethod:PyMethodDef*:method:: + +PyDescr_NewGetSet:PyObject*::+1: +PyDescr_NewGetSet:PyTypeObject*:type:+1: +PyDescr_NewGetSet:PyGetSetDef*:getset:: + +PyDescr_NewMember:PyObject*::+1: +PyDescr_NewMember:PyTypeObject*:type:+1: +PyDescr_NewMember:PyMemberDef*:member:: + +PyDescr_NewMethod:PyObject*::+1: +PyDescr_NewMethod:PyTypeObject*:type:+1: +PyDescr_NewMethod:PyMethodDef*:meth:: + +PyDescr_NewWrapper:PyObject*::+1: +PyDescr_NewWrapper:PyTypeObject*:type:+1: +PyDescr_NewWrapper:struct wrapperbase*:base:: +PyDescr_NewWrapper:void*:wrapped:: + +PyDict_Check:int::: +PyDict_Check:PyObject*:p:0: + +PyDict_CheckExact:int::: +PyDict_CheckExact:PyObject*:p:0: + +PyDict_Clear:void::: +PyDict_Clear:PyObject*:p:0: + +PyDict_Contains:int::: +PyDict_Contains:PyObject*:p:0: +PyDict_Contains:PyObject*:key:0: + +PyDict_DelItem:int::: +PyDict_DelItem:PyObject*:p:0: +PyDict_DelItem:PyObject*:key:0: + +PyDict_DelItemString:int::: +PyDict_DelItemString:PyObject*:p:0: +PyDict_DelItemString:const char*:key:: + +PyDict_GetItem:PyObject*::0: +PyDict_GetItem:PyObject*:p:0: +PyDict_GetItem:PyObject*:key:0: + +PyDict_GetItemWithError:PyObject*::0:0 +PyDict_GetItemWithError:PyObject*:p:0: +PyDict_GetItemWithError:PyObject*:key:0: + +PyDict_GetItemString:PyObject*::0: +PyDict_GetItemString:PyObject*:p:0: +PyDict_GetItemString:const char*:key:: + +PyDict_SetDefault:PyObject*::0: +PyDict_SetDefault:PyObject*:p:0: +PyDict_SetDefault:PyObject*:key:0:conditionally +1 if inserted into the dict +PyDict_SetDefault:PyObject*:default:0:conditionally +1 if inserted into the dict + +PyDict_Items:PyObject*::+1: +PyDict_Items:PyObject*:p:0: + +PyDict_Keys:PyObject*::+1: +PyDict_Keys:PyObject*:p:0: + +PyDict_New:PyObject*::+1: + +PyDict_Copy:PyObject*::+1: +PyDict_Copy:PyObject*:p:0: + +PyDict_Merge:int::: +PyDict_Merge:PyObject*:a:0: +PyDict_Merge:PyObject*:b:0: +PyDict_Merge:int:override:: + +PyDict_MergeFromSeq2:int::: +PyDict_MergeFromSeq2:PyObject*:a:0: +PyDict_MergeFromSeq2:PyObject*:seq2:0: +PyDict_MergeFromSeq2:int:override:: + +PyDict_Next:int::: +PyDict_Next:PyObject*:p:0: +PyDict_Next:Py_ssize_t:ppos:: +PyDict_Next:PyObject**:pkey:0: +PyDict_Next:PyObject**:pvalue:0: + +PyDict_SetItem:int::: +PyDict_SetItem:PyObject*:p:0: +PyDict_SetItem:PyObject*:key:+1: +PyDict_SetItem:PyObject*:val:+1: + +PyDict_SetItemString:int::: +PyDict_SetItemString:PyObject*:p:0: +PyDict_SetItemString:const char*:key:: +PyDict_SetItemString:PyObject*:val:+1: + +PyDict_Size:Py_ssize_t::: +PyDict_Size:PyObject*:p:0: + +PyDict_Update:int::: +PyDict_Update:PyObject*:a:0: +PyDict_Update:PyObject*:b:0: + +PyDict_Values:PyObject*::+1: +PyDict_Values:PyObject*:p:0: + +PyDictProxy_New:PyObject*::+1: +PyDictProxy_New:PyObject*:dict:0: + +PyErr_BadArgument:int::: + +PyErr_BadInternalCall:void::: + +PyErr_CheckSignals:int::: + +PyErr_Clear:void::: + +PyErr_ExceptionMatches:int::: +PyErr_ExceptionMatches:PyObject*:exc:0: + +PyErr_Fetch:void::: +PyErr_Fetch:PyObject**:ptype:0: +PyErr_Fetch:PyObject**:pvalue:0: +PyErr_Fetch:PyObject**:ptraceback:0: + +PyErr_Format:PyObject*::null: +PyErr_Format:PyObject*:exception:+1: +PyErr_Format:const char*:format:: +PyErr_Format::...:: + +PyErr_FormatV:PyObject*::null: +PyErr_FormatV:PyObject*:exception:+1: +PyErr_FormatV:const char*:format:: +PyErr_FormatV:va_list:vargs:: + +PyErr_GetExcInfo:void::: +PyErr_GetExcInfo:PyObject**:ptype:+1: +PyErr_GetExcInfo:PyObject**:pvalue:+1: +PyErr_GetExcInfo:PyObject**:ptraceback:+1: + +PyErr_GivenExceptionMatches:int::: +PyErr_GivenExceptionMatches:PyObject*:given:0: +PyErr_GivenExceptionMatches:PyObject*:exc:0: + +PyErr_NewException:PyObject*::+1: +PyErr_NewException:const char*:name:: +PyErr_NewException:PyObject*:base:0: +PyErr_NewException:PyObject*:dict:0: + +PyErr_NewExceptionWithDoc:PyObject*::+1: +PyErr_NewExceptionWithDoc:const char*:name:: +PyErr_NewExceptionWithDoc:const char*:doc:: +PyErr_NewExceptionWithDoc:PyObject*:base:0: +PyErr_NewExceptionWithDoc:PyObject*:dict:0: + +PyErr_NoMemory:PyObject*::null: + +PyErr_NormalizeException:void::: +PyErr_NormalizeException:PyObject**:exc::??? +PyErr_NormalizeException:PyObject**:val::??? +PyErr_NormalizeException:PyObject**:tb::??? + +PyErr_Occurred:PyObject*::0: + +PyErr_Print:void::: + +PyErr_PrintEx:void::: +PyErr_PrintEx:int:set_sys_last_vars:: + +PyErr_ResourceWarning:int::: +PyErr_ResourceWarning:PyObject*:source:0: +PyErr_ResourceWarning:Py_ssize_t:stack_level:: +PyErr_ResourceWarning:const char*:format:: +PyErr_ResourceWarning::...:: + +PyErr_Restore:void::: +PyErr_Restore:PyObject*:type:-1: +PyErr_Restore:PyObject*:value:-1: +PyErr_Restore:PyObject*:traceback:-1: + +PyErr_SetExcFromWindowsErr:PyObject*::null: +PyErr_SetExcFromWindowsErr:PyObject*:type:+1: +PyErr_SetExcFromWindowsErr:int:ierr:: + +PyErr_SetExcFromWindowsErrWithFilename:PyObject*::null: +PyErr_SetExcFromWindowsErrWithFilename:PyObject*:type:+1: +PyErr_SetExcFromWindowsErrWithFilename:int:ierr:: +PyErr_SetExcFromWindowsErrWithFilename:const char*:filename:: + +PyErr_SetExcFromWindowsErrWithFilenameObject:PyObject*::null: +PyErr_SetExcFromWindowsErrWithFilenameObject:PyObject*:type:+1: +PyErr_SetExcFromWindowsErrWithFilenameObject:int:ierr:: +PyErr_SetExcFromWindowsErrWithFilenameObject:PyObject*:filename:+1: + +PyErr_SetExcFromWindowsErrWithFilenameObjects:PyObject*::null: +PyErr_SetExcFromWindowsErrWithFilenameObjects:PyObject*:type:+1: +PyErr_SetExcFromWindowsErrWithFilenameObjects:int:ierr:: +PyErr_SetExcFromWindowsErrWithFilenameObjects:PyObject*:filename:+1: +PyErr_SetExcFromWindowsErrWithFilenameObjects:PyObject*:filename2:+1: + +PyErr_SetExcInfo:void::: +PyErr_SetExcInfo:PyObject*:type:0: +PyErr_SetExcInfo:PyObject*:value:0: +PyErr_SetExcInfo:PyObject*:traceback:0: + +PyErr_SetFromErrno:PyObject*::null: +PyErr_SetFromErrno:PyObject*:type:+1: + +PyErr_SetFromErrnoWithFilename:PyObject*::null: +PyErr_SetFromErrnoWithFilename:PyObject*:type:+1: +PyErr_SetFromErrnoWithFilename:const char*:filename:: + +PyErr_SetFromErrnoWithFilenameObject:PyObject*::null: +PyErr_SetFromErrnoWithFilenameObject:PyObject*:type:+1: +PyErr_SetFromErrnoWithFilenameObject:PyObject*:filenameObject:+1: + +PyErr_SetFromErrnoWithFilenameObjects:PyObject*::null: +PyErr_SetFromErrnoWithFilenameObjects:PyObject*:type:+1: +PyErr_SetFromErrnoWithFilenameObjects:PyObject*:filenameObject:+1: +PyErr_SetFromErrnoWithFilenameObjects:PyObject*:filenameObject2:+1: + +PyErr_SetFromWindowsErr:PyObject*::null: +PyErr_SetFromWindowsErr:int:ierr:: + +PyErr_SetFromWindowsErrWithFilename:PyObject*::null: +PyErr_SetFromWindowsErrWithFilename:int:ierr:: +PyErr_SetFromWindowsErrWithFilename:const char*:filename:: + +PyErr_SetImportError:PyObject*::null: +PyErr_SetImportError:PyObject*:msg:+1: +PyErr_SetImportError:PyObject*:name:+1: +PyErr_SetImportError:PyObject*:path:+1: + +PyErr_SetImportErrorSubclass:PyObject*::null: +PyErr_SetImportErrorSubclass:PyObject*:msg:+1: +PyErr_SetImportErrorSubclass:PyObject*:name:+1: +PyErr_SetImportErrorSubclass:PyObject*:path:+1: + +PyErr_SetInterrupt:void::: + +PyErr_SetNone:void::: +PyErr_SetNone:PyObject*:type:+1: + +PyErr_SetObject:void::: +PyErr_SetObject:PyObject*:type:+1: +PyErr_SetObject:PyObject*:value:+1: + +PyErr_SetString:void::: +PyErr_SetString:PyObject*:type:+1: +PyErr_SetString:const char*:message:: + +PyErr_SyntaxLocation:void::: +PyErr_SyntaxLocation:const char*:filename:: +PyErr_SyntaxLocation:int:lineno:: + +PyErr_SyntaxLocationEx:void::: +PyErr_SyntaxLocationEx:const char*:filename:: +PyErr_SyntaxLocationEx:int:lineno:: +PyErr_SyntaxLocationEx:int:col_offset:: + +PyErr_SyntaxLocationObject:void::: +PyErr_SyntaxLocationObject:PyObject*:filename:+1: +PyErr_SyntaxLocationObject:int:lineno:: +PyErr_SyntaxLocationObject:int:col_offset:: + +PyErr_WarnEx:int::: +PyErr_WarnEx:PyObject*:category:0: +PyErr_WarnEx:const char*:message:: +PyErr_WarnEx:Py_ssize_t:stack_level:: + +PyErr_WarnExplicit:int::: +PyErr_WarnExplicit:PyObject*:category:0: +PyErr_WarnExplicit:const char*:message:: +PyErr_WarnExplicit:const char*:filename:: +PyErr_WarnExplicit:int:lineno:: +PyErr_WarnExplicit:const char*:module:: +PyErr_WarnExplicit:PyObject*:registry:0: + +PyErr_WarnExplicitObject:int::: +PyErr_WarnExplicitObject:PyObject*:category:0: +PyErr_WarnExplicitObject:PyObject*:message:0: +PyErr_WarnExplicitObject:PyObject*:filename:0: +PyErr_WarnExplicitObject:int:lineno:: +PyErr_WarnExplicitObject:PyObject*:module:0: +PyErr_WarnExplicitObject:PyObject*:registry:0: + +PyErr_WarnFormat:int::: +PyErr_WarnFormat:PyObject*:category:0: +PyErr_WarnFormat:Py_ssize_t:stack_level:: +PyErr_WarnFormat:const char*:format:: +PyErr_WarnFormat::...:: + +PyErr_WriteUnraisable:void::: +PyErr_WriteUnraisable:PyObject*:obj:0: + +PyEval_AcquireLock:void::: + +PyEval_AcquireThread:void::: +PyEval_AcquireThread:PyThreadState*:tstate:: + +PyEval_GetBuiltins:PyObject*::0: + +PyEval_GetLocals:PyObject*::0: + +PyEval_GetGlobals:PyObject*::0: + +PyEval_GetFrame:PyObject*::0: + +PyEval_GetFuncDesc:const char*::: +PyEval_GetFuncDesc:PyObject*:func:0: + +PyEval_GetFuncName:const char*::: +PyEval_GetFuncName:PyObject*:func:0: + +PyEval_InitThreads:void::: + +PyEval_ReleaseLock:void::: + +PyEval_ReleaseThread:void::: +PyEval_ReleaseThread:PyThreadState*:tstate:: + +PyEval_RestoreThread:void::: +PyEval_RestoreThread:PyThreadState*:tstate:: + +PyEval_SaveThread:PyThreadState*::: + +PyEval_SetProfile:void::: +PyEval_SetProfile:Py_tracefunc:func:: +PyEval_SetProfile:PyObject*:obj:+1: + +PyEval_SetTrace:void::: +PyEval_SetTrace:Py_tracefunc:func:: +PyEval_SetTrace:PyObject*:obj:+1: + +PyEval_EvalCode:PyObject*::+1: +PyEval_EvalCode:PyObject*:co:0: +PyEval_EvalCode:PyObject*:globals:0: +PyEval_EvalCode:PyObject*:locals:0: + +PyEval_EvalCodeEx:PyObject*::+1: +PyEval_EvalCodeEx:PyObject*:co:0: +PyEval_EvalCodeEx:PyObject*:globals:0: +PyEval_EvalCodeEx:PyObject*:locals:0: +PyEval_EvalCodeEx:PyObject*const*:args:: +PyEval_EvalCodeEx:int:argcount:: +PyEval_EvalCodeEx:PyObject*const*:kws:: +PyEval_EvalCodeEx:int:kwcount:: +PyEval_EvalCodeEx:PyObject*const*:defs:: +PyEval_EvalCodeEx:int:defcount:: +PyEval_EvalCodeEx:PyObject*:kwdefs:0: +PyEval_EvalCodeEx:PyObject*:closure:0: + +PyEval_EvalFrame:PyObject*::+1: +PyEval_EvalFrame:PyFrameObject*:f:0: + +PyEval_EvalFrameEx:PyObject*::+1: +PyEval_EvalFrameEx:PyFrameObject*:f:0: +PyEval_EvalFrameEx:int:throwflag:: + +PyEval_MergeCompilerFlags:int::: +PyEval_MergeCompilerFlags:PyCompilerFlags*:cf:: + +PyException_GetCause:PyObject*::+1: +PyException_GetCause:PyObject*:ex:0: + +PyException_GetContext:PyObject*::+1: +PyException_GetContext:PyObject*:ex:0: + +PyException_GetTraceback:PyObject*::+1: +PyException_GetTraceback:PyObject*:ex:0: + +PyException_SetCause:void::: +PyException_SetCause:PyObject*:ex:0: +PyException_SetCause:PyObject*:cause:+1: + +PyException_SetContext:void::: +PyException_SetContext:PyObject*:ex:0: +PyException_SetContext:PyObject*:ctx:+1: + +PyException_SetTraceback:int::: +PyException_SetTraceback:PyObject*:ex:0: +PyException_SetTraceback:PyObject*:tb:+1: + +PyFile_FromFd:PyObject*::+1: +PyFile_FromFd:int:fd:: +PyFile_FromFd:const char*:name:: +PyFile_FromFd:const char*:mode:: +PyFile_FromFd:int:buffering:: +PyFile_FromFd:const char*:encoding:: +PyFile_FromFd:const char*:errors:: +PyFile_FromFd:const char*:newline:: +PyFile_FromFd:int:closefd:: + +PyFile_GetLine:PyObject*::+1: +PyFile_GetLine:PyObject*:p:0: +PyFile_GetLine:int:n:: + +PyFile_WriteObject:int::: +PyFile_WriteObject:PyObject*:obj:0: +PyFile_WriteObject:PyObject*:p:0: +PyFile_WriteObject:int:flags:: + +PyFile_WriteString:int::: +PyFile_WriteString:const char*:s:: +PyFile_WriteString:PyObject*:p:0: +PyFile_WriteString:int:flags:: + +PyFloat_AS_DOUBLE:double::: +PyFloat_AS_DOUBLE:PyObject*:pyfloat:0: + +PyFloat_AsDouble:double::: +PyFloat_AsDouble:PyObject*:pyfloat:0: + +PyFloat_Check:int::: +PyFloat_Check:PyObject*:p:0: + +PyFloat_CheckExact:int::: +PyFloat_CheckExact:PyObject*:p:0: + +PyFloat_FromDouble:PyObject*::+1: +PyFloat_FromDouble:double:v:: + +PyFloat_FromString:PyObject*::+1: +PyFloat_FromString:PyObject*:str:0: + +PyFloat_GetInfo:PyObject*::+1: +PyFloat_GetInfo::void:: + +PyFrozenSet_Check:int::: +PyFrozenSet_Check:PyObject*:p:0: + +PyFrozenSet_CheckExact:int::: +PyFrozenSet_CheckExact:PyObject*:p:0: + +PyFrozenSet_New:PyObject*::+1: +PyFrozenSet_New:PyObject*:iterable:0: + +PyFunction_Check:int::: +PyFunction_Check:PyObject*:o:0: + +PyFunction_GetAnnotations:PyObject*::0: +PyFunction_GetAnnotations:PyObject*:op:0: + +PyFunction_GetClosure:PyObject*::0: +PyFunction_GetClosure:PyObject*:op:0: + +PyFunction_GetCode:PyObject*::0: +PyFunction_GetCode:PyObject*:op:0: + +PyFunction_GetDefaults:PyObject*::0: +PyFunction_GetDefaults:PyObject*:op:0: + +PyFunction_GetGlobals:PyObject*::0: +PyFunction_GetGlobals:PyObject*:op:0: + +PyFunction_GetModule:PyObject*::0: +PyFunction_GetModule:PyObject*:op:0: + +PyFunction_New:PyObject*::+1: +PyFunction_New:PyObject*:code:+1: +PyFunction_New:PyObject*:globals:+1: + +PyFunction_NewWithQualName:PyObject*::+1: +PyFunction_NewWithQualName:PyObject*:code:+1: +PyFunction_NewWithQualName:PyObject*:globals:+1: +PyFunction_NewWithQualName:PyObject*:qualname:+1: + +PyFunction_SetAnnotations:int::: +PyFunction_SetAnnotations:PyObject*:op:0: +PyFunction_SetAnnotations:PyObject*:annotations:+1: + +PyFunction_SetClosure:int::: +PyFunction_SetClosure:PyObject*:op:0: +PyFunction_SetClosure:PyObject*:closure:+1: + +PyFunction_SetDefaults:int::: +PyFunction_SetDefaults:PyObject*:op:0: +PyFunction_SetDefaults:PyObject*:defaults:+1: + +PyGen_Check:int::: +PyGen_Check:PyObject*:ob:0: + +PyGen_CheckExact:int::: +PyGen_CheckExact:PyObject*:ob:0: + +PyGen_New:PyObject*::+1: +PyGen_New:PyFrameObject*:frame:0: + +PyGen_NewWithQualName:PyObject*::+1: +PyGen_NewWithQualName:PyFrameObject*:frame:0: +PyGen_NewWithQualName:PyObject*:name:0: +PyGen_NewWithQualName:PyObject*:qualname:0: + +PyCoro_CheckExact:int::: +PyCoro_CheckExact:PyObject*:ob:0: + +PyCoro_New:PyObject*::+1: +PyCoro_New:PyFrameObject*:frame:0: +PyCoro_New:PyObject*:name:0: +PyCoro_New:PyObject*:qualname:0: + +PyImport_AddModule:PyObject*::0:reference borrowed from sys.modules +PyImport_AddModule:const char*:name:: + +PyImport_AddModuleObject:PyObject*::0:reference borrowed from sys.modules +PyImport_AddModuleObject:PyObject*:name:0: + +PyImport_Cleanup:void::: + +PyImport_ExecCodeModule:PyObject*::+1: +PyImport_ExecCodeModule:const char*:name:: +PyImport_ExecCodeModule:PyObject*:co:0: + +PyImport_ExecCodeModuleEx:PyObject*::+1: +PyImport_ExecCodeModuleEx:const char*:name:: +PyImport_ExecCodeModuleEx:PyObject*:co:0: +PyImport_ExecCodeModuleEx:const char*:pathname:: + +PyImport_ExecCodeModuleObject:PyObject*::+1: +PyImport_ExecCodeModuleObject:const char*:name:: +PyImport_ExecCodeModuleObject:PyObject*:co:0: +PyImport_ExecCodeModuleObject:PyObject*:pathname:0: +PyImport_ExecCodeModuleObject:PyObject*:cpathname:0: + +PyImport_ExecCodeModuleWithPathnames:PyObject*::+1: +PyImport_ExecCodeModuleWithPathnames:const char*:name:: +PyImport_ExecCodeModuleWithPathnames:PyObject*:co:0: +PyImport_ExecCodeModuleWithPathnames:const char*:pathname:: +PyImport_ExecCodeModuleWithPathnames:const char*:cpathname:: + +PyImport_GetImporter:PyObject*::+1: +PyImport_GetImporter:PyObject*:path:0: + +PyImport_GetMagicNumber:long::: + +PyImport_GetModule:PyObject*::+1: +PyImport_GetModule:PyObject*:name:0: + +PyImport_GetModuleDict:PyObject*::0: + +PyImport_Import:PyObject*::+1: +PyImport_Import:PyObject*:name:0: + +PyImport_ImportFrozenModule:int::: +PyImport_ImportFrozenModule:const char*:name:: + +PyImport_ImportFrozenModuleObject:int::: +PyImport_ImportFrozenModuleObject:PyObject*:name:+1: + +PyImport_ImportModule:PyObject*::+1: +PyImport_ImportModule:const char*:name:: + +PyImport_ImportModuleEx:PyObject*::+1: +PyImport_ImportModuleEx:const char*:name:: +PyImport_ImportModuleEx:PyObject*:globals:0:??? +PyImport_ImportModuleEx:PyObject*:locals:0:??? +PyImport_ImportModuleEx:PyObject*:fromlist:0:??? + +PyImport_ImportModuleLevel:PyObject*::+1: +PyImport_ImportModuleLevel:const char*:name:: +PyImport_ImportModuleLevel:PyObject*:globals:0:??? +PyImport_ImportModuleLevel:PyObject*:locals:0:??? +PyImport_ImportModuleLevel:PyObject*:fromlist:0:??? +PyImport_ImportModuleLevel:int:level:: + +PyImport_ImportModuleLevelObject:PyObject*::+1: +PyImport_ImportModuleLevelObject:PyObject*:name:0: +PyImport_ImportModuleLevelObject:PyObject*:globals:0:??? +PyImport_ImportModuleLevelObject:PyObject*:locals:0:??? +PyImport_ImportModuleLevelObject:PyObject*:fromlist:0:??? +PyImport_ImportModuleLevelObject:int:level:: + +PyImport_ImportModuleNoBlock:PyObject*::+1: +PyImport_ImportModuleNoBlock:const char*:name:: + +PyImport_ReloadModule:PyObject*::+1: +PyImport_ReloadModule:PyObject*:m:0: + +PyIndex_Check:int::: +PyIndex_Check:PyObject*:o:0: + +PyInstanceMethod_Check:int::: +PyInstanceMethod_Check:PyObject*:o:0: + +PyInstanceMethod_Function:PyObject*::0: +PyInstanceMethod_Function:PyObject*:im:0: + +PyInstanceMethod_GET_FUNCTION:PyObject*::0: +PyInstanceMethod_GET_FUNCTION:PyObject*:im:0: + +PyInstanceMethod_New:PyObject*::+1: +PyInstanceMethod_New:PyObject*:func:0: + +PyInterpreterState_Clear:void::: +PyInterpreterState_Clear:PyInterpreterState*:interp:: + +PyInterpreterState_Delete:void::: +PyInterpreterState_Delete:PyInterpreterState*:interp:: + +PyInterpreterState_GetID:int64_t::: +PyInterpreterState_GetID:PyInterpreterState*:interp:: + +PyInterpreterState_New:PyInterpreterState*::: + +PyIter_Check:int::: +PyIter_Check:PyObject*:o:0: + +PyAIter_Check:int::: +PyAIter_Check:PyObject*:o:0: + +PyIter_Next:PyObject*::+1: +PyIter_Next:PyObject*:o:0: + +PyIter_Send:int::: +PyIter_Send:PyObject*:iter:0: +PyIter_Send:PyObject*:arg:0: +PyIter_Send:PyObject**:presult:+1: + +PyList_Append:int::: +PyList_Append:PyObject*:list:0: +PyList_Append:PyObject*:item:+1: + +PyList_AsTuple:PyObject*::+1: +PyList_AsTuple:PyObject*:list:0: + +PyList_Check:int::: +PyList_Check:PyObject*:p:0: + +PyList_CheckExact:int::: +PyList_CheckExact:PyObject*:p:0: + +PyList_GET_ITEM:PyObject*::0: +PyList_GET_ITEM:PyObject*:list:0: +PyList_GET_ITEM:Py_ssize_t:i:: + +PyList_GET_SIZE:Py_ssize_t::: +PyList_GET_SIZE:PyObject*:list:0: + +PyList_GetItem:PyObject*::0: +PyList_GetItem:PyObject*:list:0: +PyList_GetItem:Py_ssize_t:index:: + +PyList_GetSlice:PyObject*::+1: +PyList_GetSlice:PyObject*:list:0: +PyList_GetSlice:Py_ssize_t:low:: +PyList_GetSlice:Py_ssize_t:high:: + +PyList_Insert:int::: +PyList_Insert:PyObject*:list:0: +PyList_Insert:Py_ssize_t:index:: +PyList_Insert:PyObject*:item:+1: + +PyList_New:PyObject*::+1: +PyList_New:Py_ssize_t:len:: + +PyList_Reverse:int::: +PyList_Reverse:PyObject*:list:0: + +PyList_SET_ITEM:void::: +PyList_SET_ITEM:PyObject*:list:0: +PyList_SET_ITEM:Py_ssize_t:i:: +PyList_SET_ITEM:PyObject*:o:0: + +PyList_SetItem:int::: +PyList_SetItem:PyObject*:list:0: +PyList_SetItem:Py_ssize_t:index:: +PyList_SetItem:PyObject*:item:0: + +PyList_SetSlice:int::: +PyList_SetSlice:PyObject*:list:0: +PyList_SetSlice:Py_ssize_t:low:: +PyList_SetSlice:Py_ssize_t:high:: +PyList_SetSlice:PyObject*:itemlist:0:but increfs its elements? + +PyList_Size:Py_ssize_t::: +PyList_Size:PyObject*:list:0: + +PyList_Sort:int::: +PyList_Sort:PyObject*:list:0: + +PyLong_AsDouble:double::: +PyLong_AsDouble:PyObject*:pylong:0: + +PyLong_AsLong:long::: +PyLong_AsLong:PyObject*:pylong:0: + +PyLong_AsLongAndOverflow:long::: +PyLong_AsLongAndOverflow:PyObject*:obj:0: +PyLong_AsLongAndOverflow:int*:overflow:: + +PyLong_AsLongLong:long long::: +PyLong_AsLongLong:PyObject*:obj:0: + +PyLong_AsLongLongAndOverflow:long long::: +PyLong_AsLongLongAndOverflow:PyObject*:obj:0: +PyLong_AsLongLongAndOverflow:int*:overflow:: + +PyLong_AsSize_t:size_t::: +PyLong_AsSize_t:PyObject*:pylong:0: + +PyLong_AsSsize_t:Py_ssize_t::: +PyLong_AsSsize_t:PyObject*:pylong:0: + +PyLong_AsUnsignedLong:unsigned long::: +PyLong_AsUnsignedLong:PyObject*:pylong:0: + +PyLong_AsUnsignedLongLong:unsigned long long::: +PyLong_AsUnsignedLongLong:PyObject*:pylong:0: + +PyLong_AsUnsignedLongMask:unsigned long::: +PyLong_AsUnsignedLongMask:PyObject*:obj:0: + +PyLong_AsUnsignedLongLongMask:unsigned long long::: +PyLong_AsUnsignedLongLongMask:PyObject*:obj:0: + +PyLong_AsVoidPtr:void*::: +PyLong_AsVoidPtr:PyObject*:pylong:0: + +PyLong_Check:int::: +PyLong_Check:PyObject*:p:0: + +PyLong_CheckExact:int::: +PyLong_CheckExact:PyObject*:p:0: + +PyLong_FromDouble:PyObject*::+1: +PyLong_FromDouble:double:v:: + +PyLong_FromLong:PyObject*::+1: +PyLong_FromLong:long:v:: + +PyLong_FromLongLong:PyObject*::+1: +PyLong_FromLongLong:long long:v:: + +PyLong_FromUnsignedLongLong:PyObject*::+1: +PyLong_FromUnsignedLongLong:unsigned long long:v:: + +PyLong_FromSize_t:PyObject*::+1: +PyLong_FromSize_t:size_t:v:: + +PyLong_FromSsize_t:PyObject*::+1: +PyLong_FromSsize_t:Py_ssize_t:v:: + +PyLong_FromString:PyObject*::+1: +PyLong_FromString:const char*:str:: +PyLong_FromString:char**:pend:: +PyLong_FromString:int:base:: + +PyLong_FromUnicodeObject:PyObject*::+1: +PyLong_FromUnicodeObject:PyObject*:u:0: +PyLong_FromUnicodeObject:int:base:: + +PyLong_FromUnsignedLong:PyObject*::+1: +PyLong_FromUnsignedLong:unsignedlong:v:: + +PyLong_FromVoidPtr:PyObject*::+1: +PyLong_FromVoidPtr:void*:p:: + +PyMapping_Check:int::: +PyMapping_Check:PyObject*:o:0: + +PyMapping_DelItem:int::: +PyMapping_DelItem:PyObject*:o:0: +PyMapping_DelItem:PyObject*:key:0: + +PyMapping_DelItemString:int::: +PyMapping_DelItemString:PyObject*:o:0: +PyMapping_DelItemString:const char*:key:: + +PyMapping_GetItemString:PyObject*::+1: +PyMapping_GetItemString:PyObject*:o:0: +PyMapping_GetItemString:const char*:key:: + +PyMapping_HasKey:int::: +PyMapping_HasKey:PyObject*:o:0: +PyMapping_HasKey:PyObject*:key:: + +PyMapping_HasKeyString:int::: +PyMapping_HasKeyString:PyObject*:o:0: +PyMapping_HasKeyString:const char*:key:: + +PyMapping_Items:PyObject*::+1: +PyMapping_Items:PyObject*:o:0: + +PyMapping_Keys:PyObject*::+1: +PyMapping_Keys:PyObject*:o:0: + +PyMapping_Length:Py_ssize_t::: +PyMapping_Length:PyObject*:o:0: + +PyMapping_SetItemString:int::: +PyMapping_SetItemString:PyObject*:o:0: +PyMapping_SetItemString:const char*:key:: +PyMapping_SetItemString:PyObject*:v:+1: + +PyMapping_Size:Py_ssize_t::: +PyMapping_Size:PyObject*:o:0: + +PyMapping_Values:PyObject*::+1: +PyMapping_Values:PyObject*:o:0: + +PyMarshal_ReadLastObjectFromFile:PyObject*::+1: +PyMarshal_ReadLastObjectFromFile:FILE*:file:: + +PyMarshal_ReadObjectFromFile:PyObject*::+1: +PyMarshal_ReadObjectFromFile:FILE*:file:: + +PyMarshal_ReadObjectFromString:PyObject*::+1: +PyMarshal_ReadObjectFromString:const char*:string:: +PyMarshal_ReadObjectFromString:Py_ssize_t:len:: + +PyMarshal_WriteObjectToString:PyObject*::+1: +PyMarshal_WriteObjectToString:PyObject*:value:0: +PyMarshal_WriteObjectToString:int:version:: + +PyMemoryView_Check:int::: +PyMemoryView_Check:PyObject*:obj:0: + +PyMemoryView_FromBuffer:PyObject*::+1: +PyMemoryView_FromBuffer:Py_buffer*:view:: + +PyMemoryView_FromMemory:PyObject*::+1: +PyMemoryView_FromMemory:char*:mem:: +PyMemoryView_FromMemory:Py_ssize_t:size:: +PyMemoryView_FromMemory:int:flags:: + +PyMemoryView_FromObject:PyObject*::+1: +PyMemoryView_FromObject:PyObject*:obj:0: + +PyMemoryView_GET_BASE:Py_buffer*::: +PyMemoryView_GET_BASE:PyObject*:mview:0: + +PyMemoryView_GET_BUFFER:Py_buffer*::: +PyMemoryView_GET_BUFFER:PyObject*:mview:0: + +PyMemoryView_GetContiguous:PyObject*::+1: +PyMemoryView_GetContiguous:PyObject*:obj:0: +PyMemoryView_GetContiguous:int:buffertype:: +PyMemoryView_GetContiguous:char:order:: + +PyMethod_Check:int::: +PyMethod_Check:PyObject*:o:0: + +PyMethod_Function:PyObject*::0: +PyMethod_Function:PyObject*:im:0: + +PyMethod_GET_FUNCTION:PyObject*::0: +PyMethod_GET_FUNCTION:PyObject*:im:0: + +PyMethod_GET_SELF:PyObject*::0: +PyMethod_GET_SELF:PyObject*:im:0: + +PyMethod_New:PyObject*::+1: +PyMethod_New:PyObject*:func:0: +PyMethod_New:PyObject*:self:0: +PyMethod_New:PyObject*:class:0: + +PyMethod_Self:PyObject*::0: +PyMethod_Self:PyObject*:im:0: + +PyModule_AddFunctions:int::: +PyModule_AddFunctions:PyObject*:module:0: +PyModule_AddFunctions:PyMethodDef*:functions:: + +PyModule_AddIntConstant:int::: +PyModule_AddIntConstant:PyObject*:module:0: +PyModule_AddIntConstant:const char*:name:: +PyModule_AddIntConstant:long:value:: + +PyModule_AddIntMacro:int::: +PyModule_AddIntMacro:PyObject*:module:0: +PyModule_AddIntMacro::macro:: + +PyModule_AddObject:int::: +PyModule_AddObject:PyObject*:module:0: +PyModule_AddObject:const char*:name:: +PyModule_AddObject:PyObject*:value:+1: + +PyModule_AddStringConstant:int::: +PyModule_AddStringConstant:PyObject*:module:0: +PyModule_AddStringConstant:const char*:name:: +PyModule_AddStringConstant:const char*:value:: + +PyModule_AddStringMacro:int::: +PyModule_AddStringMacro:PyObject*:module:0: +PyModule_AddStringMacro::macro:: + +PyModule_Check:int::: +PyModule_Check:PyObject*:p:0: + +PyModule_CheckExact:int::: +PyModule_CheckExact:PyObject*:p:0: + +PyModule_Create:PyObject*::+1: +PyModule_Create:PyModuleDef*:def:: + +PyModule_Create2:PyObject*::+1: +PyModule_Create2:PyModuleDef*:def:: +PyModule_Create2:int:module_api_version:: + +PyModule_ExecDef:int::: +PyModule_ExecDef:PyObject*:module:0: +PyModule_ExecDef:PyModuleDef*:def:: + +PyModule_FromDefAndSpec:PyObject*::+1: +PyModule_FromDefAndSpec:PyModuleDef*:def:: +PyModule_FromDefAndSpec:PyObject*:spec:0: + +PyModule_FromDefAndSpec2:PyObject*::+1: +PyModule_FromDefAndSpec2:PyModuleDef*:def:: +PyModule_FromDefAndSpec2:PyObject*:spec:0: +PyModule_FromDefAndSpec2:int:module_api_version:: + +PyModule_GetDef:PyModuleDef*::0: +PyModule_GetDef:PyObject*:module:0: + +PyModule_GetDict:PyObject*::0: +PyModule_GetDict:PyObject*:module:0: + +PyModule_GetFilename:const char*::: +PyModule_GetFilename:PyObject*:module:0: + +PyModule_GetFilenameObject:PyObject*::+1: +PyModule_GetFilenameObject:PyObject*:module:0: + +PyModule_GetName:const char*::: +PyModule_GetName:PyObject*:module:0: + +PyModule_GetNameObject:PyObject*::+1: +PyModule_GetNameObject:PyObject*:module:0: + +PyModule_GetState:void*::: +PyModule_GetState:PyObject*:module:0: + +PyModule_New:PyObject*::+1: +PyModule_New::char* name:: + +PyModule_NewObject:PyObject*::+1: +PyModule_NewObject:PyObject*:name:+1: + +PyModule_SetDocString:int::: +PyModule_SetDocString:PyObject*:module:0: +PyModule_SetDocString:const char*:docstring:: + +PyModuleDef_Init:PyObject*::0: +PyModuleDef_Init:PyModuleDef*:def:0: + +PyNumber_Absolute:PyObject*::+1: +PyNumber_Absolute:PyObject*:o:0: + +PyNumber_Add:PyObject*::+1: +PyNumber_Add:PyObject*:o1:0: +PyNumber_Add:PyObject*:o2:0: + +PyNumber_And:PyObject*::+1: +PyNumber_And:PyObject*:o1:0: +PyNumber_And:PyObject*:o2:0: + +PyNumber_AsSsize_t:Py_ssize_t::: +PyNumber_AsSsize_t:PyObject*:o:0: +PyNumber_AsSsize_t:PyObject*:exc:0: + +PyNumber_Check:int::: +PyNumber_Check:PyObject*:o:0: + +PyNumber_Divmod:PyObject*::+1: +PyNumber_Divmod:PyObject*:o1:0: +PyNumber_Divmod:PyObject*:o2:0: + +PyNumber_Float:PyObject*::+1: +PyNumber_Float:PyObject*:o:0: + +PyNumber_FloorDivide:PyObject*::+1: +PyNumber_FloorDivide:PyObject*:v:0: +PyNumber_FloorDivide:PyObject*:w:0: + +PyNumber_Index:PyObject*::+1: +PyNumber_Index:PyObject*:o:0: + +PyNumber_InPlaceAdd:PyObject*::+1: +PyNumber_InPlaceAdd:PyObject*:v:0: +PyNumber_InPlaceAdd:PyObject*:w:0: + +PyNumber_InPlaceAnd:PyObject*::+1: +PyNumber_InPlaceAnd:PyObject*:v:0: +PyNumber_InPlaceAnd:PyObject*:w:0: + +PyNumber_InPlaceFloorDivide:PyObject*::+1: +PyNumber_InPlaceFloorDivide:PyObject*:v:0: +PyNumber_InPlaceFloorDivide:PyObject*:w:0: + +PyNumber_InPlaceLshift:PyObject*::+1: +PyNumber_InPlaceLshift:PyObject*:v:0: +PyNumber_InPlaceLshift:PyObject*:w:0: + +PyNumber_InPlaceMatrixMultiply:PyObject*::+1: +PyNumber_InPlaceMatrixMultiply:PyObject*:o1:0: +PyNumber_InPlaceMatrixMultiply:PyObject*:o2:0: + +PyNumber_InPlaceMultiply:PyObject*::+1: +PyNumber_InPlaceMultiply:PyObject*:v:0: +PyNumber_InPlaceMultiply:PyObject*:w:0: + +PyNumber_InPlaceOr:PyObject*::+1: +PyNumber_InPlaceOr:PyObject*:v:0: +PyNumber_InPlaceOr:PyObject*:w:0: + +PyNumber_InPlacePower:PyObject*::+1: +PyNumber_InPlacePower:PyObject*:v:0: +PyNumber_InPlacePower:PyObject*:w:0: +PyNumber_InPlacePower:PyObject*:z:0: + +PyNumber_InPlaceRemainder:PyObject*::+1: +PyNumber_InPlaceRemainder:PyObject*:v:0: +PyNumber_InPlaceRemainder:PyObject*:w:0: + +PyNumber_InPlaceRshift:PyObject*::+1: +PyNumber_InPlaceRshift:PyObject*:v:0: +PyNumber_InPlaceRshift:PyObject*:w:0: + +PyNumber_InPlaceSubtract:PyObject*::+1: +PyNumber_InPlaceSubtract:PyObject*:v:0: +PyNumber_InPlaceSubtract:PyObject*:w:0: + +PyNumber_InPlaceTrueDivide:PyObject*::+1: +PyNumber_InPlaceTrueDivide:PyObject*:v:0: +PyNumber_InPlaceTrueDivide:PyObject*:w:0: + +PyNumber_InPlaceXor:PyObject*::+1: +PyNumber_InPlaceXor:PyObject*:v:0: +PyNumber_InPlaceXor:PyObject*:w:0: + +PyNumber_Invert:PyObject*::+1: +PyNumber_Invert:PyObject*:o:0: + +PyNumber_Long:PyObject*::+1: +PyNumber_Long:PyObject*:o:0: + +PyNumber_Lshift:PyObject*::+1: +PyNumber_Lshift:PyObject*:o1:0: +PyNumber_Lshift:PyObject*:o2:0: + +PyNumber_MatrixMultiply:PyObject*::+1: +PyNumber_MatrixMultiply:PyObject*:o1:0: +PyNumber_MatrixMultiply:PyObject*:o2:0: + +PyNumber_Multiply:PyObject*::+1: +PyNumber_Multiply:PyObject*:o1:0: +PyNumber_Multiply:PyObject*:o2:0: + +PyNumber_Negative:PyObject*::+1: +PyNumber_Negative:PyObject*:o:0: + +PyNumber_Or:PyObject*::+1: +PyNumber_Or:PyObject*:o1:0: +PyNumber_Or:PyObject*:o2:0: + +PyNumber_Positive:PyObject*::+1: +PyNumber_Positive:PyObject*:o:0: + +PyNumber_Power:PyObject*::+1: +PyNumber_Power:PyObject*:o1:0: +PyNumber_Power:PyObject*:o2:0: +PyNumber_Power:PyObject*:o3:0: + +PyNumber_Remainder:PyObject*::+1: +PyNumber_Remainder:PyObject*:o1:0: +PyNumber_Remainder:PyObject*:o2:0: + +PyNumber_Rshift:PyObject*::+1: +PyNumber_Rshift:PyObject*:o1:0: +PyNumber_Rshift:PyObject*:o2:0: + +PyNumber_Subtract:PyObject*::+1: +PyNumber_Subtract:PyObject*:o1:0: +PyNumber_Subtract:PyObject*:o2:0: + +PyNumber_ToBase:PyObject*::+1: +PyNumber_ToBase:PyObject*:n:0: +PyNumber_ToBase:int:base:: + +PyNumber_TrueDivide:PyObject*::+1: +PyNumber_TrueDivide:PyObject*:v:0: +PyNumber_TrueDivide:PyObject*:w:0: + +PyNumber_Xor:PyObject*::+1: +PyNumber_Xor:PyObject*:o1:0: +PyNumber_Xor:PyObject*:o2:0: + +PyObject_AsFileDescriptor:int::: +PyObject_AsFileDescriptor:PyObject*:o:0: + +PyOS_AfterFork:void::: + +PyOS_AfterFork_Child:void::: + +PyOS_AfterFork_Parent:void::: + +PyOS_BeforeFork:void::: + +PyOS_FSPath:PyObject*::+1: +PyOS_FSPath:PyObject*:path:0: + +PyObject_ASCII:PyObject*::+1: +PyObject_ASCII:PyObject*:o:0: + +PyObject_AsCharBuffer:int::: +PyObject_AsCharBuffer:PyObject*:obj:0: +PyObject_AsCharBuffer:const char**:buffer:: +PyObject_AsCharBuffer:Py_ssize_t*:buffer_len:: + +PyObject_AsReadBuffer:int::: +PyObject_AsReadBuffer:PyObject*:obj:0: +PyObject_AsReadBuffer:const void**:buffer:: +PyObject_AsReadBuffer:Py_ssize_t*:buffer_len:: + +PyObject_AsWriteBuffer:int::: +PyObject_AsWriteBuffer:PyObject*:obj:0: +PyObject_AsWriteBuffer:void**:buffer:: +PyObject_AsWriteBuffer:Py_ssize_t*:buffer_len:: + +PyObject_Bytes:PyObject*::+1: +PyObject_Bytes:PyObject*:o:0: + +PyObject_Call:PyObject*::+1: +PyObject_Call:PyObject*:callable_object:0: +PyObject_Call:PyObject*:args:0: +PyObject_Call:PyObject*:kw:0: + +PyObject_CallFunction:PyObject*::+1: +PyObject_CallFunction:PyObject*:callable_object:0: +PyObject_CallFunction:const char*:format:: +PyObject_CallFunction::...:: + +PyObject_CallFunctionObjArgs:PyObject*::+1: +PyObject_CallFunctionObjArgs:PyObject*:callable:0: +PyObject_CallFunctionObjArgs::...:: + +PyObject_CallMethod:PyObject*::+1: +PyObject_CallMethod:PyObject*:o:0: +PyObject_CallMethod:const char*:m:: +PyObject_CallMethod:const char*:format:: +PyObject_CallMethod::...:: + +PyObject_CallMethodObjArgs:PyObject*::+1: +PyObject_CallMethodObjArgs:PyObject*:o:0: +PyObject_CallMethodObjArgs:PyObject*:name:0: +PyObject_CallMethodObjArgs::...:: + +PyObject_CallObject:PyObject*::+1: +PyObject_CallObject:PyObject*:callable_object:0: +PyObject_CallObject:PyObject*:args:0: + +PyObject_CheckBuffer:int::: +PyObject_CheckBuffer:PyObject*:obj:0: + +PyObject_CheckReadBuffer:int::: +PyObject_CheckReadBuffer:PyObject*:o:0: + +PyObject_DelAttr:int::: +PyObject_DelAttr:PyObject*:o:0: +PyObject_DelAttr:PyObject*:attr_name:0: + +PyObject_DelAttrString:int::: +PyObject_DelAttrString:PyObject*:o:0: +PyObject_DelAttrString:const char*:attr_name:: + +PyObject_DelItem:int::: +PyObject_DelItem:PyObject*:o:0: +PyObject_DelItem:PyObject*:key:0: + +PyObject_Dir:PyObject*::+1: +PyObject_Dir:PyObject*:o:0: + +PyObject_GC_Del:void::: +PyObject_GC_Del:void*:op:: + +PyObject_GC_New:TYPE*::+1: +PyObject_GC_New::TYPE:: +PyObject_GC_New:PyTypeObject*:type:0: + +PyObject_GC_NewVar:TYPE*::+1: +PyObject_GC_NewVar::TYPE:: +PyObject_GC_NewVar:PyTypeObject*:type:0: +PyObject_GC_NewVar:Py_ssize_t:size:: + +PyObject_GC_Resize:TYPE*::0: +PyObject_GC_Resize::TYPE:: +PyObject_GC_Resize:PyVarObject*:op:0: +PyObject_GC_Resize:Py_ssize_t:newsize:: + +PyObject_GC_Track:void::: +PyObject_GC_Track:PyObject*:op:0: + +PyObject_GC_UnTrack:void::: +PyObject_GC_UnTrack:void*:op:: + +PyObject_GenericGetAttr:PyObject*::+1: +PyObject_GenericGetAttr:PyObject*:o:0: +PyObject_GenericGetAttr:PyObject*:name:0: + +PyObject_GenericGetDict:PyObject*::+1: +PyObject_GenericGetDict:PyObject*:o:0: +PyObject_GenericGetDict:void*:context:: + +PyObject_GenericSetAttr:int::: +PyObject_GenericSetAttr:PyObject*:o:0: +PyObject_GenericSetAttr:PyObject*:name:0: +PyObject_GenericSetAttr:PyObject*:value:+1: + +PyObject_GenericSetDict:int::: +PyObject_GenericSetDict:PyObject*:o:0: +PyObject_GenericSetDict:PyObject*:value:+1: +PyObject_GenericSetDict:void*:context:: + +PyObject_GetAttr:PyObject*::+1: +PyObject_GetAttr:PyObject*:o:0: +PyObject_GetAttr:PyObject*:attr_name:0: + +PyObject_GetAttrString:PyObject*::+1: +PyObject_GetAttrString:PyObject*:o:0: +PyObject_GetAttrString:const char*:attr_name:: + +PyObject_GetBuffer:int::: +PyObject_GetBuffer:PyObject*:exporter:0: +PyObject_GetBuffer:Py_buffer*:view:: +PyObject_GetBuffer:int:flags:: + +PyObject_GetItem:PyObject*::+1: +PyObject_GetItem:PyObject*:o:0: +PyObject_GetItem:PyObject*:key:0: + +PyObject_GetIter:PyObject*::+1: +PyObject_GetIter:PyObject*:o:0: + +PyObject_GetAIter:PyObject*::+1: +PyObject_GetAIter:PyObject*:o:0: + +PyObject_HasAttr:int::: +PyObject_HasAttr:PyObject*:o:0: +PyObject_HasAttr:PyObject*:attr_name:0: + +PyObject_HasAttrString:int::: +PyObject_HasAttrString:PyObject*:o:0: +PyObject_HasAttrString:const char*:attr_name:: + +PyObject_Hash:int::: +PyObject_Hash:PyObject*:o:0: + +PyObject_HashNotImplemented:Py_hash_t::: +PyObject_HashNotImplemented:PyObject*:o:0: + +PyObject_IsInstance:int::: +PyObject_IsInstance:PyObject*:inst:0: +PyObject_IsInstance:PyObject*:cls:0: + +PyObject_IsSubclass:int::: +PyObject_IsSubclass:PyObject*:derived:0: +PyObject_IsSubclass:PyObject*:cls:0: + +PyObject_IsTrue:int::: +PyObject_IsTrue:PyObject*:o:0: + +PyObject_Init:PyObject*::0: +PyObject_Init:PyObject*:op:0: +PyObject_Init:PyTypeObject*:type:0: + +PyObject_InitVar:PyVarObject*::0: +PyObject_InitVar:PyVarObject*:op:0: + +PyObject_Length:Py_ssize_t::: +PyObject_Length:PyObject*:o:0: + +PyObject_LengthHint:Py_ssize_t::: +PyObject_LengthHint:PyObject*:o:0: +PyObject_LengthHint:Py_ssize_t:default:: + +PyObject_NEW:PyObject*::+1: +PyObject_NEW::TYPE:: +PyObject_NEW:PyTypeObject*:type:0: + +PyObject_New:PyObject*::+1: +PyObject_New::TYPE:: +PyObject_New:PyTypeObject*:type:0: + +PyObject_NEW_VAR:PyObject*::+1: +PyObject_NEW_VAR::TYPE:: +PyObject_NEW_VAR:PyTypeObject*:type:0: +PyObject_NEW_VAR:Py_ssize_t:size:: + +PyObject_NewVar:PyObject*::+1: +PyObject_NewVar::TYPE:: +PyObject_NewVar:PyTypeObject*:type:0: +PyObject_NewVar:Py_ssize_t:size:: + +PyObject_Not:int::: +PyObject_Not:PyObject*:o:0: + +PyObject_Print:int::: +PyObject_Print:PyObject*:o:0: +PyObject_Print:FILE*:fp:: +PyObject_Print:int:flags:: + +PyObject_Repr:PyObject*::+1: +PyObject_Repr:PyObject*:o:0: + +PyObject_RichCompare:PyObject*::+1: +PyObject_RichCompare:PyObject*:o1:0: +PyObject_RichCompare:PyObject*:o2:0: +PyObject_RichCompare:int:opid:: + +PyObject_RichCompareBool:int::: +PyObject_RichCompareBool:PyObject*:o1:0: +PyObject_RichCompareBool:PyObject*:o2:0: +PyObject_RichCompareBool:int:opid:: + +PyObject_SetAttr:int::: +PyObject_SetAttr:PyObject*:o:0: +PyObject_SetAttr:PyObject*:attr_name:0: +PyObject_SetAttr:PyObject*:v:+1: + +PyObject_SetAttrString:int::: +PyObject_SetAttrString:PyObject*:o:0: +PyObject_SetAttrString:const char*:attr_name:: +PyObject_SetAttrString:PyObject*:v:+1: + +PyObject_SetItem:int::: +PyObject_SetItem:PyObject*:o:0: +PyObject_SetItem:PyObject*:key:0: +PyObject_SetItem:PyObject*:v:+1: + +PyObject_Size:Py_ssize_t::: +PyObject_Size:PyObject*:o:0: + +PyObject_Str:PyObject*::+1: +PyObject_Str:PyObject*:o:0: + +PyObject_Type:PyObject*::+1: +PyObject_Type:PyObject*:o:0: + +PyObject_TypeCheck:int::: +PyObject_TypeCheck:PyObject*:o:0: +PyObject_TypeCheck:PyTypeObject*:type:0: + +PyRun_AnyFile:int::: +PyRun_AnyFile:FILE*:fp:: +PyRun_AnyFile:const char*:filename:: + +PyRun_AnyFileFlags:int::: +PyRun_AnyFileFlags:FILE*:fp:: +PyRun_AnyFileFlags:const char*:filename:: +PyRun_AnyFileFlags:PyCompilerFlags*:flags:: + +PyRun_AnyFileEx:int::: +PyRun_AnyFileEx:FILE*:fp:: +PyRun_AnyFileEx:const char*:filename:: +PyRun_AnyFileEx:int:closeit:: + +PyRun_AnyFileExFlags:int::: +PyRun_AnyFileExFlags:FILE*:fp:: +PyRun_AnyFileExFlags:const char*:filename:: +PyRun_AnyFileExFlags:int:closeit:: +PyRun_AnyFileExFlags:PyCompilerFlags*:flags:: + +PyRun_File:PyObject*::+1:??? -- same as eval_code2() +PyRun_File:FILE*:fp:: +PyRun_File:const char*:filename:: +PyRun_File:int:start:: +PyRun_File:PyObject*:globals:0: +PyRun_File:PyObject*:locals:0: + +PyRun_FileEx:PyObject*::+1:??? -- same as eval_code2() +PyRun_FileEx:FILE*:fp:: +PyRun_FileEx:const char*:filename:: +PyRun_FileEx:int:start:: +PyRun_FileEx:PyObject*:globals:0: +PyRun_FileEx:PyObject*:locals:0: +PyRun_FileEx:int:closeit:: + +PyRun_FileFlags:PyObject*::+1:??? -- same as eval_code2() +PyRun_FileFlags:FILE*:fp:: +PyRun_FileFlags:const char*:filename:: +PyRun_FileFlags:int:start:: +PyRun_FileFlags:PyObject*:globals:0: +PyRun_FileFlags:PyObject*:locals:0: +PyRun_FileFlags:PyCompilerFlags*:flags:: + +PyRun_FileExFlags:PyObject*::+1:??? -- same as eval_code2() +PyRun_FileExFlags:FILE*:fp:: +PyRun_FileExFlags:const char*:filename:: +PyRun_FileExFlags:int:start:: +PyRun_FileExFlags:PyObject*:globals:0: +PyRun_FileExFlags:PyObject*:locals:0: +PyRun_FileExFlags:int:closeit:: +PyRun_FileExFlags:PyCompilerFlags*:flags:: + +PyRun_InteractiveLoop:int::: +PyRun_InteractiveLoop:FILE*:fp:: +PyRun_InteractiveLoop:const char*:filename:: + +PyRun_InteractiveLoopFlags:int::: +PyRun_InteractiveLoopFlags:FILE*:fp:: +PyRun_InteractiveLoopFlags:const char*:filename:: +PyRun_InteractiveLoopFlags:PyCompilerFlags*:flags:: + +PyRun_InteractiveOne:int::: +PyRun_InteractiveOne:FILE*:fp:: +PyRun_InteractiveOne:const char*:filename:: + +PyRun_InteractiveOneFlags:int::: +PyRun_InteractiveOneFlags:FILE*:fp:: +PyRun_InteractiveOneFlags:const char*:filename:: +PyRun_InteractiveOneFlags:PyCompilerFlags*:flags:: + +PyRun_SimpleFile:int::: +PyRun_SimpleFile:FILE*:fp:: +PyRun_SimpleFile:const char*:filename:: + +PyRun_SimpleFileEx:int::: +PyRun_SimpleFileEx:FILE*:fp:: +PyRun_SimpleFileEx:const char*:filename:: +PyRun_SimpleFileEx:int:closeit:: + +PyRun_SimpleFileExFlags:int::: +PyRun_SimpleFileExFlags:FILE*:fp:: +PyRun_SimpleFileExFlags:const char*:filename:: +PyRun_SimpleFileExFlags:int:closeit:: +PyRun_SimpleFileExFlags:PyCompilerFlags*:flags:: + +PyRun_SimpleString:int::: +PyRun_SimpleString:const char*:command:: + +PyRun_SimpleStringFlags:int::: +PyRun_SimpleStringFlags:const char*:command:: +PyRun_SimpleStringFlags:PyCompilerFlags*:flags:: + +PyRun_String:PyObject*::+1:??? -- same as eval_code2() +PyRun_String:const char*:str:: +PyRun_String:int:start:: +PyRun_String:PyObject*:globals:0: +PyRun_String:PyObject*:locals:0: + +PyRun_StringFlags:PyObject*::+1:??? -- same as eval_code2() +PyRun_StringFlags:const char*:str:: +PyRun_StringFlags:int:start:: +PyRun_StringFlags:PyObject*:globals:0: +PyRun_StringFlags:PyObject*:locals:0: +PyRun_StringFlags:PyCompilerFlags*:flags:: + +PySeqIter_Check:int::: +PySeqIter_Check::op:: + +PySeqIter_New:PyObject*::+1: +PySeqIter_New:PyObject*:seq:: + +PySequence_Check:int::: +PySequence_Check:PyObject*:o:0: + +PySequence_Concat:PyObject*::+1: +PySequence_Concat:PyObject*:o1:0: +PySequence_Concat:PyObject*:o2:0: + +PySequence_Contains:int::: +PySequence_Contains:PyObject*:o:0: +PySequence_Contains:PyObject*:value:0: + +PySequence_Count:Py_ssize_t::: +PySequence_Count:PyObject*:o:0: +PySequence_Count:PyObject*:value:0: + +PySequence_DelItem:int::: +PySequence_DelItem:PyObject*:o:0: +PySequence_DelItem:Py_ssize_t:i:: + +PySequence_DelSlice:int::: +PySequence_DelSlice:PyObject*:o:0: +PySequence_DelSlice:Py_ssize_t:i1:: +PySequence_DelSlice:Py_ssize_t:i2:: + +PySequence_Fast:PyObject*::+1: +PySequence_Fast:PyObject*:v:0: +PySequence_Fast:const char*:m:: + +PySequence_Fast_GET_ITEM:PyObject*::0: +PySequence_Fast_GET_ITEM:PyObject*:o:0: +PySequence_Fast_GET_ITEM:Py_ssize_t:i:: + +PySequence_Fast_GET_SIZE:Py_ssize_t::: +PySequence_Fast_GET_SIZE:PyObject*:o:0: + +PySequence_Fast_ITEMS:PyObject**::: +PySequence_Fast_ITEMS:PyObject*:o:0: + +PySequence_GetItem:PyObject*::+1: +PySequence_GetItem:PyObject*:o:0: +PySequence_GetItem:Py_ssize_t:i:: + +PySequence_GetSlice:PyObject*::+1: +PySequence_GetSlice:PyObject*:o:0: +PySequence_GetSlice:Py_ssize_t:i1:: +PySequence_GetSlice:Py_ssize_t:i2:: + +PySequence_In:int::: +PySequence_In:PyObject*:o:0: +PySequence_In:PyObject*:value:0: + +PySequence_Index:Py_ssize_t::: +PySequence_Index:PyObject*:o:0: +PySequence_Index:PyObject*:value:0: + +PySequence_InPlaceConcat:PyObject*::+1: +PySequence_InPlaceConcat:PyObject*:s:0: +PySequence_InPlaceConcat:PyObject*:o:0: + +PySequence_InPlaceRepeat:PyObject*::+1: +PySequence_InPlaceRepeat:PyObject*:s:0: +PySequence_InPlaceRepeat:PyObject*:o:0: + +PySequence_ITEM:PyObject*::+1: +PySequence_ITEM:PyObject*:o:0: +PySequence_ITEM:Py_ssize_t:i:: + +PySequence_Repeat:PyObject*::+1: +PySequence_Repeat:PyObject*:o:0: +PySequence_Repeat:Py_ssize_t:count:: + +PySequence_SetItem:int::: +PySequence_SetItem:PyObject*:o:0: +PySequence_SetItem:Py_ssize_t:i:: +PySequence_SetItem:PyObject*:v:+1: + +PySequence_SetSlice:int::: +PySequence_SetSlice:PyObject*:o:0: +PySequence_SetSlice:Py_ssize_t:i1:: +PySequence_SetSlice:Py_ssize_t:i2:: +PySequence_SetSlice:PyObject*:v:0: + +PySequence_Size:Py_ssize_t::: +PySequence_Size:PyObject*:o:0: + +PySequence_List:PyObject*::+1: +PySequence_List:PyObject*:o:0: + +PySequence_Tuple:PyObject*::+1: +PySequence_Tuple:PyObject*:o:0: + +PySet_Add:int::: +PySet_Add:PyObject*:set:0: +PySet_Add:PyObject*:key:+1: + +PySet_Check:int::: +PySet_Check:PyObject*:p:0: + +PySet_Clear:int::: +PySet_Clear:PyObject*:set:0: + +PySet_Contains:int::: +PySet_Contains:PyObject*:anyset:0: +PySet_Contains:PyObject*:key:0: + +PySet_Discard:int::: +PySet_Discard:PyObject*:set:0: +PySet_Discard:PyObject*:key:-1:no effect if key not found + +PySet_GET_SIZE:Py_ssize_t::: +PySet_GET_SIZE:PyObject*:anyset:0: + +PySet_New:PyObject*::+1: +PySet_New:PyObject*:iterable:0: + +PySet_Pop:PyObject*::+1:or returns NULL and raises KeyError if set is empty +PySet_Pop:PyObject*:set:0: + +PySet_Size:Py_ssize_t::: +PySet_Size:PyObject*:anyset:0: + +PySignal_SetWakeupFd:int::: +PySignal_SetWakeupFd:int:fd:: + +PySlice_AdjustIndices:Py_ssize_t::: +PySlice_AdjustIndices:Py_ssize_t:length:: +PySlice_AdjustIndices:Py_ssize_t*:start:: +PySlice_AdjustIndices:Py_ssize_t*:stop:: +PySlice_AdjustIndices:Py_ssize_t*:step:: + +PySlice_Check:int::: +PySlice_Check:PyObject*:ob:0: + +PySlice_GetIndices:int::: +PySlice_GetIndices:PyObject*:slice:0: +PySlice_GetIndices:Py_ssize_t:length:: +PySlice_GetIndices:Py_ssize_t*:start:: +PySlice_GetIndices:Py_ssize_t*:stop:: +PySlice_GetIndices:Py_ssize_t*:step:: + +PySlice_GetIndicesEx:int::: +PySlice_GetIndicesEx:PyObject*:slice:0: +PySlice_GetIndicesEx:Py_ssize_t:length:: +PySlice_GetIndicesEx:Py_ssize_t*:start:: +PySlice_GetIndicesEx:Py_ssize_t*:stop:: +PySlice_GetIndicesEx:Py_ssize_t*:step:: +PySlice_GetIndicesEx:Py_ssize_t*:slicelength:: + +PySlice_New:PyObject*::+1: +PySlice_New:PyObject*:start:0: +PySlice_New:PyObject*:stop:0: +PySlice_New:PyObject*:step:0: + +PySlice_Unpack:int::: +PySlice_Unpack:PyObject*:slice:0: +PySlice_Unpack:Py_ssize_t*:start:: +PySlice_Unpack:Py_ssize_t*:stop:: +PySlice_Unpack:Py_ssize_t*:step:: + +PyState_AddModule:int::: +PyState_AddModule:PyObject*:module:+1: +PyState_AddModule:PyModuleDef*:def:: + +PyState_FindModule:PyObject*::0: +PyState_FindModule:PyModuleDef*:def:: + +PyState_RemoveModule:int::: +PyState_RemoveModule:PyModuleDef*:def:: + +PyStructSequence_GET_ITEM:PyObject*::0: +PyStructSequence_GET_ITEM:PyObject*:p:0: +PyStructSequence_GET_ITEM:Py_ssize_t:pos:: + +PyStructSequence_GetItem:PyObject*::0: +PyStructSequence_GetItem:PyObject*:p:0: +PyStructSequence_GetItem:Py_ssize_t:pos:: + +PyStructSequence_InitType:void::: +PyStructSequence_InitType:PyTypeObject*:type:+1: +PyStructSequence_InitType:PyStructSequence_Desc*:desc:: + +PyStructSequence_InitType2:int::: +PyStructSequence_InitType2:PyTypeObject*:type:+1: +PyStructSequence_InitType2:PyStructSequence_Desc*:desc:: + +PyStructSequence_New:PyObject*::+1: +PyStructSequence_New:PyTypeObject*:type:0: + +PyStructSequence_NewType:PyTypeObject*::+1: +PyStructSequence_NewType:PyStructSequence_Desc*:desc:: + +PyStructSequence_SET_ITEM:void::: +PyStructSequence_SET_ITEM:PyObject*:p:0: +PyStructSequence_SET_ITEM:Py_ssize_t*:pos:: +PyStructSequence_SET_ITEM:PyObject*:o:0: + +PyStructSequence_SetItem:void::: +PyStructSequence_SetItem:PyObject*:p:0: +PyStructSequence_SetItem:Py_ssize_t:pos:: +PyStructSequence_SetItem:PyObject*:o:0: + +PySys_AddWarnOption:void::: +PySys_AddWarnOption:const wchar_t*:s:: + +PySys_AddWarnOptionUnicode:void::: +PySys_AddWarnOptionUnicode:PyObject*:unicode:0: + +PySys_AddXOption:void::: +PySys_AddXOption:const wchar_t*:s:: + +PySys_FormatStderr:void::: +PySys_FormatStderr:const char*:format:: +PySys_FormatStderr::...:: + +PySys_FormatStdout:void::: +PySys_FormatStdout:const char*:format:: +PySys_FormatStdout::...:: + +PySys_GetObject:PyObject*::0: +PySys_GetObject:const char*:name:: + +PySys_GetXOptions:PyObject*::0: + +PySys_SetArgv:void::: +PySys_SetArgv:int:argc:: +PySys_SetArgv:wchar_t**:argv:: + +PySys_SetArgvEx:void::: +PySys_SetArgvEx:int:argc:: +PySys_SetArgvEx:wchar_t**:argv:: +PySys_SetArgvEx:int:updatepath:: + +PySys_SetObject:int::: +PySys_SetObject:const char*:name:: +PySys_SetObject:PyObject*:v:+1: + +PySys_ResetWarnOptions:void::: + +PySys_WriteStdout:void::: +PySys_WriteStdout:const char*:format:: +PySys_WriteStdout::...:: + +PySys_WriteStderr:void::: +PySys_WriteStderr:const char*:format:: +PySys_WriteStderr::...:: + +PyThreadState_Clear:void::: +PyThreadState_Clear:PyThreadState*:tstate:: + +PyThreadState_Delete:void::: +PyThreadState_Delete:PyThreadState*:tstate:: + +PyThreadState_Get:PyThreadState*::: + +PyThreadState_GetDict:PyObject*::0: + +PyThreadState_New:PyThreadState*::: +PyThreadState_New:PyInterpreterState*:interp:: + +PyThreadState_SetAsyncExc:int::: +PyThreadState_SetAsyncExc:unsigned long:id:: +PyThreadState_SetAsyncExc:PyObject*:exc:+1: + +PyThreadState_Swap:PyThreadState*::: +PyThreadState_Swap:PyThreadState*:tstate:: + +PyThread_tss_alloc:Py_tss_t*::: + +PyThread_tss_create:int::: +PyThread_tss_create:Py_tss_t*:key:: + +PyThread_tss_delete:void::: +PyThread_tss_delete:Py_tss_t*:key:: + +PyThread_tss_free:void::: +PyThread_tss_free:Py_tss_t*:key:: + +PyThread_tss_get:void*::: +PyThread_tss_get:Py_tss_t*:key:: + +PyThread_tss_is_created:int::: +PyThread_tss_is_created:Py_tss_t*:key:: + +PyThread_tss_set:int::: +PyThread_tss_set:Py_tss_t*:key:: +PyThread_tss_set:void*:value:: + +PyTime_Check:int::: +PyTime_Check:PyObject*:ob:0: + +PyTime_CheckExact:int::: +PyTime_CheckExact:PyObject*:ob:0: + +PyTime_FromTime:PyObject*::+1: +PyTime_FromTime:int:hour:: +PyTime_FromTime:int:minute:: +PyTime_FromTime:int:second:: +PyTime_FromTime:int:usecond:: + +PyTime_FromTimeAndFold:PyObject*::+1: +PyTime_FromTimeAndFold:int:hour:: +PyTime_FromTimeAndFold:int:minute:: +PyTime_FromTimeAndFold:int:second:: +PyTime_FromTimeAndFold:int:usecond:: +PyTime_FromTimeAndFold:int:fold:: + +PyTraceMalloc_Track:int::: +PyTraceMalloc_Track:unsigned int:domain:: +PyTraceMalloc_Track:uintptr_t:ptr:: +PyTraceMalloc_Track:size_t:size:: + +PyTraceMalloc_Untrack:int::: +PyTraceMalloc_Untrack:unsigned int:domain:: +PyTraceMalloc_Untrack:uintptr_t:ptr:: + +PyTuple_Check:int::: +PyTuple_Check:PyObject*:p:0: + +PyTuple_CheckExact:int::: +PyTuple_CheckExact:PyObject*:p:0: + +PyTuple_GET_ITEM:PyObject*::0: +PyTuple_GET_ITEM:PyObject*:p:0: +PyTuple_GET_ITEM:Py_ssize_t:pos:: + +PyTuple_GetItem:PyObject*::0: +PyTuple_GetItem:PyObject*:p:0: +PyTuple_GetItem:Py_ssize_t:pos:: + +PyTuple_GET_SIZE:Py_ssize_t::: +PyTuple_GET_SIZE:PyObject*:p:0: + +PyTuple_GetSlice:PyObject*::+1: +PyTuple_GetSlice:PyObject*:p:0: +PyTuple_GetSlice:Py_ssize_t:low:: +PyTuple_GetSlice:Py_ssize_t:high:: + +PyTuple_New:PyObject*::+1: +PyTuple_New:Py_ssize_t:len:: + +PyTuple_Pack:PyObject*::+1: +PyTuple_Pack:Py_ssize_t:len:: +PyTuple_Pack:PyObject*:...:0: + +PyTuple_SET_ITEM:void::: +PyTuple_SET_ITEM:PyObject*:p:0: +PyTuple_SET_ITEM:Py_ssize_t:pos:: +PyTuple_SET_ITEM:PyObject*:o:0: + +PyTuple_SetItem:int::: +PyTuple_SetItem:PyObject*:p:0: +PyTuple_SetItem:Py_ssize_t:pos:: +PyTuple_SetItem:PyObject*:o:0: + +PyTuple_Size:Py_ssize_t::: +PyTuple_Size:PyObject*:p:0: + +PyType_Check:int::: +PyType_Check:PyObject*:o:0: + +PyType_CheckExact:int::: +PyType_CheckExact:PyObject*:o:0: + +PyType_FromSpec:PyObject*::+1: +PyType_FromSpec:PyType_Spec*:spec:: + +PyType_FromModuleAndSpec:PyObject*::+1: +PyType_FromModuleAndSpec:PyObject*:module:+1: +PyType_FromModuleAndSpec:PyType_Spec*:spec:: +PyType_FromModuleAndSpec:PyObject*:bases:0: + +PyType_FromSpecWithBases:PyObject*::+1: +PyType_FromSpecWithBases:PyType_Spec*:spec:: +PyType_FromSpecWithBases:PyObject*:bases:0: + +PyType_GenericAlloc:PyObject*::+1: +PyType_GenericAlloc:PyObject*:type:0: +PyType_GenericAlloc:Py_ssize_t:nitems:: + +PyType_GenericNew:PyObject*::+1: +PyType_GenericNew:PyObject*:type:0: +PyType_GenericNew:PyObject*:args:0: +PyType_GenericNew:PyObject*:kwds:0: + +PyType_GetFlags:unsigned long::: +PyType_GetFlags:PyTypeObject*:type:0: + +PyType_GetName:PyObject*::+1: +PyType_GetName:PyTypeObject*:type:0: + +PyType_GetQualName:PyObject*::+1: +PyType_GetQualName:PyTypeObject*:type:0: + +PyType_GetSlot:void*::: +PyType_GetSlot:PyTypeObject*:type:0: +PyType_GetSlot:int:slot:: + +PyType_HasFeature:int::: +PyType_HasFeature:PyTypeObject*:o:0: +PyType_HasFeature:int:feature:: + +PyType_IS_GC:int::: +PyType_IS_GC:PyTypeObject*:o:0: + +PyType_IsSubtype:int::: +PyType_IsSubtype:PyTypeObject*:a:0: +PyType_IsSubtype:PyTypeObject*:b:0: + +PyType_Modified:void::: +PyType_Modified:PyTypeObject*:type:0: + +PyType_Ready:int::: +PyType_Ready:PyTypeObject*:type:0: + +PyUnicode_1BYTE_DATA:Py_UCS1*::: +PyUnicode_1BYTE_DATA:PyObject*:o:0: + +PyUnicode_Check:int::: +PyUnicode_Check:PyObject*:o:0: + +PyUnicode_CheckExact:int::: +PyUnicode_CheckExact:PyObject*:o:0: + +PyUnicode_DATA:void*::: +PyUnicode_DATA:PyObject*:o:0: + +PyUnicode_GET_LENGTH:Py_ssize_t::: +PyUnicode_GET_LENGTH:PyObject*:o:0: + +PyUnicode_GET_SIZE:Py_ssize_t::: +PyUnicode_GET_SIZE:PyObject*:o:0: + +PyUnicode_GET_DATA_SIZE:Py_ssize_t::: +PyUnicode_GET_DATA_SIZE:PyObject*:o:0: + +PyUnicode_KIND:int::: +PyUnicode_KIND:PyObject*:o:0: + +PyUnicode_MAX_CHAR_VALUE:::: +PyUnicode_MAX_CHAR_VALUE:PyObject*:o:0: + +PyUnicode_AS_UNICODE:Py_UNICODE*::: +PyUnicode_AS_UNICODE:PyObject*:o:0: + +PyUnicode_AS_DATA:const char*::: +PyUnicode_AS_DATA:PyObject*:o:0: + +Py_UNICODE_ISALNUM:int::: +Py_UNICODE_ISALNUM:Py_UNICODE:ch:: + +Py_UNICODE_ISALPHA:int::: +Py_UNICODE_ISALPHA:Py_UNICODE:ch:: + +Py_UNICODE_ISSPACE:int::: +Py_UNICODE_ISSPACE:Py_UNICODE:ch:: + +Py_UNICODE_ISLOWER:int::: +Py_UNICODE_ISLOWER:Py_UNICODE:ch:: + +Py_UNICODE_ISUPPER:int::: +Py_UNICODE_ISUPPER:Py_UNICODE:ch:: + +Py_UNICODE_ISTITLE:int::: +Py_UNICODE_ISTITLE:Py_UNICODE:ch:: + +Py_UNICODE_ISLINEBREAK:int::: +Py_UNICODE_ISLINEBREAK:Py_UNICODE:ch:: + +Py_UNICODE_ISDECIMAL:int::: +Py_UNICODE_ISDECIMAL:Py_UNICODE:ch:: + +Py_UNICODE_ISDIGIT:int::: +Py_UNICODE_ISDIGIT:Py_UNICODE:ch:: + +Py_UNICODE_ISNUMERIC:int::: +Py_UNICODE_ISNUMERIC:Py_UNICODE:ch:: + +Py_UNICODE_ISPRINTABLE:int::: +Py_UNICODE_ISPRINTABLE:Py_UNICODE:ch:: + +Py_UNICODE_TOLOWER:Py_UNICODE::: +Py_UNICODE_TOLOWER:Py_UNICODE:ch:: + +Py_UNICODE_TOUPPER:Py_UNICODE::: +Py_UNICODE_TOUPPER:Py_UNICODE:ch:: + +Py_UNICODE_TOTITLE:Py_UNICODE::: +Py_UNICODE_TOTITLE:Py_UNICODE:ch:: + +Py_UNICODE_TODECIMAL:int::: +Py_UNICODE_TODECIMAL:Py_UNICODE:ch:: + +Py_UNICODE_TODIGIT:int::: +Py_UNICODE_TODIGIT:Py_UNICODE:ch:: + +Py_UNICODE_TONUMERIC:double::: +Py_UNICODE_TONUMERIC:Py_UNICODE:ch:: + +PyUnicode_FromUnicode:PyObject*::+1: +PyUnicode_FromUnicode:const Py_UNICODE*:u:: +PyUnicode_FromUnicode:Py_ssize_t:size:: + +PyUnicode_AsUnicode:Py_UNICODE*::: +PyUnicode_AsUnicode:PyObject*:unicode:0: + +PyUnicode_AsUnicodeAndSize:Py_UNICODE*::: +PyUnicode_AsUnicodeAndSize:PyObject*:unicode:0: +PyUnicode_AsUnicodeAndSize:Py_ssize_t*:size:: + +PyUnicode_GetSize:Py_ssize_t::: +PyUnicode_GetSize:PyObject*:unicode:0: + +PyUnicode_FromObject:PyObject*::+1: +PyUnicode_FromObject:PyObject*:obj:0: + +PyUnicode_FromEncodedObject:PyObject*::+1: +PyUnicode_FromEncodedObject:PyObject*:obj:0: +PyUnicode_FromEncodedObject:const char*:encoding:: +PyUnicode_FromEncodedObject:const char*:errors:: + +PyUnicode_FromWideChar:PyObject*::+1: +PyUnicode_FromWideChar:const wchar_t*:w:: +PyUnicode_FromWideChar:Py_ssize_t:size:: + +PyUnicode_AsWideChar:Py_ssize_t::: +PyUnicode_AsWideChar:PyObject*:*unicode:0: +PyUnicode_AsWideChar:wchar_t*:w:: +PyUnicode_AsWideChar:Py_ssize_t:size:: + +PyUnicode_AsWideCharString:wchar_t*::: +PyUnicode_AsWideCharString:PyObject*:unicode:0: +PyUnicode_AsWideCharString:Py_ssize_t*:size:: + +PyUnicode_Decode:PyObject*::+1: +PyUnicode_Decode:const char*:s:: +PyUnicode_Decode:Py_ssize_t:size:: +PyUnicode_Decode:const char*:encoding:: +PyUnicode_Decode:const char*:errors:: + +PyUnicode_DecodeUTF16Stateful:PyObject*::+1: +PyUnicode_DecodeUTF16Stateful:const char*:s:: +PyUnicode_DecodeUTF16Stateful:Py_ssize_t:size:: +PyUnicode_DecodeUTF16Stateful:const char*:errors:: +PyUnicode_DecodeUTF16Stateful:int*:byteorder:: +PyUnicode_DecodeUTF16Stateful:Py_ssize_t*:consumed:: + +PyUnicode_DecodeUTF8Stateful:PyObject*::+1: +PyUnicode_DecodeUTF8Stateful:const char*:s:: +PyUnicode_DecodeUTF8Stateful:Py_ssize_t:size:: +PyUnicode_DecodeUTF8Stateful:const char*:errors:: +PyUnicode_DecodeUTF8Stateful:Py_ssize_t*:consumed:: + +PyUnicode_AsEncodedString:PyObject*::+1: +PyUnicode_AsEncodedString:PyObject*:unicode:0: +PyUnicode_AsEncodedString:const char*:encoding:: +PyUnicode_AsEncodedString:const char*:errors:: + +PyUnicode_DecodeUTF7:PyObject*::+1: +PyUnicode_DecodeUTF7:const char*:s:: +PyUnicode_DecodeUTF7:Py_ssize_t:size:: +PyUnicode_DecodeUTF7:const char*:errors:: + +PyUnicode_DecodeUTF7Stateful:PyObject*::+1: +PyUnicode_DecodeUTF7Stateful:const char*:s:: +PyUnicode_DecodeUTF7Stateful:Py_ssize_t:size:: +PyUnicode_DecodeUTF7Stateful:const char*:errors:: +PyUnicode_DecodeUTF7Stateful:Py_ssize_t*:consumed:: + +PyUnicode_DecodeUTF8:PyObject*::+1: +PyUnicode_DecodeUTF8:const char*:s:: +PyUnicode_DecodeUTF8:Py_ssize_t:size:: +PyUnicode_DecodeUTF8:const char*:errors:: + +PyUnicode_AsUTF8String:PyObject*::+1: +PyUnicode_AsUTF8String:PyObject*:unicode:0: + +PyUnicode_AsUTF8AndSize:const char*::: +PyUnicode_AsUTF8AndSize:PyObject*:unicode:0: +PyUnicode_AsUTF8AndSize:Py_ssize_t*:size:0: + +PyUnicode_AsUTF8:const char*::: +PyUnicode_AsUTF8:PyObject*:unicode:0: + +PyUnicode_DecodeUTF16:PyObject*::+1: +PyUnicode_DecodeUTF16:const char*:s:: +PyUnicode_DecodeUTF16:Py_ssize_t:size:: +PyUnicode_DecodeUTF16:const char*:errors:: +PyUnicode_DecodeUTF16:int*:byteorder:: + +PyUnicode_AsUTF16String:PyObject*::+1: +PyUnicode_AsUTF16String:PyObject*:unicode:0: + +PyUnicode_DecodeUTF32:PyObject*::+1: +PyUnicode_DecodeUTF32:const char*:s:: +PyUnicode_DecodeUTF32:Py_ssize_t:size:: +PyUnicode_DecodeUTF32:const char*:errors:: +PyUnicode_DecodeUTF32:int*:byteorder:: + +PyUnicode_DecodeUTF32Stateful:PyObject*::+1: +PyUnicode_DecodeUTF32Stateful:const char*:s:: +PyUnicode_DecodeUTF32Stateful:Py_ssize_t:size:: +PyUnicode_DecodeUTF32Stateful:const char*:errors:: +PyUnicode_DecodeUTF32Stateful:int*:byteorder:: +PyUnicode_DecodeUTF32Stateful:Py_ssize_t*:consumed:: + +PyUnicode_AsUTF32String:PyObject*::+1: +PyUnicode_AsUTF32String:PyObject*:unicode:0: + +PyUnicode_DecodeUnicodeEscape:PyObject*::+1: +PyUnicode_DecodeUnicodeEscape:const char*:s:: +PyUnicode_DecodeUnicodeEscape:Py_ssize_t:size:: +PyUnicode_DecodeUnicodeEscape:const char*:errors:: + +PyUnicode_AsUnicodeEscapeString:PyObject*::+1: +PyUnicode_AsUnicodeEscapeString:PyObject*:unicode:0: + +PyUnicode_DecodeRawUnicodeEscape:PyObject*::+1: +PyUnicode_DecodeRawUnicodeEscape:const char*:s:: +PyUnicode_DecodeRawUnicodeEscape:Py_ssize_t:size:: +PyUnicode_DecodeRawUnicodeEscape:const char*:errors:: + +PyUnicode_AsRawUnicodeEscapeString:PyObject*::+1: +PyUnicode_AsRawUnicodeEscapeString:PyObject*:unicode:0: + +PyUnicode_DecodeLatin1:PyObject*::+1: +PyUnicode_DecodeLatin1:const char*:s:: +PyUnicode_DecodeLatin1:Py_ssize_t:size:: +PyUnicode_DecodeLatin1:const char*:errors:: + +PyUnicode_AsLatin1String:PyObject*::+1: +PyUnicode_AsLatin1String:PyObject*:unicode:0: + +PyUnicode_DecodeASCII:PyObject*::+1: +PyUnicode_DecodeASCII:const char*:s:: +PyUnicode_DecodeASCII:Py_ssize_t:size:: +PyUnicode_DecodeASCII:const char*:errors:: + +PyUnicode_AsASCIIString:PyObject*::+1: +PyUnicode_AsASCIIString:PyObject*:unicode:0: + +PyUnicode_DecodeCharmap:PyObject*::+1: +PyUnicode_DecodeCharmap:const char*:s:: +PyUnicode_DecodeCharmap:Py_ssize_t:size:: +PyUnicode_DecodeCharmap:PyObject*:mapping:0: +PyUnicode_DecodeCharmap:const char*:errors:: + +PyUnicode_AsCharmapString:PyObject*::+1: +PyUnicode_AsCharmapString:PyObject*:unicode:0: +PyUnicode_AsCharmapString:PyObject*:mapping:0: + +PyUnicode_DecodeMBCS:PyObject*::+1: +PyUnicode_DecodeMBCS:const char*:s:: +PyUnicode_DecodeMBCS:Py_ssize_t:size:: +PyUnicode_DecodeMBCS:const char*:errors:: + +PyUnicode_DecodeMBCSStateful:PyObject*::+1: +PyUnicode_DecodeMBCSStateful:const char*:s:: +PyUnicode_DecodeMBCSStateful:Py_ssize_t:size:: +PyUnicode_DecodeMBCSStateful:const char*:errors:: +PyUnicode_DecodeMBCSStateful:Py_ssize_t*:consumed:: + +PyUnicode_EncodeCodePage:PyObject*::+1: +PyUnicode_EncodeCodePage:int:code_page:: +PyUnicode_EncodeCodePage:PyObject*:unicode:0: +PyUnicode_EncodeCodePage:const char*:errors:: + +PyUnicode_AsMBCSString:PyObject*::+1: +PyUnicode_AsMBCSString:PyObject*:unicode:0: + +PyUnicode_Concat:PyObject*::+1: +PyUnicode_Concat:PyObject*:left:0: +PyUnicode_Concat:PyObject*:right:0: + +PyUnicode_Split:PyObject*::+1: +PyUnicode_Split:PyObject*:left:0: +PyUnicode_Split:PyObject*:right:0: +PyUnicode_Split:Py_ssize_t:maxsplit:: + +PyUnicode_Splitlines:PyObject*::+1: +PyUnicode_Splitlines:PyObject*:s:0: +PyUnicode_Splitlines:int:keepend:: + +PyUnicode_Translate:PyObject*::+1: +PyUnicode_Translate:PyObject*:str:0: +PyUnicode_Translate:PyObject*:table:0: +PyUnicode_Translate:const char*:errors:: + +PyUnicode_Join:PyObject*::+1: +PyUnicode_Join:PyObject*:separator:0: +PyUnicode_Join:PyObject*:seq:0: + +PyUnicode_Tailmatch:Py_ssize_t::: +PyUnicode_Tailmatch:PyObject*:str:0: +PyUnicode_Tailmatch:PyObject*:substr:0: +PyUnicode_Tailmatch:Py_ssize_t:start:: +PyUnicode_Tailmatch:Py_ssize_t:end:: +PyUnicode_Tailmatch:int:direction:: + +PyUnicode_Find:Py_ssize_t::: +PyUnicode_Find:PyObject*:str:0: +PyUnicode_Find:PyObject*:substr:0: +PyUnicode_Find:Py_ssize_t:start:: +PyUnicode_Find:Py_ssize_t:end:: +PyUnicode_Find:int:direction:: + +PyUnicode_FindChar:Py_ssize_t::: +PyUnicode_FindChar:PyObject*:str:0: +PyUnicode_FindChar:Py_UCS4:ch:: +PyUnicode_FindChar:Py_ssize_t:start:: +PyUnicode_FindChar:Py_ssize_t:end:: +PyUnicode_FindChar:int:direction:: + +PyUnicode_Count:Py_ssize_t::: +PyUnicode_Count:PyObject*:str:0: +PyUnicode_Count:PyObject*:substr:0: +PyUnicode_Count:Py_ssize_t:start:: +PyUnicode_Count:Py_ssize_t:end:: + +PyUnicode_Replace:PyObject*::+1: +PyUnicode_Replace:PyObject*:str:0: +PyUnicode_Replace:PyObject*:substr:0: +PyUnicode_Replace:PyObject*:replstr:0: +PyUnicode_Replace:Py_ssize_t:maxcount:: + +PyUnicode_Compare:int::: +PyUnicode_Compare:PyObject*:left:0: +PyUnicode_Compare:PyObject*:right:0: + +PyUnicode_CompareWithASCIIString:int::: +PyUnicode_CompareWithASCIIString:PyObject*:uni:0: +PyUnicode_CompareWithASCIIString:const char*:string:: + +PyUnicode_RichCompare:PyObject*::+1: +PyUnicode_RichCompare:PyObject*:left:0: +PyUnicode_RichCompare:PyObject*:right:0: +PyUnicode_RichCompare:int:op:: + +PyUnicode_Format:PyObject*::+1: +PyUnicode_Format:PyObject*:format:0: +PyUnicode_Format:PyObject*:args:0: + +PyUnicode_Contains:int::: +PyUnicode_Contains:PyObject*:container:0: +PyUnicode_Contains:PyObject*:element:0: + +PyUnicode_InternInPlace:void::: +PyUnicode_InternInPlace:PyObject**:string:+1: + +PyUnicode_InternFromString:PyObject*::+1: +PyUnicode_InternFromString:const char*:v:: + +PyUnicode_New:PyObject*::+1: +PyUnicode_New:Py_ssize_t:size:: +PyUnicode_New:Py_UCS4:maxchar:: + +PyUnicode_FromKindAndData:PyObject*::+1: +PyUnicode_FromKindAndData:int:kind:: +PyUnicode_FromKindAndData:const void*:buffer:: +PyUnicode_FromKindAndData:Py_ssize_t:size:: + +PyUnicode_FromStringAndSize:PyObject*::+1: +PyUnicode_FromStringAndSize:const char*:u:: +PyUnicode_FromStringAndSize:Py_ssize_t:size:: + +PyUnicode_FromString:PyObject*::+1: +PyUnicode_FromString:const char*:u:: + +PyUnicode_FromFormat:PyObject*::+1: +PyUnicode_FromFormat:const char*:format:: +PyUnicode_FromFormat::...:: + +PyUnicode_FromFormatV:PyObject*::+1: +PyUnicode_FromFormatV:const char*:format:: +PyUnicode_FromFormatV:va_list:args:: + +PyUnicode_GetLength:Py_ssize_t::: +PyUnicode_GetLength:PyObject*:unicode:0: + +PyUnicode_CopyCharacters:Py_ssize_t::: +PyUnicode_CopyCharacters:PyObject*:to:0: +PyUnicode_CopyCharacters:Py_ssize_t:to_start:: +PyUnicode_CopyCharacters:PyObject*:from:0: +PyUnicode_CopyCharacters:Py_ssize_t:from_start:: +PyUnicode_CopyCharacters:Py_ssize_t:how_many:: + +PyUnicode_Fill:Py_ssize_t::: +PyUnicode_Fill:PyObject*:unicode:0: +PyUnicode_Fill:Py_ssize_t:start:: +PyUnicode_Fill:Py_ssize_t:length:: +PyUnicode_Fill:Py_UCS4:fill_char:: + +PyUnicode_READ:Py_UCS4::: +PyUnicode_READ:int:kind:: +PyUnicode_READ:void*:data:: +PyUnicode_READ:Py_ssize_t:index:: + +PyUnicode_READ_CHAR:Py_UCS4::: +PyUnicode_READ_CHAR:PyObject*:o:0: +PyUnicode_READ_CHAR:Py_ssize_t:index:: + +PyUnicode_ReadChar:Py_UCS4::: +PyUnicode_ReadChar:PyObject*:unicode:0: +PyUnicode_ReadChar:Py_ssize_t:index:: + +PyUnicode_WRITE:void::: +PyUnicode_WRITE:int:kind:: +PyUnicode_WRITE:void*:data:: +PyUnicode_WRITE:Py_ssize_t:index:: +PyUnicode_WRITE:Py_UCS4:value:: + +PyUnicode_WriteChar:int::: +PyUnicode_WriteChar:PyObject*:unicode:0: +PyUnicode_WriteChar:Py_ssize_t:index:: +PyUnicode_WriteChar:Py_UCS4:character:: + +PyUnicode_READY:int::: +PyUnicode_READY:PyObject*:o:0: + +PyUnicode_Substring:PyObject*::+1: +PyUnicode_Substring:PyObject*:str:0: +PyUnicode_Substring:Py_ssize_t:start:: +PyUnicode_Substring:Py_ssize_t:end:: + +PyUnicode_AsUCS4:Py_UCS4*::: +PyUnicode_AsUCS4:PyObject*:u:0: +PyUnicode_AsUCS4:Py_UCS4*:buffer:: +PyUnicode_AsUCS4:Py_ssize_t:buflen:: +PyUnicode_AsUCS4:int:copy_null:: + +PyUnicode_AsUCS4Copy:Py_UCS4*::: +PyUnicode_AsUCS4Copy:PyObject*:u:0: + +PyUnicode_DecodeLocaleAndSize:PyObject*::+1: +PyUnicode_DecodeLocaleAndSize:const char*:str:: +PyUnicode_DecodeLocaleAndSize:Py_ssize_t:len:: +PyUnicode_DecodeLocaleAndSize:const char*:errors:: + +PyUnicode_DecodeLocale:PyObject*::+1: +PyUnicode_DecodeLocale:const char*:str:: +PyUnicode_DecodeLocale:const char*:errors:: + +PyUnicode_EncodeLocale:PyObject*::+1: +PyUnicode_EncodeLocale:PyObject*:unicode:0: +PyUnicode_EncodeLocale:const char*:errors:: + +PyUnicode_FSConverter:int::: +PyUnicode_FSConverter:PyObject*:obj:0: +PyUnicode_FSConverter:void*:result:: + +PyUnicode_FSDecoder:int::: +PyUnicode_FSDecoder:PyObject*:obj:0: +PyUnicode_FSDecoder:void*:result:: + +PyUnicode_DecodeFSDefaultAndSize:PyObject*::+1: +PyUnicode_DecodeFSDefaultAndSize:const char*:s:: +PyUnicode_DecodeFSDefaultAndSize:Py_ssize_t:size:: + +PyUnicode_DecodeFSDefault:PyObject*::+1: +PyUnicode_DecodeFSDefault:const char*:s:: + +PyUnicode_EncodeFSDefault:PyObject*::+1: +PyUnicode_EncodeFSDefault:PyObject*:unicode:0: + +PyUnicodeDecodeError_Create:PyObject*::+1: +PyUnicodeDecodeError_Create:const char*:encoding:: +PyUnicodeDecodeError_Create:const char*:object:: +PyUnicodeDecodeError_Create:Py_ssize_t:length:: +PyUnicodeDecodeError_Create:Py_ssize_t:start:: +PyUnicodeDecodeError_Create:Py_ssize_t:end:: +PyUnicodeDecodeError_Create:const char*:reason:: + +PyUnicodeDecodeError_GetEncoding:PyObject*::+1: +PyUnicodeDecodeError_GetEncoding:PyObject*:exc:0: + +PyUnicodeDecodeError_GetEnd:Py_ssize_t::: +PyUnicodeDecodeError_GetEnd:PyObject*:exc:0: +PyUnicodeDecodeError_GetEnd:Py_ssize_t*:end:: + +PyUnicodeDecodeError_GetObject:PyObject*::+1: +PyUnicodeDecodeError_GetObject:PyObject*:exc:0: + +PyUnicodeDecodeError_GetReason:PyObject*::+1: +PyUnicodeDecodeError_GetReason:PyObject*:exc:0: + +PyUnicodeDecodeError_GetStart:Py_ssize_t::: +PyUnicodeDecodeError_GetStart:PyObject*:exc:0: +PyUnicodeDecodeError_GetStart:Py_ssize_t*:start:: + +PyUnicodeDecodeError_SetEnd:int::: +PyUnicodeDecodeError_SetEnd:PyObject*:exc:0: +PyUnicodeDecodeError_SetEnd:Py_ssize_t:end:: + +PyUnicodeDecodeError_SetReason:int::: +PyUnicodeDecodeError_SetReason:PyObject*:exc:0: +PyUnicodeDecodeError_SetReason:const char*:reason:: + +PyUnicodeDecodeError_SetStart:int::: +PyUnicodeDecodeError_SetStart:PyObject*:exc:0: +PyUnicodeDecodeError_SetStart:Py_ssize_t:start:: + +PyWeakref_Check:int::: +PyWeakref_Check:PyObject*:ob:: + +PyWeakref_CheckProxy:int::: +PyWeakref_CheckProxy:PyObject*:ob:: + +PyWeakref_CheckRef:int::: +PyWeakref_CheckRef:PyObject*:ob:: + +PyWeakref_GET_OBJECT:PyObject*::0: +PyWeakref_GET_OBJECT:PyObject*:ref:0: + +PyWeakref_GetObject:PyObject*::0: +PyWeakref_GetObject:PyObject*:ref:0: + +PyWeakref_NewProxy:PyObject*::+1: +PyWeakref_NewProxy:PyObject*:ob:0: +PyWeakref_NewProxy:PyObject*:callback:0: + +PyWeakref_NewRef:PyObject*::+1: +PyWeakref_NewRef:PyObject*:ob:0: +PyWeakref_NewRef:PyObject*:callback:0: + +PyWrapper_New:PyObject*::+1: +PyWrapper_New:PyObject*:d:0: +PyWrapper_New:PyObject*:self:0: + +Py_AtExit:int::: +Py_AtExit:void (*)():func:: + +Py_BuildValue:PyObject*::+1: +Py_BuildValue:const char*:format:: +Py_BuildValue::...:: + +Py_VaBuildValue:PyObject*::+1: +Py_VaBuildValue:const char*:format:: +Py_VaBuildValue:va_list:vargs:: + +Py_CLEAR:void::: +Py_CLEAR:PyObject*:o:-1: + +Py_CompileString:PyObject*::+1: +Py_CompileString:const char*:str:: +Py_CompileString:const char*:filename:: +Py_CompileString:int:start:: + +Py_CompileStringExFlags:PyObject*::+1: +Py_CompileStringExFlags:const char*:str:: +Py_CompileStringExFlags:const char*:filename:: +Py_CompileStringExFlags:int:start:: +Py_CompileStringExFlags:PyCompilerFlags*:flags:: +Py_CompileStringExFlags:int:optimize:: + +Py_CompileStringFlags:PyObject*::+1: +Py_CompileStringFlags:const char*:str:: +Py_CompileStringFlags:const char*:filename:: +Py_CompileStringFlags:int:start:: +Py_CompileStringFlags:PyCompilerFlags*:flags:: + +Py_CompileStringObject:PyObject*::+1: +Py_CompileStringObject:const char*:str:: +Py_CompileStringObject:PyObject*:filename:0: +Py_CompileStringObject:int:start:: +Py_CompileStringObject:PyCompilerFlags*:flags:: +Py_CompileStringObject:int:optimize:: + +Py_DECREF:void::: +Py_DECREF:PyObject*:o:-1: + +Py_EndInterpreter:void::: +Py_EndInterpreter:PyThreadState*:tstate:: + +Py_Exit:void::: +Py_Exit:int:status:: + +Py_FatalError:void::: +Py_FatalError:const char*:message:: + +Py_FdIsInteractive:int::: +Py_FdIsInteractive:FILE*:fp:: +Py_FdIsInteractive:const char*:filename:: + +Py_Finalize:void::: + +Py_GetBuildInfo:const char*::: + +Py_GetCompiler:const char*::: + +Py_GetCopyright:const char*::: + +Py_GetExecPrefix:wchar_t*::: + +Py_GetPath:wchar_t*::: + +Py_GetPlatform:const char*::: + +Py_GetPrefix:wchar_t*::: + +Py_GetProgramFullPath:wchar_t*::: + +Py_GetProgramName:wchar_t*::: + +Py_GetVersion:const char*::: + +Py_INCREF:void::: +Py_INCREF:PyObject*:o:+1: + +Py_NewRef:void::: +Py_NewRef:PyObject*:o:+1: + +Py_Initialize:void::: + +Py_IsInitialized:int::: + +Py_NewInterpreter:PyThreadState*::: + +Py_ReprEnter:int::: +Py_ReprEnter:PyObject*:object:+1: + +Py_ReprLeave:void::: +Py_ReprLeave:PyObject*:object:-1: + +Py_SetProgramName:void::: +Py_SetProgramName:const wchar_t*:name:: + +Py_XDECREF:void::: +Py_XDECREF:PyObject*:o:-1:if o is not NULL + +Py_XINCREF:void::: +Py_XINCREF:PyObject*:o:+1:if o is not NULL + +Py_XNewRef:void::: +Py_XNewRef:PyObject*:o:+1:if o is not NULL + +_PyImport_Fini:void::: + +_PyObject_New:PyObject*::+1: +_PyObject_New:PyTypeObject*:type:0: + +_PyObject_NewVar:PyVarObject*::+1: +_PyObject_NewVar:PyTypeObject*:type:0: +_PyObject_NewVar:Py_ssize_t:size:: + +_PyBytes_Resize:int::: +_PyBytes_Resize:PyObject**:bytes:0: +_PyBytes_Resize:Py_ssize_t:newsize:: + +_PyTuple_Resize:int::: +_PyTuple_Resize:PyObject**:p:0: +_PyTuple_Resize:Py_ssize_t:new:: + +_Py_c_diff:Py_complex::: +_Py_c_diff:Py_complex:left:: +_Py_c_diff:Py_complex:right:: + +_Py_c_neg:Py_complex::: +_Py_c_neg:Py_complex:complex:: + +_Py_c_pow:Py_complex::: +_Py_c_pow:Py_complex:num:: +_Py_c_pow:Py_complex:exp:: + +_Py_c_prod:Py_complex::: +_Py_c_prod:Py_complex:left:: +_Py_c_prod:Py_complex:right:: + +_Py_c_quot:Py_complex::: +_Py_c_quot:Py_complex:dividend:: +_Py_c_quot:Py_complex:divisor:: + +_Py_c_sum:Py_complex::: +_Py_c_sum:Py_complex:left:: +_Py_c_sum:Py_complex:right::
diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat new file mode 100644 index 0000000..5387d0b --- /dev/null +++ b/Doc/data/stable_abi.dat
@@ -0,0 +1,887 @@ +role,name,added,ifdef_note,struct_abi_kind +function,PyAIter_Check,3.10,, +function,PyArg_Parse,3.2,, +function,PyArg_ParseTuple,3.2,, +function,PyArg_ParseTupleAndKeywords,3.2,, +function,PyArg_UnpackTuple,3.2,, +function,PyArg_VaParse,3.2,, +function,PyArg_VaParseTupleAndKeywords,3.2,, +function,PyArg_ValidateKeywordArguments,3.2,, +var,PyBaseObject_Type,3.2,, +function,PyBool_FromLong,3.2,, +var,PyBool_Type,3.2,, +function,PyBuffer_FillContiguousStrides,3.11,, +function,PyBuffer_FillInfo,3.11,, +function,PyBuffer_FromContiguous,3.11,, +function,PyBuffer_GetPointer,3.11,, +function,PyBuffer_IsContiguous,3.11,, +function,PyBuffer_Release,3.11,, +function,PyBuffer_SizeFromFormat,3.11,, +function,PyBuffer_ToContiguous,3.11,, +var,PyByteArrayIter_Type,3.2,, +function,PyByteArray_AsString,3.2,, +function,PyByteArray_Concat,3.2,, +function,PyByteArray_FromObject,3.2,, +function,PyByteArray_FromStringAndSize,3.2,, +function,PyByteArray_Resize,3.2,, +function,PyByteArray_Size,3.2,, +var,PyByteArray_Type,3.2,, +var,PyBytesIter_Type,3.2,, +function,PyBytes_AsString,3.2,, +function,PyBytes_AsStringAndSize,3.2,, +function,PyBytes_Concat,3.2,, +function,PyBytes_ConcatAndDel,3.2,, +function,PyBytes_DecodeEscape,3.2,, +function,PyBytes_FromFormat,3.2,, +function,PyBytes_FromFormatV,3.2,, +function,PyBytes_FromObject,3.2,, +function,PyBytes_FromString,3.2,, +function,PyBytes_FromStringAndSize,3.2,, +function,PyBytes_Repr,3.2,, +function,PyBytes_Size,3.2,, +var,PyBytes_Type,3.2,, +type,PyCFunction,3.2,, +type,PyCFunctionWithKeywords,3.2,, +function,PyCFunction_Call,3.2,, +function,PyCFunction_GetFlags,3.2,, +function,PyCFunction_GetFunction,3.2,, +function,PyCFunction_GetSelf,3.2,, +function,PyCFunction_New,3.4,, +function,PyCFunction_NewEx,3.2,, +var,PyCFunction_Type,3.2,, +function,PyCMethod_New,3.9,, +function,PyCallIter_New,3.2,, +var,PyCallIter_Type,3.2,, +function,PyCallable_Check,3.2,, +type,PyCapsule_Destructor,3.2,, +function,PyCapsule_GetContext,3.2,, +function,PyCapsule_GetDestructor,3.2,, +function,PyCapsule_GetName,3.2,, +function,PyCapsule_GetPointer,3.2,, +function,PyCapsule_Import,3.2,, +function,PyCapsule_IsValid,3.2,, +function,PyCapsule_New,3.2,, +function,PyCapsule_SetContext,3.2,, +function,PyCapsule_SetDestructor,3.2,, +function,PyCapsule_SetName,3.2,, +function,PyCapsule_SetPointer,3.2,, +var,PyCapsule_Type,3.2,, +var,PyClassMethodDescr_Type,3.2,, +function,PyCodec_BackslashReplaceErrors,3.2,, +function,PyCodec_Decode,3.2,, +function,PyCodec_Decoder,3.2,, +function,PyCodec_Encode,3.2,, +function,PyCodec_Encoder,3.2,, +function,PyCodec_IgnoreErrors,3.2,, +function,PyCodec_IncrementalDecoder,3.2,, +function,PyCodec_IncrementalEncoder,3.2,, +function,PyCodec_KnownEncoding,3.2,, +function,PyCodec_LookupError,3.2,, +function,PyCodec_NameReplaceErrors,3.7,, +function,PyCodec_Register,3.2,, +function,PyCodec_RegisterError,3.2,, +function,PyCodec_ReplaceErrors,3.2,, +function,PyCodec_StreamReader,3.2,, +function,PyCodec_StreamWriter,3.2,, +function,PyCodec_StrictErrors,3.2,, +function,PyCodec_Unregister,3.10,, +function,PyCodec_XMLCharRefReplaceErrors,3.2,, +function,PyComplex_FromDoubles,3.2,, +function,PyComplex_ImagAsDouble,3.2,, +function,PyComplex_RealAsDouble,3.2,, +var,PyComplex_Type,3.2,, +function,PyDescr_NewClassMethod,3.2,, +function,PyDescr_NewGetSet,3.2,, +function,PyDescr_NewMember,3.2,, +function,PyDescr_NewMethod,3.2,, +var,PyDictItems_Type,3.2,, +var,PyDictIterItem_Type,3.2,, +var,PyDictIterKey_Type,3.2,, +var,PyDictIterValue_Type,3.2,, +var,PyDictKeys_Type,3.2,, +function,PyDictProxy_New,3.2,, +var,PyDictProxy_Type,3.2,, +var,PyDictRevIterItem_Type,3.8,, +var,PyDictRevIterKey_Type,3.8,, +var,PyDictRevIterValue_Type,3.8,, +var,PyDictValues_Type,3.2,, +function,PyDict_Clear,3.2,, +function,PyDict_Contains,3.2,, +function,PyDict_Copy,3.2,, +function,PyDict_DelItem,3.2,, +function,PyDict_DelItemString,3.2,, +function,PyDict_GetItem,3.2,, +function,PyDict_GetItemString,3.2,, +function,PyDict_GetItemWithError,3.2,, +function,PyDict_Items,3.2,, +function,PyDict_Keys,3.2,, +function,PyDict_Merge,3.2,, +function,PyDict_MergeFromSeq2,3.2,, +function,PyDict_New,3.2,, +function,PyDict_Next,3.2,, +function,PyDict_SetItem,3.2,, +function,PyDict_SetItemString,3.2,, +function,PyDict_Size,3.2,, +var,PyDict_Type,3.2,, +function,PyDict_Update,3.2,, +function,PyDict_Values,3.2,, +var,PyEllipsis_Type,3.2,, +var,PyEnum_Type,3.2,, +function,PyErr_BadArgument,3.2,, +function,PyErr_BadInternalCall,3.2,, +function,PyErr_CheckSignals,3.2,, +function,PyErr_Clear,3.2,, +function,PyErr_Display,3.2,, +function,PyErr_ExceptionMatches,3.2,, +function,PyErr_Fetch,3.2,, +function,PyErr_Format,3.2,, +function,PyErr_FormatV,3.5,, +function,PyErr_GetExcInfo,3.7,, +function,PyErr_GetHandledException,3.11,, +function,PyErr_GivenExceptionMatches,3.2,, +function,PyErr_NewException,3.2,, +function,PyErr_NewExceptionWithDoc,3.2,, +function,PyErr_NoMemory,3.2,, +function,PyErr_NormalizeException,3.2,, +function,PyErr_Occurred,3.2,, +function,PyErr_Print,3.2,, +function,PyErr_PrintEx,3.2,, +function,PyErr_ProgramText,3.2,, +function,PyErr_ResourceWarning,3.6,, +function,PyErr_Restore,3.2,, +function,PyErr_SetExcFromWindowsErr,3.7,on Windows, +function,PyErr_SetExcFromWindowsErrWithFilename,3.7,on Windows, +function,PyErr_SetExcFromWindowsErrWithFilenameObject,3.7,on Windows, +function,PyErr_SetExcFromWindowsErrWithFilenameObjects,3.7,on Windows, +function,PyErr_SetExcInfo,3.7,, +function,PyErr_SetFromErrno,3.2,, +function,PyErr_SetFromErrnoWithFilename,3.2,, +function,PyErr_SetFromErrnoWithFilenameObject,3.2,, +function,PyErr_SetFromErrnoWithFilenameObjects,3.7,, +function,PyErr_SetFromWindowsErr,3.7,on Windows, +function,PyErr_SetFromWindowsErrWithFilename,3.7,on Windows, +function,PyErr_SetHandledException,3.11,, +function,PyErr_SetImportError,3.7,, +function,PyErr_SetImportErrorSubclass,3.6,, +function,PyErr_SetInterrupt,3.2,, +function,PyErr_SetInterruptEx,3.10,, +function,PyErr_SetNone,3.2,, +function,PyErr_SetObject,3.2,, +function,PyErr_SetString,3.2,, +function,PyErr_SyntaxLocation,3.2,, +function,PyErr_SyntaxLocationEx,3.7,, +function,PyErr_WarnEx,3.2,, +function,PyErr_WarnExplicit,3.2,, +function,PyErr_WarnFormat,3.2,, +function,PyErr_WriteUnraisable,3.2,, +function,PyEval_AcquireLock,3.2,, +function,PyEval_AcquireThread,3.2,, +function,PyEval_CallFunction,3.2,, +function,PyEval_CallMethod,3.2,, +function,PyEval_CallObjectWithKeywords,3.2,, +function,PyEval_EvalCode,3.2,, +function,PyEval_EvalCodeEx,3.2,, +function,PyEval_EvalFrame,3.2,, +function,PyEval_EvalFrameEx,3.2,, +function,PyEval_GetBuiltins,3.2,, +function,PyEval_GetFrame,3.2,, +function,PyEval_GetFuncDesc,3.2,, +function,PyEval_GetFuncName,3.2,, +function,PyEval_GetGlobals,3.2,, +function,PyEval_GetLocals,3.2,, +function,PyEval_InitThreads,3.2,, +function,PyEval_ReleaseLock,3.2,, +function,PyEval_ReleaseThread,3.2,, +function,PyEval_RestoreThread,3.2,, +function,PyEval_SaveThread,3.2,, +function,PyEval_ThreadsInitialized,3.2,, +var,PyExc_ArithmeticError,3.2,, +var,PyExc_AssertionError,3.2,, +var,PyExc_AttributeError,3.2,, +var,PyExc_BaseException,3.2,, +var,PyExc_BaseExceptionGroup,3.11,, +var,PyExc_BlockingIOError,3.7,, +var,PyExc_BrokenPipeError,3.7,, +var,PyExc_BufferError,3.2,, +var,PyExc_BytesWarning,3.2,, +var,PyExc_ChildProcessError,3.7,, +var,PyExc_ConnectionAbortedError,3.7,, +var,PyExc_ConnectionError,3.7,, +var,PyExc_ConnectionRefusedError,3.7,, +var,PyExc_ConnectionResetError,3.7,, +var,PyExc_DeprecationWarning,3.2,, +var,PyExc_EOFError,3.2,, +var,PyExc_EncodingWarning,3.10,, +var,PyExc_EnvironmentError,3.2,, +var,PyExc_Exception,3.2,, +var,PyExc_FileExistsError,3.7,, +var,PyExc_FileNotFoundError,3.7,, +var,PyExc_FloatingPointError,3.2,, +var,PyExc_FutureWarning,3.2,, +var,PyExc_GeneratorExit,3.2,, +var,PyExc_IOError,3.2,, +var,PyExc_ImportError,3.2,, +var,PyExc_ImportWarning,3.2,, +var,PyExc_IndentationError,3.2,, +var,PyExc_IndexError,3.2,, +var,PyExc_InterruptedError,3.7,, +var,PyExc_IsADirectoryError,3.7,, +var,PyExc_KeyError,3.2,, +var,PyExc_KeyboardInterrupt,3.2,, +var,PyExc_LookupError,3.2,, +var,PyExc_MemoryError,3.2,, +var,PyExc_ModuleNotFoundError,3.6,, +var,PyExc_NameError,3.2,, +var,PyExc_NotADirectoryError,3.7,, +var,PyExc_NotImplementedError,3.2,, +var,PyExc_OSError,3.2,, +var,PyExc_OverflowError,3.2,, +var,PyExc_PendingDeprecationWarning,3.2,, +var,PyExc_PermissionError,3.7,, +var,PyExc_ProcessLookupError,3.7,, +var,PyExc_RecursionError,3.7,, +var,PyExc_ReferenceError,3.2,, +var,PyExc_ResourceWarning,3.7,, +var,PyExc_RuntimeError,3.2,, +var,PyExc_RuntimeWarning,3.2,, +var,PyExc_StopAsyncIteration,3.7,, +var,PyExc_StopIteration,3.2,, +var,PyExc_SyntaxError,3.2,, +var,PyExc_SyntaxWarning,3.2,, +var,PyExc_SystemError,3.2,, +var,PyExc_SystemExit,3.2,, +var,PyExc_TabError,3.2,, +var,PyExc_TimeoutError,3.7,, +var,PyExc_TypeError,3.2,, +var,PyExc_UnboundLocalError,3.2,, +var,PyExc_UnicodeDecodeError,3.2,, +var,PyExc_UnicodeEncodeError,3.2,, +var,PyExc_UnicodeError,3.2,, +var,PyExc_UnicodeTranslateError,3.2,, +var,PyExc_UnicodeWarning,3.2,, +var,PyExc_UserWarning,3.2,, +var,PyExc_ValueError,3.2,, +var,PyExc_Warning,3.2,, +var,PyExc_WindowsError,3.7,on Windows, +var,PyExc_ZeroDivisionError,3.2,, +function,PyExceptionClass_Name,3.8,, +function,PyException_GetCause,3.2,, +function,PyException_GetContext,3.2,, +function,PyException_GetTraceback,3.2,, +function,PyException_SetCause,3.2,, +function,PyException_SetContext,3.2,, +function,PyException_SetTraceback,3.2,, +function,PyFile_FromFd,3.2,, +function,PyFile_GetLine,3.2,, +function,PyFile_WriteObject,3.2,, +function,PyFile_WriteString,3.2,, +var,PyFilter_Type,3.2,, +function,PyFloat_AsDouble,3.2,, +function,PyFloat_FromDouble,3.2,, +function,PyFloat_FromString,3.2,, +function,PyFloat_GetInfo,3.2,, +function,PyFloat_GetMax,3.2,, +function,PyFloat_GetMin,3.2,, +var,PyFloat_Type,3.2,, +type,PyFrameObject,3.2,,opaque +function,PyFrame_GetCode,3.10,, +function,PyFrame_GetLineNumber,3.10,, +function,PyFrozenSet_New,3.2,, +var,PyFrozenSet_Type,3.2,, +function,PyGC_Collect,3.2,, +function,PyGC_Disable,3.10,, +function,PyGC_Enable,3.10,, +function,PyGC_IsEnabled,3.10,, +function,PyGILState_Ensure,3.2,, +function,PyGILState_GetThisThreadState,3.2,, +function,PyGILState_Release,3.2,, +type,PyGILState_STATE,3.2,, +type,PyGetSetDef,3.2,,full-abi +var,PyGetSetDescr_Type,3.2,, +function,PyImport_AddModule,3.2,, +function,PyImport_AddModuleObject,3.7,, +function,PyImport_AppendInittab,3.2,, +function,PyImport_ExecCodeModule,3.2,, +function,PyImport_ExecCodeModuleEx,3.2,, +function,PyImport_ExecCodeModuleObject,3.7,, +function,PyImport_ExecCodeModuleWithPathnames,3.2,, +function,PyImport_GetImporter,3.2,, +function,PyImport_GetMagicNumber,3.2,, +function,PyImport_GetMagicTag,3.2,, +function,PyImport_GetModule,3.8,, +function,PyImport_GetModuleDict,3.2,, +function,PyImport_Import,3.2,, +function,PyImport_ImportFrozenModule,3.2,, +function,PyImport_ImportFrozenModuleObject,3.7,, +function,PyImport_ImportModule,3.2,, +function,PyImport_ImportModuleLevel,3.2,, +function,PyImport_ImportModuleLevelObject,3.7,, +function,PyImport_ImportModuleNoBlock,3.2,, +function,PyImport_ReloadModule,3.2,, +function,PyIndex_Check,3.8,, +type,PyInterpreterState,3.2,,opaque +function,PyInterpreterState_Clear,3.2,, +function,PyInterpreterState_Delete,3.2,, +function,PyInterpreterState_Get,3.9,, +function,PyInterpreterState_GetDict,3.8,, +function,PyInterpreterState_GetID,3.7,, +function,PyInterpreterState_New,3.2,, +function,PyIter_Check,3.8,, +function,PyIter_Next,3.2,, +function,PyIter_Send,3.10,, +var,PyListIter_Type,3.2,, +var,PyListRevIter_Type,3.2,, +function,PyList_Append,3.2,, +function,PyList_AsTuple,3.2,, +function,PyList_GetItem,3.2,, +function,PyList_GetSlice,3.2,, +function,PyList_Insert,3.2,, +function,PyList_New,3.2,, +function,PyList_Reverse,3.2,, +function,PyList_SetItem,3.2,, +function,PyList_SetSlice,3.2,, +function,PyList_Size,3.2,, +function,PyList_Sort,3.2,, +var,PyList_Type,3.2,, +type,PyLongObject,3.2,,opaque +var,PyLongRangeIter_Type,3.2,, +function,PyLong_AsDouble,3.2,, +function,PyLong_AsLong,3.2,, +function,PyLong_AsLongAndOverflow,3.2,, +function,PyLong_AsLongLong,3.2,, +function,PyLong_AsLongLongAndOverflow,3.2,, +function,PyLong_AsSize_t,3.2,, +function,PyLong_AsSsize_t,3.2,, +function,PyLong_AsUnsignedLong,3.2,, +function,PyLong_AsUnsignedLongLong,3.2,, +function,PyLong_AsUnsignedLongLongMask,3.2,, +function,PyLong_AsUnsignedLongMask,3.2,, +function,PyLong_AsVoidPtr,3.2,, +function,PyLong_FromDouble,3.2,, +function,PyLong_FromLong,3.2,, +function,PyLong_FromLongLong,3.2,, +function,PyLong_FromSize_t,3.2,, +function,PyLong_FromSsize_t,3.2,, +function,PyLong_FromString,3.2,, +function,PyLong_FromUnsignedLong,3.2,, +function,PyLong_FromUnsignedLongLong,3.2,, +function,PyLong_FromVoidPtr,3.2,, +function,PyLong_GetInfo,3.2,, +var,PyLong_Type,3.2,, +var,PyMap_Type,3.2,, +function,PyMapping_Check,3.2,, +function,PyMapping_GetItemString,3.2,, +function,PyMapping_HasKey,3.2,, +function,PyMapping_HasKeyString,3.2,, +function,PyMapping_Items,3.2,, +function,PyMapping_Keys,3.2,, +function,PyMapping_Length,3.2,, +function,PyMapping_SetItemString,3.2,, +function,PyMapping_Size,3.2,, +function,PyMapping_Values,3.2,, +function,PyMem_Calloc,3.7,, +function,PyMem_Free,3.2,, +function,PyMem_Malloc,3.2,, +function,PyMem_Realloc,3.2,, +type,PyMemberDef,3.2,,full-abi +var,PyMemberDescr_Type,3.2,, +function,PyMemoryView_FromBuffer,3.11,, +function,PyMemoryView_FromMemory,3.7,, +function,PyMemoryView_FromObject,3.2,, +function,PyMemoryView_GetContiguous,3.2,, +var,PyMemoryView_Type,3.2,, +type,PyMethodDef,3.2,,full-abi +var,PyMethodDescr_Type,3.2,, +type,PyModuleDef,3.2,,full-abi +type,PyModuleDef_Base,3.2,,full-abi +function,PyModuleDef_Init,3.5,, +var,PyModuleDef_Type,3.5,, +function,PyModule_AddFunctions,3.7,, +function,PyModule_AddIntConstant,3.2,, +function,PyModule_AddObject,3.2,, +function,PyModule_AddObjectRef,3.10,, +function,PyModule_AddStringConstant,3.2,, +function,PyModule_AddType,3.10,, +function,PyModule_Create2,3.2,, +function,PyModule_ExecDef,3.7,, +function,PyModule_FromDefAndSpec2,3.7,, +function,PyModule_GetDef,3.2,, +function,PyModule_GetDict,3.2,, +function,PyModule_GetFilename,3.2,, +function,PyModule_GetFilenameObject,3.2,, +function,PyModule_GetName,3.2,, +function,PyModule_GetNameObject,3.7,, +function,PyModule_GetState,3.2,, +function,PyModule_New,3.2,, +function,PyModule_NewObject,3.7,, +function,PyModule_SetDocString,3.7,, +var,PyModule_Type,3.2,, +function,PyNumber_Absolute,3.2,, +function,PyNumber_Add,3.2,, +function,PyNumber_And,3.2,, +function,PyNumber_AsSsize_t,3.2,, +function,PyNumber_Check,3.2,, +function,PyNumber_Divmod,3.2,, +function,PyNumber_Float,3.2,, +function,PyNumber_FloorDivide,3.2,, +function,PyNumber_InPlaceAdd,3.2,, +function,PyNumber_InPlaceAnd,3.2,, +function,PyNumber_InPlaceFloorDivide,3.2,, +function,PyNumber_InPlaceLshift,3.2,, +function,PyNumber_InPlaceMatrixMultiply,3.7,, +function,PyNumber_InPlaceMultiply,3.2,, +function,PyNumber_InPlaceOr,3.2,, +function,PyNumber_InPlacePower,3.2,, +function,PyNumber_InPlaceRemainder,3.2,, +function,PyNumber_InPlaceRshift,3.2,, +function,PyNumber_InPlaceSubtract,3.2,, +function,PyNumber_InPlaceTrueDivide,3.2,, +function,PyNumber_InPlaceXor,3.2,, +function,PyNumber_Index,3.2,, +function,PyNumber_Invert,3.2,, +function,PyNumber_Long,3.2,, +function,PyNumber_Lshift,3.2,, +function,PyNumber_MatrixMultiply,3.7,, +function,PyNumber_Multiply,3.2,, +function,PyNumber_Negative,3.2,, +function,PyNumber_Or,3.2,, +function,PyNumber_Positive,3.2,, +function,PyNumber_Power,3.2,, +function,PyNumber_Remainder,3.2,, +function,PyNumber_Rshift,3.2,, +function,PyNumber_Subtract,3.2,, +function,PyNumber_ToBase,3.2,, +function,PyNumber_TrueDivide,3.2,, +function,PyNumber_Xor,3.2,, +function,PyOS_AfterFork,3.2,on platforms with fork(), +function,PyOS_AfterFork_Child,3.7,on platforms with fork(), +function,PyOS_AfterFork_Parent,3.7,on platforms with fork(), +function,PyOS_BeforeFork,3.7,on platforms with fork(), +function,PyOS_CheckStack,3.7,on platforms with USE_STACKCHECK, +function,PyOS_FSPath,3.6,, +var,PyOS_InputHook,3.2,, +function,PyOS_InterruptOccurred,3.2,, +function,PyOS_double_to_string,3.2,, +function,PyOS_getsig,3.2,, +function,PyOS_mystricmp,3.2,, +function,PyOS_mystrnicmp,3.2,, +function,PyOS_setsig,3.2,, +type,PyOS_sighandler_t,3.2,, +function,PyOS_snprintf,3.2,, +function,PyOS_string_to_double,3.2,, +function,PyOS_strtol,3.2,, +function,PyOS_strtoul,3.2,, +function,PyOS_vsnprintf,3.2,, +type,PyObject,3.2,,members +member,PyObject.ob_refcnt,3.2,, +member,PyObject.ob_type,3.2,, +function,PyObject_ASCII,3.2,, +function,PyObject_AsCharBuffer,3.2,, +function,PyObject_AsFileDescriptor,3.2,, +function,PyObject_AsReadBuffer,3.2,, +function,PyObject_AsWriteBuffer,3.2,, +function,PyObject_Bytes,3.2,, +function,PyObject_Call,3.2,, +function,PyObject_CallFunction,3.2,, +function,PyObject_CallFunctionObjArgs,3.2,, +function,PyObject_CallMethod,3.2,, +function,PyObject_CallMethodObjArgs,3.2,, +function,PyObject_CallNoArgs,3.10,, +function,PyObject_CallObject,3.2,, +function,PyObject_Calloc,3.7,, +function,PyObject_CheckBuffer,3.11,, +function,PyObject_CheckReadBuffer,3.2,, +function,PyObject_ClearWeakRefs,3.2,, +function,PyObject_CopyData,3.11,, +function,PyObject_DelItem,3.2,, +function,PyObject_DelItemString,3.2,, +function,PyObject_Dir,3.2,, +function,PyObject_Format,3.2,, +function,PyObject_Free,3.2,, +function,PyObject_GC_Del,3.2,, +function,PyObject_GC_IsFinalized,3.9,, +function,PyObject_GC_IsTracked,3.9,, +function,PyObject_GC_Track,3.2,, +function,PyObject_GC_UnTrack,3.2,, +function,PyObject_GenericGetAttr,3.2,, +function,PyObject_GenericGetDict,3.10,, +function,PyObject_GenericSetAttr,3.2,, +function,PyObject_GenericSetDict,3.7,, +function,PyObject_GetAIter,3.10,, +function,PyObject_GetAttr,3.2,, +function,PyObject_GetAttrString,3.2,, +function,PyObject_GetBuffer,3.11,, +function,PyObject_GetItem,3.2,, +function,PyObject_GetIter,3.2,, +function,PyObject_HasAttr,3.2,, +function,PyObject_HasAttrString,3.2,, +function,PyObject_Hash,3.2,, +function,PyObject_HashNotImplemented,3.2,, +function,PyObject_Init,3.2,, +function,PyObject_InitVar,3.2,, +function,PyObject_IsInstance,3.2,, +function,PyObject_IsSubclass,3.2,, +function,PyObject_IsTrue,3.2,, +function,PyObject_Length,3.2,, +function,PyObject_Malloc,3.2,, +function,PyObject_Not,3.2,, +function,PyObject_Realloc,3.2,, +function,PyObject_Repr,3.2,, +function,PyObject_RichCompare,3.2,, +function,PyObject_RichCompareBool,3.2,, +function,PyObject_SelfIter,3.2,, +function,PyObject_SetAttr,3.2,, +function,PyObject_SetAttrString,3.2,, +function,PyObject_SetItem,3.2,, +function,PyObject_Size,3.2,, +function,PyObject_Str,3.2,, +function,PyObject_Type,3.2,, +var,PyProperty_Type,3.2,, +var,PyRangeIter_Type,3.2,, +var,PyRange_Type,3.2,, +var,PyReversed_Type,3.2,, +function,PySeqIter_New,3.2,, +var,PySeqIter_Type,3.2,, +function,PySequence_Check,3.2,, +function,PySequence_Concat,3.2,, +function,PySequence_Contains,3.2,, +function,PySequence_Count,3.2,, +function,PySequence_DelItem,3.2,, +function,PySequence_DelSlice,3.2,, +function,PySequence_Fast,3.2,, +function,PySequence_GetItem,3.2,, +function,PySequence_GetSlice,3.2,, +function,PySequence_In,3.2,, +function,PySequence_InPlaceConcat,3.2,, +function,PySequence_InPlaceRepeat,3.2,, +function,PySequence_Index,3.2,, +function,PySequence_Length,3.2,, +function,PySequence_List,3.2,, +function,PySequence_Repeat,3.2,, +function,PySequence_SetItem,3.2,, +function,PySequence_SetSlice,3.2,, +function,PySequence_Size,3.2,, +function,PySequence_Tuple,3.2,, +var,PySetIter_Type,3.2,, +function,PySet_Add,3.2,, +function,PySet_Clear,3.2,, +function,PySet_Contains,3.2,, +function,PySet_Discard,3.2,, +function,PySet_New,3.2,, +function,PySet_Pop,3.2,, +function,PySet_Size,3.2,, +var,PySet_Type,3.2,, +function,PySlice_AdjustIndices,3.7,, +function,PySlice_GetIndices,3.2,, +function,PySlice_GetIndicesEx,3.2,, +function,PySlice_New,3.2,, +var,PySlice_Type,3.2,, +function,PySlice_Unpack,3.7,, +function,PyState_AddModule,3.3,, +function,PyState_FindModule,3.2,, +function,PyState_RemoveModule,3.3,, +type,PyStructSequence_Desc,3.2,,full-abi +type,PyStructSequence_Field,3.2,,full-abi +function,PyStructSequence_GetItem,3.2,, +function,PyStructSequence_New,3.2,, +function,PyStructSequence_NewType,3.2,, +function,PyStructSequence_SetItem,3.2,, +var,PyStructSequence_UnnamedField,3.11,, +var,PySuper_Type,3.2,, +function,PySys_AddWarnOption,3.2,, +function,PySys_AddWarnOptionUnicode,3.2,, +function,PySys_AddXOption,3.7,, +function,PySys_FormatStderr,3.2,, +function,PySys_FormatStdout,3.2,, +function,PySys_GetObject,3.2,, +function,PySys_GetXOptions,3.7,, +function,PySys_HasWarnOptions,3.2,, +function,PySys_ResetWarnOptions,3.2,, +function,PySys_SetArgv,3.2,, +function,PySys_SetArgvEx,3.2,, +function,PySys_SetObject,3.2,, +function,PySys_SetPath,3.2,, +function,PySys_WriteStderr,3.2,, +function,PySys_WriteStdout,3.2,, +type,PyThreadState,3.2,,opaque +function,PyThreadState_Clear,3.2,, +function,PyThreadState_Delete,3.2,, +function,PyThreadState_Get,3.2,, +function,PyThreadState_GetDict,3.2,, +function,PyThreadState_GetFrame,3.10,, +function,PyThreadState_GetID,3.10,, +function,PyThreadState_GetInterpreter,3.10,, +function,PyThreadState_New,3.2,, +function,PyThreadState_SetAsyncExc,3.2,, +function,PyThreadState_Swap,3.2,, +function,PyThread_GetInfo,3.3,, +function,PyThread_ReInitTLS,3.2,, +function,PyThread_acquire_lock,3.2,, +function,PyThread_acquire_lock_timed,3.2,, +function,PyThread_allocate_lock,3.2,, +function,PyThread_create_key,3.2,, +function,PyThread_delete_key,3.2,, +function,PyThread_delete_key_value,3.2,, +function,PyThread_exit_thread,3.2,, +function,PyThread_free_lock,3.2,, +function,PyThread_get_key_value,3.2,, +function,PyThread_get_stacksize,3.2,, +function,PyThread_get_thread_ident,3.2,, +function,PyThread_get_thread_native_id,3.2,on platforms with native thread IDs, +function,PyThread_init_thread,3.2,, +function,PyThread_release_lock,3.2,, +function,PyThread_set_key_value,3.2,, +function,PyThread_set_stacksize,3.2,, +function,PyThread_start_new_thread,3.2,, +function,PyThread_tss_alloc,3.7,, +function,PyThread_tss_create,3.7,, +function,PyThread_tss_delete,3.7,, +function,PyThread_tss_free,3.7,, +function,PyThread_tss_get,3.7,, +function,PyThread_tss_is_created,3.7,, +function,PyThread_tss_set,3.7,, +function,PyTraceBack_Here,3.2,, +function,PyTraceBack_Print,3.2,, +var,PyTraceBack_Type,3.2,, +var,PyTupleIter_Type,3.2,, +function,PyTuple_GetItem,3.2,, +function,PyTuple_GetSlice,3.2,, +function,PyTuple_New,3.2,, +function,PyTuple_Pack,3.2,, +function,PyTuple_SetItem,3.2,, +function,PyTuple_Size,3.2,, +var,PyTuple_Type,3.2,, +type,PyTypeObject,3.2,,opaque +function,PyType_ClearCache,3.2,, +function,PyType_FromModuleAndSpec,3.10,, +function,PyType_FromSpec,3.2,, +function,PyType_FromSpecWithBases,3.3,, +function,PyType_GenericAlloc,3.2,, +function,PyType_GenericNew,3.2,, +function,PyType_GetFlags,3.2,, +function,PyType_GetModule,3.10,, +function,PyType_GetModuleState,3.10,, +function,PyType_GetName,3.11,, +function,PyType_GetQualName,3.11,, +function,PyType_GetSlot,3.4,, +function,PyType_IsSubtype,3.2,, +function,PyType_Modified,3.2,, +function,PyType_Ready,3.2,, +type,PyType_Slot,3.2,,full-abi +type,PyType_Spec,3.2,,full-abi +var,PyType_Type,3.2,, +function,PyUnicodeDecodeError_Create,3.2,, +function,PyUnicodeDecodeError_GetEncoding,3.2,, +function,PyUnicodeDecodeError_GetEnd,3.2,, +function,PyUnicodeDecodeError_GetObject,3.2,, +function,PyUnicodeDecodeError_GetReason,3.2,, +function,PyUnicodeDecodeError_GetStart,3.2,, +function,PyUnicodeDecodeError_SetEnd,3.2,, +function,PyUnicodeDecodeError_SetReason,3.2,, +function,PyUnicodeDecodeError_SetStart,3.2,, +function,PyUnicodeEncodeError_GetEncoding,3.2,, +function,PyUnicodeEncodeError_GetEnd,3.2,, +function,PyUnicodeEncodeError_GetObject,3.2,, +function,PyUnicodeEncodeError_GetReason,3.2,, +function,PyUnicodeEncodeError_GetStart,3.2,, +function,PyUnicodeEncodeError_SetEnd,3.2,, +function,PyUnicodeEncodeError_SetReason,3.2,, +function,PyUnicodeEncodeError_SetStart,3.2,, +var,PyUnicodeIter_Type,3.2,, +function,PyUnicodeTranslateError_GetEnd,3.2,, +function,PyUnicodeTranslateError_GetObject,3.2,, +function,PyUnicodeTranslateError_GetReason,3.2,, +function,PyUnicodeTranslateError_GetStart,3.2,, +function,PyUnicodeTranslateError_SetEnd,3.2,, +function,PyUnicodeTranslateError_SetReason,3.2,, +function,PyUnicodeTranslateError_SetStart,3.2,, +function,PyUnicode_Append,3.2,, +function,PyUnicode_AppendAndDel,3.2,, +function,PyUnicode_AsASCIIString,3.2,, +function,PyUnicode_AsCharmapString,3.2,, +function,PyUnicode_AsDecodedObject,3.2,, +function,PyUnicode_AsDecodedUnicode,3.2,, +function,PyUnicode_AsEncodedObject,3.2,, +function,PyUnicode_AsEncodedString,3.2,, +function,PyUnicode_AsEncodedUnicode,3.2,, +function,PyUnicode_AsLatin1String,3.2,, +function,PyUnicode_AsMBCSString,3.7,on Windows, +function,PyUnicode_AsRawUnicodeEscapeString,3.2,, +function,PyUnicode_AsUCS4,3.7,, +function,PyUnicode_AsUCS4Copy,3.7,, +function,PyUnicode_AsUTF16String,3.2,, +function,PyUnicode_AsUTF32String,3.2,, +function,PyUnicode_AsUTF8AndSize,3.10,, +function,PyUnicode_AsUTF8String,3.2,, +function,PyUnicode_AsUnicodeEscapeString,3.2,, +function,PyUnicode_AsWideChar,3.2,, +function,PyUnicode_AsWideCharString,3.7,, +function,PyUnicode_BuildEncodingMap,3.2,, +function,PyUnicode_Compare,3.2,, +function,PyUnicode_CompareWithASCIIString,3.2,, +function,PyUnicode_Concat,3.2,, +function,PyUnicode_Contains,3.2,, +function,PyUnicode_Count,3.2,, +function,PyUnicode_Decode,3.2,, +function,PyUnicode_DecodeASCII,3.2,, +function,PyUnicode_DecodeCharmap,3.2,, +function,PyUnicode_DecodeCodePageStateful,3.7,on Windows, +function,PyUnicode_DecodeFSDefault,3.2,, +function,PyUnicode_DecodeFSDefaultAndSize,3.2,, +function,PyUnicode_DecodeLatin1,3.2,, +function,PyUnicode_DecodeLocale,3.7,, +function,PyUnicode_DecodeLocaleAndSize,3.7,, +function,PyUnicode_DecodeMBCS,3.7,on Windows, +function,PyUnicode_DecodeMBCSStateful,3.7,on Windows, +function,PyUnicode_DecodeRawUnicodeEscape,3.2,, +function,PyUnicode_DecodeUTF16,3.2,, +function,PyUnicode_DecodeUTF16Stateful,3.2,, +function,PyUnicode_DecodeUTF32,3.2,, +function,PyUnicode_DecodeUTF32Stateful,3.2,, +function,PyUnicode_DecodeUTF7,3.2,, +function,PyUnicode_DecodeUTF7Stateful,3.2,, +function,PyUnicode_DecodeUTF8,3.2,, +function,PyUnicode_DecodeUTF8Stateful,3.2,, +function,PyUnicode_DecodeUnicodeEscape,3.2,, +function,PyUnicode_EncodeCodePage,3.7,on Windows, +function,PyUnicode_EncodeFSDefault,3.2,, +function,PyUnicode_EncodeLocale,3.7,, +function,PyUnicode_FSConverter,3.2,, +function,PyUnicode_FSDecoder,3.2,, +function,PyUnicode_Find,3.2,, +function,PyUnicode_FindChar,3.7,, +function,PyUnicode_Format,3.2,, +function,PyUnicode_FromEncodedObject,3.2,, +function,PyUnicode_FromFormat,3.2,, +function,PyUnicode_FromFormatV,3.2,, +function,PyUnicode_FromObject,3.2,, +function,PyUnicode_FromOrdinal,3.2,, +function,PyUnicode_FromString,3.2,, +function,PyUnicode_FromStringAndSize,3.2,, +function,PyUnicode_FromWideChar,3.2,, +function,PyUnicode_GetDefaultEncoding,3.2,, +function,PyUnicode_GetLength,3.7,, +function,PyUnicode_GetSize,3.2,, +function,PyUnicode_InternFromString,3.2,, +function,PyUnicode_InternImmortal,3.2,, +function,PyUnicode_InternInPlace,3.2,, +function,PyUnicode_IsIdentifier,3.2,, +function,PyUnicode_Join,3.2,, +function,PyUnicode_Partition,3.2,, +function,PyUnicode_RPartition,3.2,, +function,PyUnicode_RSplit,3.2,, +function,PyUnicode_ReadChar,3.7,, +function,PyUnicode_Replace,3.2,, +function,PyUnicode_Resize,3.2,, +function,PyUnicode_RichCompare,3.2,, +function,PyUnicode_Split,3.2,, +function,PyUnicode_Splitlines,3.2,, +function,PyUnicode_Substring,3.7,, +function,PyUnicode_Tailmatch,3.2,, +function,PyUnicode_Translate,3.2,, +var,PyUnicode_Type,3.2,, +function,PyUnicode_WriteChar,3.7,, +type,PyVarObject,3.2,,members +member,PyVarObject.ob_base,3.2,, +member,PyVarObject.ob_size,3.2,, +type,PyWeakReference,3.2,,opaque +function,PyWeakref_GetObject,3.2,, +function,PyWeakref_NewProxy,3.2,, +function,PyWeakref_NewRef,3.2,, +var,PyWrapperDescr_Type,3.2,, +function,PyWrapper_New,3.2,, +var,PyZip_Type,3.2,, +function,Py_AddPendingCall,3.2,, +function,Py_AtExit,3.2,, +macro,Py_BEGIN_ALLOW_THREADS,3.2,, +macro,Py_BLOCK_THREADS,3.2,, +function,Py_BuildValue,3.2,, +function,Py_BytesMain,3.8,, +function,Py_CompileString,3.2,, +function,Py_DecRef,3.2,, +function,Py_DecodeLocale,3.7,, +macro,Py_END_ALLOW_THREADS,3.2,, +function,Py_EncodeLocale,3.7,, +function,Py_EndInterpreter,3.2,, +function,Py_EnterRecursiveCall,3.9,, +function,Py_Exit,3.2,, +function,Py_FatalError,3.2,, +var,Py_FileSystemDefaultEncodeErrors,3.10,, +var,Py_FileSystemDefaultEncoding,3.2,, +function,Py_Finalize,3.2,, +function,Py_FinalizeEx,3.6,, +function,Py_GenericAlias,3.9,, +var,Py_GenericAliasType,3.9,, +function,Py_GetBuildInfo,3.2,, +function,Py_GetCompiler,3.2,, +function,Py_GetCopyright,3.2,, +function,Py_GetExecPrefix,3.2,, +function,Py_GetPath,3.2,, +function,Py_GetPlatform,3.2,, +function,Py_GetPrefix,3.2,, +function,Py_GetProgramFullPath,3.2,, +function,Py_GetProgramName,3.2,, +function,Py_GetPythonHome,3.2,, +function,Py_GetRecursionLimit,3.2,, +function,Py_GetVersion,3.2,, +var,Py_HasFileSystemDefaultEncoding,3.2,, +function,Py_IncRef,3.2,, +function,Py_Initialize,3.2,, +function,Py_InitializeEx,3.2,, +function,Py_Is,3.10,, +function,Py_IsFalse,3.10,, +function,Py_IsInitialized,3.2,, +function,Py_IsNone,3.10,, +function,Py_IsTrue,3.10,, +function,Py_LeaveRecursiveCall,3.9,, +function,Py_Main,3.2,, +function,Py_MakePendingCalls,3.2,, +function,Py_NewInterpreter,3.2,, +function,Py_NewRef,3.10,, +function,Py_ReprEnter,3.2,, +function,Py_ReprLeave,3.2,, +function,Py_SetPath,3.7,, +function,Py_SetProgramName,3.2,, +function,Py_SetPythonHome,3.2,, +function,Py_SetRecursionLimit,3.2,, +type,Py_UCS4,3.2,, +macro,Py_UNBLOCK_THREADS,3.2,, +var,Py_UTF8Mode,3.8,, +function,Py_VaBuildValue,3.2,, +var,Py_Version,3.11,, +function,Py_XNewRef,3.10,, +type,Py_buffer,3.11,,full-abi +type,Py_intptr_t,3.2,, +type,Py_ssize_t,3.2,, +type,Py_uintptr_t,3.2,, +type,allocfunc,3.2,, +type,binaryfunc,3.2,, +type,descrgetfunc,3.2,, +type,descrsetfunc,3.2,, +type,destructor,3.2,, +type,getattrfunc,3.2,, +type,getattrofunc,3.2,, +type,getiterfunc,3.2,, +type,getter,3.2,, +type,hashfunc,3.2,, +type,initproc,3.2,, +type,inquiry,3.2,, +type,iternextfunc,3.2,, +type,lenfunc,3.2,, +type,newfunc,3.2,, +type,objobjargproc,3.2,, +type,objobjproc,3.2,, +type,reprfunc,3.2,, +type,richcmpfunc,3.2,, +type,setattrfunc,3.2,, +type,setattrofunc,3.2,, +type,setter,3.2,, +type,ssizeargfunc,3.2,, +type,ssizeobjargproc,3.2,, +type,ssizessizeargfunc,3.2,, +type,ssizessizeobjargproc,3.2,, +type,symtable,3.2,,opaque +type,ternaryfunc,3.2,, +type,traverseproc,3.2,, +type,unaryfunc,3.2,, +type,visitproc,3.2,,
diff --git a/Doc/distributing/index.rst b/Doc/distributing/index.rst new file mode 100644 index 0000000..8e70c24 --- /dev/null +++ b/Doc/distributing/index.rst
@@ -0,0 +1,175 @@ +.. _distributing-index: + +############################### + Distributing Python Modules +############################### + +:Email: distutils-sig@python.org + + +As a popular open source development project, Python has an active +supporting community of contributors and users that also make their software +available for other Python developers to use under open source license terms. + +This allows Python users to share and collaborate effectively, benefiting +from the solutions others have already created to common (and sometimes +even rare!) problems, as well as potentially contributing their own +solutions to the common pool. + +This guide covers the distribution part of the process. For a guide to +installing other Python projects, refer to the +:ref:`installation guide <installing-index>`. + +.. note:: + + For corporate and other institutional users, be aware that many + organisations have their own policies around using and contributing to + open source software. Please take such policies into account when making + use of the distribution and installation tools provided with Python. + + +Key terms +========= + +* the `Python Package Index <https://pypi.org>`__ is a public + repository of open source licensed packages made available for use by + other Python users +* the `Python Packaging Authority + <https://www.pypa.io/>`__ are the group of + developers and documentation authors responsible for the maintenance and + evolution of the standard packaging tools and the associated metadata and + file format standards. They maintain a variety of tools, documentation + and issue trackers on both `GitHub <https://github.com/pypa>`__ and + `Bitbucket <https://bitbucket.org/pypa/>`__. +* :mod:`distutils` is the original build and distribution system first added + to the Python standard library in 1998. While direct use of :mod:`distutils` + is being phased out, it still laid the foundation for the current packaging + and distribution infrastructure, and it not only remains part of the + standard library, but its name lives on in other ways (such as the name + of the mailing list used to coordinate Python packaging standards + development). +* `setuptools`_ is a (largely) drop-in replacement for :mod:`distutils` first + published in 2004. Its most notable addition over the unmodified + :mod:`distutils` tools was the ability to declare dependencies on other + packages. It is currently recommended as a more regularly updated + alternative to :mod:`distutils` that offers consistent support for more + recent packaging standards across a wide range of Python versions. +* `wheel`_ (in this context) is a project that adds the ``bdist_wheel`` + command to :mod:`distutils`/`setuptools`_. This produces a cross platform + binary packaging format (called "wheels" or "wheel files" and defined in + :pep:`427`) that allows Python libraries, even those including binary + extensions, to be installed on a system without needing to be built + locally. + +.. _setuptools: https://setuptools.readthedocs.io/en/latest/ +.. _wheel: https://wheel.readthedocs.io/ + +Open source licensing and collaboration +======================================= + +In most parts of the world, software is automatically covered by copyright. +This means that other developers require explicit permission to copy, use, +modify and redistribute the software. + +Open source licensing is a way of explicitly granting such permission in a +relatively consistent way, allowing developers to share and collaborate +efficiently by making common solutions to various problems freely available. +This leaves many developers free to spend more time focusing on the problems +that are relatively unique to their specific situation. + +The distribution tools provided with Python are designed to make it +reasonably straightforward for developers to make their own contributions +back to that common pool of software if they choose to do so. + +The same distribution tools can also be used to distribute software within +an organisation, regardless of whether that software is published as open +source software or not. + + +Installing the tools +==================== + +The standard library does not include build tools that support modern +Python packaging standards, as the core development team has found that it +is important to have standard tools that work consistently, even on older +versions of Python. + +The currently recommended build and distribution tools can be installed +by invoking the ``pip`` module at the command line:: + + python -m pip install setuptools wheel twine + +.. note:: + + For POSIX users (including macOS and Linux users), these instructions + assume the use of a :term:`virtual environment`. + + For Windows users, these instructions assume that the option to + adjust the system PATH environment variable was selected when installing + Python. + +The Python Packaging User Guide includes more details on the `currently +recommended tools`_. + +.. _currently recommended tools: https://packaging.python.org/guides/tool-recommendations/#packaging-tool-recommendations + +.. index:: + single: Python Package Index (PyPI) + single: PyPI; (see Python Package Index (PyPI)) + +.. _publishing-python-packages: + +Reading the Python Packaging User Guide +======================================= + +The Python Packaging User Guide covers the various key steps and elements +involved in creating and publishing a project: + +* `Project structure`_ +* `Building and packaging the project`_ +* `Uploading the project to the Python Package Index`_ +* `The .pypirc file`_ + +.. _Project structure: https://packaging.python.org/tutorials/packaging-projects/#packaging-python-projects +.. _Building and packaging the project: https://packaging.python.org/tutorials/packaging-projects/#creating-the-package-files +.. _Uploading the project to the Python Package Index: https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives +.. _The .pypirc file: https://packaging.python.org/specifications/pypirc/ + + +How do I...? +============ + +These are quick answers or links for some common tasks. + +... choose a name for my project? +--------------------------------- + +This isn't an easy topic, but here are a few tips: + +* check the Python Package Index to see if the name is already in use +* check popular hosting sites like GitHub, Bitbucket, etc to see if there + is already a project with that name +* check what comes up in a web search for the name you're considering +* avoid particularly common words, especially ones with multiple meanings, + as they can make it difficult for users to find your software when + searching for it + + +... create and distribute binary extensions? +-------------------------------------------- + +This is actually quite a complex topic, with a variety of alternatives +available depending on exactly what you're aiming to achieve. See the +Python Packaging User Guide for more information and recommendations. + +.. seealso:: + + `Python Packaging User Guide: Binary Extensions + <https://packaging.python.org/guides/packaging-binary-extensions/>`__ + +.. other topics: + + Once the Development & Deployment part of PPUG is fleshed out, some of + those sections should be linked from new questions here (most notably, + we should have a question about avoiding depending on PyPI that links to + https://packaging.python.org/en/latest/mirrors/)
diff --git a/Doc/distutils/_setuptools_disclaimer.rst b/Doc/distutils/_setuptools_disclaimer.rst new file mode 100644 index 0000000..cc75858 --- /dev/null +++ b/Doc/distutils/_setuptools_disclaimer.rst
@@ -0,0 +1,5 @@ +.. note:: + + This document is being retained solely until the ``setuptools`` documentation + at https://setuptools.readthedocs.io/en/latest/setuptools.html + independently covers all of the relevant information currently included here.
diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst new file mode 100644 index 0000000..56bed7d --- /dev/null +++ b/Doc/distutils/apiref.rst
@@ -0,0 +1,2041 @@ +.. _api-reference: + +************* +API Reference +************* + +.. seealso:: + + `New and changed setup.py arguments in setuptools`_ + The ``setuptools`` project adds new capabilities to the ``setup`` function + and other APIs, makes the API consistent across different Python versions, + and is hence recommended over using ``distutils`` directly. + +.. _New and changed setup.py arguments in setuptools: https://web.archive.org/web/20210614192516/https://setuptools.pypa.io/en/stable/userguide/keywords.html + +.. include:: ./_setuptools_disclaimer.rst + +:mod:`distutils.core` --- Core Distutils functionality +====================================================== + +.. module:: distutils.core + :synopsis: The core Distutils functionality + + +The :mod:`distutils.core` module is the only module that needs to be installed +to use the Distutils. It provides the :func:`setup` (which is called from the +setup script). Indirectly provides the :class:`distutils.dist.Distribution` and +:class:`distutils.cmd.Command` class. + + +.. function:: setup(arguments) + + The basic do-everything function that does most everything you could ever ask + for from a Distutils method. + + The setup function takes a large number of arguments. These are laid out in the + following table. + + .. tabularcolumns:: |l|L|L| + + +--------------------+--------------------------------+-------------------------------------------------------------+ + | argument name | value | type | + +====================+================================+=============================================================+ + | *name* | The name of the package | a string | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *version* | The version number of the | a string | + | | package; see | | + | | :mod:`distutils.version` | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *description* | A single line describing the | a string | + | | package | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *long_description* | Longer description of the | a string | + | | package | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *author* | The name of the package author | a string | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *author_email* | The email address of the | a string | + | | package author | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *maintainer* | The name of the current | a string | + | | maintainer, if different from | | + | | the author. Note that if | | + | | the maintainer is provided, | | + | | distutils will use it as the | | + | | author in :file:`PKG-INFO` | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *maintainer_email* | The email address of the | a string | + | | current maintainer, if | | + | | different from the author | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *url* | A URL for the package | a string | + | | (homepage) | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *download_url* | A URL to download the package | a string | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *packages* | A list of Python packages that | a list of strings | + | | distutils will manipulate | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *py_modules* | A list of Python modules that | a list of strings | + | | distutils will manipulate | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *scripts* | A list of standalone script | a list of strings | + | | files to be built and | | + | | installed | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *ext_modules* | A list of Python extensions to | a list of instances of | + | | be built | :class:`distutils.core.Extension` | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *classifiers* | A list of categories for the | a list of strings; valid classifiers are listed on `PyPI | + | | package | <https://pypi.org/classifiers>`_. | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *distclass* | the :class:`Distribution` | a subclass of | + | | class to use | :class:`distutils.core.Distribution` | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *script_name* | The name of the setup.py | a string | + | | script - defaults to | | + | | ``sys.argv[0]`` | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *script_args* | Arguments to supply to the | a list of strings | + | | setup script | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *options* | default options for the setup | a dictionary | + | | script | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *license* | The license for the package | a string | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *keywords* | Descriptive meta-data, see | a list of strings or a comma-separated string | + | | :pep:`314` | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *platforms* | | a list of strings or a comma-separated string | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *cmdclass* | A mapping of command names to | a dictionary | + | | :class:`Command` subclasses | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *data_files* | A list of data files to | a list | + | | install | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + | *package_dir* | A mapping of package to | a dictionary | + | | directory names | | + +--------------------+--------------------------------+-------------------------------------------------------------+ + + + +.. function:: run_setup(script_name[, script_args=None, stop_after='run']) + + Run a setup script in a somewhat controlled environment, and return the + :class:`distutils.dist.Distribution` instance that drives things. This is + useful if you need to find out the distribution meta-data (passed as keyword + args from *script* to :func:`setup`), or the contents of the config files or + command-line. + + *script_name* is a file that will be read and run with :func:`exec`. ``sys.argv[0]`` + will be replaced with *script* for the duration of the call. *script_args* is a + list of strings; if supplied, ``sys.argv[1:]`` will be replaced by *script_args* + for the duration of the call. + + *stop_after* tells :func:`setup` when to stop processing; possible values: + + .. tabularcolumns:: |l|L| + + +---------------+---------------------------------------------+ + | value | description | + +===============+=============================================+ + | *init* | Stop after the :class:`Distribution` | + | | instance has been created and populated | + | | with the keyword arguments to :func:`setup` | + +---------------+---------------------------------------------+ + | *config* | Stop after config files have been parsed | + | | (and their data stored in the | + | | :class:`Distribution` instance) | + +---------------+---------------------------------------------+ + | *commandline* | Stop after the command-line | + | | (``sys.argv[1:]`` or *script_args*) have | + | | been parsed (and the data stored in the | + | | :class:`Distribution` instance.) | + +---------------+---------------------------------------------+ + | *run* | Stop after all commands have been run (the | + | | same as if :func:`setup` had been called | + | | in the usual way). This is the default | + | | value. | + +---------------+---------------------------------------------+ + +In addition, the :mod:`distutils.core` module exposed a number of classes that +live elsewhere. + +* :class:`~distutils.extension.Extension` from :mod:`distutils.extension` + +* :class:`~distutils.cmd.Command` from :mod:`distutils.cmd` + +* :class:`~distutils.dist.Distribution` from :mod:`distutils.dist` + +A short description of each of these follows, but see the relevant module for +the full reference. + + +.. class:: Extension + + The Extension class describes a single C or C++ extension module in a setup + script. It accepts the following keyword arguments in its constructor: + + .. tabularcolumns:: |l|L|l| + + +------------------------+--------------------------------+---------------------------+ + | argument name | value | type | + +========================+================================+===========================+ + | *name* | the full name of the | a string | + | | extension, including any | | + | | packages --- ie. *not* a | | + | | filename or pathname, but | | + | | Python dotted name | | + +------------------------+--------------------------------+---------------------------+ + | *sources* | list of source filenames, | a list of strings | + | | relative to the distribution | | + | | root (where the setup script | | + | | lives), in Unix form | | + | | (slash-separated) for | | + | | portability. | | + | | Source files may be C, C++, | | + | | SWIG (.i), platform-specific | | + | | resource files, or whatever | | + | | else is recognized by the | | + | | :command:`build_ext` command | | + | | as source for a Python | | + | | extension. | | + +------------------------+--------------------------------+---------------------------+ + | *include_dirs* | list of directories to search | a list of strings | + | | for C/C++ header files (in | | + | | Unix form for portability) | | + +------------------------+--------------------------------+---------------------------+ + | *define_macros* | list of macros to define; each | a list of tuples | + | | macro is defined using a | | + | | 2-tuple ``(name, value)``, | | + | | where *value* is | | + | | either the string to define it | | + | | to or ``None`` to define it | | + | | without a particular value | | + | | (equivalent of ``#define FOO`` | | + | | in source or :option:`!-DFOO` | | + | | on Unix C compiler command | | + | | line) | | + +------------------------+--------------------------------+---------------------------+ + | *undef_macros* | list of macros to undefine | a list of strings | + | | explicitly | | + +------------------------+--------------------------------+---------------------------+ + | *library_dirs* | list of directories to search | a list of strings | + | | for C/C++ libraries at link | | + | | time | | + +------------------------+--------------------------------+---------------------------+ + | *libraries* | list of library names (not | a list of strings | + | | filenames or paths) to link | | + | | against | | + +------------------------+--------------------------------+---------------------------+ + | *runtime_library_dirs* | list of directories to search | a list of strings | + | | for C/C++ libraries at run | | + | | time (for shared extensions, | | + | | this is when the extension is | | + | | loaded) | | + +------------------------+--------------------------------+---------------------------+ + | *extra_objects* | list of extra files to link | a list of strings | + | | with (eg. object files not | | + | | implied by 'sources', static | | + | | library that must be | | + | | explicitly specified, binary | | + | | resource files, etc.) | | + +------------------------+--------------------------------+---------------------------+ + | *extra_compile_args* | any extra platform- and | a list of strings | + | | compiler-specific information | | + | | to use when compiling the | | + | | source files in 'sources'. For | | + | | platforms and compilers where | | + | | a command line makes sense, | | + | | this is typically a list of | | + | | command-line arguments, but | | + | | for other platforms it could | | + | | be anything. | | + +------------------------+--------------------------------+---------------------------+ + | *extra_link_args* | any extra platform- and | a list of strings | + | | compiler-specific information | | + | | to use when linking object | | + | | files together to create the | | + | | extension (or to create a new | | + | | static Python interpreter). | | + | | Similar interpretation as for | | + | | 'extra_compile_args'. | | + +------------------------+--------------------------------+---------------------------+ + | *export_symbols* | list of symbols to be exported | a list of strings | + | | from a shared extension. Not | | + | | used on all platforms, and not | | + | | generally necessary for Python | | + | | extensions, which typically | | + | | export exactly one symbol: | | + | | ``init`` + extension_name. | | + +------------------------+--------------------------------+---------------------------+ + | *depends* | list of files that the | a list of strings | + | | extension depends on | | + +------------------------+--------------------------------+---------------------------+ + | *language* | extension language (i.e. | a string | + | | ``'c'``, ``'c++'``, | | + | | ``'objc'``). Will be detected | | + | | from the source extensions if | | + | | not provided. | | + +------------------------+--------------------------------+---------------------------+ + | *optional* | specifies that a build failure | a boolean | + | | in the extension should not | | + | | abort the build process, but | | + | | simply skip the extension. | | + +------------------------+--------------------------------+---------------------------+ + + .. versionchanged:: 3.8 + + On Unix, C extensions are no longer linked to libpython except on + Android and Cygwin. + + +.. class:: Distribution + + A :class:`Distribution` describes how to build, install and package up a Python + software package. + + See the :func:`setup` function for a list of keyword arguments accepted by the + Distribution constructor. :func:`setup` creates a Distribution instance. + + .. versionchanged:: 3.7 + :class:`~distutils.core.Distribution` now warns if ``classifiers``, + ``keywords`` and ``platforms`` fields are not specified as a list or + a string. + +.. class:: Command + + A :class:`Command` class (or rather, an instance of one of its subclasses) + implement a single distutils command. + + +:mod:`distutils.ccompiler` --- CCompiler base class +=================================================== + +.. module:: distutils.ccompiler + :synopsis: Abstract CCompiler class + + +This module provides the abstract base class for the :class:`CCompiler` +classes. A :class:`CCompiler` instance can be used for all the compile and +link steps needed to build a single project. Methods are provided to set +options for the compiler --- macro definitions, include directories, link path, +libraries and the like. + +This module provides the following functions. + + +.. function:: gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries) + + Generate linker options for searching library directories and linking with + specific libraries. *libraries* and *library_dirs* are, respectively, lists of + library names (not filenames!) and search directories. Returns a list of + command-line options suitable for use with some compiler (depending on the two + format strings passed in). + + +.. function:: gen_preprocess_options(macros, include_dirs) + + Generate C pre-processor options (:option:`!-D`, :option:`!-U`, :option:`!-I`) as + used by at least two types of compilers: the typical Unix compiler and Visual + C++. *macros* is the usual thing, a list of 1- or 2-tuples, where ``(name,)`` + means undefine (:option:`!-U`) macro *name*, and ``(name, value)`` means define + (:option:`!-D`) macro *name* to *value*. *include_dirs* is just a list of + directory names to be added to the header file search path (:option:`!-I`). + Returns a list of command-line options suitable for either Unix compilers or + Visual C++. + + +.. function:: get_default_compiler(osname, platform) + + Determine the default compiler to use for the given platform. + + *osname* should be one of the standard Python OS names (i.e. the ones returned + by ``os.name``) and *platform* the common value returned by ``sys.platform`` for + the platform in question. + + The default values are ``os.name`` and ``sys.platform`` in case the parameters + are not given. + + +.. function:: new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0) + + Factory function to generate an instance of some CCompiler subclass for the + supplied platform/compiler combination. *plat* defaults to ``os.name`` (eg. + ``'posix'``, ``'nt'``), and *compiler* defaults to the default compiler for + that platform. Currently only ``'posix'`` and ``'nt'`` are supported, and the + default compilers are "traditional Unix interface" (:class:`UnixCCompiler` + class) and Visual C++ (:class:`MSVCCompiler` class). Note that it's perfectly + possible to ask for a Unix compiler object under Windows, and a Microsoft + compiler object under Unix---if you supply a value for *compiler*, *plat* is + ignored. + + .. % Is the posix/nt only thing still true? macOS seems to work, and + .. % returns a UnixCCompiler instance. How to document this... hmm. + + +.. function:: show_compilers() + + Print list of available compilers (used by the :option:`!--help-compiler` options + to :command:`build`, :command:`build_ext`, :command:`build_clib`). + + +.. class:: CCompiler([verbose=0, dry_run=0, force=0]) + + The abstract base class :class:`CCompiler` defines the interface that must be + implemented by real compiler classes. The class also has some utility methods + used by several compiler classes. + + The basic idea behind a compiler abstraction class is that each instance can be + used for all the compile/link steps in building a single project. Thus, + attributes common to all of those compile and link steps --- include + directories, macros to define, libraries to link against, etc. --- are + attributes of the compiler instance. To allow for variability in how individual + files are treated, most of those attributes may be varied on a per-compilation + or per-link basis. + + The constructor for each subclass creates an instance of the Compiler object. + Flags are *verbose* (show verbose output), *dry_run* (don't actually execute the + steps) and *force* (rebuild everything, regardless of dependencies). All of + these flags default to ``0`` (off). Note that you probably don't want to + instantiate :class:`CCompiler` or one of its subclasses directly - use the + :func:`distutils.CCompiler.new_compiler` factory function instead. + + The following methods allow you to manually alter compiler options for the + instance of the Compiler class. + + + .. method:: CCompiler.add_include_dir(dir) + + Add *dir* to the list of directories that will be searched for header files. + The compiler is instructed to search directories in the order in which they are + supplied by successive calls to :meth:`add_include_dir`. + + + .. method:: CCompiler.set_include_dirs(dirs) + + Set the list of directories that will be searched to *dirs* (a list of strings). + Overrides any preceding calls to :meth:`add_include_dir`; subsequent calls to + :meth:`add_include_dir` add to the list passed to :meth:`set_include_dirs`. + This does not affect any list of standard include directories that the compiler + may search by default. + + + .. method:: CCompiler.add_library(libname) + + Add *libname* to the list of libraries that will be included in all links driven + by this compiler object. Note that *libname* should \*not\* be the name of a + file containing a library, but the name of the library itself: the actual + filename will be inferred by the linker, the compiler, or the compiler class + (depending on the platform). + + The linker will be instructed to link against libraries in the order they were + supplied to :meth:`add_library` and/or :meth:`set_libraries`. It is perfectly + valid to duplicate library names; the linker will be instructed to link against + libraries as many times as they are mentioned. + + + .. method:: CCompiler.set_libraries(libnames) + + Set the list of libraries to be included in all links driven by this compiler + object to *libnames* (a list of strings). This does not affect any standard + system libraries that the linker may include by default. + + + .. method:: CCompiler.add_library_dir(dir) + + Add *dir* to the list of directories that will be searched for libraries + specified to :meth:`add_library` and :meth:`set_libraries`. The linker will be + instructed to search for libraries in the order they are supplied to + :meth:`add_library_dir` and/or :meth:`set_library_dirs`. + + + .. method:: CCompiler.set_library_dirs(dirs) + + Set the list of library search directories to *dirs* (a list of strings). This + does not affect any standard library search path that the linker may search by + default. + + + .. method:: CCompiler.add_runtime_library_dir(dir) + + Add *dir* to the list of directories that will be searched for shared libraries + at runtime. + + + .. method:: CCompiler.set_runtime_library_dirs(dirs) + + Set the list of directories to search for shared libraries at runtime to *dirs* + (a list of strings). This does not affect any standard search path that the + runtime linker may search by default. + + + .. method:: CCompiler.define_macro(name[, value=None]) + + Define a preprocessor macro for all compilations driven by this compiler object. + The optional parameter *value* should be a string; if it is not supplied, then + the macro will be defined without an explicit value and the exact outcome + depends on the compiler used. + + .. XXX true? does ANSI say anything about this? + + + .. method:: CCompiler.undefine_macro(name) + + Undefine a preprocessor macro for all compilations driven by this compiler + object. If the same macro is defined by :meth:`define_macro` and + undefined by :meth:`undefine_macro` the last call takes precedence + (including multiple redefinitions or undefinitions). If the macro is + redefined/undefined on a per-compilation basis (ie. in the call to + :meth:`compile`), then that takes precedence. + + + .. method:: CCompiler.add_link_object(object) + + Add *object* to the list of object files (or analogues, such as explicitly named + library files or the output of "resource compilers") to be included in every + link driven by this compiler object. + + + .. method:: CCompiler.set_link_objects(objects) + + Set the list of object files (or analogues) to be included in every link to + *objects*. This does not affect any standard object files that the linker may + include by default (such as system libraries). + + The following methods implement methods for autodetection of compiler options, + providing some functionality similar to GNU :program:`autoconf`. + + + .. method:: CCompiler.detect_language(sources) + + Detect the language of a given file, or list of files. Uses the instance + attributes :attr:`language_map` (a dictionary), and :attr:`language_order` (a + list) to do the job. + + + .. method:: CCompiler.find_library_file(dirs, lib[, debug=0]) + + Search the specified list of directories for a static or shared library file + *lib* and return the full path to that file. If *debug* is true, look for a + debugging version (if that makes sense on the current platform). Return + ``None`` if *lib* wasn't found in any of the specified directories. + + + .. method:: CCompiler.has_function(funcname [, includes=None, include_dirs=None, libraries=None, library_dirs=None]) + + Return a boolean indicating whether *funcname* is supported on the current + platform. The optional arguments can be used to augment the compilation + environment by providing additional include files and paths and libraries and + paths. + + + .. method:: CCompiler.library_dir_option(dir) + + Return the compiler option to add *dir* to the list of directories searched for + libraries. + + + .. method:: CCompiler.library_option(lib) + + Return the compiler option to add *lib* to the list of libraries linked into the + shared library or executable. + + + .. method:: CCompiler.runtime_library_dir_option(dir) + + Return the compiler option to add *dir* to the list of directories searched for + runtime libraries. + + + .. method:: CCompiler.set_executables(**args) + + Define the executables (and options for them) that will be run to perform the + various stages of compilation. The exact set of executables that may be + specified here depends on the compiler class (via the 'executables' class + attribute), but most will have: + + +--------------+------------------------------------------+ + | attribute | description | + +==============+==========================================+ + | *compiler* | the C/C++ compiler | + +--------------+------------------------------------------+ + | *linker_so* | linker used to create shared objects and | + | | libraries | + +--------------+------------------------------------------+ + | *linker_exe* | linker used to create binary executables | + +--------------+------------------------------------------+ + | *archiver* | static library creator | + +--------------+------------------------------------------+ + + On platforms with a command-line (Unix, DOS/Windows), each of these is a string + that will be split into executable name and (optional) list of arguments. + (Splitting the string is done similarly to how Unix shells operate: words are + delimited by spaces, but quotes and backslashes can override this. See + :func:`distutils.util.split_quoted`.) + + The following methods invoke stages in the build process. + + + .. method:: CCompiler.compile(sources[, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None]) + + Compile one or more source files. Generates object files (e.g. transforms a + :file:`.c` file to a :file:`.o` file.) + + *sources* must be a list of filenames, most likely C/C++ files, but in reality + anything that can be handled by a particular compiler and compiler class (eg. + :class:`MSVCCompiler` can handle resource files in *sources*). Return a list of + object filenames, one per source filename in *sources*. Depending on the + implementation, not all source files will necessarily be compiled, but all + corresponding object filenames will be returned. + + If *output_dir* is given, object files will be put under it, while retaining + their original path component. That is, :file:`foo/bar.c` normally compiles to + :file:`foo/bar.o` (for a Unix implementation); if *output_dir* is *build*, then + it would compile to :file:`build/foo/bar.o`. + + *macros*, if given, must be a list of macro definitions. A macro definition is + either a ``(name, value)`` 2-tuple or a ``(name,)`` 1-tuple. The former defines + a macro; if the value is ``None``, the macro is defined without an explicit + value. The 1-tuple case undefines a macro. Later + definitions/redefinitions/undefinitions take precedence. + + *include_dirs*, if given, must be a list of strings, the directories to add to + the default include file search path for this compilation only. + + *debug* is a boolean; if true, the compiler will be instructed to output debug + symbols in (or alongside) the object file(s). + + *extra_preargs* and *extra_postargs* are implementation-dependent. On platforms + that have the notion of a command-line (e.g. Unix, DOS/Windows), they are most + likely lists of strings: extra command-line arguments to prepend/append to the + compiler command line. On other platforms, consult the implementation class + documentation. In any event, they are intended as an escape hatch for those + occasions when the abstract compiler framework doesn't cut the mustard. + + *depends*, if given, is a list of filenames that all targets depend on. If a + source file is older than any file in depends, then the source file will be + recompiled. This supports dependency tracking, but only at a coarse + granularity. + + Raises :exc:`CompileError` on failure. + + + .. method:: CCompiler.create_static_lib(objects, output_libname[, output_dir=None, debug=0, target_lang=None]) + + Link a bunch of stuff together to create a static library file. The "bunch of + stuff" consists of the list of object files supplied as *objects*, the extra + object files supplied to :meth:`add_link_object` and/or + :meth:`set_link_objects`, the libraries supplied to :meth:`add_library` and/or + :meth:`set_libraries`, and the libraries supplied as *libraries* (if any). + + *output_libname* should be a library name, not a filename; the filename will be + inferred from the library name. *output_dir* is the directory where the library + file will be put. + + .. XXX defaults to what? + + *debug* is a boolean; if true, debugging information will be included in the + library (note that on most platforms, it is the compile step where this matters: + the *debug* flag is included here just for consistency). + + *target_lang* is the target language for which the given objects are being + compiled. This allows specific linkage time treatment of certain languages. + + Raises :exc:`LibError` on failure. + + + .. method:: CCompiler.link(target_desc, objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None]) + + Link a bunch of stuff together to create an executable or shared library file. + + The "bunch of stuff" consists of the list of object files supplied as *objects*. + *output_filename* should be a filename. If *output_dir* is supplied, + *output_filename* is relative to it (i.e. *output_filename* can provide + directory components if needed). + + *libraries* is a list of libraries to link against. These are library names, + not filenames, since they're translated into filenames in a platform-specific + way (eg. *foo* becomes :file:`libfoo.a` on Unix and :file:`foo.lib` on + DOS/Windows). However, they can include a directory component, which means the + linker will look in that specific directory rather than searching all the normal + locations. + + *library_dirs*, if supplied, should be a list of directories to search for + libraries that were specified as bare library names (ie. no directory + component). These are on top of the system default and those supplied to + :meth:`add_library_dir` and/or :meth:`set_library_dirs`. *runtime_library_dirs* + is a list of directories that will be embedded into the shared library and used + to search for other shared libraries that \*it\* depends on at run-time. (This + may only be relevant on Unix.) + + *export_symbols* is a list of symbols that the shared library will export. + (This appears to be relevant only on Windows.) + + *debug* is as for :meth:`compile` and :meth:`create_static_lib`, with the + slight distinction that it actually matters on most platforms (as opposed to + :meth:`create_static_lib`, which includes a *debug* flag mostly for form's + sake). + + *extra_preargs* and *extra_postargs* are as for :meth:`compile` (except of + course that they supply command-line arguments for the particular linker being + used). + + *target_lang* is the target language for which the given objects are being + compiled. This allows specific linkage time treatment of certain languages. + + Raises :exc:`LinkError` on failure. + + + .. method:: CCompiler.link_executable(objects, output_progname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, target_lang=None]) + + Link an executable. *output_progname* is the name of the file executable, while + *objects* are a list of object filenames to link in. Other arguments are as for + the :meth:`link` method. + + + .. method:: CCompiler.link_shared_lib(objects, output_libname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None]) + + Link a shared library. *output_libname* is the name of the output library, + while *objects* is a list of object filenames to link in. Other arguments are + as for the :meth:`link` method. + + + .. method:: CCompiler.link_shared_object(objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None]) + + Link a shared object. *output_filename* is the name of the shared object that + will be created, while *objects* is a list of object filenames to link in. + Other arguments are as for the :meth:`link` method. + + + .. method:: CCompiler.preprocess(source[, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None]) + + Preprocess a single C/C++ source file, named in *source*. Output will be written + to file named *output_file*, or *stdout* if *output_file* not supplied. + *macros* is a list of macro definitions as for :meth:`compile`, which will + augment the macros set with :meth:`define_macro` and :meth:`undefine_macro`. + *include_dirs* is a list of directory names that will be added to the default + list, in the same way as :meth:`add_include_dir`. + + Raises :exc:`PreprocessError` on failure. + + The following utility methods are defined by the :class:`CCompiler` class, for + use by the various concrete subclasses. + + + .. method:: CCompiler.executable_filename(basename[, strip_dir=0, output_dir='']) + + Returns the filename of the executable for the given *basename*. Typically for + non-Windows platforms this is the same as the basename, while Windows will get + a :file:`.exe` added. + + + .. method:: CCompiler.library_filename(libname[, lib_type='static', strip_dir=0, output_dir='']) + + Returns the filename for the given library name on the current platform. On Unix + a library with *lib_type* of ``'static'`` will typically be of the form + :file:`liblibname.a`, while a *lib_type* of ``'dynamic'`` will be of the form + :file:`liblibname.so`. + + + .. method:: CCompiler.object_filenames(source_filenames[, strip_dir=0, output_dir='']) + + Returns the name of the object files for the given source files. + *source_filenames* should be a list of filenames. + + + .. method:: CCompiler.shared_object_filename(basename[, strip_dir=0, output_dir='']) + + Returns the name of a shared object file for the given file name *basename*. + + + .. method:: CCompiler.execute(func, args[, msg=None, level=1]) + + Invokes :func:`distutils.util.execute`. This method invokes a Python function + *func* with the given arguments *args*, after logging and taking into account + the *dry_run* flag. + + + .. method:: CCompiler.spawn(cmd) + + Invokes :func:`distutils.util.spawn`. This invokes an external process to run + the given command. + + + .. method:: CCompiler.mkpath(name[, mode=511]) + + Invokes :func:`distutils.dir_util.mkpath`. This creates a directory and any + missing ancestor directories. + + + .. method:: CCompiler.move_file(src, dst) + + Invokes :meth:`distutils.file_util.move_file`. Renames *src* to *dst*. + + + .. method:: CCompiler.announce(msg[, level=1]) + + Write a message using :func:`distutils.log.debug`. + + + .. method:: CCompiler.warn(msg) + + Write a warning message *msg* to standard error. + + + .. method:: CCompiler.debug_print(msg) + + If the *debug* flag is set on this :class:`CCompiler` instance, print *msg* to + standard output, otherwise do nothing. + +.. % \subsection{Compiler-specific modules} +.. % +.. % The following modules implement concrete subclasses of the abstract +.. % \class{CCompiler} class. They should not be instantiated directly, but should +.. % be created using \function{distutils.ccompiler.new_compiler()} factory +.. % function. + + +:mod:`distutils.unixccompiler` --- Unix C Compiler +================================================== + +.. module:: distutils.unixccompiler + :synopsis: UNIX C Compiler + + +This module provides the :class:`UnixCCompiler` class, a subclass of +:class:`CCompiler` that handles the typical Unix-style command-line C compiler: + +* macros defined with :option:`!-Dname[=value]` + +* macros undefined with :option:`!-Uname` + +* include search directories specified with :option:`!-Idir` + +* libraries specified with :option:`!-llib` + +* library search directories specified with :option:`!-Ldir` + +* compile handled by :program:`cc` (or similar) executable with :option:`!-c` + option: compiles :file:`.c` to :file:`.o` + +* link static library handled by :program:`ar` command (possibly with + :program:`ranlib`) + +* link shared library handled by :program:`cc` :option:`!-shared` + + +:mod:`distutils.msvccompiler` --- Microsoft Compiler +==================================================== + +.. module:: distutils.msvccompiler + :synopsis: Microsoft Compiler + +.. XXX: This is *waaaaay* out of date! + +This module provides :class:`MSVCCompiler`, an implementation of the abstract +:class:`CCompiler` class for Microsoft Visual Studio. Typically, extension +modules need to be compiled with the same compiler that was used to compile +Python. For Python 2.3 and earlier, the compiler was Visual Studio 6. For Python +2.4 and 2.5, the compiler is Visual Studio .NET 2003. + +:class:`MSVCCompiler` will normally choose the right compiler, linker etc. on +its own. To override this choice, the environment variables *DISTUTILS_USE_SDK* +and *MSSdk* must be both set. *MSSdk* indicates that the current environment has +been setup by the SDK's ``SetEnv.Cmd`` script, or that the environment variables +had been registered when the SDK was installed; *DISTUTILS_USE_SDK* indicates +that the distutils user has made an explicit choice to override the compiler +selection by :class:`MSVCCompiler`. + + +:mod:`distutils.bcppcompiler` --- Borland Compiler +================================================== + +.. module:: distutils.bcppcompiler + + +This module provides :class:`BorlandCCompiler`, a subclass of the abstract +:class:`CCompiler` class for the Borland C++ compiler. + + +:mod:`distutils.cygwincompiler` --- Cygwin Compiler +=================================================== + +.. module:: distutils.cygwinccompiler + + +This module provides the :class:`CygwinCCompiler` class, a subclass of +:class:`UnixCCompiler` that handles the Cygwin port of the GNU C compiler to +Windows. It also contains the Mingw32CCompiler class which handles the mingw32 +port of GCC (same as cygwin in no-cygwin mode). + + +:mod:`distutils.archive_util` --- Archiving utilities +====================================================== + +.. module:: distutils.archive_util + :synopsis: Utility functions for creating archive files (tarballs, zip files, ...) + + +This module provides a few functions for creating archive files, such as +tarballs or zipfiles. + + +.. function:: make_archive(base_name, format[, root_dir=None, base_dir=None, verbose=0, dry_run=0]) + + Create an archive file (eg. ``zip`` or ``tar``). *base_name* is the name of + the file to create, minus any format-specific extension; *format* is the + archive format: one of ``zip``, ``tar``, ``gztar``, ``bztar``, ``xztar``, or + ``ztar``. *root_dir* is a directory that will be the root directory of the + archive; ie. we typically ``chdir`` into *root_dir* before creating the + archive. *base_dir* is the directory where we start archiving from; ie. + *base_dir* will be the common prefix of all files and directories in the + archive. *root_dir* and *base_dir* both default to the current directory. + Returns the name of the archive file. + + .. versionchanged:: 3.5 + Added support for the ``xztar`` format. + + +.. function:: make_tarball(base_name, base_dir[, compress='gzip', verbose=0, dry_run=0]) + + 'Create an (optional compressed) archive as a tar file from all files in and + under *base_dir*. *compress* must be ``'gzip'`` (the default), + ``'bzip2'``, ``'xz'``, ``'compress'``, or ``None``. For the ``'compress'`` + method the compression utility named by :program:`compress` must be on the + default program search path, so this is probably Unix-specific. The output + tar file will be named :file:`base_dir.tar`, possibly plus the appropriate + compression extension (``.gz``, ``.bz2``, ``.xz`` or ``.Z``). Return the + output filename. + + .. versionchanged:: 3.5 + Added support for the ``xz`` compression. + + +.. function:: make_zipfile(base_name, base_dir[, verbose=0, dry_run=0]) + + Create a zip file from all files in and under *base_dir*. The output zip file + will be named *base_name* + :file:`.zip`. Uses either the :mod:`zipfile` Python + module (if available) or the InfoZIP :file:`zip` utility (if installed and + found on the default search path). If neither tool is available, raises + :exc:`DistutilsExecError`. Returns the name of the output zip file. + + +:mod:`distutils.dep_util` --- Dependency checking +================================================= + +.. module:: distutils.dep_util + :synopsis: Utility functions for simple dependency checking + + +This module provides functions for performing simple, timestamp-based +dependency of files and groups of files; also, functions based entirely on such +timestamp dependency analysis. + + +.. function:: newer(source, target) + + Return true if *source* exists and is more recently modified than *target*, or + if *source* exists and *target* doesn't. Return false if both exist and *target* + is the same age or newer than *source*. Raise :exc:`DistutilsFileError` if + *source* does not exist. + + +.. function:: newer_pairwise(sources, targets) + + Walk two filename lists in parallel, testing if each source is newer than its + corresponding target. Return a pair of lists (*sources*, *targets*) where + source is newer than target, according to the semantics of :func:`newer`. + + .. % % equivalent to a listcomp... + + +.. function:: newer_group(sources, target[, missing='error']) + + Return true if *target* is out-of-date with respect to any file listed in + *sources*. In other words, if *target* exists and is newer than every file in + *sources*, return false; otherwise return true. *missing* controls what we do + when a source file is missing; the default (``'error'``) is to blow up with an + :exc:`OSError` from inside :func:`os.stat`; if it is ``'ignore'``, we silently + drop any missing source files; if it is ``'newer'``, any missing source files + make us assume that *target* is out-of-date (this is handy in "dry-run" mode: + it'll make you pretend to carry out commands that wouldn't work because inputs + are missing, but that doesn't matter because you're not actually going to run + the commands). + + +:mod:`distutils.dir_util` --- Directory tree operations +======================================================= + +.. module:: distutils.dir_util + :synopsis: Utility functions for operating on directories and directory trees + + +This module provides functions for operating on directories and trees of +directories. + + +.. function:: mkpath(name[, mode=0o777, verbose=0, dry_run=0]) + + Create a directory and any missing ancestor directories. If the directory + already exists (or if *name* is the empty string, which means the current + directory, which of course exists), then do nothing. Raise + :exc:`DistutilsFileError` if unable to create some directory along the way (eg. + some sub-path exists, but is a file rather than a directory). If *verbose* is + true, print a one-line summary of each mkdir to stdout. Return the list of + directories actually created. + + +.. function:: create_tree(base_dir, files[, mode=0o777, verbose=0, dry_run=0]) + + Create all the empty directories under *base_dir* needed to put *files* there. + *base_dir* is just the name of a directory which doesn't necessarily exist + yet; *files* is a list of filenames to be interpreted relative to *base_dir*. + *base_dir* + the directory portion of every file in *files* will be created if + it doesn't already exist. *mode*, *verbose* and *dry_run* flags are as for + :func:`mkpath`. + + +.. function:: copy_tree(src, dst[, preserve_mode=1, preserve_times=1, preserve_symlinks=0, update=0, verbose=0, dry_run=0]) + + Copy an entire directory tree *src* to a new location *dst*. Both *src* and + *dst* must be directory names. If *src* is not a directory, raise + :exc:`DistutilsFileError`. If *dst* does not exist, it is created with + :func:`mkpath`. The end result of the copy is that every file in *src* is + copied to *dst*, and directories under *src* are recursively copied to *dst*. + Return the list of files that were copied or might have been copied, using their + output name. The return value is unaffected by *update* or *dry_run*: it is + simply the list of all files under *src*, with the names changed to be under + *dst*. + + *preserve_mode* and *preserve_times* are the same as for + :func:`distutils.file_util.copy_file`; note that they only apply to + regular files, not to + directories. If *preserve_symlinks* is true, symlinks will be copied as + symlinks (on platforms that support them!); otherwise (the default), the + destination of the symlink will be copied. *update* and *verbose* are the same + as for :func:`copy_file`. + + Files in *src* that begin with :file:`.nfs` are skipped (more information on + these files is available in answer D2 of the `NFS FAQ page + <https://nfs.sourceforge.net/#section_d>`_). + + .. versionchanged:: 3.3.1 + NFS files are ignored. + +.. function:: remove_tree(directory[, verbose=0, dry_run=0]) + + Recursively remove *directory* and all files and directories underneath it. Any + errors are ignored (apart from being reported to ``sys.stdout`` if *verbose* is + true). + + +:mod:`distutils.file_util` --- Single file operations +===================================================== + +.. module:: distutils.file_util + :synopsis: Utility functions for operating on single files + + +This module contains some utility functions for operating on individual files. + + +.. function:: copy_file(src, dst[, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=0, dry_run=0]) + + Copy file *src* to *dst*. If *dst* is a directory, then *src* is copied there + with the same name; otherwise, it must be a filename. (If the file exists, it + will be ruthlessly clobbered.) If *preserve_mode* is true (the default), the + file's mode (type and permission bits, or whatever is analogous on the + current platform) is copied. If *preserve_times* is true (the default), the + last-modified and last-access times are copied as well. If *update* is true, + *src* will only be copied if *dst* does not exist, or if *dst* does exist but + is older than *src*. + + *link* allows you to make hard links (using :func:`os.link`) or symbolic links + (using :func:`os.symlink`) instead of copying: set it to ``'hard'`` or + ``'sym'``; if it is ``None`` (the default), files are copied. Don't set *link* + on systems that don't support it: :func:`copy_file` doesn't check if hard or + symbolic linking is available. It uses :func:`_copy_file_contents` to copy file + contents. + + Return a tuple ``(dest_name, copied)``: *dest_name* is the actual name of the + output file, and *copied* is true if the file was copied (or would have been + copied, if *dry_run* true). + + .. % XXX if the destination file already exists, we clobber it if + .. % copying, but blow up if linking. Hmmm. And I don't know what + .. % macostools.copyfile() does. Should definitely be consistent, and + .. % should probably blow up if destination exists and we would be + .. % changing it (ie. it's not already a hard/soft link to src OR + .. % (not update) and (src newer than dst)). + + +.. function:: move_file(src, dst[, verbose, dry_run]) + + Move file *src* to *dst*. If *dst* is a directory, the file will be moved into + it with the same name; otherwise, *src* is just renamed to *dst*. Returns the + new full name of the file. + + .. warning:: + + Handles cross-device moves on Unix using :func:`copy_file`. What about + other systems? + + +.. function:: write_file(filename, contents) + + Create a file called *filename* and write *contents* (a sequence of strings + without line terminators) to it. + + +:mod:`distutils.util` --- Miscellaneous other utility functions +=============================================================== + +.. module:: distutils.util + :synopsis: Miscellaneous other utility functions + + +This module contains other assorted bits and pieces that don't fit into any +other utility module. + + +.. function:: get_platform() + + Return a string that identifies the current platform. This is used mainly to + distinguish platform-specific build directories and platform-specific built + distributions. Typically includes the OS name and version and the + architecture (as supplied by 'os.uname()'), although the exact information + included depends on the OS; e.g., on Linux, the kernel version isn't + particularly important. + + Examples of returned values: + + * ``linux-i586`` + * ``linux-alpha`` + * ``solaris-2.6-sun4u`` + + For non-POSIX platforms, currently just returns ``sys.platform``. + + For macOS systems the OS version reflects the minimal version on which + binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET`` + during the build of Python), not the OS version of the current system. + + For universal binary builds on macOS the architecture value reflects + the universal binary status instead of the architecture of the current + processor. For 32-bit universal binaries the architecture is ``fat``, + for 64-bit universal binaries the architecture is ``fat64``, and + for 4-way universal binaries the architecture is ``universal``. Starting + from Python 2.7 and Python 3.2 the architecture ``fat3`` is used for + a 3-way universal build (ppc, i386, x86_64) and ``intel`` is used for + a universal build with the i386 and x86_64 architectures + + Examples of returned values on macOS: + + * ``macosx-10.3-ppc`` + + * ``macosx-10.3-fat`` + + * ``macosx-10.5-universal`` + + * ``macosx-10.6-intel`` + + For AIX, Python 3.9 and later return a string starting with "aix", followed + by additional fields (separated by ``'-'``) that represent the combined + values of AIX Version, Release and Technology Level (first field), Build Date + (second field), and bit-size (third field). Python 3.8 and earlier returned + only a single additional field with the AIX Version and Release. + + Examples of returned values on AIX: + + * ``aix-5307-0747-32`` # 32-bit build on AIX ``oslevel -s``: 5300-07-00-0000 + + * ``aix-7105-1731-64`` # 64-bit build on AIX ``oslevel -s``: 7100-05-01-1731 + + * ``aix-7.2`` # Legacy form reported in Python 3.8 and earlier + + .. versionchanged:: 3.9 + The AIX platform string format now also includes the technology level, + build date, and ABI bit-size. + + +.. function:: convert_path(pathname) + + Return 'pathname' as a name that will work on the native filesystem, i.e. split + it on '/' and put it back together again using the current directory separator. + Needed because filenames in the setup script are always supplied in Unix style, + and have to be converted to the local convention before we can actually use them + in the filesystem. Raises :exc:`ValueError` on non-Unix-ish systems if + *pathname* either starts or ends with a slash. + + +.. function:: change_root(new_root, pathname) + + Return *pathname* with *new_root* prepended. If *pathname* is relative, this is + equivalent to ``os.path.join(new_root,pathname)`` Otherwise, it requires making + *pathname* relative and then joining the two, which is tricky on DOS/Windows. + + +.. function:: check_environ() + + Ensure that 'os.environ' has all the environment variables we guarantee that + users can use in config files, command-line options, etc. Currently this + includes: + + * :envvar:`HOME` - user's home directory (Unix only) + * :envvar:`PLAT` - description of the current platform, including hardware and + OS (see :func:`get_platform`) + + +.. function:: subst_vars(s, local_vars) + + Perform shell/Perl-style variable substitution on *s*. Every occurrence of + ``$`` followed by a name is considered a variable, and variable is substituted + by the value found in the *local_vars* dictionary, or in ``os.environ`` if it's + not in *local_vars*. *os.environ* is first checked/augmented to guarantee that + it contains certain values: see :func:`check_environ`. Raise :exc:`ValueError` + for any variables not found in either *local_vars* or ``os.environ``. + + Note that this is not a full-fledged string interpolation function. A valid + ``$variable`` can consist only of upper and lower case letters, numbers and an + underscore. No { } or ( ) style quoting is available. + + +.. function:: split_quoted(s) + + Split a string up according to Unix shell-like rules for quotes and backslashes. + In short: words are delimited by spaces, as long as those spaces are not escaped + by a backslash, or inside a quoted string. Single and double quotes are + equivalent, and the quote characters can be backslash-escaped. The backslash is + stripped from any two-character escape sequence, leaving only the escaped + character. The quote characters are stripped from any quoted string. Returns a + list of words. + + .. % Should probably be moved into the standard library. + + +.. function:: execute(func, args[, msg=None, verbose=0, dry_run=0]) + + Perform some action that affects the outside world (for instance, writing to the + filesystem). Such actions are special because they are disabled by the + *dry_run* flag. This method takes care of all that bureaucracy for you; all + you have to do is supply the function to call and an argument tuple for it (to + embody the "external action" being performed), and an optional message to print. + + +.. function:: strtobool(val) + + Convert a string representation of truth to true (1) or false (0). + + True values are ``y``, ``yes``, ``t``, ``true``, ``on`` and ``1``; false values + are ``n``, ``no``, ``f``, ``false``, ``off`` and ``0``. Raises + :exc:`ValueError` if *val* is anything else. + + +.. function:: byte_compile(py_files[, optimize=0, force=0, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None]) + + Byte-compile a collection of Python source files to :file:`.pyc` files in a + :file:`__pycache__` subdirectory (see :pep:`3147` and :pep:`488`). + *py_files* is a list of files to compile; any files that don't end in + :file:`.py` are silently skipped. *optimize* must be one of the following: + + * ``0`` - don't optimize + * ``1`` - normal optimization (like ``python -O``) + * ``2`` - extra optimization (like ``python -OO``) + + If *force* is true, all files are recompiled regardless of timestamps. + + The source filename encoded in each :term:`bytecode` file defaults to the filenames + listed in *py_files*; you can modify these with *prefix* and *basedir*. + *prefix* is a string that will be stripped off of each source filename, and + *base_dir* is a directory name that will be prepended (after *prefix* is + stripped). You can supply either or both (or neither) of *prefix* and + *base_dir*, as you wish. + + If *dry_run* is true, doesn't actually do anything that would affect the + filesystem. + + Byte-compilation is either done directly in this interpreter process with the + standard :mod:`py_compile` module, or indirectly by writing a temporary script + and executing it. Normally, you should let :func:`byte_compile` figure out to + use direct compilation or not (see the source for details). The *direct* flag + is used by the script generated in indirect mode; unless you know what you're + doing, leave it set to ``None``. + + .. versionchanged:: 3.2.3 + Create ``.pyc`` files with an :func:`import magic tag + <imp.get_tag>` in their name, in a :file:`__pycache__` subdirectory + instead of files without tag in the current directory. + + .. versionchanged:: 3.5 + Create ``.pyc`` files according to :pep:`488`. + + +.. function:: rfc822_escape(header) + + Return a version of *header* escaped for inclusion in an :rfc:`822` header, by + ensuring there are 8 spaces space after each newline. Note that it does no other + modification of the string. + + .. % this _can_ be replaced + +.. % \subsection{Distutils objects} + + +:mod:`distutils.dist` --- The Distribution class +================================================ + +.. module:: distutils.dist + :synopsis: Provides the Distribution class, which represents the module distribution being + built/installed/distributed + + +This module provides the :class:`~distutils.core.Distribution` class, which +represents the module distribution being built/installed/distributed. + + +:mod:`distutils.extension` --- The Extension class +================================================== + +.. module:: distutils.extension + :synopsis: Provides the Extension class, used to describe C/C++ extension modules in setup + scripts + + +This module provides the :class:`Extension` class, used to describe C/C++ +extension modules in setup scripts. + +.. % \subsection{Ungrouped modules} +.. % The following haven't been moved into a more appropriate section yet. + + +:mod:`distutils.debug` --- Distutils debug mode +=============================================== + +.. module:: distutils.debug + :synopsis: Provides the debug flag for distutils + + +This module provides the DEBUG flag. + + +:mod:`distutils.errors` --- Distutils exceptions +================================================ + +.. module:: distutils.errors + :synopsis: Provides standard distutils exceptions + + +Provides exceptions used by the Distutils modules. Note that Distutils modules +may raise standard exceptions; in particular, SystemExit is usually raised for +errors that are obviously the end-user's fault (eg. bad command-line arguments). + +This module is safe to use in ``from ... import *`` mode; it only exports +symbols whose names start with ``Distutils`` and end with ``Error``. + + +:mod:`distutils.fancy_getopt` --- Wrapper around the standard getopt module +=========================================================================== + +.. module:: distutils.fancy_getopt + :synopsis: Additional getopt functionality + + +This module provides a wrapper around the standard :mod:`getopt` module that +provides the following additional features: + +* short and long options are tied together + +* options have help strings, so :func:`fancy_getopt` could potentially create a + complete usage summary + +* options set attributes of a passed-in object + +* boolean options can have "negative aliases" --- eg. if :option:`!--quiet` is + the "negative alias" of :option:`!--verbose`, then :option:`!--quiet` on the + command line sets *verbose* to false. + +.. function:: fancy_getopt(options, negative_opt, object, args) + + Wrapper function. *options* is a list of ``(long_option, short_option, + help_string)`` 3-tuples as described in the constructor for + :class:`FancyGetopt`. *negative_opt* should be a dictionary mapping option names + to option names, both the key and value should be in the *options* list. + *object* is an object which will be used to store values (see the :meth:`getopt` + method of the :class:`FancyGetopt` class). *args* is the argument list. Will use + ``sys.argv[1:]`` if you pass ``None`` as *args*. + + +.. function:: wrap_text(text, width) + + Wraps *text* to less than *width* wide. + + +.. class:: FancyGetopt([option_table=None]) + + The option_table is a list of 3-tuples: ``(long_option, short_option, + help_string)`` + + If an option takes an argument, its *long_option* should have ``'='`` appended; + *short_option* should just be a single character, no ``':'`` in any case. + *short_option* should be ``None`` if a *long_option* doesn't have a + corresponding *short_option*. All option tuples must have long options. + +The :class:`FancyGetopt` class provides the following methods: + + +.. method:: FancyGetopt.getopt([args=None, object=None]) + + Parse command-line options in args. Store as attributes on *object*. + + If *args* is ``None`` or not supplied, uses ``sys.argv[1:]``. If *object* is + ``None`` or not supplied, creates a new :class:`OptionDummy` instance, stores + option values there, and returns a tuple ``(args, object)``. If *object* is + supplied, it is modified in place and :func:`getopt` just returns *args*; in + both cases, the returned *args* is a modified copy of the passed-in *args* list, + which is left untouched. + + .. % and args returned are? + + +.. method:: FancyGetopt.get_option_order() + + Returns the list of ``(option, value)`` tuples processed by the previous run of + :meth:`getopt` Raises :exc:`RuntimeError` if :meth:`getopt` hasn't been called + yet. + + +.. method:: FancyGetopt.generate_help([header=None]) + + Generate help text (a list of strings, one per suggested line of output) from + the option table for this :class:`FancyGetopt` object. + + If supplied, prints the supplied *header* at the top of the help. + + +:mod:`distutils.filelist` --- The FileList class +================================================ + +.. module:: distutils.filelist + :synopsis: The FileList class, used for poking about the file system and + building lists of files. + + +This module provides the :class:`FileList` class, used for poking about the +filesystem and building lists of files. + + +:mod:`distutils.log` --- Simple :pep:`282`-style logging +======================================================== + +.. module:: distutils.log + :synopsis: A simple logging mechanism, :pep:`282`-style + + +:mod:`distutils.spawn` --- Spawn a sub-process +============================================== + +.. module:: distutils.spawn + :synopsis: Provides the spawn() function + + +This module provides the :func:`spawn` function, a front-end to various +platform-specific functions for launching another program in a sub-process. +Also provides :func:`find_executable` to search the path for a given executable +name. + + +:mod:`distutils.sysconfig` --- System configuration information +=============================================================== + +.. module:: distutils.sysconfig + :synopsis: Low-level access to configuration information of the Python interpreter. +.. deprecated:: 3.10 + :mod:`distutils.sysconfig` has been merged into :mod:`sysconfig`. +.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org> +.. moduleauthor:: Greg Ward <gward@python.net> +.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> + + +The :mod:`distutils.sysconfig` module provides access to Python's low-level +configuration information. The specific configuration variables available +depend heavily on the platform and configuration. The specific variables depend +on the build process for the specific version of Python being run; the variables +are those found in the :file:`Makefile` and configuration header that are +installed with Python on Unix systems. The configuration header is called +:file:`pyconfig.h` for Python versions starting with 2.2, and :file:`config.h` +for earlier versions of Python. + +Some additional functions are provided which perform some useful manipulations +for other parts of the :mod:`distutils` package. + + +.. data:: PREFIX + + The result of ``os.path.normpath(sys.prefix)``. + + +.. data:: EXEC_PREFIX + + The result of ``os.path.normpath(sys.exec_prefix)``. + + +.. function:: get_config_var(name) + + Return the value of a single variable. This is equivalent to + ``get_config_vars().get(name)``. + + +.. function:: get_config_vars(...) + + Return a set of variable definitions. If there are no arguments, this returns a + dictionary mapping names of configuration variables to values. If arguments are + provided, they should be strings, and the return value will be a sequence giving + the associated values. If a given name does not have a corresponding value, + ``None`` will be included for that variable. + + +.. function:: get_config_h_filename() + + Return the full path name of the configuration header. For Unix, this will be + the header generated by the :program:`configure` script; for other platforms the + header will have been supplied directly by the Python source distribution. The + file is a platform-specific text file. + + +.. function:: get_makefile_filename() + + Return the full path name of the :file:`Makefile` used to build Python. For + Unix, this will be a file generated by the :program:`configure` script; the + meaning for other platforms will vary. The file is a platform-specific text + file, if it exists. This function is only useful on POSIX platforms. + +The following functions are deprecated together with this module and they +have no direct replacement. + + +.. function:: get_python_inc([plat_specific[, prefix]]) + + Return the directory for either the general or platform-dependent C include + files. If *plat_specific* is true, the platform-dependent include directory is + returned; if false or omitted, the platform-independent directory is returned. + If *prefix* is given, it is used as either the prefix instead of + :const:`PREFIX`, or as the exec-prefix instead of :const:`EXEC_PREFIX` if + *plat_specific* is true. + + +.. function:: get_python_lib([plat_specific[, standard_lib[, prefix]]]) + + Return the directory for either the general or platform-dependent library + installation. If *plat_specific* is true, the platform-dependent include + directory is returned; if false or omitted, the platform-independent directory + is returned. If *prefix* is given, it is used as either the prefix instead of + :const:`PREFIX`, or as the exec-prefix instead of :const:`EXEC_PREFIX` if + *plat_specific* is true. If *standard_lib* is true, the directory for the + standard library is returned rather than the directory for the installation of + third-party extensions. + +The following function is only intended for use within the :mod:`distutils` +package. + + +.. function:: customize_compiler(compiler) + + Do any platform-specific customization of a + :class:`distutils.ccompiler.CCompiler` instance. + + This function is only needed on Unix at this time, but should be called + consistently to support forward-compatibility. It inserts the information that + varies across Unix flavors and is stored in Python's :file:`Makefile`. This + information includes the selected compiler, compiler and linker options, and the + extension used by the linker for shared objects. + +This function is even more special-purpose, and should only be used from +Python's own build procedures. + + +.. function:: set_python_build() + + Inform the :mod:`distutils.sysconfig` module that it is being used as part of + the build process for Python. This changes a lot of relative locations for + files, allowing them to be located in the build area rather than in an installed + Python. + + +:mod:`distutils.text_file` --- The TextFile class +================================================= + +.. module:: distutils.text_file + :synopsis: Provides the TextFile class, a simple interface to text files + + +This module provides the :class:`TextFile` class, which gives an interface to +text files that (optionally) takes care of stripping comments, ignoring blank +lines, and joining lines with backslashes. + + +.. class:: TextFile([filename=None, file=None, **options]) + + This class provides a file-like object that takes care of all the things you + commonly want to do when processing a text file that has some line-by-line + syntax: strip comments (as long as ``#`` is your comment character), skip blank + lines, join adjacent lines by escaping the newline (ie. backslash at end of + line), strip leading and/or trailing whitespace. All of these are optional and + independently controllable. + + The class provides a :meth:`warn` method so you can generate warning messages + that report physical line number, even if the logical line in question spans + multiple physical lines. Also provides :meth:`unreadline` for implementing + line-at-a-time lookahead. + + :class:`TextFile` instances are create with either *filename*, *file*, or both. + :exc:`RuntimeError` is raised if both are ``None``. *filename* should be a + string, and *file* a file object (or something that provides :meth:`readline` + and :meth:`close` methods). It is recommended that you supply at least + *filename*, so that :class:`TextFile` can include it in warning messages. If + *file* is not supplied, :class:`TextFile` creates its own using the + :func:`open` built-in function. + + The options are all boolean, and affect the values returned by :meth:`readline` + + .. tabularcolumns:: |l|L|l| + + +------------------+--------------------------------+---------+ + | option name | description | default | + +==================+================================+=========+ + | *strip_comments* | strip from ``'#'`` to | true | + | | end-of-line, as well as any | | + | | whitespace leading up to the | | + | | ``'#'``\ ---unless it is | | + | | escaped by a backslash | | + +------------------+--------------------------------+---------+ + | *lstrip_ws* | strip leading whitespace from | false | + | | each line before returning it | | + +------------------+--------------------------------+---------+ + | *rstrip_ws* | strip trailing whitespace | true | + | | (including line terminator!) | | + | | from each line before | | + | | returning it. | | + +------------------+--------------------------------+---------+ + | *skip_blanks* | skip lines that are empty | true | + | | \*after\* stripping comments | | + | | and whitespace. (If both | | + | | lstrip_ws and rstrip_ws are | | + | | false, then some lines may | | + | | consist of solely whitespace: | | + | | these will \*not\* be skipped, | | + | | even if *skip_blanks* is | | + | | true.) | | + +------------------+--------------------------------+---------+ + | *join_lines* | if a backslash is the last | false | + | | non-newline character on a | | + | | line after stripping comments | | + | | and whitespace, join the | | + | | following line to it to form | | + | | one logical line; if N | | + | | consecutive lines end with a | | + | | backslash, then N+1 physical | | + | | lines will be joined to form | | + | | one logical line. | | + +------------------+--------------------------------+---------+ + | *collapse_join* | strip leading whitespace from | false | + | | lines that are joined to their | | + | | predecessor; only matters if | | + | | ``(join_lines and not | | + | | lstrip_ws)`` | | + +------------------+--------------------------------+---------+ + + Note that since *rstrip_ws* can strip the trailing newline, the semantics of + :meth:`readline` must differ from those of the built-in file object's + :meth:`readline` method! In particular, :meth:`readline` returns ``None`` for + end-of-file: an empty string might just be a blank line (or an all-whitespace + line), if *rstrip_ws* is true but *skip_blanks* is not. + + + .. method:: TextFile.open(filename) + + Open a new file *filename*. This overrides any *file* or *filename* + constructor arguments. + + + .. method:: TextFile.close() + + Close the current file and forget everything we know about it (including the + filename and the current line number). + + + .. method:: TextFile.warn(msg[,line=None]) + + Print (to stderr) a warning message tied to the current logical line in the + current file. If the current logical line in the file spans multiple physical + lines, the warning refers to the whole range, such as ``"lines 3-5"``. If + *line* is supplied, it overrides the current line number; it may be a list or + tuple to indicate a range of physical lines, or an integer for a single + physical line. + + + .. method:: TextFile.readline() + + Read and return a single logical line from the current file (or from an internal + buffer if lines have previously been "unread" with :meth:`unreadline`). If the + *join_lines* option is true, this may involve reading multiple physical lines + concatenated into a single string. Updates the current line number, so calling + :meth:`warn` after :meth:`readline` emits a warning about the physical line(s) + just read. Returns ``None`` on end-of-file, since the empty string can occur + if *rstrip_ws* is true but *strip_blanks* is not. + + + .. method:: TextFile.readlines() + + Read and return the list of all logical lines remaining in the current file. + This updates the current line number to the last line of the file. + + + .. method:: TextFile.unreadline(line) + + Push *line* (a string) onto an internal buffer that will be checked by future + :meth:`readline` calls. Handy for implementing a parser with line-at-a-time + lookahead. Note that lines that are "unread" with :meth:`unreadline` are not + subsequently re-cleansed (whitespace stripped, or whatever) when read with + :meth:`readline`. If multiple calls are made to :meth:`unreadline` before a call + to :meth:`readline`, the lines will be returned most in most recent first order. + + +:mod:`distutils.version` --- Version number classes +=================================================== + +.. module:: distutils.version + :synopsis: Implements classes that represent module version numbers. + + +.. % todo +.. % \section{Distutils Commands} +.. % +.. % This part of Distutils implements the various Distutils commands, such +.. % as \code{build}, \code{install} \&c. Each command is implemented as a +.. % separate module, with the command name as the name of the module. + + +:mod:`distutils.cmd` --- Abstract base class for Distutils commands +=================================================================== + +.. module:: distutils.cmd + :synopsis: Provides the abstract base class :class:`~distutils.cmd.Command`. This class + is subclassed by the modules in the distutils.command subpackage. + + +This module supplies the abstract base class :class:`Command`. + + +.. class:: Command(dist) + + Abstract base class for defining command classes, the "worker bees" of the + Distutils. A useful analogy for command classes is to think of them as + subroutines with local variables called *options*. The options are declared + in :meth:`initialize_options` and defined (given their final values) in + :meth:`finalize_options`, both of which must be defined by every command + class. The distinction between the two is necessary because option values + might come from the outside world (command line, config file, ...), and any + options dependent on other options must be computed after these outside + influences have been processed --- hence :meth:`finalize_options`. The body + of the subroutine, where it does all its work based on the values of its + options, is the :meth:`run` method, which must also be implemented by every + command class. + + The class constructor takes a single argument *dist*, a + :class:`~distutils.core.Distribution` instance. + + +Creating a new Distutils command +================================ + +This section outlines the steps to create a new Distutils command. + +A new command lives in a module in the :mod:`distutils.command` package. There +is a sample template in that directory called :file:`command_template`. Copy +this file to a new module with the same name as the new command you're +implementing. This module should implement a class with the same name as the +module (and the command). So, for instance, to create the command +``peel_banana`` (so that users can run ``setup.py peel_banana``), you'd copy +:file:`command_template` to :file:`distutils/command/peel_banana.py`, then edit +it so that it's implementing the class :class:`peel_banana`, a subclass of +:class:`distutils.cmd.Command`. + +Subclasses of :class:`Command` must define the following methods. + +.. method:: Command.initialize_options() + + Set default values for all the options that this command supports. Note that + these defaults may be overridden by other commands, by the setup script, by + config files, or by the command-line. Thus, this is not the place to code + dependencies between options; generally, :meth:`initialize_options` + implementations are just a bunch of ``self.foo = None`` assignments. + + +.. method:: Command.finalize_options() + + Set final values for all the options that this command supports. This is + always called as late as possible, ie. after any option assignments from the + command-line or from other commands have been done. Thus, this is the place + to code option dependencies: if *foo* depends on *bar*, then it is safe to + set *foo* from *bar* as long as *foo* still has the same value it was + assigned in :meth:`initialize_options`. + + +.. method:: Command.run() + + A command's raison d'etre: carry out the action it exists to perform, controlled + by the options initialized in :meth:`initialize_options`, customized by other + commands, the setup script, the command-line, and config files, and finalized in + :meth:`finalize_options`. All terminal output and filesystem interaction should + be done by :meth:`run`. + + +.. attribute:: Command.sub_commands + + *sub_commands* formalizes the notion of a "family" of commands, + e.g. ``install`` as the parent with sub-commands ``install_lib``, + ``install_headers``, etc. The parent of a family of commands defines + *sub_commands* as a class attribute; it's a list of 2-tuples ``(command_name, + predicate)``, with *command_name* a string and *predicate* a function, a + string or ``None``. *predicate* is a method of the parent command that + determines whether the corresponding command is applicable in the current + situation. (E.g. ``install_headers`` is only applicable if we have any C + header files to install.) If *predicate* is ``None``, that command is always + applicable. + + *sub_commands* is usually defined at the *end* of a class, because + predicates can be methods of the class, so they must already have been + defined. The canonical example is the :command:`install` command. + + +:mod:`distutils.command` --- Individual Distutils commands +========================================================== + +.. module:: distutils.command + :synopsis: Contains one module for each standard Distutils command. + + +.. % \subsubsection{Individual Distutils commands} +.. % todo + + +:mod:`distutils.command.bdist` --- Build a binary installer +=========================================================== + +.. module:: distutils.command.bdist + :synopsis: Build a binary installer for a package + + +.. % todo + + +:mod:`distutils.command.bdist_packager` --- Abstract base class for packagers +============================================================================= + +.. module:: distutils.command.bdist_packager + :synopsis: Abstract base class for packagers + + +.. % todo + + +:mod:`distutils.command.bdist_dumb` --- Build a "dumb" installer +================================================================ + +.. module:: distutils.command.bdist_dumb + :synopsis: Build a "dumb" installer - a simple archive of files + + +.. % todo + + +:mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a Redhat RPM and SRPM +=========================================================================================== + +.. module:: distutils.command.bdist_rpm + :synopsis: Build a binary distribution as a Redhat RPM and SRPM + + +.. % todo + + +:mod:`distutils.command.sdist` --- Build a source distribution +============================================================== + +.. module:: distutils.command.sdist + :synopsis: Build a source distribution + + +.. % todo + + +:mod:`distutils.command.build` --- Build all files of a package +=============================================================== + +.. module:: distutils.command.build + :synopsis: Build all files of a package + + +.. % todo + + +:mod:`distutils.command.build_clib` --- Build any C libraries in a package +========================================================================== + +.. module:: distutils.command.build_clib + :synopsis: Build any C libraries in a package + + +.. % todo + + +:mod:`distutils.command.build_ext` --- Build any extensions in a package +======================================================================== + +.. module:: distutils.command.build_ext + :synopsis: Build any extensions in a package + + +.. % todo + + +:mod:`distutils.command.build_py` --- Build the .py/.pyc files of a package +=========================================================================== + +.. module:: distutils.command.build_py + :synopsis: Build the .py/.pyc files of a package + + +.. class:: build_py + +.. class:: build_py_2to3 + + Alternative implementation of build_py which also runs the + 2to3 conversion library on each .py file that is going to be + installed. To use this in a setup.py file for a distribution + that is designed to run with both Python 2.x and 3.x, add:: + + try: + from distutils.command.build_py import build_py_2to3 as build_py + except ImportError: + from distutils.command.build_py import build_py + + to your setup.py, and later:: + + cmdclass = {'build_py': build_py} + + to the invocation of setup(). + + +:mod:`distutils.command.build_scripts` --- Build the scripts of a package +========================================================================= + +.. module:: distutils.command.build_scripts + :synopsis: Build the scripts of a package + + +.. % todo + + +:mod:`distutils.command.clean` --- Clean a package build area +============================================================= + +.. module:: distutils.command.clean + :synopsis: Clean a package build area + +This command removes the temporary files created by :command:`build` +and its subcommands, like intermediary compiled object files. With +the ``--all`` option, the complete build directory will be removed. + +Extension modules built :ref:`in place <distutils-build-ext-inplace>` +will not be cleaned, as they are not in the build directory. + + +:mod:`distutils.command.config` --- Perform package configuration +================================================================= + +.. module:: distutils.command.config + :synopsis: Perform package configuration + + +.. % todo + + +:mod:`distutils.command.install` --- Install a package +====================================================== + +.. module:: distutils.command.install + :synopsis: Install a package + + +.. % todo + + +:mod:`distutils.command.install_data` --- Install data files from a package +=========================================================================== + +.. module:: distutils.command.install_data + :synopsis: Install data files from a package + + +.. % todo + + +:mod:`distutils.command.install_headers` --- Install C/C++ header files from a package +====================================================================================== + +.. module:: distutils.command.install_headers + :synopsis: Install C/C++ header files from a package + + +.. % todo + + +:mod:`distutils.command.install_lib` --- Install library files from a package +============================================================================= + +.. module:: distutils.command.install_lib + :synopsis: Install library files from a package + + +.. % todo + + +:mod:`distutils.command.install_scripts` --- Install script files from a package +================================================================================ + +.. module:: distutils.command.install_scripts + :synopsis: Install script files from a package + + +.. % todo + + +:mod:`distutils.command.register` --- Register a module with the Python Package Index +===================================================================================== + +.. module:: distutils.command.register + :synopsis: Register a module with the Python Package Index + + +The ``register`` command registers the package with the Python Package Index. +This is described in more detail in :pep:`301`. + +.. % todo + + +:mod:`distutils.command.check` --- Check the meta-data of a package +=================================================================== + +.. module:: distutils.command.check + :synopsis: Check the meta-data of a package + + +The ``check`` command performs some tests on the meta-data of a package. +For example, it verifies that all required meta-data are provided as +the arguments passed to the :func:`setup` function. + +.. % todo
diff --git a/Doc/distutils/builtdist.rst b/Doc/distutils/builtdist.rst new file mode 100644 index 0000000..c1d9ea5 --- /dev/null +++ b/Doc/distutils/builtdist.rst
@@ -0,0 +1,392 @@ +.. _built-dist: + +**************************** +Creating Built Distributions +**************************** + +.. include:: ./_setuptools_disclaimer.rst + +A "built distribution" is what you're probably used to thinking of either as a +"binary package" or an "installer" (depending on your background). It's not +necessarily binary, though, because it might contain only Python source code +and/or byte-code; and we don't call it a package, because that word is already +spoken for in Python. (And "installer" is a term specific to the world of +mainstream desktop systems.) + +A built distribution is how you make life as easy as possible for installers of +your module distribution: for users of RPM-based Linux systems, it's a binary +RPM; for Windows users, it's an executable installer; for Debian-based Linux +users, it's a Debian package; and so forth. Obviously, no one person will be +able to create built distributions for every platform under the sun, so the +Distutils are designed to enable module developers to concentrate on their +specialty---writing code and creating source distributions---while an +intermediary species called *packagers* springs up to turn source distributions +into built distributions for as many platforms as there are packagers. + +Of course, the module developer could be their own packager; or the packager could +be a volunteer "out there" somewhere who has access to a platform which the +original developer does not; or it could be software periodically grabbing new +source distributions and turning them into built distributions for as many +platforms as the software has access to. Regardless of who they are, a packager +uses the setup script and the :command:`bdist` command family to generate built +distributions. + +As a simple example, if I run the following command in the Distutils source +tree:: + + python setup.py bdist + +then the Distutils builds my module distribution (the Distutils itself in this +case), does a "fake" installation (also in the :file:`build` directory), and +creates the default type of built distribution for my platform. The default +format for built distributions is a "dumb" tar file on Unix, and a simple +executable installer on Windows. (That tar file is considered "dumb" because it +has to be unpacked in a specific location to work.) + +Thus, the above command on a Unix system creates +:file:`Distutils-1.0.{plat}.tar.gz`; unpacking this tarball from the right place +installs the Distutils just as though you had downloaded the source distribution +and run ``python setup.py install``. (The "right place" is either the root of +the filesystem or Python's :file:`{prefix}` directory, depending on the options +given to the :command:`bdist_dumb` command; the default is to make dumb +distributions relative to :file:`{prefix}`.) + +Obviously, for pure Python distributions, this isn't any simpler than just +running ``python setup.py install``\ ---but for non-pure distributions, which +include extensions that would need to be compiled, it can mean the difference +between someone being able to use your extensions or not. And creating "smart" +built distributions, such as an RPM package or an executable installer for +Windows, is far more convenient for users even if your distribution doesn't +include any extensions. + +The :command:`bdist` command has a :option:`!--formats` option, similar to the +:command:`sdist` command, which you can use to select the types of built +distribution to generate: for example, :: + + python setup.py bdist --format=zip + +would, when run on a Unix system, create +:file:`Distutils-1.0.{plat}.zip`\ ---again, this archive would be unpacked +from the root directory to install the Distutils. + +The available formats for built distributions are: + ++-------------+------------------------------+---------+ +| Format | Description | Notes | ++=============+==============================+=========+ +| ``gztar`` | gzipped tar file | \(1) | +| | (:file:`.tar.gz`) | | ++-------------+------------------------------+---------+ +| ``bztar`` | bzipped tar file | | +| | (:file:`.tar.bz2`) | | ++-------------+------------------------------+---------+ +| ``xztar`` | xzipped tar file | | +| | (:file:`.tar.xz`) | | ++-------------+------------------------------+---------+ +| ``ztar`` | compressed tar file | \(3) | +| | (:file:`.tar.Z`) | | ++-------------+------------------------------+---------+ +| ``tar`` | tar file (:file:`.tar`) | | ++-------------+------------------------------+---------+ +| ``zip`` | zip file (:file:`.zip`) | (2),(4) | ++-------------+------------------------------+---------+ +| ``rpm`` | RPM | \(5) | ++-------------+------------------------------+---------+ +| ``pkgtool`` | Solaris :program:`pkgtool` | | ++-------------+------------------------------+---------+ +| ``sdux`` | HP-UX :program:`swinstall` | | ++-------------+------------------------------+---------+ +| ``msi`` | Microsoft Installer. | | ++-------------+------------------------------+---------+ + +.. versionchanged:: 3.5 + Added support for the ``xztar`` format. + + +Notes: + +(1) + default on Unix + +(2) + default on Windows + +(3) + requires external :program:`compress` utility. + +(4) + requires either external :program:`zip` utility or :mod:`zipfile` module (part + of the standard Python library since Python 1.6) + +(5) + requires external :program:`rpm` utility, version 3.0.4 or better (use ``rpm + --version`` to find out which version you have) + +You don't have to use the :command:`bdist` command with the :option:`!--formats` +option; you can also use the command that directly implements the format you're +interested in. Some of these :command:`bdist` "sub-commands" actually generate +several similar formats; for instance, the :command:`bdist_dumb` command +generates all the "dumb" archive formats (``tar``, ``gztar``, ``bztar``, +``xztar``, ``ztar``, and ``zip``), and :command:`bdist_rpm` generates both +binary and source RPMs. The :command:`bdist` sub-commands, and the formats +generated by each, are: + ++--------------------------+-------------------------------------+ +| Command | Formats | ++==========================+=====================================+ +| :command:`bdist_dumb` | tar, gztar, bztar, xztar, ztar, zip | ++--------------------------+-------------------------------------+ +| :command:`bdist_rpm` | rpm, srpm | ++--------------------------+-------------------------------------+ + +The following sections give details on the individual :command:`bdist_\*` +commands. + + +.. .. _creating-dumb: + +.. Creating dumb built distributions +.. ================================= + +.. XXX Need to document absolute vs. prefix-relative packages here, but first + I have to implement it! + + +.. _creating-rpms: + +Creating RPM packages +===================== + +The RPM format is used by many popular Linux distributions, including Red Hat, +SuSE, and Mandrake. If one of these (or any of the other RPM-based Linux +distributions) is your usual environment, creating RPM packages for other users +of that same distribution is trivial. Depending on the complexity of your module +distribution and differences between Linux distributions, you may also be able +to create RPMs that work on different RPM-based distributions. + +The usual way to create an RPM of your module distribution is to run the +:command:`bdist_rpm` command:: + + python setup.py bdist_rpm + +or the :command:`bdist` command with the :option:`!--format` option:: + + python setup.py bdist --formats=rpm + +The former allows you to specify RPM-specific options; the latter allows you to +easily specify multiple formats in one run. If you need to do both, you can +explicitly specify multiple :command:`bdist_\*` commands and their options:: + + python setup.py bdist_rpm --packager="John Doe <jdoe@example.org>" + +Creating RPM packages is driven by a :file:`.spec` file, much as using the +Distutils is driven by the setup script. To make your life easier, the +:command:`bdist_rpm` command normally creates a :file:`.spec` file based on the +information you supply in the setup script, on the command line, and in any +Distutils configuration files. Various options and sections in the +:file:`.spec` file are derived from options in the setup script as follows: + ++------------------------------------------+----------------------------------------------+ +| RPM :file:`.spec` file option or section | Distutils setup script option | ++==========================================+==============================================+ +| Name | ``name`` | ++------------------------------------------+----------------------------------------------+ +| Summary (in preamble) | ``description`` | ++------------------------------------------+----------------------------------------------+ +| Version | ``version`` | ++------------------------------------------+----------------------------------------------+ +| Vendor | ``author`` and ``author_email``, | +| | or --- & ``maintainer`` and | +| | ``maintainer_email`` | ++------------------------------------------+----------------------------------------------+ +| Copyright | ``license`` | ++------------------------------------------+----------------------------------------------+ +| Url | ``url`` | ++------------------------------------------+----------------------------------------------+ +| %description (section) | ``long_description`` | ++------------------------------------------+----------------------------------------------+ + +Additionally, there are many options in :file:`.spec` files that don't have +corresponding options in the setup script. Most of these are handled through +options to the :command:`bdist_rpm` command as follows: + ++-------------------------------+-----------------------------+-------------------------+ +| RPM :file:`.spec` file option | :command:`bdist_rpm` option | default value | +| or section | | | ++===============================+=============================+=========================+ +| Release | ``release`` | "1" | ++-------------------------------+-----------------------------+-------------------------+ +| Group | ``group`` | "Development/Libraries" | ++-------------------------------+-----------------------------+-------------------------+ +| Vendor | ``vendor`` | (see above) | ++-------------------------------+-----------------------------+-------------------------+ +| Packager | ``packager`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ +| Provides | ``provides`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ +| Requires | ``requires`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ +| Conflicts | ``conflicts`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ +| Obsoletes | ``obsoletes`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ +| Distribution | ``distribution_name`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ +| BuildRequires | ``build_requires`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ +| Icon | ``icon`` | (none) | ++-------------------------------+-----------------------------+-------------------------+ + +Obviously, supplying even a few of these options on the command-line would be +tedious and error-prone, so it's usually best to put them in the setup +configuration file, :file:`setup.cfg`\ ---see section :ref:`setup-config`. If +you distribute or package many Python module distributions, you might want to +put options that apply to all of them in your personal Distutils configuration +file (:file:`~/.pydistutils.cfg`). If you want to temporarily disable +this file, you can pass the :option:`!--no-user-cfg` option to :file:`setup.py`. + +There are three steps to building a binary RPM package, all of which are +handled automatically by the Distutils: + +#. create a :file:`.spec` file, which describes the package (analogous to the + Distutils setup script; in fact, much of the information in the setup script + winds up in the :file:`.spec` file) + +#. create the source RPM + +#. create the "binary" RPM (which may or may not contain binary code, depending + on whether your module distribution contains Python extensions) + +Normally, RPM bundles the last two steps together; when you use the Distutils, +all three steps are typically bundled together. + +If you wish, you can separate these three steps. You can use the +:option:`!--spec-only` option to make :command:`bdist_rpm` just create the +:file:`.spec` file and exit; in this case, the :file:`.spec` file will be +written to the "distribution directory"---normally :file:`dist/`, but +customizable with the :option:`!--dist-dir` option. (Normally, the :file:`.spec` +file winds up deep in the "build tree," in a temporary directory created by +:command:`bdist_rpm`.) + +.. % \XXX{this isn't implemented yet---is it needed?!} +.. % You can also specify a custom \file{.spec} file with the +.. % \longprogramopt{spec-file} option; used in conjunction with +.. % \longprogramopt{spec-only}, this gives you an opportunity to customize +.. % the \file{.spec} file manually: +.. % +.. % \ begin{verbatim} +.. % > python setup.py bdist_rpm --spec-only +.. % # ...edit dist/FooBar-1.0.spec +.. % > python setup.py bdist_rpm --spec-file=dist/FooBar-1.0.spec +.. % \ end{verbatim} +.. % +.. % (Although a better way to do this is probably to override the standard +.. % \command{bdist\_rpm} command with one that writes whatever else you want +.. % to the \file{.spec} file.) + + +.. _cross-compile-windows: + +Cross-compiling on Windows +========================== + +Starting with Python 2.6, distutils is capable of cross-compiling between +Windows platforms. In practice, this means that with the correct tools +installed, you can use a 32bit version of Windows to create 64bit extensions +and vice-versa. + +To build for an alternate platform, specify the :option:`!--plat-name` option +to the build command. Valid values are currently 'win32', and 'win-amd64'. +For example, on a 32bit version of Windows, you could execute:: + + python setup.py build --plat-name=win-amd64 + +to build a 64bit version of your extension. + +would create a 64bit installation executable on your 32bit version of Windows. + +To cross-compile, you must download the Python source code and cross-compile +Python itself for the platform you are targeting - it is not possible from a +binary installation of Python (as the .lib etc file for other platforms are +not included.) In practice, this means the user of a 32 bit operating +system will need to use Visual Studio 2008 to open the +:file:`PCbuild/PCbuild.sln` solution in the Python source tree and build the +"x64" configuration of the 'pythoncore' project before cross-compiling +extensions is possible. + +Note that by default, Visual Studio 2008 does not install 64bit compilers or +tools. You may need to reexecute the Visual Studio setup process and select +these tools (using Control Panel->[Add/Remove] Programs is a convenient way to +check or modify your existing install.) + +.. _postinstallation-script: + +The Postinstallation script +--------------------------- + +Starting with Python 2.3, a postinstallation script can be specified with the +:option:`!--install-script` option. The basename of the script must be +specified, and the script filename must also be listed in the scripts argument +to the setup function. + +This script will be run at installation time on the target system after all the +files have been copied, with ``argv[1]`` set to :option:`!-install`, and again at +uninstallation time before the files are removed with ``argv[1]`` set to +:option:`!-remove`. + +The installation script runs embedded in the windows installer, every output +(``sys.stdout``, ``sys.stderr``) is redirected into a buffer and will be +displayed in the GUI after the script has finished. + +Some functions especially useful in this context are available as additional +built-in functions in the installation script. + + +.. function:: directory_created(path) + file_created(path) + + These functions should be called when a directory or file is created by the + postinstall script at installation time. It will register *path* with the + uninstaller, so that it will be removed when the distribution is uninstalled. + To be safe, directories are only removed if they are empty. + + +.. function:: get_special_folder_path(csidl_string) + + This function can be used to retrieve special folder locations on Windows like + the Start Menu or the Desktop. It returns the full path to the folder. + *csidl_string* must be one of the following strings:: + + "CSIDL_APPDATA" + + "CSIDL_COMMON_STARTMENU" + "CSIDL_STARTMENU" + + "CSIDL_COMMON_DESKTOPDIRECTORY" + "CSIDL_DESKTOPDIRECTORY" + + "CSIDL_COMMON_STARTUP" + "CSIDL_STARTUP" + + "CSIDL_COMMON_PROGRAMS" + "CSIDL_PROGRAMS" + + "CSIDL_FONTS" + + If the folder cannot be retrieved, :exc:`OSError` is raised. + + Which folders are available depends on the exact Windows version, and probably + also the configuration. For details refer to Microsoft's documentation of the + :c:func:`SHGetSpecialFolderPath` function. + + +.. function:: create_shortcut(target, description, filename[, arguments[, workdir[, iconpath[, iconindex]]]]) + + This function creates a shortcut. *target* is the path to the program to be + started by the shortcut. *description* is the description of the shortcut. + *filename* is the title of the shortcut that the user will see. *arguments* + specifies the command line arguments, if any. *workdir* is the working directory + for the program. *iconpath* is the file containing the icon for the shortcut, + and *iconindex* is the index of the icon in the file *iconpath*. Again, for + details consult the Microsoft documentation for the :class:`IShellLink` + interface.
diff --git a/Doc/distutils/commandref.rst b/Doc/distutils/commandref.rst new file mode 100644 index 0000000..3e247e6 --- /dev/null +++ b/Doc/distutils/commandref.rst
@@ -0,0 +1,105 @@ +.. _reference: + +***************** +Command Reference +***************** + +.. include:: ./_setuptools_disclaimer.rst + +.. % \section{Building modules: the \protect\command{build} command family} +.. % \label{build-cmds} +.. % \subsubsection{\protect\command{build}} +.. % \label{build-cmd} +.. % \subsubsection{\protect\command{build\_py}} +.. % \label{build-py-cmd} +.. % \subsubsection{\protect\command{build\_ext}} +.. % \label{build-ext-cmd} +.. % \subsubsection{\protect\command{build\_clib}} +.. % \label{build-clib-cmd} + + +.. _install-cmd: + +Installing modules: the :command:`install` command family +========================================================= + +The install command ensures that the build commands have been run and then runs +the subcommands :command:`install_lib`, :command:`install_data` and +:command:`install_scripts`. + +.. % \subsubsection{\protect\command{install\_lib}} +.. % \label{install-lib-cmd} + + +.. _install-data-cmd: + +:command:`install_data` +----------------------- + +This command installs all data files provided with the distribution. + + +.. _install-scripts-cmd: + +:command:`install_scripts` +-------------------------- + +This command installs all (Python) scripts in the distribution. + +.. % \subsection{Cleaning up: the \protect\command{clean} command} +.. % \label{clean-cmd} + + +.. _sdist-cmd: + +Creating a source distribution: the :command:`sdist` command +============================================================ + +.. XXX fragment moved down from above: needs context! + +The manifest template commands are: + ++-------------------------------------------+-----------------------------------------------+ +| Command | Description | ++===========================================+===============================================+ +| :command:`include pat1 pat2 ...` | include all files matching any of the listed | +| | patterns | ++-------------------------------------------+-----------------------------------------------+ +| :command:`exclude pat1 pat2 ...` | exclude all files matching any of the listed | +| | patterns | ++-------------------------------------------+-----------------------------------------------+ +| :command:`recursive-include dir pat1 pat2 | include all files under *dir* matching any of | +| ...` | the listed patterns | ++-------------------------------------------+-----------------------------------------------+ +| :command:`recursive-exclude dir pat1 pat2 | exclude all files under *dir* matching any of | +| ...` | the listed patterns | ++-------------------------------------------+-----------------------------------------------+ +| :command:`global-include pat1 pat2 ...` | include all files anywhere in the source tree | +| | matching --- & any of the listed patterns | ++-------------------------------------------+-----------------------------------------------+ +| :command:`global-exclude pat1 pat2 ...` | exclude all files anywhere in the source tree | +| | matching --- & any of the listed patterns | ++-------------------------------------------+-----------------------------------------------+ +| :command:`prune dir` | exclude all files under *dir* | ++-------------------------------------------+-----------------------------------------------+ +| :command:`graft dir` | include all files under *dir* | ++-------------------------------------------+-----------------------------------------------+ + +The patterns here are Unix-style "glob" patterns: ``*`` matches any sequence of +regular filename characters, ``?`` matches any single regular filename +character, and ``[range]`` matches any of the characters in *range* (e.g., +``a-z``, ``a-zA-Z``, ``a-f0-9_.``). The definition of "regular filename +character" is platform-specific: on Unix it is anything except slash; on Windows +anything except backslash or colon. + +.. XXX Windows support not there yet + +.. % \section{Creating a built distribution: the +.. % \protect\command{bdist} command family} +.. % \label{bdist-cmds} + +.. % \subsection{\protect\command{bdist}} +.. % \subsection{\protect\command{bdist\_dumb}} +.. % \subsection{\protect\command{bdist\_rpm}} + +
diff --git a/Doc/distutils/configfile.rst b/Doc/distutils/configfile.rst new file mode 100644 index 0000000..2a5c832 --- /dev/null +++ b/Doc/distutils/configfile.rst
@@ -0,0 +1,144 @@ +.. _setup-config: + +************************************ +Writing the Setup Configuration File +************************************ + +.. include:: ./_setuptools_disclaimer.rst + +Often, it's not possible to write down everything needed to build a distribution +*a priori*: you may need to get some information from the user, or from the +user's system, in order to proceed. As long as that information is fairly +simple---a list of directories to search for C header files or libraries, for +example---then providing a configuration file, :file:`setup.cfg`, for users to +edit is a cheap and easy way to solicit it. Configuration files also let you +provide default values for any command option, which the installer can then +override either on the command-line or by editing the config file. + +The setup configuration file is a useful middle-ground between the setup +script---which, ideally, would be opaque to installers [#]_---and the command-line to +the setup script, which is outside of your control and entirely up to the +installer. In fact, :file:`setup.cfg` (and any other Distutils configuration +files present on the target system) are processed after the contents of the +setup script, but before the command-line. This has several useful +consequences: + +.. % (If you have more advanced needs, such as determining which extensions +.. % to build based on what capabilities are present on the target system, +.. % then you need the Distutils ``auto-configuration'' facility. This +.. % started to appear in Distutils 0.9 but, as of this writing, isn't mature +.. % or stable enough yet for real-world use.) + +* installers can override some of what you put in :file:`setup.py` by editing + :file:`setup.cfg` + +* you can provide non-standard defaults for options that are not easily set in + :file:`setup.py` + +* installers can override anything in :file:`setup.cfg` using the command-line + options to :file:`setup.py` + +The basic syntax of the configuration file is simple: + +.. code-block:: ini + + [command] + option=value + ... + +where *command* is one of the Distutils commands (e.g. :command:`build_py`, +:command:`install`), and *option* is one of the options that command supports. +Any number of options can be supplied for each command, and any number of +command sections can be included in the file. Blank lines are ignored, as are +comments, which run from a ``'#'`` character until the end of the line. Long +option values can be split across multiple lines simply by indenting the +continuation lines. + +You can find out the list of options supported by a particular command with the +universal :option:`!--help` option, e.g. + +.. code-block:: shell-session + + $ python setup.py --help build_ext + [...] + Options for 'build_ext' command: + --build-lib (-b) directory for compiled extension modules + --build-temp (-t) directory for temporary files (build by-products) + --inplace (-i) ignore build-lib and put compiled extensions into the + source directory alongside your pure Python modules + --include-dirs (-I) list of directories to search for header files + --define (-D) C preprocessor macros to define + --undef (-U) C preprocessor macros to undefine + --swig-opts list of SWIG command line options + [...] + +Note that an option spelled :option:`!--foo-bar` on the command-line is spelled +``foo_bar`` in configuration files. + +.. _distutils-build-ext-inplace: + +For example, say you want your extensions to be built "in-place"---that is, you +have an extension :mod:`pkg.ext`, and you want the compiled extension file +(:file:`ext.so` on Unix, say) to be put in the same source directory as your +pure Python modules :mod:`pkg.mod1` and :mod:`pkg.mod2`. You can always use the +:option:`!--inplace` option on the command-line to ensure this: + +.. code-block:: sh + + python setup.py build_ext --inplace + +But this requires that you always specify the :command:`build_ext` command +explicitly, and remember to provide :option:`!--inplace`. An easier way is to +"set and forget" this option, by encoding it in :file:`setup.cfg`, the +configuration file for this distribution: + +.. code-block:: ini + + [build_ext] + inplace=1 + +This will affect all builds of this module distribution, whether or not you +explicitly specify :command:`build_ext`. If you include :file:`setup.cfg` in +your source distribution, it will also affect end-user builds---which is +probably a bad idea for this option, since always building extensions in-place +would break installation of the module distribution. In certain peculiar cases, +though, modules are built right in their installation directory, so this is +conceivably a useful ability. (Distributing extensions that expect to be built +in their installation directory is almost always a bad idea, though.) + +Another example: certain commands take a lot of options that don't change from +run to run; for example, :command:`bdist_rpm` needs to know everything required +to generate a "spec" file for creating an RPM distribution. Some of this +information comes from the setup script, and some is automatically generated by +the Distutils (such as the list of files installed). But some of it has to be +supplied as options to :command:`bdist_rpm`, which would be very tedious to do +on the command-line for every run. Hence, here is a snippet from the Distutils' +own :file:`setup.cfg`: + +.. code-block:: ini + + [bdist_rpm] + release = 1 + packager = Greg Ward <gward@python.net> + doc_files = CHANGES.txt + README.txt + USAGE.txt + doc/ + examples/ + +Note that the ``doc_files`` option is simply a whitespace-separated string +split across multiple lines for readability. + + +.. seealso:: + + :ref:`inst-config-syntax` in "Installing Python Modules" + More information on the configuration files is available in the manual for + system administrators. + + +.. rubric:: Footnotes + +.. [#] This ideal probably won't be achieved until auto-configuration is fully + supported by the Distutils. +
diff --git a/Doc/distutils/examples.rst b/Doc/distutils/examples.rst new file mode 100644 index 0000000..49e4b6e --- /dev/null +++ b/Doc/distutils/examples.rst
@@ -0,0 +1,340 @@ +.. _distutils_examples: + +****************** +Distutils Examples +****************** + +.. include:: ./_setuptools_disclaimer.rst + +This chapter provides a number of basic examples to help get started with +distutils. Additional information about using distutils can be found in the +Distutils Cookbook. + + +.. seealso:: + + `Distutils Cookbook <https://wiki.python.org/moin/Distutils/Cookbook>`_ + Collection of recipes showing how to achieve more control over distutils. + + +.. _pure-mod: + +Pure Python distribution (by module) +==================================== + +If you're just distributing a couple of modules, especially if they don't live +in a particular package, you can specify them individually using the +``py_modules`` option in the setup script. + +In the simplest case, you'll have two files to worry about: a setup script and +the single module you're distributing, :file:`foo.py` in this example:: + + <root>/ + setup.py + foo.py + +(In all diagrams in this section, *<root>* will refer to the distribution root +directory.) A minimal setup script to describe this situation would be:: + + from distutils.core import setup + setup(name='foo', + version='1.0', + py_modules=['foo'], + ) + +Note that the name of the distribution is specified independently with the +``name`` option, and there's no rule that says it has to be the same as +the name of the sole module in the distribution (although that's probably a good +convention to follow). However, the distribution name is used to generate +filenames, so you should stick to letters, digits, underscores, and hyphens. + +Since ``py_modules`` is a list, you can of course specify multiple +modules, eg. if you're distributing modules :mod:`foo` and :mod:`bar`, your +setup might look like this:: + + <root>/ + setup.py + foo.py + bar.py + +and the setup script might be :: + + from distutils.core import setup + setup(name='foobar', + version='1.0', + py_modules=['foo', 'bar'], + ) + +You can put module source files into another directory, but if you have enough +modules to do that, it's probably easier to specify modules by package rather +than listing them individually. + + +.. _pure-pkg: + +Pure Python distribution (by package) +===================================== + +If you have more than a couple of modules to distribute, especially if they are +in multiple packages, it's probably easier to specify whole packages rather than +individual modules. This works even if your modules are not in a package; you +can just tell the Distutils to process modules from the root package, and that +works the same as any other package (except that you don't have to have an +:file:`__init__.py` file). + +The setup script from the last example could also be written as :: + + from distutils.core import setup + setup(name='foobar', + version='1.0', + packages=[''], + ) + +(The empty string stands for the root package.) + +If those two files are moved into a subdirectory, but remain in the root +package, e.g.:: + + <root>/ + setup.py + src/ foo.py + bar.py + +then you would still specify the root package, but you have to tell the +Distutils where source files in the root package live:: + + from distutils.core import setup + setup(name='foobar', + version='1.0', + package_dir={'': 'src'}, + packages=[''], + ) + +More typically, though, you will want to distribute multiple modules in the same +package (or in sub-packages). For example, if the :mod:`foo` and :mod:`bar` +modules belong in package :mod:`foobar`, one way to layout your source tree is +:: + + <root>/ + setup.py + foobar/ + __init__.py + foo.py + bar.py + +This is in fact the default layout expected by the Distutils, and the one that +requires the least work to describe in your setup script:: + + from distutils.core import setup + setup(name='foobar', + version='1.0', + packages=['foobar'], + ) + +If you want to put modules in directories not named for their package, then you +need to use the ``package_dir`` option again. For example, if the +:file:`src` directory holds modules in the :mod:`foobar` package:: + + <root>/ + setup.py + src/ + __init__.py + foo.py + bar.py + +an appropriate setup script would be :: + + from distutils.core import setup + setup(name='foobar', + version='1.0', + package_dir={'foobar': 'src'}, + packages=['foobar'], + ) + +Or, you might put modules from your main package right in the distribution +root:: + + <root>/ + setup.py + __init__.py + foo.py + bar.py + +in which case your setup script would be :: + + from distutils.core import setup + setup(name='foobar', + version='1.0', + package_dir={'foobar': ''}, + packages=['foobar'], + ) + +(The empty string also stands for the current directory.) + +If you have sub-packages, they must be explicitly listed in ``packages``, +but any entries in ``package_dir`` automatically extend to sub-packages. +(In other words, the Distutils does *not* scan your source tree, trying to +figure out which directories correspond to Python packages by looking for +:file:`__init__.py` files.) Thus, if the default layout grows a sub-package:: + + <root>/ + setup.py + foobar/ + __init__.py + foo.py + bar.py + subfoo/ + __init__.py + blah.py + +then the corresponding setup script would be :: + + from distutils.core import setup + setup(name='foobar', + version='1.0', + packages=['foobar', 'foobar.subfoo'], + ) + + +.. _single-ext: + +Single extension module +======================= + +Extension modules are specified using the ``ext_modules`` option. +``package_dir`` has no effect on where extension source files are found; +it only affects the source for pure Python modules. The simplest case, a +single extension module in a single C source file, is:: + + <root>/ + setup.py + foo.c + +If the :mod:`foo` extension belongs in the root package, the setup script for +this could be :: + + from distutils.core import setup + from distutils.extension import Extension + setup(name='foobar', + version='1.0', + ext_modules=[Extension('foo', ['foo.c'])], + ) + +If the extension actually belongs in a package, say :mod:`foopkg`, then + +With exactly the same source tree layout, this extension can be put in the +:mod:`foopkg` package simply by changing the name of the extension:: + + from distutils.core import setup + from distutils.extension import Extension + setup(name='foobar', + version='1.0', + ext_modules=[Extension('foopkg.foo', ['foo.c'])], + ) + +Checking a package +================== + +The ``check`` command allows you to verify if your package meta-data +meet the minimum requirements to build a distribution. + +To run it, just call it using your :file:`setup.py` script. If something is +missing, ``check`` will display a warning. + +Let's take an example with a simple script:: + + from distutils.core import setup + + setup(name='foobar') + +Running the ``check`` command will display some warnings: + +.. code-block:: shell-session + + $ python setup.py check + running check + warning: check: missing required meta-data: version, url + warning: check: missing meta-data: either (author and author_email) or + (maintainer and maintainer_email) should be supplied + + +If you use the reStructuredText syntax in the ``long_description`` field and +`docutils`_ is installed you can check if the syntax is fine with the +``check`` command, using the ``restructuredtext`` option. + +For example, if the :file:`setup.py` script is changed like this:: + + from distutils.core import setup + + desc = """\ + My description + ============== + + This is the description of the ``foobar`` package. + """ + + setup(name='foobar', version='1', author='tarek', + author_email='tarek@ziade.org', + url='http://example.com', long_description=desc) + +Where the long description is broken, ``check`` will be able to detect it +by using the :mod:`docutils` parser: + +.. code-block:: shell-session + + $ python setup.py check --restructuredtext + running check + warning: check: Title underline too short. (line 2) + warning: check: Could not finish the parsing. + +Reading the metadata +===================== + +The :func:`distutils.core.setup` function provides a command-line interface +that allows you to query the metadata fields of a project through the +``setup.py`` script of a given project: + +.. code-block:: shell-session + + $ python setup.py --name + distribute + +This call reads the ``name`` metadata by running the +:func:`distutils.core.setup` function. Although, when a source or binary +distribution is created with Distutils, the metadata fields are written +in a static file called :file:`PKG-INFO`. When a Distutils-based project is +installed in Python, the :file:`PKG-INFO` file is copied alongside the modules +and packages of the distribution under :file:`NAME-VERSION-pyX.X.egg-info`, +where ``NAME`` is the name of the project, ``VERSION`` its version as defined +in the Metadata, and ``pyX.X`` the major and minor version of Python like +``2.7`` or ``3.2``. + +You can read back this static file, by using the +:class:`distutils.dist.DistributionMetadata` class and its +:func:`read_pkg_file` method:: + + >>> from distutils.dist import DistributionMetadata + >>> metadata = DistributionMetadata() + >>> metadata.read_pkg_file(open('distribute-0.6.8-py2.7.egg-info')) + >>> metadata.name + 'distribute' + >>> metadata.version + '0.6.8' + >>> metadata.description + 'Easily download, build, install, upgrade, and uninstall Python packages' + +Notice that the class can also be instantiated with a metadata file path to +loads its values:: + + >>> pkg_info_path = 'distribute-0.6.8-py2.7.egg-info' + >>> DistributionMetadata(pkg_info_path).name + 'distribute' + + +.. % \section{Multiple extension modules} +.. % \label{multiple-ext} + +.. % \section{Putting it all together} + + +.. _docutils: https://docutils.sourceforge.io
diff --git a/Doc/distutils/extending.rst b/Doc/distutils/extending.rst new file mode 100644 index 0000000..1075e81 --- /dev/null +++ b/Doc/distutils/extending.rst
@@ -0,0 +1,98 @@ +.. _extending-distutils: + +******************* +Extending Distutils +******************* + +.. include:: ./_setuptools_disclaimer.rst + +Distutils can be extended in various ways. Most extensions take the form of new +commands or replacements for existing commands. New commands may be written to +support new types of platform-specific packaging, for example, while +replacements for existing commands may be made to modify details of how the +command operates on a package. + +Most extensions of the distutils are made within :file:`setup.py` scripts that +want to modify existing commands; many simply add a few file extensions that +should be copied into packages in addition to :file:`.py` files as a +convenience. + +Most distutils command implementations are subclasses of the +:class:`distutils.cmd.Command` class. New commands may directly inherit from +:class:`Command`, while replacements often derive from :class:`Command` +indirectly, directly subclassing the command they are replacing. Commands are +required to derive from :class:`Command`. + +.. % \section{Extending existing commands} +.. % \label{extend-existing} + +.. % \section{Writing new commands} +.. % \label{new-commands} +.. % \XXX{Would an uninstall command be a good example here?} + + +Integrating new commands +======================== + +There are different ways to integrate new command implementations into +distutils. The most difficult is to lobby for the inclusion of the new features +in distutils itself, and wait for (and require) a version of Python that +provides that support. This is really hard for many reasons. + +The most common, and possibly the most reasonable for most needs, is to include +the new implementations with your :file:`setup.py` script, and cause the +:func:`distutils.core.setup` function use them:: + + from distutils.command.build_py import build_py as _build_py + from distutils.core import setup + + class build_py(_build_py): + """Specialized Python source builder.""" + + # implement whatever needs to be different... + + setup(cmdclass={'build_py': build_py}, + ...) + +This approach is most valuable if the new implementations must be used to use a +particular package, as everyone interested in the package will need to have the +new command implementation. + +Beginning with Python 2.4, a third option is available, intended to allow new +commands to be added which can support existing :file:`setup.py` scripts without +requiring modifications to the Python installation. This is expected to allow +third-party extensions to provide support for additional packaging systems, but +the commands can be used for anything distutils commands can be used for. A new +configuration option, ``command_packages`` (command-line option +:option:`!--command-packages`), can be used to specify additional packages to be +searched for modules implementing commands. Like all distutils options, this +can be specified on the command line or in a configuration file. This option +can only be set in the ``[global]`` section of a configuration file, or before +any commands on the command line. If set in a configuration file, it can be +overridden from the command line; setting it to an empty string on the command +line causes the default to be used. This should never be set in a configuration +file provided with a package. + +This new option can be used to add any number of packages to the list of +packages searched for command implementations; multiple package names should be +separated by commas. When not specified, the search is only performed in the +:mod:`distutils.command` package. When :file:`setup.py` is run with the option +``--command-packages distcmds,buildcmds``, however, the packages +:mod:`distutils.command`, :mod:`distcmds`, and :mod:`buildcmds` will be searched +in that order. New commands are expected to be implemented in modules of the +same name as the command by classes sharing the same name. Given the example +command line option above, the command :command:`bdist_openpkg` could be +implemented by the class :class:`distcmds.bdist_openpkg.bdist_openpkg` or +:class:`buildcmds.bdist_openpkg.bdist_openpkg`. + + +Adding new distribution types +============================= + +Commands that create distributions (files in the :file:`dist/` directory) need +to add ``(command, filename)`` pairs to ``self.distribution.dist_files`` so that +:command:`upload` can upload it to PyPI. The *filename* in the pair contains no +path information, only the name of the file itself. In dry-run mode, pairs +should still be added to represent what would have been created. + +
diff --git a/Doc/distutils/index.rst b/Doc/distutils/index.rst new file mode 100644 index 0000000..2ccddc3 --- /dev/null +++ b/Doc/distutils/index.rst
@@ -0,0 +1,49 @@ +.. _distutils-index: + +############################################## + Distributing Python Modules (Legacy version) +############################################## + +:Authors: Greg Ward, Anthony Baxter +:Email: distutils-sig@python.org + +.. seealso:: + + :ref:`distributing-index` + The up to date module distribution documentations + +.. note:: + + The entire ``distutils`` package has been deprecated and will be + removed in Python 3.12. This documentation is retained as a + reference only, and will be removed with the package. See the + :ref:`What's New <distutils-deprecated>` entry for more information. + +.. include:: ./_setuptools_disclaimer.rst + +.. note:: + + This guide only covers the basic tools for building and distributing + extensions that are provided as part of this version of Python. Third party + tools offer easier to use and more secure alternatives. Refer to the `quick + recommendations section <https://packaging.python.org/guides/tool-recommendations/>`__ + in the Python Packaging User Guide for more information. + +This document describes the Python Distribution Utilities ("Distutils") from +the module developer's point of view, describing the underlying capabilities +that ``setuptools`` builds on to allow Python developers to make Python modules +and extensions readily available to a wider audience. + +.. toctree:: + :maxdepth: 2 + :numbered: + + introduction.rst + setupscript.rst + configfile.rst + sourcedist.rst + builtdist.rst + examples.rst + extending.rst + commandref.rst + apiref.rst
diff --git a/Doc/distutils/introduction.rst b/Doc/distutils/introduction.rst new file mode 100644 index 0000000..87ed178 --- /dev/null +++ b/Doc/distutils/introduction.rst
@@ -0,0 +1,203 @@ +.. _distutils-intro: + +**************************** +An Introduction to Distutils +**************************** + +.. include:: ./_setuptools_disclaimer.rst + +This document covers using the Distutils to distribute your Python modules, +concentrating on the role of developer/distributor: if you're looking for +information on installing Python modules, you should refer to the +:ref:`install-index` chapter. + + +.. _distutils-concepts: + +Concepts & Terminology +====================== + +Using the Distutils is quite simple, both for module developers and for +users/administrators installing third-party modules. As a developer, your +responsibilities (apart from writing solid, well-documented and well-tested +code, of course!) are: + +* write a setup script (:file:`setup.py` by convention) + +* (optional) write a setup configuration file + +* create a source distribution + +* (optional) create one or more built (binary) distributions + +Each of these tasks is covered in this document. + +Not all module developers have access to a multitude of platforms, so it's not +always feasible to expect them to create a multitude of built distributions. It +is hoped that a class of intermediaries, called *packagers*, will arise to +address this need. Packagers will take source distributions released by module +developers, build them on one or more platforms, and release the resulting built +distributions. Thus, users on the most popular platforms will be able to +install most popular Python module distributions in the most natural way for +their platform, without having to run a single setup script or compile a line of +code. + + +.. _distutils-simple-example: + +A Simple Example +================ + +The setup script is usually quite simple, although since it's written in Python, +there are no arbitrary limits to what you can do with it, though you should be +careful about putting arbitrarily expensive operations in your setup script. +Unlike, say, Autoconf-style configure scripts, the setup script may be run +multiple times in the course of building and installing your module +distribution. + +If all you want to do is distribute a module called :mod:`foo`, contained in a +file :file:`foo.py`, then your setup script can be as simple as this:: + + from distutils.core import setup + setup(name='foo', + version='1.0', + py_modules=['foo'], + ) + +Some observations: + +* most information that you supply to the Distutils is supplied as keyword + arguments to the :func:`setup` function + +* those keyword arguments fall into two categories: package metadata (name, + version number) and information about what's in the package (a list of pure + Python modules, in this case) + +* modules are specified by module name, not filename (the same will hold true + for packages and extensions) + +* it's recommended that you supply a little more metadata, in particular your + name, email address and a URL for the project (see section :ref:`setup-script` + for an example) + +To create a source distribution for this module, you would create a setup +script, :file:`setup.py`, containing the above code, and run this command from a +terminal:: + + python setup.py sdist + +For Windows, open a command prompt window (:menuselection:`Start --> +Accessories`) and change the command to:: + + setup.py sdist + +:command:`sdist` will create an archive file (e.g., tarball on Unix, ZIP file on Windows) +containing your setup script :file:`setup.py`, and your module :file:`foo.py`. +The archive file will be named :file:`foo-1.0.tar.gz` (or :file:`.zip`), and +will unpack into a directory :file:`foo-1.0`. + +If an end-user wishes to install your :mod:`foo` module, all they have to do is +download :file:`foo-1.0.tar.gz` (or :file:`.zip`), unpack it, and---from the +:file:`foo-1.0` directory---run :: + + python setup.py install + +which will ultimately copy :file:`foo.py` to the appropriate directory for +third-party modules in their Python installation. + +This simple example demonstrates some fundamental concepts of the Distutils. +First, both developers and installers have the same basic user interface, i.e. +the setup script. The difference is which Distutils *commands* they use: the +:command:`sdist` command is almost exclusively for module developers, while +:command:`install` is more often for installers (although most developers will +want to install their own code occasionally). + +Other useful built distribution formats are RPM, implemented by the +:command:`bdist_rpm` command, Solaris :program:`pkgtool` +(:command:`bdist_pkgtool`), and HP-UX :program:`swinstall` +(:command:`bdist_sdux`). For example, the following command will create an RPM +file called :file:`foo-1.0.noarch.rpm`:: + + python setup.py bdist_rpm + +(The :command:`bdist_rpm` command uses the :command:`rpm` executable, therefore +this has to be run on an RPM-based system such as Red Hat Linux, SuSE Linux, or +Mandrake Linux.) + +You can find out what distribution formats are available at any time by running +:: + + python setup.py bdist --help-formats + + +.. _python-terms: + +General Python terminology +========================== + +If you're reading this document, you probably have a good idea of what modules, +extensions, and so forth are. Nevertheless, just to be sure that everyone is +operating from a common starting point, we offer the following glossary of +common Python terms: + +module + the basic unit of code reusability in Python: a block of code imported by some + other code. Three types of modules concern us here: pure Python modules, + extension modules, and packages. + +pure Python module + a module written in Python and contained in a single :file:`.py` file (and + possibly associated :file:`.pyc` files). Sometimes referred to as a + "pure module." + +extension module + a module written in the low-level language of the Python implementation: C/C++ + for Python, Java for Jython. Typically contained in a single dynamically + loadable pre-compiled file, e.g. a shared object (:file:`.so`) file for Python + extensions on Unix, a DLL (given the :file:`.pyd` extension) for Python + extensions on Windows, or a Java class file for Jython extensions. (Note that + currently, the Distutils only handles C/C++ extensions for Python.) + +package + a module that contains other modules; typically contained in a directory in the + filesystem and distinguished from other directories by the presence of a file + :file:`__init__.py`. + +root package + the root of the hierarchy of packages. (This isn't really a package, since it + doesn't have an :file:`__init__.py` file. But we have to call it something.) + The vast majority of the standard library is in the root package, as are many + small, standalone third-party modules that don't belong to a larger module + collection. Unlike regular packages, modules in the root package can be found in + many directories: in fact, every directory listed in ``sys.path`` contributes + modules to the root package. + + +.. _distutils-term: + +Distutils-specific terminology +============================== + +The following terms apply more specifically to the domain of distributing Python +modules using the Distutils: + +module distribution + a collection of Python modules distributed together as a single downloadable + resource and meant to be installed *en masse*. Examples of some well-known + module distributions are NumPy, SciPy, Pillow, + or mxBase. (This would be called a *package*, except that term is + already taken in the Python context: a single module distribution may contain + zero, one, or many Python packages.) + +pure module distribution + a module distribution that contains only pure Python modules and packages. + Sometimes referred to as a "pure distribution." + +non-pure module distribution + a module distribution that contains at least one extension module. Sometimes + referred to as a "non-pure distribution." + +distribution root + the top-level directory of your source tree (or source distribution); the + directory where :file:`setup.py` exists. Generally :file:`setup.py` will be + run from this directory.
diff --git a/Doc/distutils/packageindex.rst b/Doc/distutils/packageindex.rst new file mode 100644 index 0000000..ccb9a59 --- /dev/null +++ b/Doc/distutils/packageindex.rst
@@ -0,0 +1,16 @@ +:orphan: + +.. _package-index: + +******************************* +The Python Package Index (PyPI) +******************************* + +The `Python Package Index (PyPI)`_ stores metadata describing distributions +packaged with distutils and other publishing tools, as well the distribution +archives themselves. + +References to up to date PyPI documentation can be found at +:ref:`publishing-python-packages`. + +.. _Python Package Index (PyPI): https://pypi.org
diff --git a/Doc/distutils/setupscript.rst b/Doc/distutils/setupscript.rst new file mode 100644 index 0000000..8635c91 --- /dev/null +++ b/Doc/distutils/setupscript.rst
@@ -0,0 +1,713 @@ +.. _setup-script: + +************************ +Writing the Setup Script +************************ + +.. include:: ./_setuptools_disclaimer.rst + +The setup script is the centre of all activity in building, distributing, and +installing modules using the Distutils. The main purpose of the setup script is +to describe your module distribution to the Distutils, so that the various +commands that operate on your modules do the right thing. As we saw in section +:ref:`distutils-simple-example` above, the setup script consists mainly of a call to +:func:`setup`, and most information supplied to the Distutils by the module +developer is supplied as keyword arguments to :func:`setup`. + +Here's a slightly more involved example, which we'll follow for the next couple +of sections: the Distutils' own setup script. (Keep in mind that although the +Distutils are included with Python 1.6 and later, they also have an independent +existence so that Python 1.5.2 users can use them to install other module +distributions. The Distutils' own setup script, shown here, is used to install +the package into Python 1.5.2.) :: + + #!/usr/bin/env python + + from distutils.core import setup + + setup(name='Distutils', + version='1.0', + description='Python Distribution Utilities', + author='Greg Ward', + author_email='gward@python.net', + url='https://www.python.org/sigs/distutils-sig/', + packages=['distutils', 'distutils.command'], + ) + +There are only two differences between this and the trivial one-file +distribution presented in section :ref:`distutils-simple-example`: more metadata, and the +specification of pure Python modules by package, rather than by module. This is +important since the Distutils consist of a couple of dozen modules split into +(so far) two packages; an explicit list of every module would be tedious to +generate and difficult to maintain. For more information on the additional +meta-data, see section :ref:`meta-data`. + +Note that any pathnames (files or directories) supplied in the setup script +should be written using the Unix convention, i.e. slash-separated. The +Distutils will take care of converting this platform-neutral representation into +whatever is appropriate on your current platform before actually using the +pathname. This makes your setup script portable across operating systems, which +of course is one of the major goals of the Distutils. In this spirit, all +pathnames in this document are slash-separated. + +This, of course, only applies to pathnames given to Distutils functions. If +you, for example, use standard Python functions such as :func:`glob.glob` or +:func:`os.listdir` to specify files, you should be careful to write portable +code instead of hardcoding path separators:: + + glob.glob(os.path.join('mydir', 'subdir', '*.html')) + os.listdir(os.path.join('mydir', 'subdir')) + + +.. _listing-packages: + +Listing whole packages +====================== + +The ``packages`` option tells the Distutils to process (build, distribute, +install, etc.) all pure Python modules found in each package mentioned in the +``packages`` list. In order to do this, of course, there has to be a +correspondence between package names and directories in the filesystem. The +default correspondence is the most obvious one, i.e. package :mod:`distutils` is +found in the directory :file:`distutils` relative to the distribution root. +Thus, when you say ``packages = ['foo']`` in your setup script, you are +promising that the Distutils will find a file :file:`foo/__init__.py` (which +might be spelled differently on your system, but you get the idea) relative to +the directory where your setup script lives. If you break this promise, the +Distutils will issue a warning but still process the broken package anyway. + +If you use a different convention to lay out your source directory, that's no +problem: you just have to supply the ``package_dir`` option to tell the +Distutils about your convention. For example, say you keep all Python source +under :file:`lib`, so that modules in the "root package" (i.e., not in any +package at all) are in :file:`lib`, modules in the :mod:`foo` package are in +:file:`lib/foo`, and so forth. Then you would put :: + + package_dir = {'': 'lib'} + +in your setup script. The keys to this dictionary are package names, and an +empty package name stands for the root package. The values are directory names +relative to your distribution root. In this case, when you say ``packages = +['foo']``, you are promising that the file :file:`lib/foo/__init__.py` exists. + +Another possible convention is to put the :mod:`foo` package right in +:file:`lib`, the :mod:`foo.bar` package in :file:`lib/bar`, etc. This would be +written in the setup script as :: + + package_dir = {'foo': 'lib'} + +A ``package: dir`` entry in the ``package_dir`` dictionary implicitly +applies to all packages below *package*, so the :mod:`foo.bar` case is +automatically handled here. In this example, having ``packages = ['foo', +'foo.bar']`` tells the Distutils to look for :file:`lib/__init__.py` and +:file:`lib/bar/__init__.py`. (Keep in mind that although ``package_dir`` +applies recursively, you must explicitly list all packages in +``packages``: the Distutils will *not* recursively scan your source tree +looking for any directory with an :file:`__init__.py` file.) + + +.. _listing-modules: + +Listing individual modules +========================== + +For a small module distribution, you might prefer to list all modules rather +than listing packages---especially the case of a single module that goes in the +"root package" (i.e., no package at all). This simplest case was shown in +section :ref:`distutils-simple-example`; here is a slightly more involved example:: + + py_modules = ['mod1', 'pkg.mod2'] + +This describes two modules, one of them in the "root" package, the other in the +:mod:`pkg` package. Again, the default package/directory layout implies that +these two modules can be found in :file:`mod1.py` and :file:`pkg/mod2.py`, and +that :file:`pkg/__init__.py` exists as well. And again, you can override the +package/directory correspondence using the ``package_dir`` option. + + +.. _describing-extensions: + +Describing extension modules +============================ + +Just as writing Python extension modules is a bit more complicated than writing +pure Python modules, describing them to the Distutils is a bit more complicated. +Unlike pure modules, it's not enough just to list modules or packages and expect +the Distutils to go out and find the right files; you have to specify the +extension name, source file(s), and any compile/link requirements (include +directories, libraries to link with, etc.). + +.. XXX read over this section + +All of this is done through another keyword argument to :func:`setup`, the +``ext_modules`` option. ``ext_modules`` is just a list of +:class:`~distutils.core.Extension` instances, each of which describes a +single extension module. +Suppose your distribution includes a single extension, called :mod:`foo` and +implemented by :file:`foo.c`. If no additional instructions to the +compiler/linker are needed, describing this extension is quite simple:: + + Extension('foo', ['foo.c']) + +The :class:`Extension` class can be imported from :mod:`distutils.core` along +with :func:`setup`. Thus, the setup script for a module distribution that +contains only this one extension and nothing else might be:: + + from distutils.core import setup, Extension + setup(name='foo', + version='1.0', + ext_modules=[Extension('foo', ['foo.c'])], + ) + +The :class:`Extension` class (actually, the underlying extension-building +machinery implemented by the :command:`build_ext` command) supports a great deal +of flexibility in describing Python extensions, which is explained in the +following sections. + + +Extension names and packages +---------------------------- + +The first argument to the :class:`~distutils.core.Extension` constructor is +always the name of the extension, including any package names. For example, :: + + Extension('foo', ['src/foo1.c', 'src/foo2.c']) + +describes an extension that lives in the root package, while :: + + Extension('pkg.foo', ['src/foo1.c', 'src/foo2.c']) + +describes the same extension in the :mod:`pkg` package. The source files and +resulting object code are identical in both cases; the only difference is where +in the filesystem (and therefore where in Python's namespace hierarchy) the +resulting extension lives. + +If you have a number of extensions all in the same package (or all under the +same base package), use the ``ext_package`` keyword argument to +:func:`setup`. For example, :: + + setup(..., + ext_package='pkg', + ext_modules=[Extension('foo', ['foo.c']), + Extension('subpkg.bar', ['bar.c'])], + ) + +will compile :file:`foo.c` to the extension :mod:`pkg.foo`, and :file:`bar.c` to +:mod:`pkg.subpkg.bar`. + + +Extension source files +---------------------- + +The second argument to the :class:`~distutils.core.Extension` constructor is +a list of source +files. Since the Distutils currently only support C, C++, and Objective-C +extensions, these are normally C/C++/Objective-C source files. (Be sure to use +appropriate extensions to distinguish C++ source files: :file:`.cc` and +:file:`.cpp` seem to be recognized by both Unix and Windows compilers.) + +However, you can also include SWIG interface (:file:`.i`) files in the list; the +:command:`build_ext` command knows how to deal with SWIG extensions: it will run +SWIG on the interface file and compile the resulting C/C++ file into your +extension. + +.. XXX SWIG support is rough around the edges and largely untested! + +This warning notwithstanding, options to SWIG can be currently passed like +this:: + + setup(..., + ext_modules=[Extension('_foo', ['foo.i'], + swig_opts=['-modern', '-I../include'])], + py_modules=['foo'], + ) + +Or on the commandline like this:: + + > python setup.py build_ext --swig-opts="-modern -I../include" + +On some platforms, you can include non-source files that are processed by the +compiler and included in your extension. Currently, this just means Windows +message text (:file:`.mc`) files and resource definition (:file:`.rc`) files for +Visual C++. These will be compiled to binary resource (:file:`.res`) files and +linked into the executable. + + +Preprocessor options +-------------------- + +Three optional arguments to :class:`~distutils.core.Extension` will help if +you need to specify include directories to search or preprocessor macros to +define/undefine: ``include_dirs``, ``define_macros``, and ``undef_macros``. + +For example, if your extension requires header files in the :file:`include` +directory under your distribution root, use the ``include_dirs`` option:: + + Extension('foo', ['foo.c'], include_dirs=['include']) + +You can specify absolute directories there; if you know that your extension will +only be built on Unix systems with X11R6 installed to :file:`/usr`, you can get +away with :: + + Extension('foo', ['foo.c'], include_dirs=['/usr/include/X11']) + +You should avoid this sort of non-portable usage if you plan to distribute your +code: it's probably better to write C code like :: + + #include <X11/Xlib.h> + +If you need to include header files from some other Python extension, you can +take advantage of the fact that header files are installed in a consistent way +by the Distutils :command:`install_headers` command. For example, the Numerical +Python header files are installed (on a standard Unix installation) to +:file:`/usr/local/include/python1.5/Numerical`. (The exact location will differ +according to your platform and Python installation.) Since the Python include +directory---\ :file:`/usr/local/include/python1.5` in this case---is always +included in the search path when building Python extensions, the best approach +is to write C code like :: + + #include <Numerical/arrayobject.h> + +If you must put the :file:`Numerical` include directory right into your header +search path, though, you can find that directory using the Distutils +:mod:`distutils.sysconfig` module:: + + from distutils.sysconfig import get_python_inc + incdir = os.path.join(get_python_inc(plat_specific=1), 'Numerical') + setup(..., + Extension(..., include_dirs=[incdir]), + ) + +Even though this is quite portable---it will work on any Python installation, +regardless of platform---it's probably easier to just write your C code in the +sensible way. + +You can define and undefine pre-processor macros with the ``define_macros`` and +``undef_macros`` options. ``define_macros`` takes a list of ``(name, value)`` +tuples, where ``name`` is the name of the macro to define (a string) and +``value`` is its value: either a string or ``None``. (Defining a macro ``FOO`` +to ``None`` is the equivalent of a bare ``#define FOO`` in your C source: with +most compilers, this sets ``FOO`` to the string ``1``.) ``undef_macros`` is +just a list of macros to undefine. + +For example:: + + Extension(..., + define_macros=[('NDEBUG', '1'), + ('HAVE_STRFTIME', None)], + undef_macros=['HAVE_FOO', 'HAVE_BAR']) + +is the equivalent of having this at the top of every C source file:: + + #define NDEBUG 1 + #define HAVE_STRFTIME + #undef HAVE_FOO + #undef HAVE_BAR + + +Library options +--------------- + +You can also specify the libraries to link against when building your extension, +and the directories to search for those libraries. The ``libraries`` option is +a list of libraries to link against, ``library_dirs`` is a list of directories +to search for libraries at link-time, and ``runtime_library_dirs`` is a list of +directories to search for shared (dynamically loaded) libraries at run-time. + +For example, if you need to link against libraries known to be in the standard +library search path on target systems :: + + Extension(..., + libraries=['gdbm', 'readline']) + +If you need to link with libraries in a non-standard location, you'll have to +include the location in ``library_dirs``:: + + Extension(..., + library_dirs=['/usr/X11R6/lib'], + libraries=['X11', 'Xt']) + +(Again, this sort of non-portable construct should be avoided if you intend to +distribute your code.) + +.. XXX Should mention clib libraries here or somewhere else! + + +Other options +------------- + +There are still some other options which can be used to handle special cases. + +The ``optional`` option is a boolean; if it is true, +a build failure in the extension will not abort the build process, but +instead simply not install the failing extension. + +The ``extra_objects`` option is a list of object files to be passed to the +linker. These files must not have extensions, as the default extension for the +compiler is used. + +``extra_compile_args`` and ``extra_link_args`` can be used to +specify additional command line options for the respective compiler and linker +command lines. + +``export_symbols`` is only useful on Windows. It can contain a list of +symbols (functions or variables) to be exported. This option is not needed when +building compiled extensions: Distutils will automatically add ``initmodule`` +to the list of exported symbols. + +The ``depends`` option is a list of files that the extension depends on +(for example header files). The build command will call the compiler on the +sources to rebuild extension if any on this files has been modified since the +previous build. + +Relationships between Distributions and Packages +================================================ + +A distribution may relate to packages in three specific ways: + +#. It can require packages or modules. + +#. It can provide packages or modules. + +#. It can obsolete packages or modules. + +These relationships can be specified using keyword arguments to the +:func:`distutils.core.setup` function. + +Dependencies on other Python modules and packages can be specified by supplying +the *requires* keyword argument to :func:`setup`. The value must be a list of +strings. Each string specifies a package that is required, and optionally what +versions are sufficient. + +To specify that any version of a module or package is required, the string +should consist entirely of the module or package name. Examples include +``'mymodule'`` and ``'xml.parsers.expat'``. + +If specific versions are required, a sequence of qualifiers can be supplied in +parentheses. Each qualifier may consist of a comparison operator and a version +number. The accepted comparison operators are:: + + < > == + <= >= != + +These can be combined by using multiple qualifiers separated by commas (and +optional whitespace). In this case, all of the qualifiers must be matched; a +logical AND is used to combine the evaluations. + +Let's look at a bunch of examples: + ++-------------------------+----------------------------------------------+ +| Requires Expression | Explanation | ++=========================+==============================================+ +| ``==1.0`` | Only version ``1.0`` is compatible | ++-------------------------+----------------------------------------------+ +| ``>1.0, !=1.5.1, <2.0`` | Any version after ``1.0`` and before ``2.0`` | +| | is compatible, except ``1.5.1`` | ++-------------------------+----------------------------------------------+ + +Now that we can specify dependencies, we also need to be able to specify what we +provide that other distributions can require. This is done using the *provides* +keyword argument to :func:`setup`. The value for this keyword is a list of +strings, each of which names a Python module or package, and optionally +identifies the version. If the version is not specified, it is assumed to match +that of the distribution. + +Some examples: + ++---------------------+----------------------------------------------+ +| Provides Expression | Explanation | ++=====================+==============================================+ +| ``mypkg`` | Provide ``mypkg``, using the distribution | +| | version | ++---------------------+----------------------------------------------+ +| ``mypkg (1.1)`` | Provide ``mypkg`` version 1.1, regardless of | +| | the distribution version | ++---------------------+----------------------------------------------+ + +A package can declare that it obsoletes other packages using the *obsoletes* +keyword argument. The value for this is similar to that of the *requires* +keyword: a list of strings giving module or package specifiers. Each specifier +consists of a module or package name optionally followed by one or more version +qualifiers. Version qualifiers are given in parentheses after the module or +package name. + +The versions identified by the qualifiers are those that are obsoleted by the +distribution being described. If no qualifiers are given, all versions of the +named module or package are understood to be obsoleted. + +.. _distutils-installing-scripts: + +Installing Scripts +================== + +So far we have been dealing with pure and non-pure Python modules, which are +usually not run by themselves but imported by scripts. + +Scripts are files containing Python source code, intended to be started from the +command line. Scripts don't require Distutils to do anything very complicated. +The only clever feature is that if the first line of the script starts with +``#!`` and contains the word "python", the Distutils will adjust the first line +to refer to the current interpreter location. By default, it is replaced with +the current interpreter location. The :option:`!--executable` (or :option:`!-e`) +option will allow the interpreter path to be explicitly overridden. + +The ``scripts`` option simply is a list of files to be handled in this +way. From the PyXML setup script:: + + setup(..., + scripts=['scripts/xmlproc_parse', 'scripts/xmlproc_val'] + ) + +.. versionchanged:: 3.1 + All the scripts will also be added to the ``MANIFEST`` file if no template is + provided. See :ref:`manifest`. + + +.. _distutils-installing-package-data: + +Installing Package Data +======================= + +Often, additional files need to be installed into a package. These files are +often data that's closely related to the package's implementation, or text files +containing documentation that might be of interest to programmers using the +package. These files are called :dfn:`package data`. + +Package data can be added to packages using the ``package_data`` keyword +argument to the :func:`setup` function. The value must be a mapping from +package name to a list of relative path names that should be copied into the +package. The paths are interpreted as relative to the directory containing the +package (information from the ``package_dir`` mapping is used if appropriate); +that is, the files are expected to be part of the package in the source +directories. They may contain glob patterns as well. + +The path names may contain directory portions; any necessary directories will be +created in the installation. + +For example, if a package should contain a subdirectory with several data files, +the files can be arranged like this in the source tree:: + + setup.py + src/ + mypkg/ + __init__.py + module.py + data/ + tables.dat + spoons.dat + forks.dat + +The corresponding call to :func:`setup` might be:: + + setup(..., + packages=['mypkg'], + package_dir={'mypkg': 'src/mypkg'}, + package_data={'mypkg': ['data/*.dat']}, + ) + + +.. versionchanged:: 3.1 + All the files that match ``package_data`` will be added to the ``MANIFEST`` + file if no template is provided. See :ref:`manifest`. + + +.. _distutils-additional-files: + +Installing Additional Files +=========================== + +The ``data_files`` option can be used to specify additional files needed +by the module distribution: configuration files, message catalogs, data files, +anything which doesn't fit in the previous categories. + +``data_files`` specifies a sequence of (*directory*, *files*) pairs in the +following way:: + + setup(..., + data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']), + ('config', ['cfg/data.cfg'])], + ) + +Each (*directory*, *files*) pair in the sequence specifies the installation +directory and the files to install there. + +Each file name in *files* is interpreted relative to the :file:`setup.py` +script at the top of the package source distribution. Note that you can +specify the directory where the data files will be installed, but you cannot +rename the data files themselves. + +The *directory* should be a relative path. It is interpreted relative to the +installation prefix (Python's ``sys.prefix`` for system installations; +``site.USER_BASE`` for user installations). Distutils allows *directory* to be +an absolute installation path, but this is discouraged since it is +incompatible with the wheel packaging format. No directory information from +*files* is used to determine the final location of the installed file; only +the name of the file is used. + +You can specify the ``data_files`` options as a simple sequence of files +without specifying a target directory, but this is not recommended, and the +:command:`install` command will print a warning in this case. To install data +files directly in the target directory, an empty string should be given as the +directory. + +.. versionchanged:: 3.1 + All the files that match ``data_files`` will be added to the ``MANIFEST`` + file if no template is provided. See :ref:`manifest`. + + +.. _meta-data: + +Additional meta-data +==================== + +The setup script may include additional meta-data beyond the name and version. +This information includes: + ++----------------------+---------------------------+-----------------+--------+ +| Meta-Data | Description | Value | Notes | ++======================+===========================+=================+========+ +| ``name`` | name of the package | short string | \(1) | ++----------------------+---------------------------+-----------------+--------+ +| ``version`` | version of this release | short string | (1)(2) | ++----------------------+---------------------------+-----------------+--------+ +| ``author`` | package author's name | short string | \(3) | ++----------------------+---------------------------+-----------------+--------+ +| ``author_email`` | email address of the | email address | \(3) | +| | package author | | | ++----------------------+---------------------------+-----------------+--------+ +| ``maintainer`` | package maintainer's name | short string | \(3) | ++----------------------+---------------------------+-----------------+--------+ +| ``maintainer_email`` | email address of the | email address | \(3) | +| | package maintainer | | | ++----------------------+---------------------------+-----------------+--------+ +| ``url`` | home page for the package | URL | \(1) | ++----------------------+---------------------------+-----------------+--------+ +| ``description`` | short, summary | short string | | +| | description of the | | | +| | package | | | ++----------------------+---------------------------+-----------------+--------+ +| ``long_description`` | longer description of the | long string | \(4) | +| | package | | | ++----------------------+---------------------------+-----------------+--------+ +| ``download_url`` | location where the | URL | | +| | package may be downloaded | | | ++----------------------+---------------------------+-----------------+--------+ +| ``classifiers`` | a list of classifiers | list of strings | (6)(7) | ++----------------------+---------------------------+-----------------+--------+ +| ``platforms`` | a list of platforms | list of strings | (6)(8) | ++----------------------+---------------------------+-----------------+--------+ +| ``keywords`` | a list of keywords | list of strings | (6)(8) | ++----------------------+---------------------------+-----------------+--------+ +| ``license`` | license for the package | short string | \(5) | ++----------------------+---------------------------+-----------------+--------+ + +Notes: + +(1) + These fields are required. + +(2) + It is recommended that versions take the form *major.minor[.patch[.sub]]*. + +(3) + Either the author or the maintainer must be identified. If maintainer is + provided, distutils lists it as the author in :file:`PKG-INFO`. + +(4) + The ``long_description`` field is used by PyPI when you publish a package, + to build its project page. + +(5) + The ``license`` field is a text indicating the license covering the + package where the license is not a selection from the "License" Trove + classifiers. See the ``Classifier`` field. Notice that + there's a ``licence`` distribution option which is deprecated but still + acts as an alias for ``license``. + +(6) + This field must be a list. + +(7) + The valid classifiers are listed on + `PyPI <https://pypi.org/classifiers>`_. + +(8) + To preserve backward compatibility, this field also accepts a string. If + you pass a comma-separated string ``'foo, bar'``, it will be converted to + ``['foo', 'bar']``, Otherwise, it will be converted to a list of one + string. + +'short string' + A single line of text, not more than 200 characters. + +'long string' + Multiple lines of plain text in reStructuredText format (see + https://docutils.sourceforge.io/). + +'list of strings' + See below. + +Encoding the version information is an art in itself. Python packages generally +adhere to the version format *major.minor[.patch][sub]*. The major number is 0 +for initial, experimental releases of software. It is incremented for releases +that represent major milestones in a package. The minor number is incremented +when important new features are added to the package. The patch number +increments when bug-fix releases are made. Additional trailing version +information is sometimes used to indicate sub-releases. These are +"a1,a2,...,aN" (for alpha releases, where functionality and API may change), +"b1,b2,...,bN" (for beta releases, which only fix bugs) and "pr1,pr2,...,prN" +(for final pre-release release testing). Some examples: + +0.1.0 + the first, experimental release of a package + +1.0.1a2 + the second alpha release of the first patch version of 1.0 + +``classifiers`` must be specified in a list:: + + setup(..., + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Environment :: Web Environment', + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'License :: OSI Approved :: Python Software Foundation License', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', + 'Programming Language :: Python', + 'Topic :: Communications :: Email', + 'Topic :: Office/Business', + 'Topic :: Software Development :: Bug Tracking', + ], + ) + +.. versionchanged:: 3.7 + :class:`~distutils.core.setup` now warns when ``classifiers``, ``keywords`` + or ``platforms`` fields are not specified as a list or a string. + +.. _debug-setup-script: + +Debugging the setup script +========================== + +Sometimes things go wrong, and the setup script doesn't do what the developer +wants. + +Distutils catches any exceptions when running the setup script, and print a +simple error message before the script is terminated. The motivation for this +behaviour is to not confuse administrators who don't know much about Python and +are trying to install a package. If they get a big long traceback from deep +inside the guts of Distutils, they may think the package or the Python +installation is broken because they don't read all the way down to the bottom +and see that it's a permission problem. + +On the other hand, this doesn't help the developer to find the cause of the +failure. For this purpose, the :envvar:`DISTUTILS_DEBUG` environment variable can be set +to anything except an empty string, and distutils will now print detailed +information about what it is doing, dump the full traceback when an exception +occurs, and print the whole command line when an external program (like a C +compiler) fails.
diff --git a/Doc/distutils/sourcedist.rst b/Doc/distutils/sourcedist.rst new file mode 100644 index 0000000..b55d011 --- /dev/null +++ b/Doc/distutils/sourcedist.rst
@@ -0,0 +1,245 @@ +.. _source-dist: + +****************************** +Creating a Source Distribution +****************************** + +.. include:: ./_setuptools_disclaimer.rst + +As shown in section :ref:`distutils-simple-example`, you use the :command:`sdist` command +to create a source distribution. In the simplest case, :: + + python setup.py sdist + +(assuming you haven't specified any :command:`sdist` options in the setup script +or config file), :command:`sdist` creates the archive of the default format for +the current platform. The default format is a gzip'ed tar file +(:file:`.tar.gz`) on Unix, and ZIP file on Windows. + +You can specify as many formats as you like using the :option:`!--formats` +option, for example:: + + python setup.py sdist --formats=gztar,zip + +to create a gzipped tarball and a zip file. The available formats are: + ++-----------+-------------------------+-------------+ +| Format | Description | Notes | ++===========+=========================+=============+ +| ``zip`` | zip file (:file:`.zip`) | (1),(3) | ++-----------+-------------------------+-------------+ +| ``gztar`` | gzip'ed tar file | \(2) | +| | (:file:`.tar.gz`) | | ++-----------+-------------------------+-------------+ +| ``bztar`` | bzip2'ed tar file | \(5) | +| | (:file:`.tar.bz2`) | | ++-----------+-------------------------+-------------+ +| ``xztar`` | xz'ed tar file | \(5) | +| | (:file:`.tar.xz`) | | ++-----------+-------------------------+-------------+ +| ``ztar`` | compressed tar file | (4),(5) | +| | (:file:`.tar.Z`) | | ++-----------+-------------------------+-------------+ +| ``tar`` | tar file (:file:`.tar`) | \(5) | ++-----------+-------------------------+-------------+ + +.. versionchanged:: 3.5 + Added support for the ``xztar`` format. + +Notes: + +(1) + default on Windows + +(2) + default on Unix + +(3) + requires either external :program:`zip` utility or :mod:`zipfile` module (part + of the standard Python library since Python 1.6) + +(4) + requires the :program:`compress` program. Notice that this format is now + pending for deprecation and will be removed in the future versions of Python. +(5) + deprecated by `PEP 527 <https://peps.python.org/pep-0527/>`_; + `PyPI <https://pypi.org>`_ only accepts ``.zip`` and ``.tar.gz`` files. + +When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or +``tar``), under Unix you can specify the ``owner`` and ``group`` names +that will be set for each member of the archive. + +For example, if you want all files of the archive to be owned by root:: + + python setup.py sdist --owner=root --group=root + + +.. _manifest: + +Specifying the files to distribute +================================== + +If you don't supply an explicit list of files (or instructions on how to +generate one), the :command:`sdist` command puts a minimal default set into the +source distribution: + +* all Python source files implied by the ``py_modules`` and + ``packages`` options + +* all C source files mentioned in the ``ext_modules`` or + ``libraries`` options + + .. XXX getting C library sources currently broken---no + :meth:`get_source_files` method in :file:`build_clib.py`! + +* scripts identified by the ``scripts`` option + See :ref:`distutils-installing-scripts`. + +* anything that looks like a test script: :file:`test/test\*.py` (currently, the + Distutils don't do anything with test scripts except include them in source + distributions, but in the future there will be a standard for testing Python + module distributions) + +* Any of the standard README files (:file:`README`, :file:`README.txt`, + or :file:`README.rst`), :file:`setup.py` (or whatever you called your setup + script), and :file:`setup.cfg`. + +* all files that matches the ``package_data`` metadata. + See :ref:`distutils-installing-package-data`. + +* all files that matches the ``data_files`` metadata. + See :ref:`distutils-additional-files`. + +Sometimes this is enough, but usually you will want to specify additional files +to distribute. The typical way to do this is to write a *manifest template*, +called :file:`MANIFEST.in` by default. The manifest template is just a list of +instructions for how to generate your manifest file, :file:`MANIFEST`, which is +the exact list of files to include in your source distribution. The +:command:`sdist` command processes this template and generates a manifest based +on its instructions and what it finds in the filesystem. + +If you prefer to roll your own manifest file, the format is simple: one filename +per line, regular files (or symlinks to them) only. If you do supply your own +:file:`MANIFEST`, you must specify everything: the default set of files +described above does not apply in this case. + +.. versionchanged:: 3.1 + An existing generated :file:`MANIFEST` will be regenerated without + :command:`sdist` comparing its modification time to the one of + :file:`MANIFEST.in` or :file:`setup.py`. + +.. versionchanged:: 3.1.3 + :file:`MANIFEST` files start with a comment indicating they are generated. + Files without this comment are not overwritten or removed. + +.. versionchanged:: 3.2.2 + :command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` + exists, like it used to do. + +.. versionchanged:: 3.7 + :file:`README.rst` is now included in the list of distutils standard READMEs. + + +The manifest template has one command per line, where each command specifies a +set of files to include or exclude from the source distribution. For an +example, again we turn to the Distutils' own manifest template: + +.. code-block:: none + + include *.txt + recursive-include examples *.txt *.py + prune examples/sample?/build + +The meanings should be fairly clear: include all files in the distribution root +matching :file:`\*.txt`, all files anywhere under the :file:`examples` directory +matching :file:`\*.txt` or :file:`\*.py`, and exclude all directories matching +:file:`examples/sample?/build`. All of this is done *after* the standard +include set, so you can exclude files from the standard set with explicit +instructions in the manifest template. (Or, you can use the +:option:`!--no-defaults` option to disable the standard set entirely.) There are +several other commands available in the manifest template mini-language; see +section :ref:`sdist-cmd`. + +The order of commands in the manifest template matters: initially, we have the +list of default files as described above, and each command in the template adds +to or removes from that list of files. Once we have fully processed the +manifest template, we remove files that should not be included in the source +distribution: + +* all files in the Distutils "build" tree (default :file:`build/`) + +* all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, + :file:`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs` + +Now we have our complete list of files, which is written to the manifest for +future reference, and then used to build the source distribution archive(s). + +You can disable the default set of included files with the +:option:`!--no-defaults` option, and you can disable the standard exclude set +with :option:`!--no-prune`. + +Following the Distutils' own manifest template, let's trace how the +:command:`sdist` command builds the list of files to include in the Distutils +source distribution: + +#. include all Python source files in the :file:`distutils` and + :file:`distutils/command` subdirectories (because packages corresponding to + those two directories were mentioned in the ``packages`` option in the + setup script---see section :ref:`setup-script`) + +#. include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` (standard + files) + +#. include :file:`test/test\*.py` (standard files) + +#. include :file:`\*.txt` in the distribution root (this will find + :file:`README.txt` a second time, but such redundancies are weeded out later) + +#. include anything matching :file:`\*.txt` or :file:`\*.py` in the sub-tree + under :file:`examples`, + +#. exclude all files in the sub-trees starting at directories matching + :file:`examples/sample?/build`\ ---this may exclude files included by the + previous two steps, so it's important that the ``prune`` command in the manifest + template comes after the ``recursive-include`` command + +#. exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`, + :file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs` + directories + +Just like in the setup script, file and directory names in the manifest template +should always be slash-separated; the Distutils will take care of converting +them to the standard representation on your platform. That way, the manifest +template is portable across operating systems. + + +.. _manifest-options: + +Manifest-related options +======================== + +The normal course of operations for the :command:`sdist` command is as follows: + +* if the manifest file (:file:`MANIFEST` by default) exists and the first line + does not have a comment indicating it is generated from :file:`MANIFEST.in`, + then it is used as is, unaltered + +* if the manifest file doesn't exist or has been previously automatically + generated, read :file:`MANIFEST.in` and create the manifest + +* if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest + with just the default file set + +* use the list of files now in :file:`MANIFEST` (either just generated or read + in) to create the source distribution archive(s) + +There are a couple of options that modify this behaviour. First, use the +:option:`!--no-defaults` and :option:`!--no-prune` to disable the standard +"include" and "exclude" sets. + +Second, you might just want to (re)generate the manifest, but not create a source +distribution:: + + python setup.py sdist --manifest-only + +:option:`!-o` is a shortcut for :option:`!--manifest-only`.
diff --git a/Doc/distutils/uploading.rst b/Doc/distutils/uploading.rst new file mode 100644 index 0000000..4c391ca --- /dev/null +++ b/Doc/distutils/uploading.rst
@@ -0,0 +1,8 @@ +:orphan: + +*************************************** +Uploading Packages to the Package Index +*************************************** + +References to up to date PyPI documentation can be found at +:ref:`publishing-python-packages`.
diff --git a/Doc/extending/building.rst b/Doc/extending/building.rst new file mode 100644 index 0000000..5381707 --- /dev/null +++ b/Doc/extending/building.rst
@@ -0,0 +1,166 @@ +.. highlight:: c + +.. _building: + +***************************** +Building C and C++ Extensions +***************************** + +A C extension for CPython is a shared library (e.g. a ``.so`` file on Linux, +``.pyd`` on Windows), which exports an *initialization function*. + +To be importable, the shared library must be available on :envvar:`PYTHONPATH`, +and must be named after the module name, with an appropriate extension. +When using distutils, the correct filename is generated automatically. + +The initialization function has the signature: + +.. c:function:: PyObject* PyInit_modulename(void) + +It returns either a fully initialized module, or a :c:type:`PyModuleDef` +instance. See :ref:`initializing-modules` for details. + +.. highlight:: python + +For modules with ASCII-only names, the function must be named +``PyInit_<modulename>``, with ``<modulename>`` replaced by the name of the +module. When using :ref:`multi-phase-initialization`, non-ASCII module names +are allowed. In this case, the initialization function name is +``PyInitU_<modulename>``, with ``<modulename>`` encoded using Python's +*punycode* encoding with hyphens replaced by underscores. In Python:: + + def initfunc_name(name): + try: + suffix = b'_' + name.encode('ascii') + except UnicodeEncodeError: + suffix = b'U_' + name.encode('punycode').replace(b'-', b'_') + return b'PyInit' + suffix + +It is possible to export multiple modules from a single shared library by +defining multiple initialization functions. However, importing them requires +using symbolic links or a custom importer, because by default only the +function corresponding to the filename is found. +See the *"Multiple modules in one library"* section in :pep:`489` for details. + + +.. highlight:: c + +Building C and C++ Extensions with distutils +============================================ + +.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> + +Extension modules can be built using distutils, which is included in Python. +Since distutils also supports creation of binary packages, users don't +necessarily need a compiler and distutils to install the extension. + +A distutils package contains a driver script, :file:`setup.py`. This is a plain +Python file, which, in the most simple case, could look like this: + +.. code-block:: python3 + + from distutils.core import setup, Extension + + module1 = Extension('demo', + sources = ['demo.c']) + + setup (name = 'PackageName', + version = '1.0', + description = 'This is a demo package', + ext_modules = [module1]) + + +With this :file:`setup.py`, and a file :file:`demo.c`, running :: + + python setup.py build + +will compile :file:`demo.c`, and produce an extension module named ``demo`` in +the :file:`build` directory. Depending on the system, the module file will end +up in a subdirectory :file:`build/lib.system`, and may have a name like +:file:`demo.so` or :file:`demo.pyd`. + +In the :file:`setup.py`, all execution is performed by calling the ``setup`` +function. This takes a variable number of keyword arguments, of which the +example above uses only a subset. Specifically, the example specifies +meta-information to build packages, and it specifies the contents of the +package. Normally, a package will contain additional modules, like Python +source modules, documentation, subpackages, etc. Please refer to the distutils +documentation in :ref:`distutils-index` to learn more about the features of +distutils; this section explains building extension modules only. + +It is common to pre-compute arguments to :func:`setup`, to better structure the +driver script. In the example above, the ``ext_modules`` argument to +:func:`~distutils.core.setup` is a list of extension modules, each of which is +an instance of +the :class:`~distutils.extension.Extension`. In the example, the instance +defines an extension named ``demo`` which is build by compiling a single source +file, :file:`demo.c`. + +In many cases, building an extension is more complex, since additional +preprocessor defines and libraries may be needed. This is demonstrated in the +example below. + +.. code-block:: python3 + + from distutils.core import setup, Extension + + module1 = Extension('demo', + define_macros = [('MAJOR_VERSION', '1'), + ('MINOR_VERSION', '0')], + include_dirs = ['/usr/local/include'], + libraries = ['tcl83'], + library_dirs = ['/usr/local/lib'], + sources = ['demo.c']) + + setup (name = 'PackageName', + version = '1.0', + description = 'This is a demo package', + author = 'Martin v. Loewis', + author_email = 'martin@v.loewis.de', + url = 'https://docs.python.org/extending/building', + long_description = ''' + This is really just a demo package. + ''', + ext_modules = [module1]) + + +In this example, :func:`~distutils.core.setup` is called with additional +meta-information, which +is recommended when distribution packages have to be built. For the extension +itself, it specifies preprocessor defines, include directories, library +directories, and libraries. Depending on the compiler, distutils passes this +information in different ways to the compiler. For example, on Unix, this may +result in the compilation commands :: + + gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/usr/local/include -I/usr/local/include/python2.2 -c demo.c -o build/temp.linux-i686-2.2/demo.o + + gcc -shared build/temp.linux-i686-2.2/demo.o -L/usr/local/lib -ltcl83 -o build/lib.linux-i686-2.2/demo.so + +These lines are for demonstration purposes only; distutils users should trust +that distutils gets the invocations right. + + +.. _distributing: + +Distributing your extension modules +=================================== + +When an extension has been successfully built, there are three ways to use it. + +End-users will typically want to install the module, they do so by running :: + + python setup.py install + +Module maintainers should produce source packages; to do so, they run :: + + python setup.py sdist + +In some cases, additional files need to be included in a source distribution; +this is done through a :file:`MANIFEST.in` file; see :ref:`manifest` for details. + +If the source distribution has been built successfully, maintainers can also +create binary distributions. Depending on the platform, one of the following +commands can be used to do so. :: + + python setup.py bdist_rpm + python setup.py bdist_dumb
diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst new file mode 100644 index 0000000..e64db37 --- /dev/null +++ b/Doc/extending/embedding.rst
@@ -0,0 +1,336 @@ +.. highlight:: c + + +.. _embedding: + +*************************************** +Embedding Python in Another Application +*************************************** + +The previous chapters discussed how to extend Python, that is, how to extend the +functionality of Python by attaching a library of C functions to it. It is also +possible to do it the other way around: enrich your C/C++ application by +embedding Python in it. Embedding provides your application with the ability to +implement some of the functionality of your application in Python rather than C +or C++. This can be used for many purposes; one example would be to allow users +to tailor the application to their needs by writing some scripts in Python. You +can also use it yourself if some of the functionality can be written in Python +more easily. + +Embedding Python is similar to extending it, but not quite. The difference is +that when you extend Python, the main program of the application is still the +Python interpreter, while if you embed Python, the main program may have nothing +to do with Python --- instead, some parts of the application occasionally call +the Python interpreter to run some Python code. + +So if you are embedding Python, you are providing your own main program. One of +the things this main program has to do is initialize the Python interpreter. At +the very least, you have to call the function :c:func:`Py_Initialize`. There are +optional calls to pass command line arguments to Python. Then later you can +call the interpreter from any part of the application. + +There are several different ways to call the interpreter: you can pass a string +containing Python statements to :c:func:`PyRun_SimpleString`, or you can pass a +stdio file pointer and a file name (for identification in error messages only) +to :c:func:`PyRun_SimpleFile`. You can also call the lower-level operations +described in the previous chapters to construct and use Python objects. + + +.. seealso:: + + :ref:`c-api-index` + The details of Python's C interface are given in this manual. A great deal of + necessary information can be found here. + + +.. _high-level-embedding: + +Very High Level Embedding +========================= + +The simplest form of embedding Python is the use of the very high level +interface. This interface is intended to execute a Python script without needing +to interact with the application directly. This can for example be used to +perform some operation on a file. :: + + #define PY_SSIZE_T_CLEAN + #include <Python.h> + + int + main(int argc, char *argv[]) + { + wchar_t *program = Py_DecodeLocale(argv[0], NULL); + if (program == NULL) { + fprintf(stderr, "Fatal error: cannot decode argv[0]\n"); + exit(1); + } + Py_SetProgramName(program); /* optional but recommended */ + Py_Initialize(); + PyRun_SimpleString("from time import time,ctime\n" + "print('Today is', ctime(time()))\n"); + if (Py_FinalizeEx() < 0) { + exit(120); + } + PyMem_RawFree(program); + return 0; + } + +The :c:func:`Py_SetProgramName` function should be called before +:c:func:`Py_Initialize` to inform the interpreter about paths to Python run-time +libraries. Next, the Python interpreter is initialized with +:c:func:`Py_Initialize`, followed by the execution of a hard-coded Python script +that prints the date and time. Afterwards, the :c:func:`Py_FinalizeEx` call shuts +the interpreter down, followed by the end of the program. In a real program, +you may want to get the Python script from another source, perhaps a text-editor +routine, a file, or a database. Getting the Python code from a file can better +be done by using the :c:func:`PyRun_SimpleFile` function, which saves you the +trouble of allocating memory space and loading the file contents. + + +.. _lower-level-embedding: + +Beyond Very High Level Embedding: An overview +============================================= + +The high level interface gives you the ability to execute arbitrary pieces of +Python code from your application, but exchanging data values is quite +cumbersome to say the least. If you want that, you should use lower level calls. +At the cost of having to write more C code, you can achieve almost anything. + +It should be noted that extending Python and embedding Python is quite the same +activity, despite the different intent. Most topics discussed in the previous +chapters are still valid. To show this, consider what the extension code from +Python to C really does: + +#. Convert data values from Python to C, + +#. Perform a function call to a C routine using the converted values, and + +#. Convert the data values from the call from C to Python. + +When embedding Python, the interface code does: + +#. Convert data values from C to Python, + +#. Perform a function call to a Python interface routine using the converted + values, and + +#. Convert the data values from the call from Python to C. + +As you can see, the data conversion steps are simply swapped to accommodate the +different direction of the cross-language transfer. The only difference is the +routine that you call between both data conversions. When extending, you call a +C routine, when embedding, you call a Python routine. + +This chapter will not discuss how to convert data from Python to C and vice +versa. Also, proper use of references and dealing with errors is assumed to be +understood. Since these aspects do not differ from extending the interpreter, +you can refer to earlier chapters for the required information. + + +.. _pure-embedding: + +Pure Embedding +============== + +The first program aims to execute a function in a Python script. Like in the +section about the very high level interface, the Python interpreter does not +directly interact with the application (but that will change in the next +section). + +The code to run a function defined in a Python script is: + +.. literalinclude:: ../includes/run-func.c + + +This code loads a Python script using ``argv[1]``, and calls the function named +in ``argv[2]``. Its integer arguments are the other values of the ``argv`` +array. If you :ref:`compile and link <compiling>` this program (let's call +the finished executable :program:`call`), and use it to execute a Python +script, such as: + +.. code-block:: python + + def multiply(a,b): + print("Will compute", a, "times", b) + c = 0 + for i in range(0, a): + c = c + b + return c + +then the result should be: + +.. code-block:: shell-session + + $ call multiply multiply 3 2 + Will compute 3 times 2 + Result of call: 6 + +Although the program is quite large for its functionality, most of the code is +for data conversion between Python and C, and for error reporting. The +interesting part with respect to embedding Python starts with :: + + Py_Initialize(); + pName = PyUnicode_DecodeFSDefault(argv[1]); + /* Error checking of pName left out */ + pModule = PyImport_Import(pName); + +After initializing the interpreter, the script is loaded using +:c:func:`PyImport_Import`. This routine needs a Python string as its argument, +which is constructed using the :c:func:`PyUnicode_FromString` data conversion +routine. :: + + pFunc = PyObject_GetAttrString(pModule, argv[2]); + /* pFunc is a new reference */ + + if (pFunc && PyCallable_Check(pFunc)) { + ... + } + Py_XDECREF(pFunc); + +Once the script is loaded, the name we're looking for is retrieved using +:c:func:`PyObject_GetAttrString`. If the name exists, and the object returned is +callable, you can safely assume that it is a function. The program then +proceeds by constructing a tuple of arguments as normal. The call to the Python +function is then made with:: + + pValue = PyObject_CallObject(pFunc, pArgs); + +Upon return of the function, ``pValue`` is either ``NULL`` or it contains a +reference to the return value of the function. Be sure to release the reference +after examining the value. + + +.. _extending-with-embedding: + +Extending Embedded Python +========================= + +Until now, the embedded Python interpreter had no access to functionality from +the application itself. The Python API allows this by extending the embedded +interpreter. That is, the embedded interpreter gets extended with routines +provided by the application. While it sounds complex, it is not so bad. Simply +forget for a while that the application starts the Python interpreter. Instead, +consider the application to be a set of subroutines, and write some glue code +that gives Python access to those routines, just like you would write a normal +Python extension. For example:: + + static int numargs=0; + + /* Return the number of arguments of the application command line */ + static PyObject* + emb_numargs(PyObject *self, PyObject *args) + { + if(!PyArg_ParseTuple(args, ":numargs")) + return NULL; + return PyLong_FromLong(numargs); + } + + static PyMethodDef EmbMethods[] = { + {"numargs", emb_numargs, METH_VARARGS, + "Return the number of arguments received by the process."}, + {NULL, NULL, 0, NULL} + }; + + static PyModuleDef EmbModule = { + PyModuleDef_HEAD_INIT, "emb", NULL, -1, EmbMethods, + NULL, NULL, NULL, NULL + }; + + static PyObject* + PyInit_emb(void) + { + return PyModule_Create(&EmbModule); + } + +Insert the above code just above the :c:func:`main` function. Also, insert the +following two statements before the call to :c:func:`Py_Initialize`:: + + numargs = argc; + PyImport_AppendInittab("emb", &PyInit_emb); + +These two lines initialize the ``numargs`` variable, and make the +:func:`emb.numargs` function accessible to the embedded Python interpreter. +With these extensions, the Python script can do things like + +.. code-block:: python + + import emb + print("Number of arguments", emb.numargs()) + +In a real application, the methods will expose an API of the application to +Python. + +.. TODO: threads, code examples do not really behave well if errors happen + (what to watch out for) + + +.. _embeddingincplusplus: + +Embedding Python in C++ +======================= + +It is also possible to embed Python in a C++ program; precisely how this is done +will depend on the details of the C++ system used; in general you will need to +write the main program in C++, and use the C++ compiler to compile and link your +program. There is no need to recompile Python itself using C++. + + +.. _compiling: + +Compiling and Linking under Unix-like systems +============================================= + +It is not necessarily trivial to find the right flags to pass to your +compiler (and linker) in order to embed the Python interpreter into your +application, particularly because Python needs to load library modules +implemented as C dynamic extensions (:file:`.so` files) linked against +it. + +To find out the required compiler and linker flags, you can execute the +:file:`python{X.Y}-config` script which is generated as part of the +installation process (a :file:`python3-config` script may also be +available). This script has several options, of which the following will +be directly useful to you: + +* ``pythonX.Y-config --cflags`` will give you the recommended flags when + compiling: + + .. code-block:: shell-session + + $ /opt/bin/python3.11-config --cflags + -I/opt/include/python3.11 -I/opt/include/python3.11 -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall + +* ``pythonX.Y-config --ldflags --embed`` will give you the recommended flags + when linking: + + .. code-block:: shell-session + + $ /opt/bin/python3.11-config --ldflags --embed + -L/opt/lib/python3.11/config-3.11-x86_64-linux-gnu -L/opt/lib -lpython3.11 -lpthread -ldl -lutil -lm + +.. note:: + To avoid confusion between several Python installations (and especially + between the system Python and your own compiled Python), it is recommended + that you use the absolute path to :file:`python{X.Y}-config`, as in the above + example. + +If this procedure doesn't work for you (it is not guaranteed to work for +all Unix-like platforms; however, we welcome :ref:`bug reports <reporting-bugs>`) +you will have to read your system's documentation about dynamic linking and/or +examine Python's :file:`Makefile` (use :func:`sysconfig.get_makefile_filename` +to find its location) and compilation +options. In this case, the :mod:`sysconfig` module is a useful tool to +programmatically extract the configuration values that you will want to +combine together. For example: + +.. code-block:: pycon + + >>> import sysconfig + >>> sysconfig.get_config_var('LIBS') + '-lpthread -ldl -lutil' + >>> sysconfig.get_config_var('LINKFORSHARED') + '-Xlinker -export-dynamic' + + +.. XXX similar documentation for Windows missing
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst new file mode 100644 index 0000000..d9bf4fd --- /dev/null +++ b/Doc/extending/extending.rst
@@ -0,0 +1,1376 @@ +.. highlight:: c + + +.. _extending-intro: + +****************************** +Extending Python with C or C++ +****************************** + +It is quite easy to add new built-in modules to Python, if you know how to +program in C. Such :dfn:`extension modules` can do two things that can't be +done directly in Python: they can implement new built-in object types, and they +can call C library functions and system calls. + +To support extensions, the Python API (Application Programmers Interface) +defines a set of functions, macros and variables that provide access to most +aspects of the Python run-time system. The Python API is incorporated in a C +source file by including the header ``"Python.h"``. + +The compilation of an extension module depends on its intended use as well as on +your system setup; details are given in later chapters. + +.. note:: + + The C extension interface is specific to CPython, and extension modules do + not work on other Python implementations. In many cases, it is possible to + avoid writing C extensions and preserve portability to other implementations. + For example, if your use case is calling C library functions or system calls, + you should consider using the :mod:`ctypes` module or the `cffi + <https://cffi.readthedocs.io/>`_ library rather than writing + custom C code. + These modules let you write Python code to interface with C code and are more + portable between implementations of Python than writing and compiling a C + extension module. + + +.. _extending-simpleexample: + +A Simple Example +================ + +Let's create an extension module called ``spam`` (the favorite food of Monty +Python fans...) and let's say we want to create a Python interface to the C +library function :c:func:`system` [#]_. This function takes a null-terminated +character string as argument and returns an integer. We want this function to +be callable from Python as follows: + +.. code-block:: pycon + + >>> import spam + >>> status = spam.system("ls -l") + +Begin by creating a file :file:`spammodule.c`. (Historically, if a module is +called ``spam``, the C file containing its implementation is called +:file:`spammodule.c`; if the module name is very long, like ``spammify``, the +module name can be just :file:`spammify.c`.) + +The first two lines of our file can be:: + + #define PY_SSIZE_T_CLEAN + #include <Python.h> + +which pulls in the Python API (you can add a comment describing the purpose of +the module and a copyright notice if you like). + +.. note:: + + Since Python may define some pre-processor definitions which affect the standard + headers on some systems, you *must* include :file:`Python.h` before any standard + headers are included. + + It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including + ``Python.h``. See :ref:`parsetuple` for a description of this macro. + +All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` or +``PY``, except those defined in standard header files. For convenience, and +since they are used extensively by the Python interpreter, ``"Python.h"`` +includes a few standard header files: ``<stdio.h>``, ``<string.h>``, +``<errno.h>``, and ``<stdlib.h>``. If the latter header file does not exist on +your system, it declares the functions :c:func:`malloc`, :c:func:`free` and +:c:func:`realloc` directly. + +The next thing we add to our module file is the C function that will be called +when the Python expression ``spam.system(string)`` is evaluated (we'll see +shortly how it ends up being called):: + + static PyObject * + spam_system(PyObject *self, PyObject *args) + { + const char *command; + int sts; + + if (!PyArg_ParseTuple(args, "s", &command)) + return NULL; + sts = system(command); + return PyLong_FromLong(sts); + } + +There is a straightforward translation from the argument list in Python (for +example, the single expression ``"ls -l"``) to the arguments passed to the C +function. The C function always has two arguments, conventionally named *self* +and *args*. + +The *self* argument points to the module object for module-level functions; +for a method it would point to the object instance. + +The *args* argument will be a pointer to a Python tuple object containing the +arguments. Each item of the tuple corresponds to an argument in the call's +argument list. The arguments are Python objects --- in order to do anything +with them in our C function we have to convert them to C values. The function +:c:func:`PyArg_ParseTuple` in the Python API checks the argument types and +converts them to C values. It uses a template string to determine the required +types of the arguments as well as the types of the C variables into which to +store the converted values. More about this later. + +:c:func:`PyArg_ParseTuple` returns true (nonzero) if all arguments have the right +type and its components have been stored in the variables whose addresses are +passed. It returns false (zero) if an invalid argument list was passed. In the +latter case it also raises an appropriate exception so the calling function can +return ``NULL`` immediately (as we saw in the example). + + +.. _extending-errors: + +Intermezzo: Errors and Exceptions +================================= + +An important convention throughout the Python interpreter is the following: when +a function fails, it should set an exception condition and return an error value +(usually ``-1`` or a ``NULL`` pointer). Exception information is stored in +three members of the interpreter's thread state. These are ``NULL`` if +there is no exception. Otherwise they are the C equivalents of the members +of the Python tuple returned by :meth:`sys.exc_info`. These are the +exception type, exception instance, and a traceback object. It is important +to know about them to understand how errors are passed around. + +The Python API defines a number of functions to set various types of exceptions. + +The most common one is :c:func:`PyErr_SetString`. Its arguments are an exception +object and a C string. The exception object is usually a predefined object like +:c:data:`PyExc_ZeroDivisionError`. The C string indicates the cause of the error +and is converted to a Python string object and stored as the "associated value" +of the exception. + +Another useful function is :c:func:`PyErr_SetFromErrno`, which only takes an +exception argument and constructs the associated value by inspection of the +global variable :c:data:`errno`. The most general function is +:c:func:`PyErr_SetObject`, which takes two object arguments, the exception and +its associated value. You don't need to :c:func:`Py_INCREF` the objects passed +to any of these functions. + +You can test non-destructively whether an exception has been set with +:c:func:`PyErr_Occurred`. This returns the current exception object, or ``NULL`` +if no exception has occurred. You normally don't need to call +:c:func:`PyErr_Occurred` to see whether an error occurred in a function call, +since you should be able to tell from the return value. + +When a function *f* that calls another function *g* detects that the latter +fails, *f* should itself return an error value (usually ``NULL`` or ``-1``). It +should *not* call one of the ``PyErr_*`` functions --- one has already +been called by *g*. *f*'s caller is then supposed to also return an error +indication to *its* caller, again *without* calling ``PyErr_*``, and so on +--- the most detailed cause of the error was already reported by the function +that first detected it. Once the error reaches the Python interpreter's main +loop, this aborts the currently executing Python code and tries to find an +exception handler specified by the Python programmer. + +(There are situations where a module can actually give a more detailed error +message by calling another ``PyErr_*`` function, and in such cases it is +fine to do so. As a general rule, however, this is not necessary, and can cause +information about the cause of the error to be lost: most operations can fail +for a variety of reasons.) + +To ignore an exception set by a function call that failed, the exception +condition must be cleared explicitly by calling :c:func:`PyErr_Clear`. The only +time C code should call :c:func:`PyErr_Clear` is if it doesn't want to pass the +error on to the interpreter but wants to handle it completely by itself +(possibly by trying something else, or pretending nothing went wrong). + +Every failing :c:func:`malloc` call must be turned into an exception --- the +direct caller of :c:func:`malloc` (or :c:func:`realloc`) must call +:c:func:`PyErr_NoMemory` and return a failure indicator itself. All the +object-creating functions (for example, :c:func:`PyLong_FromLong`) already do +this, so this note is only relevant to those who call :c:func:`malloc` directly. + +Also note that, with the important exception of :c:func:`PyArg_ParseTuple` and +friends, functions that return an integer status usually return a positive value +or zero for success and ``-1`` for failure, like Unix system calls. + +Finally, be careful to clean up garbage (by making :c:func:`Py_XDECREF` or +:c:func:`Py_DECREF` calls for objects you have already created) when you return +an error indicator! + +The choice of which exception to raise is entirely yours. There are predeclared +C objects corresponding to all built-in Python exceptions, such as +:c:data:`PyExc_ZeroDivisionError`, which you can use directly. Of course, you +should choose exceptions wisely --- don't use :c:data:`PyExc_TypeError` to mean +that a file couldn't be opened (that should probably be :c:data:`PyExc_IOError`). +If something's wrong with the argument list, the :c:func:`PyArg_ParseTuple` +function usually raises :c:data:`PyExc_TypeError`. If you have an argument whose +value must be in a particular range or must satisfy other conditions, +:c:data:`PyExc_ValueError` is appropriate. + +You can also define a new exception that is unique to your module. For this, you +usually declare a static object variable at the beginning of your file:: + + static PyObject *SpamError; + +and initialize it in your module's initialization function (:c:func:`PyInit_spam`) +with an exception object:: + + PyMODINIT_FUNC + PyInit_spam(void) + { + PyObject *m; + + m = PyModule_Create(&spammodule); + if (m == NULL) + return NULL; + + SpamError = PyErr_NewException("spam.error", NULL, NULL); + Py_XINCREF(SpamError); + if (PyModule_AddObject(m, "error", SpamError) < 0) { + Py_XDECREF(SpamError); + Py_CLEAR(SpamError); + Py_DECREF(m); + return NULL; + } + + return m; + } + +Note that the Python name for the exception object is :exc:`spam.error`. The +:c:func:`PyErr_NewException` function may create a class with the base class +being :exc:`Exception` (unless another class is passed in instead of ``NULL``), +described in :ref:`bltin-exceptions`. + +Note also that the :c:data:`SpamError` variable retains a reference to the newly +created exception class; this is intentional! Since the exception could be +removed from the module by external code, an owned reference to the class is +needed to ensure that it will not be discarded, causing :c:data:`SpamError` to +become a dangling pointer. Should it become a dangling pointer, C code which +raises the exception could cause a core dump or other unintended side effects. + +We discuss the use of ``PyMODINIT_FUNC`` as a function return type later in this +sample. + +The :exc:`spam.error` exception can be raised in your extension module using a +call to :c:func:`PyErr_SetString` as shown below:: + + static PyObject * + spam_system(PyObject *self, PyObject *args) + { + const char *command; + int sts; + + if (!PyArg_ParseTuple(args, "s", &command)) + return NULL; + sts = system(command); + if (sts < 0) { + PyErr_SetString(SpamError, "System command failed"); + return NULL; + } + return PyLong_FromLong(sts); + } + + +.. _backtoexample: + +Back to the Example +=================== + +Going back to our example function, you should now be able to understand this +statement:: + + if (!PyArg_ParseTuple(args, "s", &command)) + return NULL; + +It returns ``NULL`` (the error indicator for functions returning object pointers) +if an error is detected in the argument list, relying on the exception set by +:c:func:`PyArg_ParseTuple`. Otherwise the string value of the argument has been +copied to the local variable :c:data:`command`. This is a pointer assignment and +you are not supposed to modify the string to which it points (so in Standard C, +the variable :c:data:`command` should properly be declared as ``const char +*command``). + +The next statement is a call to the Unix function :c:func:`system`, passing it +the string we just got from :c:func:`PyArg_ParseTuple`:: + + sts = system(command); + +Our :func:`spam.system` function must return the value of :c:data:`sts` as a +Python object. This is done using the function :c:func:`PyLong_FromLong`. :: + + return PyLong_FromLong(sts); + +In this case, it will return an integer object. (Yes, even integers are objects +on the heap in Python!) + +If you have a C function that returns no useful argument (a function returning +:c:expr:`void`), the corresponding Python function must return ``None``. You +need this idiom to do so (which is implemented by the :c:macro:`Py_RETURN_NONE` +macro):: + + Py_INCREF(Py_None); + return Py_None; + +:c:data:`Py_None` is the C name for the special Python object ``None``. It is a +genuine Python object rather than a ``NULL`` pointer, which means "error" in most +contexts, as we have seen. + + +.. _methodtable: + +The Module's Method Table and Initialization Function +===================================================== + +I promised to show how :c:func:`spam_system` is called from Python programs. +First, we need to list its name and address in a "method table":: + + static PyMethodDef SpamMethods[] = { + ... + {"system", spam_system, METH_VARARGS, + "Execute a shell command."}, + ... + {NULL, NULL, 0, NULL} /* Sentinel */ + }; + +Note the third entry (``METH_VARARGS``). This is a flag telling the interpreter +the calling convention to be used for the C function. It should normally always +be ``METH_VARARGS`` or ``METH_VARARGS | METH_KEYWORDS``; a value of ``0`` means +that an obsolete variant of :c:func:`PyArg_ParseTuple` is used. + +When using only ``METH_VARARGS``, the function should expect the Python-level +parameters to be passed in as a tuple acceptable for parsing via +:c:func:`PyArg_ParseTuple`; more information on this function is provided below. + +The :const:`METH_KEYWORDS` bit may be set in the third field if keyword +arguments should be passed to the function. In this case, the C function should +accept a third ``PyObject *`` parameter which will be a dictionary of keywords. +Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments to such a +function. + +The method table must be referenced in the module definition structure:: + + static struct PyModuleDef spammodule = { + PyModuleDef_HEAD_INIT, + "spam", /* name of module */ + spam_doc, /* module documentation, may be NULL */ + -1, /* size of per-interpreter state of the module, + or -1 if the module keeps state in global variables. */ + SpamMethods + }; + +This structure, in turn, must be passed to the interpreter in the module's +initialization function. The initialization function must be named +:c:func:`PyInit_name`, where *name* is the name of the module, and should be the +only non-\ ``static`` item defined in the module file:: + + PyMODINIT_FUNC + PyInit_spam(void) + { + return PyModule_Create(&spammodule); + } + +Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return type, +declares any special linkage declarations required by the platform, and for C++ +declares the function as ``extern "C"``. + +When the Python program imports module :mod:`spam` for the first time, +:c:func:`PyInit_spam` is called. (See below for comments about embedding Python.) +It calls :c:func:`PyModule_Create`, which returns a module object, and +inserts built-in function objects into the newly created module based upon the +table (an array of :c:type:`PyMethodDef` structures) found in the module definition. +:c:func:`PyModule_Create` returns a pointer to the module object +that it creates. It may abort with a fatal error for +certain errors, or return ``NULL`` if the module could not be initialized +satisfactorily. The init function must return the module object to its caller, +so that it then gets inserted into ``sys.modules``. + +When embedding Python, the :c:func:`PyInit_spam` function is not called +automatically unless there's an entry in the :c:data:`PyImport_Inittab` table. +To add the module to the initialization table, use :c:func:`PyImport_AppendInittab`, +optionally followed by an import of the module:: + + int + main(int argc, char *argv[]) + { + wchar_t *program = Py_DecodeLocale(argv[0], NULL); + if (program == NULL) { + fprintf(stderr, "Fatal error: cannot decode argv[0]\n"); + exit(1); + } + + /* Add a built-in module, before Py_Initialize */ + if (PyImport_AppendInittab("spam", PyInit_spam) == -1) { + fprintf(stderr, "Error: could not extend in-built modules table\n"); + exit(1); + } + + /* Pass argv[0] to the Python interpreter */ + Py_SetProgramName(program); + + /* Initialize the Python interpreter. Required. + If this step fails, it will be a fatal error. */ + Py_Initialize(); + + /* Optionally import the module; alternatively, + import can be deferred until the embedded script + imports it. */ + PyObject *pmodule = PyImport_ImportModule("spam"); + if (!pmodule) { + PyErr_Print(); + fprintf(stderr, "Error: could not import module 'spam'\n"); + } + + ... + + PyMem_RawFree(program); + return 0; + } + +.. note:: + + Removing entries from ``sys.modules`` or importing compiled modules into + multiple interpreters within a process (or following a :c:func:`fork` without an + intervening :c:func:`exec`) can create problems for some extension modules. + Extension module authors should exercise caution when initializing internal data + structures. + +A more substantial example module is included in the Python source distribution +as :file:`Modules/xxmodule.c`. This file may be used as a template or simply +read as an example. + +.. note:: + + Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* + (new in Python 3.5), where a PyModuleDef structure is returned from + ``PyInit_spam``, and creation of the module is left to the import machinery. + For details on multi-phase initialization, see :PEP:`489`. + + +.. _compilation: + +Compilation and Linkage +======================= + +There are two more things to do before you can use your new extension: compiling +and linking it with the Python system. If you use dynamic loading, the details +may depend on the style of dynamic loading your system uses; see the chapters +about building extension modules (chapter :ref:`building`) and additional +information that pertains only to building on Windows (chapter +:ref:`building-on-windows`) for more information about this. + +If you can't use dynamic loading, or if you want to make your module a permanent +part of the Python interpreter, you will have to change the configuration setup +and rebuild the interpreter. Luckily, this is very simple on Unix: just place +your file (:file:`spammodule.c` for example) in the :file:`Modules/` directory +of an unpacked source distribution, add a line to the file +:file:`Modules/Setup.local` describing your file: + +.. code-block:: sh + + spam spammodule.o + +and rebuild the interpreter by running :program:`make` in the toplevel +directory. You can also run :program:`make` in the :file:`Modules/` +subdirectory, but then you must first rebuild :file:`Makefile` there by running +':program:`make` Makefile'. (This is necessary each time you change the +:file:`Setup` file.) + +If your module requires additional libraries to link with, these can be listed +on the line in the configuration file as well, for instance: + +.. code-block:: sh + + spam spammodule.o -lX11 + + +.. _callingpython: + +Calling Python Functions from C +=============================== + +So far we have concentrated on making C functions callable from Python. The +reverse is also useful: calling Python functions from C. This is especially the +case for libraries that support so-called "callback" functions. If a C +interface makes use of callbacks, the equivalent Python often needs to provide a +callback mechanism to the Python programmer; the implementation will require +calling the Python callback functions from a C callback. Other uses are also +imaginable. + +Fortunately, the Python interpreter is easily called recursively, and there is a +standard interface to call a Python function. (I won't dwell on how to call the +Python parser with a particular string as input --- if you're interested, have a +look at the implementation of the :option:`-c` command line option in +:file:`Modules/main.c` from the Python source code.) + +Calling a Python function is easy. First, the Python program must somehow pass +you the Python function object. You should provide a function (or some other +interface) to do this. When this function is called, save a pointer to the +Python function object (be careful to :c:func:`Py_INCREF` it!) in a global +variable --- or wherever you see fit. For example, the following function might +be part of a module definition:: + + static PyObject *my_callback = NULL; + + static PyObject * + my_set_callback(PyObject *dummy, PyObject *args) + { + PyObject *result = NULL; + PyObject *temp; + + if (PyArg_ParseTuple(args, "O:set_callback", &temp)) { + if (!PyCallable_Check(temp)) { + PyErr_SetString(PyExc_TypeError, "parameter must be callable"); + return NULL; + } + Py_XINCREF(temp); /* Add a reference to new callback */ + Py_XDECREF(my_callback); /* Dispose of previous callback */ + my_callback = temp; /* Remember new callback */ + /* Boilerplate to return "None" */ + Py_INCREF(Py_None); + result = Py_None; + } + return result; + } + +This function must be registered with the interpreter using the +:const:`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The +:c:func:`PyArg_ParseTuple` function and its arguments are documented in section +:ref:`parsetuple`. + +The macros :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF` increment/decrement the +reference count of an object and are safe in the presence of ``NULL`` pointers +(but note that *temp* will not be ``NULL`` in this context). More info on them +in section :ref:`refcounts`. + +.. index:: single: PyObject_CallObject() + +Later, when it is time to call the function, you call the C function +:c:func:`PyObject_CallObject`. This function has two arguments, both pointers to +arbitrary Python objects: the Python function, and the argument list. The +argument list must always be a tuple object, whose length is the number of +arguments. To call the Python function with no arguments, pass in ``NULL``, or +an empty tuple; to call it with one argument, pass a singleton tuple. +:c:func:`Py_BuildValue` returns a tuple when its format string consists of zero +or more format codes between parentheses. For example:: + + int arg; + PyObject *arglist; + PyObject *result; + ... + arg = 123; + ... + /* Time to call the callback */ + arglist = Py_BuildValue("(i)", arg); + result = PyObject_CallObject(my_callback, arglist); + Py_DECREF(arglist); + +:c:func:`PyObject_CallObject` returns a Python object pointer: this is the return +value of the Python function. :c:func:`PyObject_CallObject` is +"reference-count-neutral" with respect to its arguments. In the example a new +tuple was created to serve as the argument list, which is +:c:func:`Py_DECREF`\ -ed immediately after the :c:func:`PyObject_CallObject` +call. + +The return value of :c:func:`PyObject_CallObject` is "new": either it is a brand +new object, or it is an existing object whose reference count has been +incremented. So, unless you want to save it in a global variable, you should +somehow :c:func:`Py_DECREF` the result, even (especially!) if you are not +interested in its value. + +Before you do this, however, it is important to check that the return value +isn't ``NULL``. If it is, the Python function terminated by raising an exception. +If the C code that called :c:func:`PyObject_CallObject` is called from Python, it +should now return an error indication to its Python caller, so the interpreter +can print a stack trace, or the calling Python code can handle the exception. +If this is not possible or desirable, the exception should be cleared by calling +:c:func:`PyErr_Clear`. For example:: + + if (result == NULL) + return NULL; /* Pass error back */ + ...use result... + Py_DECREF(result); + +Depending on the desired interface to the Python callback function, you may also +have to provide an argument list to :c:func:`PyObject_CallObject`. In some cases +the argument list is also provided by the Python program, through the same +interface that specified the callback function. It can then be saved and used +in the same manner as the function object. In other cases, you may have to +construct a new tuple to pass as the argument list. The simplest way to do this +is to call :c:func:`Py_BuildValue`. For example, if you want to pass an integral +event code, you might use the following code:: + + PyObject *arglist; + ... + arglist = Py_BuildValue("(l)", eventcode); + result = PyObject_CallObject(my_callback, arglist); + Py_DECREF(arglist); + if (result == NULL) + return NULL; /* Pass error back */ + /* Here maybe use the result */ + Py_DECREF(result); + +Note the placement of ``Py_DECREF(arglist)`` immediately after the call, before +the error check! Also note that strictly speaking this code is not complete: +:c:func:`Py_BuildValue` may run out of memory, and this should be checked. + +You may also call a function with keyword arguments by using +:c:func:`PyObject_Call`, which supports arguments and keyword arguments. As in +the above example, we use :c:func:`Py_BuildValue` to construct the dictionary. :: + + PyObject *dict; + ... + dict = Py_BuildValue("{s:i}", "name", val); + result = PyObject_Call(my_callback, NULL, dict); + Py_DECREF(dict); + if (result == NULL) + return NULL; /* Pass error back */ + /* Here maybe use the result */ + Py_DECREF(result); + + +.. _parsetuple: + +Extracting Parameters in Extension Functions +============================================ + +.. index:: single: PyArg_ParseTuple() + +The :c:func:`PyArg_ParseTuple` function is declared as follows:: + + int PyArg_ParseTuple(PyObject *arg, const char *format, ...); + +The *arg* argument must be a tuple object containing an argument list passed +from Python to a C function. The *format* argument must be a format string, +whose syntax is explained in :ref:`arg-parsing` in the Python/C API Reference +Manual. The remaining arguments must be addresses of variables whose type is +determined by the format string. + +Note that while :c:func:`PyArg_ParseTuple` checks that the Python arguments have +the required types, it cannot check the validity of the addresses of C variables +passed to the call: if you make mistakes there, your code will probably crash or +at least overwrite random bits in memory. So be careful! + +Note that any Python object references which are provided to the caller are +*borrowed* references; do not decrement their reference count! + +Some example calls:: + + #define PY_SSIZE_T_CLEAN /* Make "s#" use Py_ssize_t rather than int. */ + #include <Python.h> + +:: + + int ok; + int i, j; + long k, l; + const char *s; + Py_ssize_t size; + + ok = PyArg_ParseTuple(args, ""); /* No arguments */ + /* Python call: f() */ + +:: + + ok = PyArg_ParseTuple(args, "s", &s); /* A string */ + /* Possible Python call: f('whoops!') */ + +:: + + ok = PyArg_ParseTuple(args, "lls", &k, &l, &s); /* Two longs and a string */ + /* Possible Python call: f(1, 2, 'three') */ + +:: + + ok = PyArg_ParseTuple(args, "(ii)s#", &i, &j, &s, &size); + /* A pair of ints and a string, whose size is also returned */ + /* Possible Python call: f((1, 2), 'three') */ + +:: + + { + const char *file; + const char *mode = "r"; + int bufsize = 0; + ok = PyArg_ParseTuple(args, "s|si", &file, &mode, &bufsize); + /* A string, and optionally another string and an integer */ + /* Possible Python calls: + f('spam') + f('spam', 'w') + f('spam', 'wb', 100000) */ + } + +:: + + { + int left, top, right, bottom, h, v; + ok = PyArg_ParseTuple(args, "((ii)(ii))(ii)", + &left, &top, &right, &bottom, &h, &v); + /* A rectangle and a point */ + /* Possible Python call: + f(((0, 0), (400, 300)), (10, 10)) */ + } + +:: + + { + Py_complex c; + ok = PyArg_ParseTuple(args, "D:myfunction", &c); + /* a complex, also providing a function name for errors */ + /* Possible Python call: myfunction(1+2j) */ + } + + +.. _parsetupleandkeywords: + +Keyword Parameters for Extension Functions +========================================== + +.. index:: single: PyArg_ParseTupleAndKeywords() + +The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows:: + + int PyArg_ParseTupleAndKeywords(PyObject *arg, PyObject *kwdict, + const char *format, char *kwlist[], ...); + +The *arg* and *format* parameters are identical to those of the +:c:func:`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of +keywords received as the third parameter from the Python runtime. The *kwlist* +parameter is a ``NULL``-terminated list of strings which identify the parameters; +the names are matched with the type information from *format* from left to +right. On success, :c:func:`PyArg_ParseTupleAndKeywords` returns true, otherwise +it returns false and raises an appropriate exception. + +.. note:: + + Nested tuples cannot be parsed when using keyword arguments! Keyword parameters + passed in which are not present in the *kwlist* will cause :exc:`TypeError` to + be raised. + +.. index:: single: Philbrick, Geoff + +Here is an example module which uses keywords, based on an example by Geoff +Philbrick (philbrick@hks.com):: + + #define PY_SSIZE_T_CLEAN /* Make "s#" use Py_ssize_t rather than int. */ + #include <Python.h> + + static PyObject * + keywdarg_parrot(PyObject *self, PyObject *args, PyObject *keywds) + { + int voltage; + const char *state = "a stiff"; + const char *action = "voom"; + const char *type = "Norwegian Blue"; + + static char *kwlist[] = {"voltage", "state", "action", "type", NULL}; + + if (!PyArg_ParseTupleAndKeywords(args, keywds, "i|sss", kwlist, + &voltage, &state, &action, &type)) + return NULL; + + printf("-- This parrot wouldn't %s if you put %i Volts through it.\n", + action, voltage); + printf("-- Lovely plumage, the %s -- It's %s!\n", type, state); + + Py_RETURN_NONE; + } + + static PyMethodDef keywdarg_methods[] = { + /* The cast of the function is necessary since PyCFunction values + * only take two PyObject* parameters, and keywdarg_parrot() takes + * three. + */ + {"parrot", (PyCFunction)(void(*)(void))keywdarg_parrot, METH_VARARGS | METH_KEYWORDS, + "Print a lovely skit to standard output."}, + {NULL, NULL, 0, NULL} /* sentinel */ + }; + + static struct PyModuleDef keywdargmodule = { + PyModuleDef_HEAD_INIT, + "keywdarg", + NULL, + -1, + keywdarg_methods + }; + + PyMODINIT_FUNC + PyInit_keywdarg(void) + { + return PyModule_Create(&keywdargmodule); + } + + +.. _buildvalue: + +Building Arbitrary Values +========================= + +This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is declared +as follows:: + + PyObject *Py_BuildValue(const char *format, ...); + +It recognizes a set of format units similar to the ones recognized by +:c:func:`PyArg_ParseTuple`, but the arguments (which are input to the function, +not output) must not be pointers, just values. It returns a new Python object, +suitable for returning from a C function called from Python. + +One difference with :c:func:`PyArg_ParseTuple`: while the latter requires its +first argument to be a tuple (since Python argument lists are always represented +as tuples internally), :c:func:`Py_BuildValue` does not always build a tuple. It +builds a tuple only if its format string contains two or more format units. If +the format string is empty, it returns ``None``; if it contains exactly one +format unit, it returns whatever object is described by that format unit. To +force it to return a tuple of size 0 or one, parenthesize the format string. + +Examples (to the left the call, to the right the resulting Python value): + +.. code-block:: none + + Py_BuildValue("") None + Py_BuildValue("i", 123) 123 + Py_BuildValue("iii", 123, 456, 789) (123, 456, 789) + Py_BuildValue("s", "hello") 'hello' + Py_BuildValue("y", "hello") b'hello' + Py_BuildValue("ss", "hello", "world") ('hello', 'world') + Py_BuildValue("s#", "hello", 4) 'hell' + Py_BuildValue("y#", "hello", 4) b'hell' + Py_BuildValue("()") () + Py_BuildValue("(i)", 123) (123,) + Py_BuildValue("(ii)", 123, 456) (123, 456) + Py_BuildValue("(i,i)", 123, 456) (123, 456) + Py_BuildValue("[i,i]", 123, 456) [123, 456] + Py_BuildValue("{s:i,s:i}", + "abc", 123, "def", 456) {'abc': 123, 'def': 456} + Py_BuildValue("((ii)(ii)) (ii)", + 1, 2, 3, 4, 5, 6) (((1, 2), (3, 4)), (5, 6)) + + +.. _refcounts: + +Reference Counts +================ + +In languages like C or C++, the programmer is responsible for dynamic allocation +and deallocation of memory on the heap. In C, this is done using the functions +:c:func:`malloc` and :c:func:`free`. In C++, the operators ``new`` and +``delete`` are used with essentially the same meaning and we'll restrict +the following discussion to the C case. + +Every block of memory allocated with :c:func:`malloc` should eventually be +returned to the pool of available memory by exactly one call to :c:func:`free`. +It is important to call :c:func:`free` at the right time. If a block's address +is forgotten but :c:func:`free` is not called for it, the memory it occupies +cannot be reused until the program terminates. This is called a :dfn:`memory +leak`. On the other hand, if a program calls :c:func:`free` for a block and then +continues to use the block, it creates a conflict with re-use of the block +through another :c:func:`malloc` call. This is called :dfn:`using freed memory`. +It has the same bad consequences as referencing uninitialized data --- core +dumps, wrong results, mysterious crashes. + +Common causes of memory leaks are unusual paths through the code. For instance, +a function may allocate a block of memory, do some calculation, and then free +the block again. Now a change in the requirements for the function may add a +test to the calculation that detects an error condition and can return +prematurely from the function. It's easy to forget to free the allocated memory +block when taking this premature exit, especially when it is added later to the +code. Such leaks, once introduced, often go undetected for a long time: the +error exit is taken only in a small fraction of all calls, and most modern +machines have plenty of virtual memory, so the leak only becomes apparent in a +long-running process that uses the leaking function frequently. Therefore, it's +important to prevent leaks from happening by having a coding convention or +strategy that minimizes this kind of errors. + +Since Python makes heavy use of :c:func:`malloc` and :c:func:`free`, it needs a +strategy to avoid memory leaks as well as the use of freed memory. The chosen +method is called :dfn:`reference counting`. The principle is simple: every +object contains a counter, which is incremented when a reference to the object +is stored somewhere, and which is decremented when a reference to it is deleted. +When the counter reaches zero, the last reference to the object has been deleted +and the object is freed. + +An alternative strategy is called :dfn:`automatic garbage collection`. +(Sometimes, reference counting is also referred to as a garbage collection +strategy, hence my use of "automatic" to distinguish the two.) The big +advantage of automatic garbage collection is that the user doesn't need to call +:c:func:`free` explicitly. (Another claimed advantage is an improvement in speed +or memory usage --- this is no hard fact however.) The disadvantage is that for +C, there is no truly portable automatic garbage collector, while reference +counting can be implemented portably (as long as the functions :c:func:`malloc` +and :c:func:`free` are available --- which the C Standard guarantees). Maybe some +day a sufficiently portable automatic garbage collector will be available for C. +Until then, we'll have to live with reference counts. + +While Python uses the traditional reference counting implementation, it also +offers a cycle detector that works to detect reference cycles. This allows +applications to not worry about creating direct or indirect circular references; +these are the weakness of garbage collection implemented using only reference +counting. Reference cycles consist of objects which contain (possibly indirect) +references to themselves, so that each object in the cycle has a reference count +which is non-zero. Typical reference counting implementations are not able to +reclaim the memory belonging to any objects in a reference cycle, or referenced +from the objects in the cycle, even though there are no further references to +the cycle itself. + +The cycle detector is able to detect garbage cycles and can reclaim them. +The :mod:`gc` module exposes a way to run the detector (the +:func:`~gc.collect` function), as well as configuration +interfaces and the ability to disable the detector at runtime. + + +.. _refcountsinpython: + +Reference Counting in Python +---------------------------- + +There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle the +incrementing and decrementing of the reference count. :c:func:`Py_DECREF` also +frees the object when the count reaches zero. For flexibility, it doesn't call +:c:func:`free` directly --- rather, it makes a call through a function pointer in +the object's :dfn:`type object`. For this purpose (and others), every object +also contains a pointer to its type object. + +The big question now remains: when to use ``Py_INCREF(x)`` and ``Py_DECREF(x)``? +Let's first introduce some terms. Nobody "owns" an object; however, you can +:dfn:`own a reference` to an object. An object's reference count is now defined +as the number of owned references to it. The owner of a reference is +responsible for calling :c:func:`Py_DECREF` when the reference is no longer +needed. Ownership of a reference can be transferred. There are three ways to +dispose of an owned reference: pass it on, store it, or call :c:func:`Py_DECREF`. +Forgetting to dispose of an owned reference creates a memory leak. + +It is also possible to :dfn:`borrow` [#]_ a reference to an object. The +borrower of a reference should not call :c:func:`Py_DECREF`. The borrower must +not hold on to the object longer than the owner from which it was borrowed. +Using a borrowed reference after the owner has disposed of it risks using freed +memory and should be avoided completely [#]_. + +The advantage of borrowing over owning a reference is that you don't need to +take care of disposing of the reference on all possible paths through the code +--- in other words, with a borrowed reference you don't run the risk of leaking +when a premature exit is taken. The disadvantage of borrowing over owning is +that there are some subtle situations where in seemingly correct code a borrowed +reference can be used after the owner from which it was borrowed has in fact +disposed of it. + +A borrowed reference can be changed into an owned reference by calling +:c:func:`Py_INCREF`. This does not affect the status of the owner from which the +reference was borrowed --- it creates a new owned reference, and gives full +owner responsibilities (the new owner must dispose of the reference properly, as +well as the previous owner). + + +.. _ownershiprules: + +Ownership Rules +--------------- + +Whenever an object reference is passed into or out of a function, it is part of +the function's interface specification whether ownership is transferred with the +reference or not. + +Most functions that return a reference to an object pass on ownership with the +reference. In particular, all functions whose function it is to create a new +object, such as :c:func:`PyLong_FromLong` and :c:func:`Py_BuildValue`, pass +ownership to the receiver. Even if the object is not actually new, you still +receive ownership of a new reference to that object. For instance, +:c:func:`PyLong_FromLong` maintains a cache of popular values and can return a +reference to a cached item. + +Many functions that extract objects from other objects also transfer ownership +with the reference, for instance :c:func:`PyObject_GetAttrString`. The picture +is less clear, here, however, since a few common routines are exceptions: +:c:func:`PyTuple_GetItem`, :c:func:`PyList_GetItem`, :c:func:`PyDict_GetItem`, and +:c:func:`PyDict_GetItemString` all return references that you borrow from the +tuple, list or dictionary. + +The function :c:func:`PyImport_AddModule` also returns a borrowed reference, even +though it may actually create the object it returns: this is possible because an +owned reference to the object is stored in ``sys.modules``. + +When you pass an object reference into another function, in general, the +function borrows the reference from you --- if it needs to store it, it will use +:c:func:`Py_INCREF` to become an independent owner. There are exactly two +important exceptions to this rule: :c:func:`PyTuple_SetItem` and +:c:func:`PyList_SetItem`. These functions take over ownership of the item passed +to them --- even if they fail! (Note that :c:func:`PyDict_SetItem` and friends +don't take over ownership --- they are "normal.") + +When a C function is called from Python, it borrows references to its arguments +from the caller. The caller owns a reference to the object, so the borrowed +reference's lifetime is guaranteed until the function returns. Only when such a +borrowed reference must be stored or passed on, it must be turned into an owned +reference by calling :c:func:`Py_INCREF`. + +The object reference returned from a C function that is called from Python must +be an owned reference --- ownership is transferred from the function to its +caller. + + +.. _thinice: + +Thin Ice +-------- + +There are a few situations where seemingly harmless use of a borrowed reference +can lead to problems. These all have to do with implicit invocations of the +interpreter, which can cause the owner of a reference to dispose of it. + +The first and most important case to know about is using :c:func:`Py_DECREF` on +an unrelated object while borrowing a reference to a list item. For instance:: + + void + bug(PyObject *list) + { + PyObject *item = PyList_GetItem(list, 0); + + PyList_SetItem(list, 1, PyLong_FromLong(0L)); + PyObject_Print(item, stdout, 0); /* BUG! */ + } + +This function first borrows a reference to ``list[0]``, then replaces +``list[1]`` with the value ``0``, and finally prints the borrowed reference. +Looks harmless, right? But it's not! + +Let's follow the control flow into :c:func:`PyList_SetItem`. The list owns +references to all its items, so when item 1 is replaced, it has to dispose of +the original item 1. Now let's suppose the original item 1 was an instance of a +user-defined class, and let's further suppose that the class defined a +:meth:`__del__` method. If this class instance has a reference count of 1, +disposing of it will call its :meth:`__del__` method. + +Since it is written in Python, the :meth:`__del__` method can execute arbitrary +Python code. Could it perhaps do something to invalidate the reference to +``item`` in :c:func:`bug`? You bet! Assuming that the list passed into +:c:func:`bug` is accessible to the :meth:`__del__` method, it could execute a +statement to the effect of ``del list[0]``, and assuming this was the last +reference to that object, it would free the memory associated with it, thereby +invalidating ``item``. + +The solution, once you know the source of the problem, is easy: temporarily +increment the reference count. The correct version of the function reads:: + + void + no_bug(PyObject *list) + { + PyObject *item = PyList_GetItem(list, 0); + + Py_INCREF(item); + PyList_SetItem(list, 1, PyLong_FromLong(0L)); + PyObject_Print(item, stdout, 0); + Py_DECREF(item); + } + +This is a true story. An older version of Python contained variants of this bug +and someone spent a considerable amount of time in a C debugger to figure out +why his :meth:`__del__` methods would fail... + +The second case of problems with a borrowed reference is a variant involving +threads. Normally, multiple threads in the Python interpreter can't get in each +other's way, because there is a global lock protecting Python's entire object +space. However, it is possible to temporarily release this lock using the macro +:c:macro:`Py_BEGIN_ALLOW_THREADS`, and to re-acquire it using +:c:macro:`Py_END_ALLOW_THREADS`. This is common around blocking I/O calls, to +let other threads use the processor while waiting for the I/O to complete. +Obviously, the following function has the same problem as the previous one:: + + void + bug(PyObject *list) + { + PyObject *item = PyList_GetItem(list, 0); + Py_BEGIN_ALLOW_THREADS + ...some blocking I/O call... + Py_END_ALLOW_THREADS + PyObject_Print(item, stdout, 0); /* BUG! */ + } + + +.. _nullpointers: + +NULL Pointers +------------- + +In general, functions that take object references as arguments do not expect you +to pass them ``NULL`` pointers, and will dump core (or cause later core dumps) if +you do so. Functions that return object references generally return ``NULL`` only +to indicate that an exception occurred. The reason for not testing for ``NULL`` +arguments is that functions often pass the objects they receive on to other +function --- if each function were to test for ``NULL``, there would be a lot of +redundant tests and the code would run more slowly. + +It is better to test for ``NULL`` only at the "source:" when a pointer that may be +``NULL`` is received, for example, from :c:func:`malloc` or from a function that +may raise an exception. + +The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for ``NULL`` +pointers --- however, their variants :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF` +do. + +The macros for checking for a particular object type (``Pytype_Check()``) don't +check for ``NULL`` pointers --- again, there is much code that calls several of +these in a row to test an object against various different expected types, and +this would generate redundant tests. There are no variants with ``NULL`` +checking. + +The C function calling mechanism guarantees that the argument list passed to C +functions (``args`` in the examples) is never ``NULL`` --- in fact it guarantees +that it is always a tuple [#]_. + +It is a severe error to ever let a ``NULL`` pointer "escape" to the Python user. + +.. Frank Stajano: + A pedagogically buggy example, along the lines of the previous listing, would + be helpful here -- showing in more concrete terms what sort of actions could + cause the problem. I can't very well imagine it from the description. + + +.. _cplusplus: + +Writing Extensions in C++ +========================= + +It is possible to write extension modules in C++. Some restrictions apply. If +the main program (the Python interpreter) is compiled and linked by the C +compiler, global or static objects with constructors cannot be used. This is +not a problem if the main program is linked by the C++ compiler. Functions that +will be called by the Python interpreter (in particular, module initialization +functions) have to be declared using ``extern "C"``. It is unnecessary to +enclose the Python header files in ``extern "C" {...}`` --- they use this form +already if the symbol ``__cplusplus`` is defined (all recent C++ compilers +define this symbol). + + +.. _using-capsules: + +Providing a C API for an Extension Module +========================================= + +.. sectionauthor:: Konrad Hinsen <hinsen@cnrs-orleans.fr> + + +Many extension modules just provide new functions and types to be used from +Python, but sometimes the code in an extension module can be useful for other +extension modules. For example, an extension module could implement a type +"collection" which works like lists without order. Just like the standard Python +list type has a C API which permits extension modules to create and manipulate +lists, this new collection type should have a set of C functions for direct +manipulation from other extension modules. + +At first sight this seems easy: just write the functions (without declaring them +``static``, of course), provide an appropriate header file, and document +the C API. And in fact this would work if all extension modules were always +linked statically with the Python interpreter. When modules are used as shared +libraries, however, the symbols defined in one module may not be visible to +another module. The details of visibility depend on the operating system; some +systems use one global namespace for the Python interpreter and all extension +modules (Windows, for example), whereas others require an explicit list of +imported symbols at module link time (AIX is one example), or offer a choice of +different strategies (most Unices). And even if symbols are globally visible, +the module whose functions one wishes to call might not have been loaded yet! + +Portability therefore requires not to make any assumptions about symbol +visibility. This means that all symbols in extension modules should be declared +``static``, except for the module's initialization function, in order to +avoid name clashes with other extension modules (as discussed in section +:ref:`methodtable`). And it means that symbols that *should* be accessible from +other extension modules must be exported in a different way. + +Python provides a special mechanism to pass C-level information (pointers) from +one extension module to another one: Capsules. A Capsule is a Python data type +which stores a pointer (:c:expr:`void \*`). Capsules can only be created and +accessed via their C API, but they can be passed around like any other Python +object. In particular, they can be assigned to a name in an extension module's +namespace. Other extension modules can then import this module, retrieve the +value of this name, and then retrieve the pointer from the Capsule. + +There are many ways in which Capsules can be used to export the C API of an +extension module. Each function could get its own Capsule, or all C API pointers +could be stored in an array whose address is published in a Capsule. And the +various tasks of storing and retrieving the pointers can be distributed in +different ways between the module providing the code and the client modules. + +Whichever method you choose, it's important to name your Capsules properly. +The function :c:func:`PyCapsule_New` takes a name parameter +(:c:expr:`const char \*`); you're permitted to pass in a ``NULL`` name, but +we strongly encourage you to specify a name. Properly named Capsules provide +a degree of runtime type-safety; there is no feasible way to tell one unnamed +Capsule from another. + +In particular, Capsules used to expose C APIs should be given a name following +this convention:: + + modulename.attributename + +The convenience function :c:func:`PyCapsule_Import` makes it easy to +load a C API provided via a Capsule, but only if the Capsule's name +matches this convention. This behavior gives C API users a high degree +of certainty that the Capsule they load contains the correct C API. + +The following example demonstrates an approach that puts most of the burden on +the writer of the exporting module, which is appropriate for commonly used +library modules. It stores all C API pointers (just one in the example!) in an +array of :c:expr:`void` pointers which becomes the value of a Capsule. The header +file corresponding to the module provides a macro that takes care of importing +the module and retrieving its C API pointers; client modules only have to call +this macro before accessing the C API. + +The exporting module is a modification of the :mod:`spam` module from section +:ref:`extending-simpleexample`. The function :func:`spam.system` does not call +the C library function :c:func:`system` directly, but a function +:c:func:`PySpam_System`, which would of course do something more complicated in +reality (such as adding "spam" to every command). This function +:c:func:`PySpam_System` is also exported to other extension modules. + +The function :c:func:`PySpam_System` is a plain C function, declared +``static`` like everything else:: + + static int + PySpam_System(const char *command) + { + return system(command); + } + +The function :c:func:`spam_system` is modified in a trivial way:: + + static PyObject * + spam_system(PyObject *self, PyObject *args) + { + const char *command; + int sts; + + if (!PyArg_ParseTuple(args, "s", &command)) + return NULL; + sts = PySpam_System(command); + return PyLong_FromLong(sts); + } + +In the beginning of the module, right after the line :: + + #include <Python.h> + +two more lines must be added:: + + #define SPAM_MODULE + #include "spammodule.h" + +The ``#define`` is used to tell the header file that it is being included in the +exporting module, not a client module. Finally, the module's initialization +function must take care of initializing the C API pointer array:: + + PyMODINIT_FUNC + PyInit_spam(void) + { + PyObject *m; + static void *PySpam_API[PySpam_API_pointers]; + PyObject *c_api_object; + + m = PyModule_Create(&spammodule); + if (m == NULL) + return NULL; + + /* Initialize the C API pointer array */ + PySpam_API[PySpam_System_NUM] = (void *)PySpam_System; + + /* Create a Capsule containing the API pointer array's address */ + c_api_object = PyCapsule_New((void *)PySpam_API, "spam._C_API", NULL); + + if (PyModule_AddObject(m, "_C_API", c_api_object) < 0) { + Py_XDECREF(c_api_object); + Py_DECREF(m); + return NULL; + } + + return m; + } + +Note that ``PySpam_API`` is declared ``static``; otherwise the pointer +array would disappear when :func:`PyInit_spam` terminates! + +The bulk of the work is in the header file :file:`spammodule.h`, which looks +like this:: + + #ifndef Py_SPAMMODULE_H + #define Py_SPAMMODULE_H + #ifdef __cplusplus + extern "C" { + #endif + + /* Header file for spammodule */ + + /* C API functions */ + #define PySpam_System_NUM 0 + #define PySpam_System_RETURN int + #define PySpam_System_PROTO (const char *command) + + /* Total number of C API pointers */ + #define PySpam_API_pointers 1 + + + #ifdef SPAM_MODULE + /* This section is used when compiling spammodule.c */ + + static PySpam_System_RETURN PySpam_System PySpam_System_PROTO; + + #else + /* This section is used in modules that use spammodule's API */ + + static void **PySpam_API; + + #define PySpam_System \ + (*(PySpam_System_RETURN (*)PySpam_System_PROTO) PySpam_API[PySpam_System_NUM]) + + /* Return -1 on error, 0 on success. + * PyCapsule_Import will set an exception if there's an error. + */ + static int + import_spam(void) + { + PySpam_API = (void **)PyCapsule_Import("spam._C_API", 0); + return (PySpam_API != NULL) ? 0 : -1; + } + + #endif + + #ifdef __cplusplus + } + #endif + + #endif /* !defined(Py_SPAMMODULE_H) */ + +All that a client module must do in order to have access to the function +:c:func:`PySpam_System` is to call the function (or rather macro) +:c:func:`import_spam` in its initialization function:: + + PyMODINIT_FUNC + PyInit_client(void) + { + PyObject *m; + + m = PyModule_Create(&clientmodule); + if (m == NULL) + return NULL; + if (import_spam() < 0) + return NULL; + /* additional initialization can happen here */ + return m; + } + +The main disadvantage of this approach is that the file :file:`spammodule.h` is +rather complicated. However, the basic structure is the same for each function +that is exported, so it has to be learned only once. + +Finally it should be mentioned that Capsules offer additional functionality, +which is especially useful for memory allocation and deallocation of the pointer +stored in a Capsule. The details are described in the Python/C API Reference +Manual in the section :ref:`capsules` and in the implementation of Capsules (files +:file:`Include/pycapsule.h` and :file:`Objects/pycapsule.c` in the Python source +code distribution). + +.. rubric:: Footnotes + +.. [#] An interface for this function already exists in the standard module :mod:`os` + --- it was chosen as a simple and straightforward example. + +.. [#] The metaphor of "borrowing" a reference is not completely correct: the owner + still has a copy of the reference. + +.. [#] Checking that the reference count is at least 1 **does not work** --- the + reference count itself could be in freed memory and may thus be reused for + another object! + +.. [#] These guarantees don't hold when you use the "old" style calling convention --- + this is still found in much existing code.
diff --git a/Doc/extending/index.rst b/Doc/extending/index.rst new file mode 100644 index 0000000..01b4df6 --- /dev/null +++ b/Doc/extending/index.rst
@@ -0,0 +1,74 @@ +.. _extending-index: + +################################################## + Extending and Embedding the Python Interpreter +################################################## + +This document describes how to write modules in C or C++ to extend the Python +interpreter with new modules. Those modules can not only define new functions +but also new object types and their methods. The document also describes how +to embed the Python interpreter in another application, for use as an extension +language. Finally, it shows how to compile and link extension modules so that +they can be loaded dynamically (at run time) into the interpreter, if the +underlying operating system supports this feature. + +This document assumes basic knowledge about Python. For an informal +introduction to the language, see :ref:`tutorial-index`. :ref:`reference-index` +gives a more formal definition of the language. :ref:`library-index` documents +the existing object types, functions and modules (both built-in and written in +Python) that give the language its wide application range. + +For a detailed description of the whole Python/C API, see the separate +:ref:`c-api-index`. + + +Recommended third party tools +============================= + +This guide only covers the basic tools for creating extensions provided +as part of this version of CPython. Third party tools like +`Cython <https://cython.org/>`_, `cffi <https://cffi.readthedocs.io>`_, +`SWIG <https://www.swig.org>`_ and `Numba <https://numba.pydata.org/>`_ +offer both simpler and more sophisticated approaches to creating C and C++ +extensions for Python. + +.. seealso:: + + `Python Packaging User Guide: Binary Extensions <https://packaging.python.org/guides/packaging-binary-extensions/>`_ + The Python Packaging User Guide not only covers several available + tools that simplify the creation of binary extensions, but also + discusses the various reasons why creating an extension module may be + desirable in the first place. + + +Creating extensions without third party tools +============================================= + +This section of the guide covers creating C and C++ extensions without +assistance from third party tools. It is intended primarily for creators +of those tools, rather than being a recommended way to create your own +C extensions. + +.. toctree:: + :maxdepth: 2 + :numbered: + + extending.rst + newtypes_tutorial.rst + newtypes.rst + building.rst + windows.rst + +Embedding the CPython runtime in a larger application +===================================================== + +Sometimes, rather than creating an extension that runs inside the Python +interpreter as the main application, it is desirable to instead embed +the CPython runtime inside a larger application. This section covers +some of the details involved in doing that successfully. + +.. toctree:: + :maxdepth: 2 + :numbered: + + embedding.rst
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst new file mode 100644 index 0000000..e60db11 --- /dev/null +++ b/Doc/extending/newtypes.rst
@@ -0,0 +1,638 @@ +.. highlight:: c + +.. _new-types-topics: + +***************************************** +Defining Extension Types: Assorted Topics +***************************************** + +.. _dnt-type-methods: + +This section aims to give a quick fly-by on the various type methods you can +implement and what they do. + +Here is the definition of :c:type:`PyTypeObject`, with some fields only used in +:ref:`debug builds <debug-build>` omitted: + +.. literalinclude:: ../includes/typestruct.h + + +Now that's a *lot* of methods. Don't worry too much though -- if you have +a type you want to define, the chances are very good that you will only +implement a handful of these. + +As you probably expect by now, we're going to go over this and give more +information about the various handlers. We won't go in the order they are +defined in the structure, because there is a lot of historical baggage that +impacts the ordering of the fields. It's often easiest to find an example +that includes the fields you need and then change the values to suit your new +type. :: + + const char *tp_name; /* For printing */ + +The name of the type -- as mentioned in the previous chapter, this will appear in +various places, almost entirely for diagnostic purposes. Try to choose something +that will be helpful in such a situation! :: + + Py_ssize_t tp_basicsize, tp_itemsize; /* For allocation */ + +These fields tell the runtime how much memory to allocate when new objects of +this type are created. Python has some built-in support for variable length +structures (think: strings, tuples) which is where the :c:member:`~PyTypeObject.tp_itemsize` field +comes in. This will be dealt with later. :: + + const char *tp_doc; + +Here you can put a string (or its address) that you want returned when the +Python script references ``obj.__doc__`` to retrieve the doc string. + +Now we come to the basic type methods -- the ones most extension types will +implement. + + +Finalization and De-allocation +------------------------------ + +.. index:: + single: object; deallocation + single: deallocation, object + single: object; finalization + single: finalization, of objects + +:: + + destructor tp_dealloc; + +This function is called when the reference count of the instance of your type is +reduced to zero and the Python interpreter wants to reclaim it. If your type +has memory to free or other clean-up to perform, you can put it here. The +object itself needs to be freed here as well. Here is an example of this +function:: + + static void + newdatatype_dealloc(newdatatypeobject *obj) + { + free(obj->obj_UnderlyingDatatypePtr); + Py_TYPE(obj)->tp_free((PyObject *)obj); + } + +If your type supports garbage collection, the destructor should call +:c:func:`PyObject_GC_UnTrack` before clearing any member fields:: + + static void + newdatatype_dealloc(newdatatypeobject *obj) + { + PyObject_GC_UnTrack(obj); + Py_CLEAR(obj->other_obj); + ... + Py_TYPE(obj)->tp_free((PyObject *)obj); + } + +.. index:: + single: PyErr_Fetch() + single: PyErr_Restore() + +One important requirement of the deallocator function is that it leaves any +pending exceptions alone. This is important since deallocators are frequently +called as the interpreter unwinds the Python stack; when the stack is unwound +due to an exception (rather than normal returns), nothing is done to protect the +deallocators from seeing that an exception has already been set. Any actions +which a deallocator performs which may cause additional Python code to be +executed may detect that an exception has been set. This can lead to misleading +errors from the interpreter. The proper way to protect against this is to save +a pending exception before performing the unsafe action, and restoring it when +done. This can be done using the :c:func:`PyErr_Fetch` and +:c:func:`PyErr_Restore` functions:: + + static void + my_dealloc(PyObject *obj) + { + MyObject *self = (MyObject *) obj; + PyObject *cbresult; + + if (self->my_callback != NULL) { + PyObject *err_type, *err_value, *err_traceback; + + /* This saves the current exception state */ + PyErr_Fetch(&err_type, &err_value, &err_traceback); + + cbresult = PyObject_CallNoArgs(self->my_callback); + if (cbresult == NULL) + PyErr_WriteUnraisable(self->my_callback); + else + Py_DECREF(cbresult); + + /* This restores the saved exception state */ + PyErr_Restore(err_type, err_value, err_traceback); + + Py_DECREF(self->my_callback); + } + Py_TYPE(obj)->tp_free((PyObject*)self); + } + +.. note:: + There are limitations to what you can safely do in a deallocator function. + First, if your type supports garbage collection (using :c:member:`~PyTypeObject.tp_traverse` + and/or :c:member:`~PyTypeObject.tp_clear`), some of the object's members can have been + cleared or finalized by the time :c:member:`~PyTypeObject.tp_dealloc` is called. Second, in + :c:member:`~PyTypeObject.tp_dealloc`, your object is in an unstable state: its reference + count is equal to zero. Any call to a non-trivial object or API (as in the + example above) might end up calling :c:member:`~PyTypeObject.tp_dealloc` again, causing a + double free and a crash. + + Starting with Python 3.4, it is recommended not to put any complex + finalization code in :c:member:`~PyTypeObject.tp_dealloc`, and instead use the new + :c:member:`~PyTypeObject.tp_finalize` type method. + + .. seealso:: + :pep:`442` explains the new finalization scheme. + +.. index:: + single: string; object representation + pair: built-in function; repr + +Object Presentation +------------------- + +In Python, there are two ways to generate a textual representation of an object: +the :func:`repr` function, and the :func:`str` function. (The :func:`print` +function just calls :func:`str`.) These handlers are both optional. + +:: + + reprfunc tp_repr; + reprfunc tp_str; + +The :c:member:`~PyTypeObject.tp_repr` handler should return a string object containing a +representation of the instance for which it is called. Here is a simple +example:: + + static PyObject * + newdatatype_repr(newdatatypeobject * obj) + { + return PyUnicode_FromFormat("Repr-ified_newdatatype{{size:%d}}", + obj->obj_UnderlyingDatatypePtr->size); + } + +If no :c:member:`~PyTypeObject.tp_repr` handler is specified, the interpreter will supply a +representation that uses the type's :c:member:`~PyTypeObject.tp_name` and a uniquely identifying +value for the object. + +The :c:member:`~PyTypeObject.tp_str` handler is to :func:`str` what the :c:member:`~PyTypeObject.tp_repr` handler +described above is to :func:`repr`; that is, it is called when Python code calls +:func:`str` on an instance of your object. Its implementation is very similar +to the :c:member:`~PyTypeObject.tp_repr` function, but the resulting string is intended for human +consumption. If :c:member:`~PyTypeObject.tp_str` is not specified, the :c:member:`~PyTypeObject.tp_repr` handler is +used instead. + +Here is a simple example:: + + static PyObject * + newdatatype_str(newdatatypeobject * obj) + { + return PyUnicode_FromFormat("Stringified_newdatatype{{size:%d}}", + obj->obj_UnderlyingDatatypePtr->size); + } + + + +Attribute Management +-------------------- + +For every object which can support attributes, the corresponding type must +provide the functions that control how the attributes are resolved. There needs +to be a function which can retrieve attributes (if any are defined), and another +to set attributes (if setting attributes is allowed). Removing an attribute is +a special case, for which the new value passed to the handler is ``NULL``. + +Python supports two pairs of attribute handlers; a type that supports attributes +only needs to implement the functions for one pair. The difference is that one +pair takes the name of the attribute as a :c:expr:`char\*`, while the other +accepts a :c:expr:`PyObject*`. Each type can use whichever pair makes more +sense for the implementation's convenience. :: + + getattrfunc tp_getattr; /* char * version */ + setattrfunc tp_setattr; + /* ... */ + getattrofunc tp_getattro; /* PyObject * version */ + setattrofunc tp_setattro; + +If accessing attributes of an object is always a simple operation (this will be +explained shortly), there are generic implementations which can be used to +provide the :c:expr:`PyObject*` version of the attribute management functions. +The actual need for type-specific attribute handlers almost completely +disappeared starting with Python 2.2, though there are many examples which have +not been updated to use some of the new generic mechanism that is available. + + +.. _generic-attribute-management: + +Generic Attribute Management +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Most extension types only use *simple* attributes. So, what makes the +attributes simple? There are only a couple of conditions that must be met: + +#. The name of the attributes must be known when :c:func:`PyType_Ready` is + called. + +#. No special processing is needed to record that an attribute was looked up or + set, nor do actions need to be taken based on the value. + +Note that this list does not place any restrictions on the values of the +attributes, when the values are computed, or how relevant data is stored. + +When :c:func:`PyType_Ready` is called, it uses three tables referenced by the +type object to create :term:`descriptor`\s which are placed in the dictionary of the +type object. Each descriptor controls access to one attribute of the instance +object. Each of the tables is optional; if all three are ``NULL``, instances of +the type will only have attributes that are inherited from their base type, and +should leave the :c:member:`~PyTypeObject.tp_getattro` and :c:member:`~PyTypeObject.tp_setattro` fields ``NULL`` as +well, allowing the base type to handle attributes. + +The tables are declared as three fields of the type object:: + + struct PyMethodDef *tp_methods; + struct PyMemberDef *tp_members; + struct PyGetSetDef *tp_getset; + +If :c:member:`~PyTypeObject.tp_methods` is not ``NULL``, it must refer to an array of +:c:type:`PyMethodDef` structures. Each entry in the table is an instance of this +structure:: + + typedef struct PyMethodDef { + const char *ml_name; /* method name */ + PyCFunction ml_meth; /* implementation function */ + int ml_flags; /* flags */ + const char *ml_doc; /* docstring */ + } PyMethodDef; + +One entry should be defined for each method provided by the type; no entries are +needed for methods inherited from a base type. One additional entry is needed +at the end; it is a sentinel that marks the end of the array. The +:attr:`ml_name` field of the sentinel must be ``NULL``. + +The second table is used to define attributes which map directly to data stored +in the instance. A variety of primitive C types are supported, and access may +be read-only or read-write. The structures in the table are defined as:: + + typedef struct PyMemberDef { + const char *name; + int type; + int offset; + int flags; + const char *doc; + } PyMemberDef; + +For each entry in the table, a :term:`descriptor` will be constructed and added to the +type which will be able to extract a value from the instance structure. The +:attr:`type` field should contain one of the type codes defined in the +:file:`structmember.h` header; the value will be used to determine how to +convert Python values to and from C values. The :attr:`flags` field is used to +store flags which control how the attribute can be accessed. + +The following flag constants are defined in :file:`structmember.h`; they may be +combined using bitwise-OR. + ++---------------------------+----------------------------------------------+ +| Constant | Meaning | ++===========================+==============================================+ +| :const:`READONLY` | Never writable. | ++---------------------------+----------------------------------------------+ +| :const:`PY_AUDIT_READ` | Emit an ``object.__getattr__`` | +| | :ref:`audit events <audit-events>` before | +| | reading. | ++---------------------------+----------------------------------------------+ + +.. versionchanged:: 3.10 + :const:`RESTRICTED`, :const:`READ_RESTRICTED` and :const:`WRITE_RESTRICTED` + are deprecated. However, :const:`READ_RESTRICTED` is an alias for + :const:`PY_AUDIT_READ`, so fields that specify either :const:`RESTRICTED` + or :const:`READ_RESTRICTED` will also raise an audit event. + +.. index:: + single: READONLY + single: READ_RESTRICTED + single: WRITE_RESTRICTED + single: RESTRICTED + single: PY_AUDIT_READ + +An interesting advantage of using the :c:member:`~PyTypeObject.tp_members` table to build +descriptors that are used at runtime is that any attribute defined this way can +have an associated doc string simply by providing the text in the table. An +application can use the introspection API to retrieve the descriptor from the +class object, and get the doc string using its :attr:`__doc__` attribute. + +As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry with a :attr:`name` value +of ``NULL`` is required. + +.. XXX Descriptors need to be explained in more detail somewhere, but not here. + + Descriptor objects have two handler functions which correspond to the + \member{tp_getattro} and \member{tp_setattro} handlers. The + \method{__get__()} handler is a function which is passed the descriptor, + instance, and type objects, and returns the value of the attribute, or it + returns \NULL{} and sets an exception. The \method{__set__()} handler is + passed the descriptor, instance, type, and new value; + + +Type-specific Attribute Management +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +For simplicity, only the :c:expr:`char\*` version will be demonstrated here; the +type of the name parameter is the only difference between the :c:expr:`char\*` +and :c:expr:`PyObject*` flavors of the interface. This example effectively does +the same thing as the generic example above, but does not use the generic +support added in Python 2.2. It explains how the handler functions are +called, so that if you do need to extend their functionality, you'll understand +what needs to be done. + +The :c:member:`~PyTypeObject.tp_getattr` handler is called when the object requires an attribute +look-up. It is called in the same situations where the :meth:`__getattr__` +method of a class would be called. + +Here is an example:: + + static PyObject * + newdatatype_getattr(newdatatypeobject *obj, char *name) + { + if (strcmp(name, "data") == 0) + { + return PyLong_FromLong(obj->data); + } + + PyErr_Format(PyExc_AttributeError, + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, name); + return NULL; + } + +The :c:member:`~PyTypeObject.tp_setattr` handler is called when the :meth:`__setattr__` or +:meth:`__delattr__` method of a class instance would be called. When an +attribute should be deleted, the third parameter will be ``NULL``. Here is an +example that simply raises an exception; if this were really all you wanted, the +:c:member:`~PyTypeObject.tp_setattr` handler should be set to ``NULL``. :: + + static int + newdatatype_setattr(newdatatypeobject *obj, char *name, PyObject *v) + { + PyErr_Format(PyExc_RuntimeError, "Read-only attribute: %s", name); + return -1; + } + +Object Comparison +----------------- + +:: + + richcmpfunc tp_richcompare; + +The :c:member:`~PyTypeObject.tp_richcompare` handler is called when comparisons are needed. It is +analogous to the :ref:`rich comparison methods <richcmpfuncs>`, like +:meth:`__lt__`, and also called by :c:func:`PyObject_RichCompare` and +:c:func:`PyObject_RichCompareBool`. + +This function is called with two Python objects and the operator as arguments, +where the operator is one of ``Py_EQ``, ``Py_NE``, ``Py_LE``, ``Py_GE``, +``Py_LT`` or ``Py_GT``. It should compare the two objects with respect to the +specified operator and return ``Py_True`` or ``Py_False`` if the comparison is +successful, ``Py_NotImplemented`` to indicate that comparison is not +implemented and the other object's comparison method should be tried, or ``NULL`` +if an exception was set. + +Here is a sample implementation, for a datatype that is considered equal if the +size of an internal pointer is equal:: + + static PyObject * + newdatatype_richcmp(PyObject *obj1, PyObject *obj2, int op) + { + PyObject *result; + int c, size1, size2; + + /* code to make sure that both arguments are of type + newdatatype omitted */ + + size1 = obj1->obj_UnderlyingDatatypePtr->size; + size2 = obj2->obj_UnderlyingDatatypePtr->size; + + switch (op) { + case Py_LT: c = size1 < size2; break; + case Py_LE: c = size1 <= size2; break; + case Py_EQ: c = size1 == size2; break; + case Py_NE: c = size1 != size2; break; + case Py_GT: c = size1 > size2; break; + case Py_GE: c = size1 >= size2; break; + } + result = c ? Py_True : Py_False; + Py_INCREF(result); + return result; + } + + +Abstract Protocol Support +------------------------- + +Python supports a variety of *abstract* 'protocols;' the specific interfaces +provided to use these interfaces are documented in :ref:`abstract`. + + +A number of these abstract interfaces were defined early in the development of +the Python implementation. In particular, the number, mapping, and sequence +protocols have been part of Python since the beginning. Other protocols have +been added over time. For protocols which depend on several handler routines +from the type implementation, the older protocols have been defined as optional +blocks of handlers referenced by the type object. For newer protocols there are +additional slots in the main type object, with a flag bit being set to indicate +that the slots are present and should be checked by the interpreter. (The flag +bit does not indicate that the slot values are non-``NULL``. The flag may be set +to indicate the presence of a slot, but a slot may still be unfilled.) :: + + PyNumberMethods *tp_as_number; + PySequenceMethods *tp_as_sequence; + PyMappingMethods *tp_as_mapping; + +If you wish your object to be able to act like a number, a sequence, or a +mapping object, then you place the address of a structure that implements the C +type :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, or +:c:type:`PyMappingMethods`, respectively. It is up to you to fill in this +structure with appropriate values. You can find examples of the use of each of +these in the :file:`Objects` directory of the Python source distribution. :: + + hashfunc tp_hash; + +This function, if you choose to provide it, should return a hash number for an +instance of your data type. Here is a simple example:: + + static Py_hash_t + newdatatype_hash(newdatatypeobject *obj) + { + Py_hash_t result; + result = obj->some_size + 32767 * obj->some_number; + if (result == -1) + result = -2; + return result; + } + +:c:type:`Py_hash_t` is a signed integer type with a platform-varying width. +Returning ``-1`` from :c:member:`~PyTypeObject.tp_hash` indicates an error, +which is why you should be careful to avoid returning it when hash computation +is successful, as seen above. + +:: + + ternaryfunc tp_call; + +This function is called when an instance of your data type is "called", for +example, if ``obj1`` is an instance of your data type and the Python script +contains ``obj1('hello')``, the :c:member:`~PyTypeObject.tp_call` handler is invoked. + +This function takes three arguments: + +#. *self* is the instance of the data type which is the subject of the call. + If the call is ``obj1('hello')``, then *self* is ``obj1``. + +#. *args* is a tuple containing the arguments to the call. You can use + :c:func:`PyArg_ParseTuple` to extract the arguments. + +#. *kwds* is a dictionary of keyword arguments that were passed. If this is + non-``NULL`` and you support keyword arguments, use + :c:func:`PyArg_ParseTupleAndKeywords` to extract the arguments. If you + do not want to support keyword arguments and this is non-``NULL``, raise a + :exc:`TypeError` with a message saying that keyword arguments are not supported. + +Here is a toy ``tp_call`` implementation:: + + static PyObject * + newdatatype_call(newdatatypeobject *self, PyObject *args, PyObject *kwds) + { + PyObject *result; + const char *arg1; + const char *arg2; + const char *arg3; + + if (!PyArg_ParseTuple(args, "sss:call", &arg1, &arg2, &arg3)) { + return NULL; + } + result = PyUnicode_FromFormat( + "Returning -- value: [%d] arg1: [%s] arg2: [%s] arg3: [%s]\n", + obj->obj_UnderlyingDatatypePtr->size, + arg1, arg2, arg3); + return result; + } + +:: + + /* Iterators */ + getiterfunc tp_iter; + iternextfunc tp_iternext; + +These functions provide support for the iterator protocol. Both handlers +take exactly one parameter, the instance for which they are being called, +and return a new reference. In the case of an error, they should set an +exception and return ``NULL``. :c:member:`~PyTypeObject.tp_iter` corresponds +to the Python :meth:`__iter__` method, while :c:member:`~PyTypeObject.tp_iternext` +corresponds to the Python :meth:`~iterator.__next__` method. + +Any :term:`iterable` object must implement the :c:member:`~PyTypeObject.tp_iter` +handler, which must return an :term:`iterator` object. Here the same guidelines +apply as for Python classes: + +* For collections (such as lists and tuples) which can support multiple + independent iterators, a new iterator should be created and returned by + each call to :c:member:`~PyTypeObject.tp_iter`. +* Objects which can only be iterated over once (usually due to side effects of + iteration, such as file objects) can implement :c:member:`~PyTypeObject.tp_iter` + by returning a new reference to themselves -- and should also therefore + implement the :c:member:`~PyTypeObject.tp_iternext` handler. + +Any :term:`iterator` object should implement both :c:member:`~PyTypeObject.tp_iter` +and :c:member:`~PyTypeObject.tp_iternext`. An iterator's +:c:member:`~PyTypeObject.tp_iter` handler should return a new reference +to the iterator. Its :c:member:`~PyTypeObject.tp_iternext` handler should +return a new reference to the next object in the iteration, if there is one. +If the iteration has reached the end, :c:member:`~PyTypeObject.tp_iternext` +may return ``NULL`` without setting an exception, or it may set +:exc:`StopIteration` *in addition* to returning ``NULL``; avoiding +the exception can yield slightly better performance. If an actual error +occurs, :c:member:`~PyTypeObject.tp_iternext` should always set an exception +and return ``NULL``. + + +.. _weakref-support: + +Weak Reference Support +---------------------- + +One of the goals of Python's weak reference implementation is to allow any type +to participate in the weak reference mechanism without incurring the overhead on +performance-critical objects (such as numbers). + +.. seealso:: + Documentation for the :mod:`weakref` module. + +For an object to be weakly referencable, the extension type must do two things: + +#. Include a :c:expr:`PyObject*` field in the C object structure dedicated to + the weak reference mechanism. The object's constructor should leave it + ``NULL`` (which is automatic when using the default + :c:member:`~PyTypeObject.tp_alloc`). + +#. Set the :c:member:`~PyTypeObject.tp_weaklistoffset` type member + to the offset of the aforementioned field in the C object structure, + so that the interpreter knows how to access and modify that field. + +Concretely, here is how a trivial object structure would be augmented +with the required field:: + + typedef struct { + PyObject_HEAD + PyObject *weakreflist; /* List of weak references */ + } TrivialObject; + +And the corresponding member in the statically declared type object:: + + static PyTypeObject TrivialType = { + PyVarObject_HEAD_INIT(NULL, 0) + /* ... other members omitted for brevity ... */ + .tp_weaklistoffset = offsetof(TrivialObject, weakreflist), + }; + +The only further addition is that ``tp_dealloc`` needs to clear any weak +references (by calling :c:func:`PyObject_ClearWeakRefs`) if the field is +non-``NULL``:: + + static void + Trivial_dealloc(TrivialObject *self) + { + /* Clear weakrefs first before calling any destructors */ + if (self->weakreflist != NULL) + PyObject_ClearWeakRefs((PyObject *) self); + /* ... remainder of destruction code omitted for brevity ... */ + Py_TYPE(self)->tp_free((PyObject *) self); + } + + +More Suggestions +---------------- + +In order to learn how to implement any specific method for your new data type, +get the :term:`CPython` source code. Go to the :file:`Objects` directory, +then search the C source files for ``tp_`` plus the function you want +(for example, ``tp_richcompare``). You will find examples of the function +you want to implement. + +When you need to verify that an object is a concrete instance of the type you +are implementing, use the :c:func:`PyObject_TypeCheck` function. A sample of +its use might be something like the following:: + + if (!PyObject_TypeCheck(some_object, &MyType)) { + PyErr_SetString(PyExc_TypeError, "arg #1 not a mything"); + return NULL; + } + +.. seealso:: + Download CPython source releases. + https://www.python.org/downloads/source/ + + The CPython project on GitHub, where the CPython source code is developed. + https://github.com/python/cpython
diff --git a/Doc/extending/newtypes_tutorial.rst b/Doc/extending/newtypes_tutorial.rst new file mode 100644 index 0000000..5d4a3f0 --- /dev/null +++ b/Doc/extending/newtypes_tutorial.rst
@@ -0,0 +1,908 @@ +.. highlight:: c + +.. _defining-new-types: + +********************************** +Defining Extension Types: Tutorial +********************************** + +.. sectionauthor:: Michael Hudson <mwh@python.net> +.. sectionauthor:: Dave Kuhlman <dkuhlman@rexx.com> +.. sectionauthor:: Jim Fulton <jim@zope.com> + + +Python allows the writer of a C extension module to define new types that +can be manipulated from Python code, much like the built-in :class:`str` +and :class:`list` types. The code for all extension types follows a +pattern, but there are some details that you need to understand before you +can get started. This document is a gentle introduction to the topic. + + +.. _dnt-basics: + +The Basics +========== + +The :term:`CPython` runtime sees all Python objects as variables of type +:c:expr:`PyObject*`, which serves as a "base type" for all Python objects. +The :c:type:`PyObject` structure itself only contains the object's +:term:`reference count` and a pointer to the object's "type object". +This is where the action is; the type object determines which (C) functions +get called by the interpreter when, for instance, an attribute gets looked up +on an object, a method called, or it is multiplied by another object. These +C functions are called "type methods". + +So, if you want to define a new extension type, you need to create a new type +object. + +This sort of thing can only be explained by example, so here's a minimal, but +complete, module that defines a new type named :class:`Custom` inside a C +extension module :mod:`custom`: + +.. note:: + What we're showing here is the traditional way of defining *static* + extension types. It should be adequate for most uses. The C API also + allows defining heap-allocated extension types using the + :c:func:`PyType_FromSpec` function, which isn't covered in this tutorial. + +.. literalinclude:: ../includes/custom.c + +Now that's quite a bit to take in at once, but hopefully bits will seem familiar +from the previous chapter. This file defines three things: + +#. What a :class:`Custom` **object** contains: this is the ``CustomObject`` + struct, which is allocated once for each :class:`Custom` instance. +#. How the :class:`Custom` **type** behaves: this is the ``CustomType`` struct, + which defines a set of flags and function pointers that the interpreter + inspects when specific operations are requested. +#. How to initialize the :mod:`custom` module: this is the ``PyInit_custom`` + function and the associated ``custommodule`` struct. + +The first bit is:: + + typedef struct { + PyObject_HEAD + } CustomObject; + +This is what a Custom object will contain. ``PyObject_HEAD`` is mandatory +at the start of each object struct and defines a field called ``ob_base`` +of type :c:type:`PyObject`, containing a pointer to a type object and a +reference count (these can be accessed using the macros :c:macro:`Py_TYPE` +and :c:macro:`Py_REFCNT` respectively). The reason for the macro is to +abstract away the layout and to enable additional fields in :ref:`debug builds +<debug-build>`. + +.. note:: + There is no semicolon above after the :c:macro:`PyObject_HEAD` macro. + Be wary of adding one by accident: some compilers will complain. + +Of course, objects generally store additional data besides the standard +``PyObject_HEAD`` boilerplate; for example, here is the definition for +standard Python floats:: + + typedef struct { + PyObject_HEAD + double ob_fval; + } PyFloatObject; + +The second bit is the definition of the type object. :: + + static PyTypeObject CustomType = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "custom.Custom", + .tp_doc = PyDoc_STR("Custom objects"), + .tp_basicsize = sizeof(CustomObject), + .tp_itemsize = 0, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_new = PyType_GenericNew, + }; + +.. note:: + We recommend using C99-style designated initializers as above, to + avoid listing all the :c:type:`PyTypeObject` fields that you don't care + about and also to avoid caring about the fields' declaration order. + +The actual definition of :c:type:`PyTypeObject` in :file:`object.h` has +many more :ref:`fields <type-structs>` than the definition above. The +remaining fields will be filled with zeros by the C compiler, and it's +common practice to not specify them explicitly unless you need them. + +We're going to pick it apart, one field at a time:: + + PyVarObject_HEAD_INIT(NULL, 0) + +This line is mandatory boilerplate to initialize the ``ob_base`` +field mentioned above. :: + + .tp_name = "custom.Custom", + +The name of our type. This will appear in the default textual representation of +our objects and in some error messages, for example: + +.. code-block:: pycon + + >>> "" + custom.Custom() + Traceback (most recent call last): + File "<stdin>", line 1, in <module> + TypeError: can only concatenate str (not "custom.Custom") to str + +Note that the name is a dotted name that includes both the module name and the +name of the type within the module. The module in this case is :mod:`custom` and +the type is :class:`Custom`, so we set the type name to :class:`custom.Custom`. +Using the real dotted import path is important to make your type compatible +with the :mod:`pydoc` and :mod:`pickle` modules. :: + + .tp_basicsize = sizeof(CustomObject), + .tp_itemsize = 0, + +This is so that Python knows how much memory to allocate when creating +new :class:`Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is +only used for variable-sized objects and should otherwise be zero. + +.. note:: + + If you want your type to be subclassable from Python, and your type has the same + :c:member:`~PyTypeObject.tp_basicsize` as its base type, you may have problems with multiple + inheritance. A Python subclass of your type will have to list your type first + in its :attr:`~class.__bases__`, or else it will not be able to call your type's + :meth:`__new__` method without getting an error. You can avoid this problem by + ensuring that your type has a larger value for :c:member:`~PyTypeObject.tp_basicsize` than its + base type does. Most of the time, this will be true anyway, because either your + base type will be :class:`object`, or else you will be adding data members to + your base type, and therefore increasing its size. + +We set the class flags to :const:`Py_TPFLAGS_DEFAULT`. :: + + .tp_flags = Py_TPFLAGS_DEFAULT, + +All types should include this constant in their flags. It enables all of the +members defined until at least Python 3.3. If you need further members, +you will need to OR the corresponding flags. + +We provide a doc string for the type in :c:member:`~PyTypeObject.tp_doc`. :: + + .tp_doc = PyDoc_STR("Custom objects"), + +To enable object creation, we have to provide a :c:member:`~PyTypeObject.tp_new` +handler. This is the equivalent of the Python method :meth:`__new__`, but +has to be specified explicitly. In this case, we can just use the default +implementation provided by the API function :c:func:`PyType_GenericNew`. :: + + .tp_new = PyType_GenericNew, + +Everything else in the file should be familiar, except for some code in +:c:func:`PyInit_custom`:: + + if (PyType_Ready(&CustomType) < 0) + return; + +This initializes the :class:`Custom` type, filling in a number of members +to the appropriate default values, including :attr:`ob_type` that we initially +set to ``NULL``. :: + + Py_INCREF(&CustomType); + if (PyModule_AddObject(m, "Custom", (PyObject *) &CustomType) < 0) { + Py_DECREF(&CustomType); + Py_DECREF(m); + return NULL; + } + +This adds the type to the module dictionary. This allows us to create +:class:`Custom` instances by calling the :class:`Custom` class: + +.. code-block:: pycon + + >>> import custom + >>> mycustom = custom.Custom() + +That's it! All that remains is to build it; put the above code in a file called +:file:`custom.c` and: + +.. code-block:: python + + from distutils.core import setup, Extension + setup(name="custom", version="1.0", + ext_modules=[Extension("custom", ["custom.c"])]) + +in a file called :file:`setup.py`; then typing + +.. code-block:: shell-session + + $ python setup.py build + +at a shell should produce a file :file:`custom.so` in a subdirectory; move to +that directory and fire up Python --- you should be able to ``import custom`` and +play around with Custom objects. + +That wasn't so hard, was it? + +Of course, the current Custom type is pretty uninteresting. It has no data and +doesn't do anything. It can't even be subclassed. + +.. note:: + While this documentation showcases the standard :mod:`distutils` module + for building C extensions, it is recommended in real-world use cases to + use the newer and better-maintained ``setuptools`` library. Documentation + on how to do this is out of scope for this document and can be found in + the `Python Packaging User's Guide <https://packaging.python.org/tutorials/distributing-packages/>`_. + + +Adding data and methods to the Basic example +============================================ + +Let's extend the basic example to add some data and methods. Let's also make +the type usable as a base class. We'll create a new module, :mod:`custom2` that +adds these capabilities: + +.. literalinclude:: ../includes/custom2.c + + +This version of the module has a number of changes. + +We've added an extra include:: + + #include <structmember.h> + +This include provides declarations that we use to handle attributes, as +described a bit later. + +The :class:`Custom` type now has three data attributes in its C struct, +*first*, *last*, and *number*. The *first* and *last* variables are Python +strings containing first and last names. The *number* attribute is a C integer. + +The object structure is updated accordingly:: + + typedef struct { + PyObject_HEAD + PyObject *first; /* first name */ + PyObject *last; /* last name */ + int number; + } CustomObject; + +Because we now have data to manage, we have to be more careful about object +allocation and deallocation. At a minimum, we need a deallocation method:: + + static void + Custom_dealloc(CustomObject *self) + { + Py_XDECREF(self->first); + Py_XDECREF(self->last); + Py_TYPE(self)->tp_free((PyObject *) self); + } + +which is assigned to the :c:member:`~PyTypeObject.tp_dealloc` member:: + + .tp_dealloc = (destructor) Custom_dealloc, + +This method first clears the reference counts of the two Python attributes. +:c:func:`Py_XDECREF` correctly handles the case where its argument is +``NULL`` (which might happen here if ``tp_new`` failed midway). It then +calls the :c:member:`~PyTypeObject.tp_free` member of the object's type +(computed by ``Py_TYPE(self)``) to free the object's memory. Note that +the object's type might not be :class:`CustomType`, because the object may +be an instance of a subclass. + +.. note:: + The explicit cast to ``destructor`` above is needed because we defined + ``Custom_dealloc`` to take a ``CustomObject *`` argument, but the ``tp_dealloc`` + function pointer expects to receive a ``PyObject *`` argument. Otherwise, + the compiler will emit a warning. This is object-oriented polymorphism, + in C! + +We want to make sure that the first and last names are initialized to empty +strings, so we provide a ``tp_new`` implementation:: + + static PyObject * + Custom_new(PyTypeObject *type, PyObject *args, PyObject *kwds) + { + CustomObject *self; + self = (CustomObject *) type->tp_alloc(type, 0); + if (self != NULL) { + self->first = PyUnicode_FromString(""); + if (self->first == NULL) { + Py_DECREF(self); + return NULL; + } + self->last = PyUnicode_FromString(""); + if (self->last == NULL) { + Py_DECREF(self); + return NULL; + } + self->number = 0; + } + return (PyObject *) self; + } + +and install it in the :c:member:`~PyTypeObject.tp_new` member:: + + .tp_new = Custom_new, + +The ``tp_new`` handler is responsible for creating (as opposed to initializing) +objects of the type. It is exposed in Python as the :meth:`__new__` method. +It is not required to define a ``tp_new`` member, and indeed many extension +types will simply reuse :c:func:`PyType_GenericNew` as done in the first +version of the ``Custom`` type above. In this case, we use the ``tp_new`` +handler to initialize the ``first`` and ``last`` attributes to non-``NULL`` +default values. + +``tp_new`` is passed the type being instantiated (not necessarily ``CustomType``, +if a subclass is instantiated) and any arguments passed when the type was +called, and is expected to return the instance created. ``tp_new`` handlers +always accept positional and keyword arguments, but they often ignore the +arguments, leaving the argument handling to initializer (a.k.a. ``tp_init`` +in C or ``__init__`` in Python) methods. + +.. note:: + ``tp_new`` shouldn't call ``tp_init`` explicitly, as the interpreter + will do it itself. + +The ``tp_new`` implementation calls the :c:member:`~PyTypeObject.tp_alloc` +slot to allocate memory:: + + self = (CustomObject *) type->tp_alloc(type, 0); + +Since memory allocation may fail, we must check the :c:member:`~PyTypeObject.tp_alloc` +result against ``NULL`` before proceeding. + +.. note:: + We didn't fill the :c:member:`~PyTypeObject.tp_alloc` slot ourselves. Rather + :c:func:`PyType_Ready` fills it for us by inheriting it from our base class, + which is :class:`object` by default. Most types use the default allocation + strategy. + +.. note:: + If you are creating a co-operative :c:member:`~PyTypeObject.tp_new` (one + that calls a base type's :c:member:`~PyTypeObject.tp_new` or :meth:`__new__`), + you must *not* try to determine what method to call using method resolution + order at runtime. Always statically determine what type you are going to + call, and call its :c:member:`~PyTypeObject.tp_new` directly, or via + ``type->tp_base->tp_new``. If you do not do this, Python subclasses of your + type that also inherit from other Python-defined classes may not work correctly. + (Specifically, you may not be able to create instances of such subclasses + without getting a :exc:`TypeError`.) + +We also define an initialization function which accepts arguments to provide +initial values for our instance:: + + static int + Custom_init(CustomObject *self, PyObject *args, PyObject *kwds) + { + static char *kwlist[] = {"first", "last", "number", NULL}; + PyObject *first = NULL, *last = NULL, *tmp; + + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOi", kwlist, + &first, &last, + &self->number)) + return -1; + + if (first) { + tmp = self->first; + Py_INCREF(first); + self->first = first; + Py_XDECREF(tmp); + } + if (last) { + tmp = self->last; + Py_INCREF(last); + self->last = last; + Py_XDECREF(tmp); + } + return 0; + } + +by filling the :c:member:`~PyTypeObject.tp_init` slot. :: + + .tp_init = (initproc) Custom_init, + +The :c:member:`~PyTypeObject.tp_init` slot is exposed in Python as the +:meth:`__init__` method. It is used to initialize an object after it's +created. Initializers always accept positional and keyword arguments, +and they should return either ``0`` on success or ``-1`` on error. + +Unlike the ``tp_new`` handler, there is no guarantee that ``tp_init`` +is called at all (for example, the :mod:`pickle` module by default +doesn't call :meth:`__init__` on unpickled instances). It can also be +called multiple times. Anyone can call the :meth:`__init__` method on +our objects. For this reason, we have to be extra careful when assigning +the new attribute values. We might be tempted, for example to assign the +``first`` member like this:: + + if (first) { + Py_XDECREF(self->first); + Py_INCREF(first); + self->first = first; + } + +But this would be risky. Our type doesn't restrict the type of the +``first`` member, so it could be any kind of object. It could have a +destructor that causes code to be executed that tries to access the +``first`` member; or that destructor could release the +:term:`Global interpreter Lock <GIL>` and let arbitrary code run in other +threads that accesses and modifies our object. + +To be paranoid and protect ourselves against this possibility, we almost +always reassign members before decrementing their reference counts. When +don't we have to do this? + +* when we absolutely know that the reference count is greater than 1; + +* when we know that deallocation of the object [#]_ will neither release + the :term:`GIL` nor cause any calls back into our type's code; + +* when decrementing a reference count in a :c:member:`~PyTypeObject.tp_dealloc` + handler on a type which doesn't support cyclic garbage collection [#]_. + +We want to expose our instance variables as attributes. There are a +number of ways to do that. The simplest way is to define member definitions:: + + static PyMemberDef Custom_members[] = { + {"first", T_OBJECT_EX, offsetof(CustomObject, first), 0, + "first name"}, + {"last", T_OBJECT_EX, offsetof(CustomObject, last), 0, + "last name"}, + {"number", T_INT, offsetof(CustomObject, number), 0, + "custom number"}, + {NULL} /* Sentinel */ + }; + +and put the definitions in the :c:member:`~PyTypeObject.tp_members` slot:: + + .tp_members = Custom_members, + +Each member definition has a member name, type, offset, access flags and +documentation string. See the :ref:`Generic-Attribute-Management` section +below for details. + +A disadvantage of this approach is that it doesn't provide a way to restrict the +types of objects that can be assigned to the Python attributes. We expect the +first and last names to be strings, but any Python objects can be assigned. +Further, the attributes can be deleted, setting the C pointers to ``NULL``. Even +though we can make sure the members are initialized to non-``NULL`` values, the +members can be set to ``NULL`` if the attributes are deleted. + +We define a single method, :meth:`Custom.name()`, that outputs the objects name as the +concatenation of the first and last names. :: + + static PyObject * + Custom_name(CustomObject *self, PyObject *Py_UNUSED(ignored)) + { + if (self->first == NULL) { + PyErr_SetString(PyExc_AttributeError, "first"); + return NULL; + } + if (self->last == NULL) { + PyErr_SetString(PyExc_AttributeError, "last"); + return NULL; + } + return PyUnicode_FromFormat("%S %S", self->first, self->last); + } + +The method is implemented as a C function that takes a :class:`Custom` (or +:class:`Custom` subclass) instance as the first argument. Methods always take an +instance as the first argument. Methods often take positional and keyword +arguments as well, but in this case we don't take any and don't need to accept +a positional argument tuple or keyword argument dictionary. This method is +equivalent to the Python method: + +.. code-block:: python + + def name(self): + return "%s %s" % (self.first, self.last) + +Note that we have to check for the possibility that our :attr:`first` and +:attr:`last` members are ``NULL``. This is because they can be deleted, in which +case they are set to ``NULL``. It would be better to prevent deletion of these +attributes and to restrict the attribute values to be strings. We'll see how to +do that in the next section. + +Now that we've defined the method, we need to create an array of method +definitions:: + + static PyMethodDef Custom_methods[] = { + {"name", (PyCFunction) Custom_name, METH_NOARGS, + "Return the name, combining the first and last name" + }, + {NULL} /* Sentinel */ + }; + +(note that we used the :const:`METH_NOARGS` flag to indicate that the method +is expecting no arguments other than *self*) + +and assign it to the :c:member:`~PyTypeObject.tp_methods` slot:: + + .tp_methods = Custom_methods, + +Finally, we'll make our type usable as a base class for subclassing. We've +written our methods carefully so far so that they don't make any assumptions +about the type of the object being created or used, so all we need to do is +to add the :const:`Py_TPFLAGS_BASETYPE` to our class flag definition:: + + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + +We rename :c:func:`PyInit_custom` to :c:func:`PyInit_custom2`, update the +module name in the :c:type:`PyModuleDef` struct, and update the full class +name in the :c:type:`PyTypeObject` struct. + +Finally, we update our :file:`setup.py` file to build the new module: + +.. code-block:: python + + from distutils.core import setup, Extension + setup(name="custom", version="1.0", + ext_modules=[ + Extension("custom", ["custom.c"]), + Extension("custom2", ["custom2.c"]), + ]) + + +Providing finer control over data attributes +============================================ + +In this section, we'll provide finer control over how the :attr:`first` and +:attr:`last` attributes are set in the :class:`Custom` example. In the previous +version of our module, the instance variables :attr:`first` and :attr:`last` +could be set to non-string values or even deleted. We want to make sure that +these attributes always contain strings. + +.. literalinclude:: ../includes/custom3.c + + +To provide greater control, over the :attr:`first` and :attr:`last` attributes, +we'll use custom getter and setter functions. Here are the functions for +getting and setting the :attr:`first` attribute:: + + static PyObject * + Custom_getfirst(CustomObject *self, void *closure) + { + Py_INCREF(self->first); + return self->first; + } + + static int + Custom_setfirst(CustomObject *self, PyObject *value, void *closure) + { + PyObject *tmp; + if (value == NULL) { + PyErr_SetString(PyExc_TypeError, "Cannot delete the first attribute"); + return -1; + } + if (!PyUnicode_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "The first attribute value must be a string"); + return -1; + } + tmp = self->first; + Py_INCREF(value); + self->first = value; + Py_DECREF(tmp); + return 0; + } + +The getter function is passed a :class:`Custom` object and a "closure", which is +a void pointer. In this case, the closure is ignored. (The closure supports an +advanced usage in which definition data is passed to the getter and setter. This +could, for example, be used to allow a single set of getter and setter functions +that decide the attribute to get or set based on data in the closure.) + +The setter function is passed the :class:`Custom` object, the new value, and the +closure. The new value may be ``NULL``, in which case the attribute is being +deleted. In our setter, we raise an error if the attribute is deleted or if its +new value is not a string. + +We create an array of :c:type:`PyGetSetDef` structures:: + + static PyGetSetDef Custom_getsetters[] = { + {"first", (getter) Custom_getfirst, (setter) Custom_setfirst, + "first name", NULL}, + {"last", (getter) Custom_getlast, (setter) Custom_setlast, + "last name", NULL}, + {NULL} /* Sentinel */ + }; + +and register it in the :c:member:`~PyTypeObject.tp_getset` slot:: + + .tp_getset = Custom_getsetters, + +The last item in a :c:type:`PyGetSetDef` structure is the "closure" mentioned +above. In this case, we aren't using a closure, so we just pass ``NULL``. + +We also remove the member definitions for these attributes:: + + static PyMemberDef Custom_members[] = { + {"number", T_INT, offsetof(CustomObject, number), 0, + "custom number"}, + {NULL} /* Sentinel */ + }; + +We also need to update the :c:member:`~PyTypeObject.tp_init` handler to only +allow strings [#]_ to be passed:: + + static int + Custom_init(CustomObject *self, PyObject *args, PyObject *kwds) + { + static char *kwlist[] = {"first", "last", "number", NULL}; + PyObject *first = NULL, *last = NULL, *tmp; + + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|UUi", kwlist, + &first, &last, + &self->number)) + return -1; + + if (first) { + tmp = self->first; + Py_INCREF(first); + self->first = first; + Py_DECREF(tmp); + } + if (last) { + tmp = self->last; + Py_INCREF(last); + self->last = last; + Py_DECREF(tmp); + } + return 0; + } + +With these changes, we can assure that the ``first`` and ``last`` members are +never ``NULL`` so we can remove checks for ``NULL`` values in almost all cases. +This means that most of the :c:func:`Py_XDECREF` calls can be converted to +:c:func:`Py_DECREF` calls. The only place we can't change these calls is in +the ``tp_dealloc`` implementation, where there is the possibility that the +initialization of these members failed in ``tp_new``. + +We also rename the module initialization function and module name in the +initialization function, as we did before, and we add an extra definition to the +:file:`setup.py` file. + + +Supporting cyclic garbage collection +==================================== + +Python has a :term:`cyclic garbage collector (GC) <garbage collection>` that +can identify unneeded objects even when their reference counts are not zero. +This can happen when objects are involved in cycles. For example, consider: + +.. code-block:: pycon + + >>> l = [] + >>> l.append(l) + >>> del l + +In this example, we create a list that contains itself. When we delete it, it +still has a reference from itself. Its reference count doesn't drop to zero. +Fortunately, Python's cyclic garbage collector will eventually figure out that +the list is garbage and free it. + +In the second version of the :class:`Custom` example, we allowed any kind of +object to be stored in the :attr:`first` or :attr:`last` attributes [#]_. +Besides, in the second and third versions, we allowed subclassing +:class:`Custom`, and subclasses may add arbitrary attributes. For any of +those two reasons, :class:`Custom` objects can participate in cycles: + +.. code-block:: pycon + + >>> import custom3 + >>> class Derived(custom3.Custom): pass + ... + >>> n = Derived() + >>> n.some_attribute = n + +To allow a :class:`Custom` instance participating in a reference cycle to +be properly detected and collected by the cyclic GC, our :class:`Custom` type +needs to fill two additional slots and to enable a flag that enables these slots: + +.. literalinclude:: ../includes/custom4.c + + +First, the traversal method lets the cyclic GC know about subobjects that could +participate in cycles:: + + static int + Custom_traverse(CustomObject *self, visitproc visit, void *arg) + { + int vret; + if (self->first) { + vret = visit(self->first, arg); + if (vret != 0) + return vret; + } + if (self->last) { + vret = visit(self->last, arg); + if (vret != 0) + return vret; + } + return 0; + } + +For each subobject that can participate in cycles, we need to call the +:c:func:`visit` function, which is passed to the traversal method. The +:c:func:`visit` function takes as arguments the subobject and the extra argument +*arg* passed to the traversal method. It returns an integer value that must be +returned if it is non-zero. + +Python provides a :c:func:`Py_VISIT` macro that automates calling visit +functions. With :c:func:`Py_VISIT`, we can minimize the amount of boilerplate +in ``Custom_traverse``:: + + static int + Custom_traverse(CustomObject *self, visitproc visit, void *arg) + { + Py_VISIT(self->first); + Py_VISIT(self->last); + return 0; + } + +.. note:: + The :c:member:`~PyTypeObject.tp_traverse` implementation must name its + arguments exactly *visit* and *arg* in order to use :c:func:`Py_VISIT`. + +Second, we need to provide a method for clearing any subobjects that can +participate in cycles:: + + static int + Custom_clear(CustomObject *self) + { + Py_CLEAR(self->first); + Py_CLEAR(self->last); + return 0; + } + +Notice the use of the :c:func:`Py_CLEAR` macro. It is the recommended and safe +way to clear data attributes of arbitrary types while decrementing +their reference counts. If you were to call :c:func:`Py_XDECREF` instead +on the attribute before setting it to ``NULL``, there is a possibility +that the attribute's destructor would call back into code that reads the +attribute again (*especially* if there is a reference cycle). + +.. note:: + You could emulate :c:func:`Py_CLEAR` by writing:: + + PyObject *tmp; + tmp = self->first; + self->first = NULL; + Py_XDECREF(tmp); + + Nevertheless, it is much easier and less error-prone to always + use :c:func:`Py_CLEAR` when deleting an attribute. Don't + try to micro-optimize at the expense of robustness! + +The deallocator ``Custom_dealloc`` may call arbitrary code when clearing +attributes. It means the circular GC can be triggered inside the function. +Since the GC assumes reference count is not zero, we need to untrack the object +from the GC by calling :c:func:`PyObject_GC_UnTrack` before clearing members. +Here is our reimplemented deallocator using :c:func:`PyObject_GC_UnTrack` +and ``Custom_clear``:: + + static void + Custom_dealloc(CustomObject *self) + { + PyObject_GC_UnTrack(self); + Custom_clear(self); + Py_TYPE(self)->tp_free((PyObject *) self); + } + +Finally, we add the :const:`Py_TPFLAGS_HAVE_GC` flag to the class flags:: + + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + +That's pretty much it. If we had written custom :c:member:`~PyTypeObject.tp_alloc` or +:c:member:`~PyTypeObject.tp_free` handlers, we'd need to modify them for cyclic +garbage collection. Most extensions will use the versions automatically provided. + + +Subclassing other types +======================= + +It is possible to create new extension types that are derived from existing +types. It is easiest to inherit from the built in types, since an extension can +easily use the :c:type:`PyTypeObject` it needs. It can be difficult to share +these :c:type:`PyTypeObject` structures between extension modules. + +In this example we will create a :class:`SubList` type that inherits from the +built-in :class:`list` type. The new type will be completely compatible with +regular lists, but will have an additional :meth:`increment` method that +increases an internal counter: + +.. code-block:: pycon + + >>> import sublist + >>> s = sublist.SubList(range(3)) + >>> s.extend(s) + >>> print(len(s)) + 6 + >>> print(s.increment()) + 1 + >>> print(s.increment()) + 2 + +.. literalinclude:: ../includes/sublist.c + + +As you can see, the source code closely resembles the :class:`Custom` examples in +previous sections. We will break down the main differences between them. :: + + typedef struct { + PyListObject list; + int state; + } SubListObject; + +The primary difference for derived type objects is that the base type's +object structure must be the first value. The base type will already include +the :c:func:`PyObject_HEAD` at the beginning of its structure. + +When a Python object is a :class:`SubList` instance, its ``PyObject *`` pointer +can be safely cast to both ``PyListObject *`` and ``SubListObject *``:: + + static int + SubList_init(SubListObject *self, PyObject *args, PyObject *kwds) + { + if (PyList_Type.tp_init((PyObject *) self, args, kwds) < 0) + return -1; + self->state = 0; + return 0; + } + +We see above how to call through to the :attr:`__init__` method of the base +type. + +This pattern is important when writing a type with custom +:c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_dealloc` +members. The :c:member:`~PyTypeObject.tp_new` handler should not actually +create the memory for the object with its :c:member:`~PyTypeObject.tp_alloc`, +but let the base class handle it by calling its own :c:member:`~PyTypeObject.tp_new`. + +The :c:type:`PyTypeObject` struct supports a :c:member:`~PyTypeObject.tp_base` +specifying the type's concrete base class. Due to cross-platform compiler +issues, you can't fill that field directly with a reference to +:c:type:`PyList_Type`; it should be done later in the module initialization +function:: + + PyMODINIT_FUNC + PyInit_sublist(void) + { + PyObject* m; + SubListType.tp_base = &PyList_Type; + if (PyType_Ready(&SubListType) < 0) + return NULL; + + m = PyModule_Create(&sublistmodule); + if (m == NULL) + return NULL; + + Py_INCREF(&SubListType); + if (PyModule_AddObject(m, "SubList", (PyObject *) &SubListType) < 0) { + Py_DECREF(&SubListType); + Py_DECREF(m); + return NULL; + } + + return m; + } + +Before calling :c:func:`PyType_Ready`, the type structure must have the +:c:member:`~PyTypeObject.tp_base` slot filled in. When we are deriving an +existing type, it is not necessary to fill out the :c:member:`~PyTypeObject.tp_alloc` +slot with :c:func:`PyType_GenericNew` -- the allocation function from the base +type will be inherited. + +After that, calling :c:func:`PyType_Ready` and adding the type object to the +module is the same as with the basic :class:`Custom` examples. + + +.. rubric:: Footnotes + +.. [#] This is true when we know that the object is a basic type, like a string or a + float. + +.. [#] We relied on this in the :c:member:`~PyTypeObject.tp_dealloc` handler + in this example, because our type doesn't support garbage collection. + +.. [#] We now know that the first and last members are strings, so perhaps we + could be less careful about decrementing their reference counts, however, + we accept instances of string subclasses. Even though deallocating normal + strings won't call back into our objects, we can't guarantee that deallocating + an instance of a string subclass won't call back into our objects. + +.. [#] Also, even with our attributes restricted to strings instances, the user + could pass arbitrary :class:`str` subclasses and therefore still create + reference cycles.
diff --git a/Doc/extending/windows.rst b/Doc/extending/windows.rst new file mode 100644 index 0000000..28d0350 --- /dev/null +++ b/Doc/extending/windows.rst
@@ -0,0 +1,135 @@ +.. highlight:: c + + +.. _building-on-windows: + +**************************************** +Building C and C++ Extensions on Windows +**************************************** + +This chapter briefly explains how to create a Windows extension module for +Python using Microsoft Visual C++, and follows with more detailed background +information on how it works. The explanatory material is useful for both the +Windows programmer learning to build Python extensions and the Unix programmer +interested in producing software which can be successfully built on both Unix +and Windows. + +Module authors are encouraged to use the distutils approach for building +extension modules, instead of the one described in this section. You will still +need the C compiler that was used to build Python; typically Microsoft Visual +C++. + +.. note:: + + This chapter mentions a number of filenames that include an encoded Python + version number. These filenames are represented with the version number shown + as ``XY``; in practice, ``'X'`` will be the major version number and ``'Y'`` + will be the minor version number of the Python release you're working with. For + example, if you are using Python 2.2.1, ``XY`` will actually be ``22``. + + +.. _win-cookbook: + +A Cookbook Approach +=================== + +There are two approaches to building extension modules on Windows, just as there +are on Unix: use the :mod:`distutils` package to control the build process, or +do things manually. The distutils approach works well for most extensions; +documentation on using :mod:`distutils` to build and package extension modules +is available in :ref:`distutils-index`. If you find you really need to do +things manually, it may be instructive to study the project file for the +:source:`winsound <PCbuild/winsound.vcxproj>` standard library module. + + +.. _dynamic-linking: + +Differences Between Unix and Windows +==================================== + +.. sectionauthor:: Chris Phoenix <cphoenix@best.com> + + +Unix and Windows use completely different paradigms for run-time loading of +code. Before you try to build a module that can be dynamically loaded, be aware +of how your system works. + +In Unix, a shared object (:file:`.so`) file contains code to be used by the +program, and also the names of functions and data that it expects to find in the +program. When the file is joined to the program, all references to those +functions and data in the file's code are changed to point to the actual +locations in the program where the functions and data are placed in memory. +This is basically a link operation. + +In Windows, a dynamic-link library (:file:`.dll`) file has no dangling +references. Instead, an access to functions or data goes through a lookup +table. So the DLL code does not have to be fixed up at runtime to refer to the +program's memory; instead, the code already uses the DLL's lookup table, and the +lookup table is modified at runtime to point to the functions and data. + +In Unix, there is only one type of library file (:file:`.a`) which contains code +from several object files (:file:`.o`). During the link step to create a shared +object file (:file:`.so`), the linker may find that it doesn't know where an +identifier is defined. The linker will look for it in the object files in the +libraries; if it finds it, it will include all the code from that object file. + +In Windows, there are two types of library, a static library and an import +library (both called :file:`.lib`). A static library is like a Unix :file:`.a` +file; it contains code to be included as necessary. An import library is +basically used only to reassure the linker that a certain identifier is legal, +and will be present in the program when the DLL is loaded. So the linker uses +the information from the import library to build the lookup table for using +identifiers that are not included in the DLL. When an application or a DLL is +linked, an import library may be generated, which will need to be used for all +future DLLs that depend on the symbols in the application or DLL. + +Suppose you are building two dynamic-load modules, B and C, which should share +another block of code A. On Unix, you would *not* pass :file:`A.a` to the +linker for :file:`B.so` and :file:`C.so`; that would cause it to be included +twice, so that B and C would each have their own copy. In Windows, building +:file:`A.dll` will also build :file:`A.lib`. You *do* pass :file:`A.lib` to the +linker for B and C. :file:`A.lib` does not contain code; it just contains +information which will be used at runtime to access A's code. + +In Windows, using an import library is sort of like using ``import spam``; it +gives you access to spam's names, but does not create a separate copy. On Unix, +linking with a library is more like ``from spam import *``; it does create a +separate copy. + + +.. _win-dlls: + +Using DLLs in Practice +====================== + +.. sectionauthor:: Chris Phoenix <cphoenix@best.com> + + +Windows Python is built in Microsoft Visual C++; using other compilers may or +may not work. The rest of this section is MSVC++ specific. + +When creating DLLs in Windows, you must pass :file:`pythonXY.lib` to the linker. +To build two DLLs, spam and ni (which uses C functions found in spam), you could +use these commands:: + + cl /LD /I/python/include spam.c ../libs/pythonXY.lib + cl /LD /I/python/include ni.c spam.lib ../libs/pythonXY.lib + +The first command created three files: :file:`spam.obj`, :file:`spam.dll` and +:file:`spam.lib`. :file:`Spam.dll` does not contain any Python functions (such +as :c:func:`PyArg_ParseTuple`), but it does know how to find the Python code +thanks to :file:`pythonXY.lib`. + +The second command created :file:`ni.dll` (and :file:`.obj` and :file:`.lib`), +which knows how to find the necessary functions from spam, and also from the +Python executable. + +Not every identifier is exported to the lookup table. If you want any other +modules (including Python) to be able to see your identifiers, you have to say +``_declspec(dllexport)``, as in ``void _declspec(dllexport) initspam(void)`` or +``PyObject _declspec(dllexport) *NiGetSpamData(void)``. + +Developer Studio will throw in a lot of import libraries that you do not really +need, adding about 100K to your executable. To get rid of them, use the Project +Settings dialog, Link tab, to specify *ignore default libraries*. Add the +correct :file:`msvcrtxx.lib` to the list of libraries.
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst new file mode 100644 index 0000000..9dbfacd --- /dev/null +++ b/Doc/faq/design.rst
@@ -0,0 +1,772 @@ +====================== +Design and History FAQ +====================== + +.. only:: html + + .. contents:: + + +Why does Python use indentation for grouping of statements? +----------------------------------------------------------- + +Guido van Rossum believes that using indentation for grouping is extremely +elegant and contributes a lot to the clarity of the average Python program. +Most people learn to love this feature after a while. + +Since there are no begin/end brackets there cannot be a disagreement between +grouping perceived by the parser and the human reader. Occasionally C +programmers will encounter a fragment of code like this:: + + if (x <= y) + x++; + y--; + z++; + +Only the ``x++`` statement is executed if the condition is true, but the +indentation leads many to believe otherwise. Even experienced C programmers will +sometimes stare at it a long time wondering as to why ``y`` is being decremented even +for ``x > y``. + +Because there are no begin/end brackets, Python is much less prone to +coding-style conflicts. In C there are many different ways to place the braces. +After becoming used to reading and writing code using a particular style, +it is normal to feel somewhat uneasy when reading (or being required to write) +in a different one. + + +Many coding styles place begin/end brackets on a line by themselves. This makes +programs considerably longer and wastes valuable screen space, making it harder +to get a good overview of a program. Ideally, a function should fit on one +screen (say, 20--30 lines). 20 lines of Python can do a lot more work than 20 +lines of C. This is not solely due to the lack of begin/end brackets -- the +lack of declarations and the high-level data types are also responsible -- but +the indentation-based syntax certainly helps. + + +Why am I getting strange results with simple arithmetic operations? +------------------------------------------------------------------- + +See the next question. + + +Why are floating-point calculations so inaccurate? +-------------------------------------------------- + +Users are often surprised by results like this:: + + >>> 1.2 - 1.0 + 0.19999999999999996 + +and think it is a bug in Python. It's not. This has little to do with Python, +and much more to do with how the underlying platform handles floating-point +numbers. + +The :class:`float` type in CPython uses a C ``double`` for storage. A +:class:`float` object's value is stored in binary floating-point with a fixed +precision (typically 53 bits) and Python uses C operations, which in turn rely +on the hardware implementation in the processor, to perform floating-point +operations. This means that as far as floating-point operations are concerned, +Python behaves like many popular languages including C and Java. + +Many numbers that can be written easily in decimal notation cannot be expressed +exactly in binary floating-point. For example, after:: + + >>> x = 1.2 + +the value stored for ``x`` is a (very good) approximation to the decimal value +``1.2``, but is not exactly equal to it. On a typical machine, the actual +stored value is:: + + 1.0011001100110011001100110011001100110011001100110011 (binary) + +which is exactly:: + + 1.1999999999999999555910790149937383830547332763671875 (decimal) + +The typical precision of 53 bits provides Python floats with 15--16 +decimal digits of accuracy. + +For a fuller explanation, please see the :ref:`floating point arithmetic +<tut-fp-issues>` chapter in the Python tutorial. + + +Why are Python strings immutable? +--------------------------------- + +There are several advantages. + +One is performance: knowing that a string is immutable means we can allocate +space for it at creation time, and the storage requirements are fixed and +unchanging. This is also one of the reasons for the distinction between tuples +and lists. + +Another advantage is that strings in Python are considered as "elemental" as +numbers. No amount of activity will change the value 8 to anything else, and in +Python, no amount of activity will change the string "eight" to anything else. + + +.. _why-self: + +Why must 'self' be used explicitly in method definitions and calls? +------------------------------------------------------------------- + +The idea was borrowed from Modula-3. It turns out to be very useful, for a +variety of reasons. + +First, it's more obvious that you are using a method or instance attribute +instead of a local variable. Reading ``self.x`` or ``self.meth()`` makes it +absolutely clear that an instance variable or method is used even if you don't +know the class definition by heart. In C++, you can sort of tell by the lack of +a local variable declaration (assuming globals are rare or easily recognizable) +-- but in Python, there are no local variable declarations, so you'd have to +look up the class definition to be sure. Some C++ and Java coding standards +call for instance attributes to have an ``m_`` prefix, so this explicitness is +still useful in those languages, too. + +Second, it means that no special syntax is necessary if you want to explicitly +reference or call the method from a particular class. In C++, if you want to +use a method from a base class which is overridden in a derived class, you have +to use the ``::`` operator -- in Python you can write +``baseclass.methodname(self, <argument list>)``. This is particularly useful +for :meth:`__init__` methods, and in general in cases where a derived class +method wants to extend the base class method of the same name and thus has to +call the base class method somehow. + +Finally, for instance variables it solves a syntactic problem with assignment: +since local variables in Python are (by definition!) those variables to which a +value is assigned in a function body (and that aren't explicitly declared +global), there has to be some way to tell the interpreter that an assignment was +meant to assign to an instance variable instead of to a local variable, and it +should preferably be syntactic (for efficiency reasons). C++ does this through +declarations, but Python doesn't have declarations and it would be a pity having +to introduce them just for this purpose. Using the explicit ``self.var`` solves +this nicely. Similarly, for using instance variables, having to write +``self.var`` means that references to unqualified names inside a method don't +have to search the instance's directories. To put it another way, local +variables and instance variables live in two different namespaces, and you need +to tell Python which namespace to use. + + +.. _why-can-t-i-use-an-assignment-in-an-expression: + +Why can't I use an assignment in an expression? +----------------------------------------------- + +Starting in Python 3.8, you can! + +Assignment expressions using the walrus operator ``:=`` assign a variable in an +expression:: + + while chunk := fp.read(200): + print(chunk) + +See :pep:`572` for more information. + + + +Why does Python use methods for some functionality (e.g. list.index()) but functions for other (e.g. len(list))? +---------------------------------------------------------------------------------------------------------------- + +As Guido said: + + (a) For some operations, prefix notation just reads better than + postfix -- prefix (and infix!) operations have a long tradition in + mathematics which likes notations where the visuals help the + mathematician thinking about a problem. Compare the easy with which we + rewrite a formula like x*(a+b) into x*a + x*b to the clumsiness of + doing the same thing using a raw OO notation. + + (b) When I read code that says len(x) I *know* that it is asking for + the length of something. This tells me two things: the result is an + integer, and the argument is some kind of container. To the contrary, + when I read x.len(), I have to already know that x is some kind of + container implementing an interface or inheriting from a class that + has a standard len(). Witness the confusion we occasionally have when + a class that is not implementing a mapping has a get() or keys() + method, or something that isn't a file has a write() method. + + -- https://mail.python.org/pipermail/python-3000/2006-November/004643.html + + +Why is join() a string method instead of a list or tuple method? +---------------------------------------------------------------- + +Strings became much more like other standard types starting in Python 1.6, when +methods were added which give the same functionality that has always been +available using the functions of the string module. Most of these new methods +have been widely accepted, but the one which appears to make some programmers +feel uncomfortable is:: + + ", ".join(['1', '2', '4', '8', '16']) + +which gives the result:: + + "1, 2, 4, 8, 16" + +There are two common arguments against this usage. + +The first runs along the lines of: "It looks really ugly using a method of a +string literal (string constant)", to which the answer is that it might, but a +string literal is just a fixed value. If the methods are to be allowed on names +bound to strings there is no logical reason to make them unavailable on +literals. + +The second objection is typically cast as: "I am really telling a sequence to +join its members together with a string constant". Sadly, you aren't. For some +reason there seems to be much less difficulty with having :meth:`~str.split` as +a string method, since in that case it is easy to see that :: + + "1, 2, 4, 8, 16".split(", ") + +is an instruction to a string literal to return the substrings delimited by the +given separator (or, by default, arbitrary runs of white space). + +:meth:`~str.join` is a string method because in using it you are telling the +separator string to iterate over a sequence of strings and insert itself between +adjacent elements. This method can be used with any argument which obeys the +rules for sequence objects, including any new classes you might define yourself. +Similar methods exist for bytes and bytearray objects. + + +How fast are exceptions? +------------------------ + +A try/except block is extremely efficient if no exceptions are raised. Actually +catching an exception is expensive. In versions of Python prior to 2.0 it was +common to use this idiom:: + + try: + value = mydict[key] + except KeyError: + mydict[key] = getvalue(key) + value = mydict[key] + +This only made sense when you expected the dict to have the key almost all the +time. If that wasn't the case, you coded it like this:: + + if key in mydict: + value = mydict[key] + else: + value = mydict[key] = getvalue(key) + +For this specific case, you could also use ``value = dict.setdefault(key, +getvalue(key))``, but only if the ``getvalue()`` call is cheap enough because it +is evaluated in all cases. + + +Why isn't there a switch or case statement in Python? +----------------------------------------------------- + +You can do this easily enough with a sequence of ``if... elif... elif... else``. +For literal values, or constants within a namespace, you can also use a +``match ... case`` statement. + +For cases where you need to choose from a very large number of possibilities, +you can create a dictionary mapping case values to functions to call. For +example:: + + functions = {'a': function_1, + 'b': function_2, + 'c': self.method_1} + + func = functions[value] + func() + +For calling methods on objects, you can simplify yet further by using the +:func:`getattr` built-in to retrieve methods with a particular name:: + + class MyVisitor: + def visit_a(self): + ... + + def dispatch(self, value): + method_name = 'visit_' + str(value) + method = getattr(self, method_name) + method() + +It's suggested that you use a prefix for the method names, such as ``visit_`` in +this example. Without such a prefix, if values are coming from an untrusted +source, an attacker would be able to call any method on your object. + + +Can't you emulate threads in the interpreter instead of relying on an OS-specific thread implementation? +-------------------------------------------------------------------------------------------------------- + +Answer 1: Unfortunately, the interpreter pushes at least one C stack frame for +each Python stack frame. Also, extensions can call back into Python at almost +random moments. Therefore, a complete threads implementation requires thread +support for C. + +Answer 2: Fortunately, there is `Stackless Python <https://github.com/stackless-dev/stackless/wiki>`_, +which has a completely redesigned interpreter loop that avoids the C stack. + + +Why can't lambda expressions contain statements? +------------------------------------------------ + +Python lambda expressions cannot contain statements because Python's syntactic +framework can't handle statements nested inside expressions. However, in +Python, this is not a serious problem. Unlike lambda forms in other languages, +where they add functionality, Python lambdas are only a shorthand notation if +you're too lazy to define a function. + +Functions are already first class objects in Python, and can be declared in a +local scope. Therefore the only advantage of using a lambda instead of a +locally defined function is that you don't need to invent a name for the +function -- but that's just a local variable to which the function object (which +is exactly the same type of object that a lambda expression yields) is assigned! + + +Can Python be compiled to machine code, C or some other language? +----------------------------------------------------------------- + +`Cython <https://cython.org/>`_ compiles a modified version of Python with +optional annotations into C extensions. `Nuitka <https://www.nuitka.net/>`_ is +an up-and-coming compiler of Python into C++ code, aiming to support the full +Python language. + + +How does Python manage memory? +------------------------------ + +The details of Python memory management depend on the implementation. The +standard implementation of Python, :term:`CPython`, uses reference counting to +detect inaccessible objects, and another mechanism to collect reference cycles, +periodically executing a cycle detection algorithm which looks for inaccessible +cycles and deletes the objects involved. The :mod:`gc` module provides functions +to perform a garbage collection, obtain debugging statistics, and tune the +collector's parameters. + +Other implementations (such as `Jython <https://www.jython.org>`_ or +`PyPy <https://www.pypy.org>`_), however, can rely on a different mechanism +such as a full-blown garbage collector. This difference can cause some +subtle porting problems if your Python code depends on the behavior of the +reference counting implementation. + +In some Python implementations, the following code (which is fine in CPython) +will probably run out of file descriptors:: + + for file in very_long_list_of_files: + f = open(file) + c = f.read(1) + +Indeed, using CPython's reference counting and destructor scheme, each new +assignment to *f* closes the previous file. With a traditional GC, however, +those file objects will only get collected (and closed) at varying and possibly +long intervals. + +If you want to write code that will work with any Python implementation, +you should explicitly close the file or use the :keyword:`with` statement; +this will work regardless of memory management scheme:: + + for file in very_long_list_of_files: + with open(file) as f: + c = f.read(1) + + +Why doesn't CPython use a more traditional garbage collection scheme? +--------------------------------------------------------------------- + +For one thing, this is not a C standard feature and hence it's not portable. +(Yes, we know about the Boehm GC library. It has bits of assembler code for +*most* common platforms, not for all of them, and although it is mostly +transparent, it isn't completely transparent; patches are required to get +Python to work with it.) + +Traditional GC also becomes a problem when Python is embedded into other +applications. While in a standalone Python it's fine to replace the standard +malloc() and free() with versions provided by the GC library, an application +embedding Python may want to have its *own* substitute for malloc() and free(), +and may not want Python's. Right now, CPython works with anything that +implements malloc() and free() properly. + + +Why isn't all memory freed when CPython exits? +---------------------------------------------- + +Objects referenced from the global namespaces of Python modules are not always +deallocated when Python exits. This may happen if there are circular +references. There are also certain bits of memory that are allocated by the C +library that are impossible to free (e.g. a tool like Purify will complain about +these). Python is, however, aggressive about cleaning up memory on exit and +does try to destroy every single object. + +If you want to force Python to delete certain things on deallocation use the +:mod:`atexit` module to run a function that will force those deletions. + + +Why are there separate tuple and list data types? +------------------------------------------------- + +Lists and tuples, while similar in many respects, are generally used in +fundamentally different ways. Tuples can be thought of as being similar to +Pascal records or C structs; they're small collections of related data which may +be of different types which are operated on as a group. For example, a +Cartesian coordinate is appropriately represented as a tuple of two or three +numbers. + +Lists, on the other hand, are more like arrays in other languages. They tend to +hold a varying number of objects all of which have the same type and which are +operated on one-by-one. For example, ``os.listdir('.')`` returns a list of +strings representing the files in the current directory. Functions which +operate on this output would generally not break if you added another file or +two to the directory. + +Tuples are immutable, meaning that once a tuple has been created, you can't +replace any of its elements with a new value. Lists are mutable, meaning that +you can always change a list's elements. Only immutable elements can be used as +dictionary keys, and hence only tuples and not lists can be used as keys. + + +How are lists implemented in CPython? +------------------------------------- + +CPython's lists are really variable-length arrays, not Lisp-style linked lists. +The implementation uses a contiguous array of references to other objects, and +keeps a pointer to this array and the array's length in a list head structure. + +This makes indexing a list ``a[i]`` an operation whose cost is independent of +the size of the list or the value of the index. + +When items are appended or inserted, the array of references is resized. Some +cleverness is applied to improve the performance of appending items repeatedly; +when the array must be grown, some extra space is allocated so the next few +times don't require an actual resize. + + +How are dictionaries implemented in CPython? +-------------------------------------------- + +CPython's dictionaries are implemented as resizable hash tables. Compared to +B-trees, this gives better performance for lookup (the most common operation by +far) under most circumstances, and the implementation is simpler. + +Dictionaries work by computing a hash code for each key stored in the dictionary +using the :func:`hash` built-in function. The hash code varies widely depending +on the key and a per-process seed; for example, "Python" could hash to +-539294296 while "python", a string that differs by a single bit, could hash +to 1142331976. The hash code is then used to calculate a location in an +internal array where the value will be stored. Assuming that you're storing +keys that all have different hash values, this means that dictionaries take +constant time -- O(1), in Big-O notation -- to retrieve a key. + + +Why must dictionary keys be immutable? +-------------------------------------- + +The hash table implementation of dictionaries uses a hash value calculated from +the key value to find the key. If the key were a mutable object, its value +could change, and thus its hash could also change. But since whoever changes +the key object can't tell that it was being used as a dictionary key, it can't +move the entry around in the dictionary. Then, when you try to look up the same +object in the dictionary it won't be found because its hash value is different. +If you tried to look up the old value it wouldn't be found either, because the +value of the object found in that hash bin would be different. + +If you want a dictionary indexed with a list, simply convert the list to a tuple +first; the function ``tuple(L)`` creates a tuple with the same entries as the +list ``L``. Tuples are immutable and can therefore be used as dictionary keys. + +Some unacceptable solutions that have been proposed: + +- Hash lists by their address (object ID). This doesn't work because if you + construct a new list with the same value it won't be found; e.g.:: + + mydict = {[1, 2]: '12'} + print(mydict[[1, 2]]) + + would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` used in the + second line differs from that in the first line. In other words, dictionary + keys should be compared using ``==``, not using :keyword:`is`. + +- Make a copy when using a list as a key. This doesn't work because the list, + being a mutable object, could contain a reference to itself, and then the + copying code would run into an infinite loop. + +- Allow lists as keys but tell the user not to modify them. This would allow a + class of hard-to-track bugs in programs when you forgot or modified a list by + accident. It also invalidates an important invariant of dictionaries: every + value in ``d.keys()`` is usable as a key of the dictionary. + +- Mark lists as read-only once they are used as a dictionary key. The problem + is that it's not just the top-level object that could change its value; you + could use a tuple containing a list as a key. Entering anything as a key into + a dictionary would require marking all objects reachable from there as + read-only -- and again, self-referential objects could cause an infinite loop. + +There is a trick to get around this if you need to, but use it at your own risk: +You can wrap a mutable structure inside a class instance which has both a +:meth:`__eq__` and a :meth:`__hash__` method. You must then make sure that the +hash value for all such wrapper objects that reside in a dictionary (or other +hash based structure), remain fixed while the object is in the dictionary (or +other structure). :: + + class ListWrapper: + def __init__(self, the_list): + self.the_list = the_list + + def __eq__(self, other): + return self.the_list == other.the_list + + def __hash__(self): + l = self.the_list + result = 98767 - len(l)*555 + for i, el in enumerate(l): + try: + result = result + (hash(el) % 9999999) * 1001 + i + except Exception: + result = (result % 7777777) + i * 333 + return result + +Note that the hash computation is complicated by the possibility that some +members of the list may be unhashable and also by the possibility of arithmetic +overflow. + +Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1.__eq__(o2) +is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == o2.__hash__()``), +regardless of whether the object is in a dictionary or not. If you fail to meet +these restrictions dictionaries and other hash based structures will misbehave. + +In the case of ListWrapper, whenever the wrapper object is in a dictionary the +wrapped list must not change to avoid anomalies. Don't do this unless you are +prepared to think hard about the requirements and the consequences of not +meeting them correctly. Consider yourself warned. + + +Why doesn't list.sort() return the sorted list? +----------------------------------------------- + +In situations where performance matters, making a copy of the list just to sort +it would be wasteful. Therefore, :meth:`list.sort` sorts the list in place. In +order to remind you of that fact, it does not return the sorted list. This way, +you won't be fooled into accidentally overwriting a list when you need a sorted +copy but also need to keep the unsorted version around. + +If you want to return a new list, use the built-in :func:`sorted` function +instead. This function creates a new list from a provided iterable, sorts +it and returns it. For example, here's how to iterate over the keys of a +dictionary in sorted order:: + + for key in sorted(mydict): + ... # do whatever with mydict[key]... + + +How do you specify and enforce an interface spec in Python? +----------------------------------------------------------- + +An interface specification for a module as provided by languages such as C++ and +Java describes the prototypes for the methods and functions of the module. Many +feel that compile-time enforcement of interface specifications helps in the +construction of large programs. + +Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base Classes +(ABCs). You can then use :func:`isinstance` and :func:`issubclass` to check +whether an instance or a class implements a particular ABC. The +:mod:`collections.abc` module defines a set of useful ABCs such as +:class:`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and +:class:`~collections.abc.MutableMapping`. + +For Python, many of the advantages of interface specifications can be obtained +by an appropriate test discipline for components. + +A good test suite for a module can both provide a regression test and serve as a +module interface specification and a set of examples. Many Python modules can +be run as a script to provide a simple "self test." Even modules which use +complex external interfaces can often be tested in isolation using trivial +"stub" emulations of the external interface. The :mod:`doctest` and +:mod:`unittest` modules or third-party test frameworks can be used to construct +exhaustive test suites that exercise every line of code in a module. + +An appropriate testing discipline can help build large complex applications in +Python as well as having interface specifications would. In fact, it can be +better because an interface specification cannot test certain properties of a +program. For example, the :meth:`append` method is expected to add new elements +to the end of some internal list; an interface specification cannot test that +your :meth:`append` implementation will actually do this correctly, but it's +trivial to check this property in a test suite. + +Writing test suites is very helpful, and you might want to design your code to +make it easily tested. One increasingly popular technique, test-driven +development, calls for writing parts of the test suite first, before you write +any of the actual code. Of course Python allows you to be sloppy and not write +test cases at all. + + +Why is there no goto? +--------------------- + +In the 1970s people realized that unrestricted goto could lead +to messy "spaghetti" code that was hard to understand and revise. +In a high-level language, it is also unneeded as long as there +are ways to branch (in Python, with ``if`` statements and ``or``, +``and``, and ``if-else`` expressions) and loop (with ``while`` +and ``for`` statements, possibly containing ``continue`` and ``break``). + +One can also use exceptions to provide a "structured goto" +that works even across +function calls. Many feel that exceptions can conveniently emulate all +reasonable uses of the "go" or "goto" constructs of C, Fortran, and other +languages. For example:: + + class label(Exception): pass # declare a label + + try: + ... + if condition: raise label() # goto label + ... + except label: # where to goto + pass + ... + +This doesn't allow you to jump into the middle of a loop, but that's usually +considered an abuse of goto anyway. Use sparingly. + + +Why can't raw strings (r-strings) end with a backslash? +------------------------------------------------------- + +More precisely, they can't end with an odd number of backslashes: the unpaired +backslash at the end escapes the closing quote character, leaving an +unterminated string. + +Raw strings were designed to ease creating input for processors (chiefly regular +expression engines) that want to do their own backslash escape processing. Such +processors consider an unmatched trailing backslash to be an error anyway, so +raw strings disallow that. In return, they allow you to pass on the string +quote character by escaping it with a backslash. These rules work well when +r-strings are used for their intended purpose. + +If you're trying to build Windows pathnames, note that all Windows system calls +accept forward slashes too:: + + f = open("/mydir/file.txt") # works fine! + +If you're trying to build a pathname for a DOS command, try e.g. one of :: + + dir = r"\this\is\my\dos\dir" "\\" + dir = r"\this\is\my\dos\dir\ "[:-1] + dir = "\\this\\is\\my\\dos\\dir\\" + + +Why doesn't Python have a "with" statement for attribute assignments? +--------------------------------------------------------------------- + +Python has a 'with' statement that wraps the execution of a block, calling code +on the entrance and exit from the block. Some languages have a construct that +looks like this:: + + with obj: + a = 1 # equivalent to obj.a = 1 + total = total + 1 # obj.total = obj.total + 1 + +In Python, such a construct would be ambiguous. + +Other languages, such as Object Pascal, Delphi, and C++, use static types, so +it's possible to know, in an unambiguous way, what member is being assigned +to. This is the main point of static typing -- the compiler *always* knows the +scope of every variable at compile time. + +Python uses dynamic types. It is impossible to know in advance which attribute +will be referenced at runtime. Member attributes may be added or removed from +objects on the fly. This makes it impossible to know, from a simple reading, +what attribute is being referenced: a local one, a global one, or a member +attribute? + +For instance, take the following incomplete snippet:: + + def foo(a): + with a: + print(x) + +The snippet assumes that "a" must have a member attribute called "x". However, +there is nothing in Python that tells the interpreter this. What should happen +if "a" is, let us say, an integer? If there is a global variable named "x", +will it be used inside the with block? As you see, the dynamic nature of Python +makes such choices much harder. + +The primary benefit of "with" and similar language features (reduction of code +volume) can, however, easily be achieved in Python by assignment. Instead of:: + + function(args).mydict[index][index].a = 21 + function(args).mydict[index][index].b = 42 + function(args).mydict[index][index].c = 63 + +write this:: + + ref = function(args).mydict[index][index] + ref.a = 21 + ref.b = 42 + ref.c = 63 + +This also has the side-effect of increasing execution speed because name +bindings are resolved at run-time in Python, and the second version only needs +to perform the resolution once. + + +Why don't generators support the with statement? +------------------------------------------------ + +For technical reasons, a generator used directly as a context manager +would not work correctly. When, as is most common, a generator is used as +an iterator run to completion, no closing is needed. When it is, wrap +it as "contextlib.closing(generator)" in the 'with' statement. + + +Why are colons required for the if/while/def/class statements? +-------------------------------------------------------------- + +The colon is required primarily to enhance readability (one of the results of +the experimental ABC language). Consider this:: + + if a == b + print(a) + +versus :: + + if a == b: + print(a) + +Notice how the second one is slightly easier to read. Notice further how a +colon sets off the example in this FAQ answer; it's a standard usage in English. + +Another minor reason is that the colon makes it easier for editors with syntax +highlighting; they can look for colons to decide when indentation needs to be +increased instead of having to do a more elaborate parsing of the program text. + + +Why does Python allow commas at the end of lists and tuples? +------------------------------------------------------------ + +Python lets you add a trailing comma at the end of lists, tuples, and +dictionaries:: + + [1, 2, 3,] + ('a', 'b', 'c',) + d = { + "A": [1, 5], + "B": [6, 7], # last trailing comma is optional but good style + } + + +There are several reasons to allow this. + +When you have a literal value for a list, tuple, or dictionary spread across +multiple lines, it's easier to add more elements because you don't have to +remember to add a comma to the previous line. The lines can also be reordered +without creating a syntax error. + +Accidentally omitting the comma can lead to errors that are hard to diagnose. +For example:: + + x = [ + "fee", + "fie" + "foo", + "fum" + ] + +This list looks like it has four elements, but it actually contains three: +"fee", "fiefoo" and "fum". Always adding the comma avoids this source of error. + +Allowing the trailing comma may also make programmatic code generation easier.
diff --git a/Doc/faq/extending.rst b/Doc/faq/extending.rst new file mode 100644 index 0000000..bc3080f --- /dev/null +++ b/Doc/faq/extending.rst
@@ -0,0 +1,291 @@ +======================= +Extending/Embedding FAQ +======================= + +.. only:: html + + .. contents:: + +.. highlight:: c + + +.. XXX need review for Python 3. + + +Can I create my own functions in C? +----------------------------------- + +Yes, you can create built-in modules containing functions, variables, exceptions +and even new types in C. This is explained in the document +:ref:`extending-index`. + +Most intermediate or advanced Python books will also cover this topic. + + +Can I create my own functions in C++? +------------------------------------- + +Yes, using the C compatibility features found in C++. Place ``extern "C" { +... }`` around the Python include files and put ``extern "C"`` before each +function that is going to be called by the Python interpreter. Global or static +C++ objects with constructors are probably not a good idea. + + +.. _c-wrapper-software: + +Writing C is hard; are there any alternatives? +---------------------------------------------- + +There are a number of alternatives to writing your own C extensions, depending +on what you're trying to do. + +.. XXX make sure these all work + +`Cython <https://cython.org>`_ and its relative `Pyrex +<https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers +that accept a slightly modified form of Python and generate the corresponding +C code. Cython and Pyrex make it possible to write an extension without having +to learn Python's C API. + +If you need to interface to some C or C++ library for which no Python extension +currently exists, you can try wrapping the library's data types and functions +with a tool such as `SWIG <https://www.swig.org>`_. `SIP +<https://riverbankcomputing.com/software/sip/intro>`__, `CXX +<https://cxx.sourceforge.net/>`_ `Boost +<https://www.boost.org/libs/python/doc/index.html>`_, or `Weave +<https://github.com/scipy/weave>`_ are also +alternatives for wrapping C++ libraries. + + +How can I execute arbitrary Python statements from C? +----------------------------------------------------- + +The highest-level function to do this is :c:func:`PyRun_SimpleString` which takes +a single string argument to be executed in the context of the module +``__main__`` and returns ``0`` for success and ``-1`` when an exception occurred +(including :exc:`SyntaxError`). If you want more control, use +:c:func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in +``Python/pythonrun.c``. + + +How can I evaluate an arbitrary Python expression from C? +--------------------------------------------------------- + +Call the function :c:func:`PyRun_String` from the previous question with the +start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it and +returns its value. + + +How do I extract C values from a Python object? +----------------------------------------------- + +That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` +returns its length and :c:func:`PyTuple_GetItem` returns the item at a specified +index. Lists have similar functions, :c:func:`PyListSize` and +:c:func:`PyList_GetItem`. + +For bytes, :c:func:`PyBytes_Size` returns its length and +:c:func:`PyBytes_AsStringAndSize` provides a pointer to its value and its +length. Note that Python bytes objects may contain null bytes so C's +:c:func:`strlen` should not be used. + +To test the type of an object, first make sure it isn't ``NULL``, and then use +:c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:`PyList_Check`, etc. + +There is also a high-level API to Python objects which is provided by the +so-called 'abstract' interface -- read ``Include/abstract.h`` for further +details. It allows interfacing with any kind of Python sequence using calls +like :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc. as well +as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et +al.) and mappings in the PyMapping APIs. + + +How do I use Py_BuildValue() to create a tuple of arbitrary length? +------------------------------------------------------------------- + +You can't. Use :c:func:`PyTuple_Pack` instead. + + +How do I call an object's method from C? +---------------------------------------- + +The :c:func:`PyObject_CallMethod` function can be used to call an arbitrary +method of an object. The parameters are the object, the name of the method to +call, a format string like that used with :c:func:`Py_BuildValue`, and the +argument values:: + + PyObject * + PyObject_CallMethod(PyObject *object, const char *method_name, + const char *arg_format, ...); + +This works for any object that has methods -- whether built-in or user-defined. +You are responsible for eventually :c:func:`Py_DECREF`\ 'ing the return value. + +To call, e.g., a file object's "seek" method with arguments 10, 0 (assuming the +file object pointer is "f"):: + + res = PyObject_CallMethod(f, "seek", "(ii)", 10, 0); + if (res == NULL) { + ... an exception occurred ... + } + else { + Py_DECREF(res); + } + +Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the +argument list, to call a function without arguments, pass "()" for the format, +and to call a function with one argument, surround the argument in parentheses, +e.g. "(i)". + + +How do I catch the output from PyErr_Print() (or anything that prints to stdout/stderr)? +---------------------------------------------------------------------------------------- + +In Python code, define an object that supports the ``write()`` method. Assign +this object to :data:`sys.stdout` and :data:`sys.stderr`. Call print_error, or +just allow the standard traceback mechanism to work. Then, the output will go +wherever your ``write()`` method sends it. + +The easiest way to do this is to use the :class:`io.StringIO` class: + +.. code-block:: pycon + + >>> import io, sys + >>> sys.stdout = io.StringIO() + >>> print('foo') + >>> print('hello world!') + >>> sys.stderr.write(sys.stdout.getvalue()) + foo + hello world! + +A custom object to do the same would look like this: + +.. code-block:: pycon + + >>> import io, sys + >>> class StdoutCatcher(io.TextIOBase): + ... def __init__(self): + ... self.data = [] + ... def write(self, stuff): + ... self.data.append(stuff) + ... + >>> import sys + >>> sys.stdout = StdoutCatcher() + >>> print('foo') + >>> print('hello world!') + >>> sys.stderr.write(''.join(sys.stdout.data)) + foo + hello world! + + +How do I access a module written in Python from C? +-------------------------------------------------- + +You can get a pointer to the module object as follows:: + + module = PyImport_ImportModule("<modulename>"); + +If the module hasn't been imported yet (i.e. it is not yet present in +:data:`sys.modules`), this initializes the module; otherwise it simply returns +the value of ``sys.modules["<modulename>"]``. Note that it doesn't enter the +module into any namespace -- it only ensures it has been initialized and is +stored in :data:`sys.modules`. + +You can then access the module's attributes (i.e. any name defined in the +module) as follows:: + + attr = PyObject_GetAttrString(module, "<attrname>"); + +Calling :c:func:`PyObject_SetAttrString` to assign to variables in the module +also works. + + +How do I interface to C++ objects from Python? +---------------------------------------------- + +Depending on your requirements, there are many approaches. To do this manually, +begin by reading :ref:`the "Extending and Embedding" document +<extending-index>`. Realize that for the Python run-time system, there isn't a +whole lot of difference between C and C++ -- so the strategy of building a new +Python type around a C structure (pointer) type will also work for C++ objects. + +For C++ libraries, see :ref:`c-wrapper-software`. + + +I added a module using the Setup file and the make fails; why? +-------------------------------------------------------------- + +Setup must end in a newline, if there is no newline there, the build process +fails. (Fixing this requires some ugly shell script hackery, and this bug is so +minor that it doesn't seem worth the effort.) + + +How do I debug an extension? +---------------------------- + +When using GDB with dynamically loaded extensions, you can't set a breakpoint in +your extension until your extension is loaded. + +In your ``.gdbinit`` file (or interactively), add the command: + +.. code-block:: none + + br _PyImport_LoadDynamicModule + +Then, when you run GDB: + +.. code-block:: shell-session + + $ gdb /local/bin/python + gdb) run myscript.py + gdb) continue # repeat until your extension is loaded + gdb) finish # so that your extension is loaded + gdb) br myfunction.c:50 + gdb) continue + +I want to compile a Python module on my Linux system, but some files are missing. Why? +-------------------------------------------------------------------------------------- + +Most packaged versions of Python don't include the +:file:`/usr/lib/python2.{x}/config/` directory, which contains various files +required for compiling Python extensions. + +For Red Hat, install the python-devel RPM to get the necessary files. + +For Debian, run ``apt-get install python-dev``. + +How do I tell "incomplete input" from "invalid input"? +------------------------------------------------------ + +Sometimes you want to emulate the Python interactive interpreter's behavior, +where it gives you a continuation prompt when the input is incomplete (e.g. you +typed the start of an "if" statement or you didn't close your parentheses or +triple string quotes), but it gives you a syntax error message immediately when +the input is invalid. + +In Python you can use the :mod:`codeop` module, which approximates the parser's +behavior sufficiently. IDLE uses this, for example. + +The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` (perhaps +in a separate thread) and let the Python interpreter handle the input for +you. You can also set the :c:func:`PyOS_ReadlineFunctionPointer` to point at your +custom input function. See ``Modules/readline.c`` and ``Parser/myreadline.c`` +for more hints. + +How do I find undefined g++ symbols __builtin_new or __pure_virtual? +-------------------------------------------------------------------- + +To dynamically load g++ extension modules, you must recompile Python, relink it +using g++ (change LINKCC in the Python Modules Makefile), and link your +extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``). + + +Can I create an object class with some methods implemented in C and others in Python (e.g. through inheritance)? +---------------------------------------------------------------------------------------------------------------- + +Yes, you can inherit from built-in classes such as :class:`int`, :class:`list`, +:class:`dict`, etc. + +The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index.html) +provides a way of doing this from C++ (i.e. you can inherit from an extension +class written in C++ using the BPL).
diff --git a/Doc/faq/general.rst b/Doc/faq/general.rst new file mode 100644 index 0000000..a9b2622 --- /dev/null +++ b/Doc/faq/general.rst
@@ -0,0 +1,447 @@ +:tocdepth: 2 + +================== +General Python FAQ +================== + +.. only:: html + + .. contents:: + + +General Information +=================== + +What is Python? +--------------- + +Python is an interpreted, interactive, object-oriented programming language. It +incorporates modules, exceptions, dynamic typing, very high level dynamic data +types, and classes. It supports multiple programming paradigms beyond +object-oriented programming, such as procedural and functional programming. +Python combines remarkable power with very clear syntax. It has interfaces to +many system calls and libraries, as well as to various window systems, and is +extensible in C or C++. It is also usable as an extension language for +applications that need a programmable interface. Finally, Python is portable: +it runs on many Unix variants including Linux and macOS, and on Windows. + +To find out more, start with :ref:`tutorial-index`. The `Beginner's Guide to +Python <https://wiki.python.org/moin/BeginnersGuide>`_ links to other +introductory tutorials and resources for learning Python. + + +What is the Python Software Foundation? +--------------------------------------- + +The Python Software Foundation is an independent non-profit organization that +holds the copyright on Python versions 2.1 and newer. The PSF's mission is to +advance open source technology related to the Python programming language and to +publicize the use of Python. The PSF's home page is at +https://www.python.org/psf/. + +Donations to the PSF are tax-exempt in the US. If you use Python and find it +helpful, please contribute via `the PSF donation page +<https://www.python.org/psf/donations/>`_. + + +Are there copyright restrictions on the use of Python? +------------------------------------------------------ + +You can do anything you want with the source, as long as you leave the +copyrights in and display those copyrights in any documentation about Python +that you produce. If you honor the copyright rules, it's OK to use Python for +commercial use, to sell copies of Python in source or binary form (modified or +unmodified), or to sell products that incorporate Python in some form. We would +still like to know about all commercial use of Python, of course. + +See `the license page <https://docs.python.org/3/license.html>`_ to find further +explanations and the full text of the PSF License. + +The Python logo is trademarked, and in certain cases permission is required to +use it. Consult `the Trademark Usage Policy +<https://www.python.org/psf/trademarks/>`__ for more information. + + +Why was Python created in the first place? +------------------------------------------ + +Here's a *very* brief summary of what started it all, written by Guido van +Rossum: + + I had extensive experience with implementing an interpreted language in the + ABC group at CWI, and from working with this group I had learned a lot about + language design. This is the origin of many Python features, including the + use of indentation for statement grouping and the inclusion of + very-high-level data types (although the details are all different in + Python). + + I had a number of gripes about the ABC language, but also liked many of its + features. It was impossible to extend the ABC language (or its + implementation) to remedy my complaints -- in fact its lack of extensibility + was one of its biggest problems. I had some experience with using Modula-2+ + and talked with the designers of Modula-3 and read the Modula-3 report. + Modula-3 is the origin of the syntax and semantics used for exceptions, and + some other Python features. + + I was working in the Amoeba distributed operating system group at CWI. We + needed a better way to do system administration than by writing either C + programs or Bourne shell scripts, since Amoeba had its own system call + interface which wasn't easily accessible from the Bourne shell. My + experience with error handling in Amoeba made me acutely aware of the + importance of exceptions as a programming language feature. + + It occurred to me that a scripting language with a syntax like ABC but with + access to the Amoeba system calls would fill the need. I realized that it + would be foolish to write an Amoeba-specific language, so I decided that I + needed a language that was generally extensible. + + During the 1989 Christmas holidays, I had a lot of time on my hand, so I + decided to give it a try. During the next year, while still mostly working + on it in my own time, Python was used in the Amoeba project with increasing + success, and the feedback from colleagues made me add many early + improvements. + + In February 1991, after just over a year of development, I decided to post to + USENET. The rest is in the ``Misc/HISTORY`` file. + + +What is Python good for? +------------------------ + +Python is a high-level general-purpose programming language that can be applied +to many different classes of problems. + +The language comes with a large standard library that covers areas such as +string processing (regular expressions, Unicode, calculating differences between +files), internet protocols (HTTP, FTP, SMTP, XML-RPC, POP, IMAP), +software engineering (unit testing, logging, profiling, parsing +Python code), and operating system interfaces (system calls, filesystems, TCP/IP +sockets). Look at the table of contents for :ref:`library-index` to get an idea +of what's available. A wide variety of third-party extensions are also +available. Consult `the Python Package Index <https://pypi.org>`_ to +find packages of interest to you. + + +How does the Python version numbering scheme work? +-------------------------------------------------- + +Python versions are numbered "A.B.C" or "A.B": + +* *A* is the major version number -- it is only incremented for really major + changes in the language. +* *B* is the minor version number -- it is incremented for less earth-shattering + changes. +* *C* is the micro version number -- it is incremented for each bugfix release. + +See :pep:`6` for more information about bugfix releases. + +Not all releases are bugfix releases. In the run-up to a new major release, a +series of development releases are made, denoted as alpha, beta, or release +candidate. Alphas are early releases in which interfaces aren't yet finalized; +it's not unexpected to see an interface change between two alpha releases. +Betas are more stable, preserving existing interfaces but possibly adding new +modules, and release candidates are frozen, making no changes except as needed +to fix critical bugs. + +Alpha, beta and release candidate versions have an additional suffix: + +* The suffix for an alpha version is "aN" for some small number *N*. +* The suffix for a beta version is "bN" for some small number *N*. +* The suffix for a release candidate version is "rcN" for some small number *N*. + +In other words, all versions labeled *2.0aN* precede the versions labeled +*2.0bN*, which precede versions labeled *2.0rcN*, and *those* precede 2.0. + +You may also find version numbers with a "+" suffix, e.g. "2.2+". These are +unreleased versions, built directly from the CPython development repository. In +practice, after a final minor release is made, the version is incremented to the +next minor version, which becomes the "a0" version, e.g. "2.4a0". + +See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, and +:data:`sys.version_info`. + + +How do I obtain a copy of the Python source? +-------------------------------------------- + +The latest Python source distribution is always available from python.org, at +https://www.python.org/downloads/. The latest development sources can be obtained +at https://github.com/python/cpython/. + +The source distribution is a gzipped tar file containing the complete C source, +Sphinx-formatted documentation, Python library modules, example programs, and +several useful pieces of freely distributable software. The source will compile +and run out of the box on most UNIX platforms. + +Consult the `Getting Started section of the Python Developer's Guide +<https://devguide.python.org/setup/>`__ for more +information on getting the source code and compiling it. + + +How do I get documentation on Python? +------------------------------------- + +.. XXX mention py3k + +The standard documentation for the current stable version of Python is available +at https://docs.python.org/3/. PDF, plain text, and downloadable HTML versions are +also available at https://docs.python.org/3/download.html. + +The documentation is written in reStructuredText and processed by `the Sphinx +documentation tool <https://www.sphinx-doc.org/>`__. The reStructuredText source for +the documentation is part of the Python source distribution. + + +I've never programmed before. Is there a Python tutorial? +--------------------------------------------------------- + +There are numerous tutorials and books available. The standard documentation +includes :ref:`tutorial-index`. + +Consult `the Beginner's Guide <https://wiki.python.org/moin/BeginnersGuide>`_ to +find information for beginning Python programmers, including lists of tutorials. + + +Is there a newsgroup or mailing list devoted to Python? +------------------------------------------------------- + +There is a newsgroup, :newsgroup:`comp.lang.python`, and a mailing list, +`python-list <https://mail.python.org/mailman/listinfo/python-list>`_. The +newsgroup and mailing list are gatewayed into each other -- if you can read news +it's unnecessary to subscribe to the mailing list. +:newsgroup:`comp.lang.python` is high-traffic, receiving hundreds of postings +every day, and Usenet readers are often more able to cope with this volume. + +Announcements of new software releases and events can be found in +comp.lang.python.announce, a low-traffic moderated list that receives about five +postings per day. It's available as `the python-announce mailing list +<https://mail.python.org/mailman3/lists/python-announce-list.python.org/>`_. + +More info about other mailing lists and newsgroups +can be found at https://www.python.org/community/lists/. + + +How do I get a beta test version of Python? +------------------------------------------- + +Alpha and beta releases are available from https://www.python.org/downloads/. All +releases are announced on the comp.lang.python and comp.lang.python.announce +newsgroups and on the Python home page at https://www.python.org/; an RSS feed of +news is available. + +You can also access the development version of Python through Git. See +`The Python Developer's Guide <https://devguide.python.org/>`_ for details. + + +How do I submit bug reports and patches for Python? +--------------------------------------------------- + +To report a bug or submit a patch, use the issue tracker at +https://github.com/python/cpython/issues. + +For more information on how Python is developed, consult `the Python Developer's +Guide <https://devguide.python.org/>`_. + + +Are there any published articles about Python that I can reference? +------------------------------------------------------------------- + +It's probably best to cite your favorite book about Python. + +The `very first article <https://ir.cwi.nl/pub/18204>`_ about Python was +written in 1991 and is now quite outdated. + + Guido van Rossum and Jelke de Boer, "Interactively Testing Remote Servers + Using the Python Programming Language", CWI Quarterly, Volume 4, Issue 4 + (December 1991), Amsterdam, pp 283--303. + + +Are there any books on Python? +------------------------------ + +Yes, there are many, and more are being published. See the python.org wiki at +https://wiki.python.org/moin/PythonBooks for a list. + +You can also search online bookstores for "Python" and filter out the Monty +Python references; or perhaps search for "Python" and "language". + + +Where in the world is www.python.org located? +--------------------------------------------- + +The Python project's infrastructure is located all over the world and is managed +by the Python Infrastructure Team. Details `here <https://infra.psf.io>`__. + + +Why is it called Python? +------------------------ + +When he began implementing Python, Guido van Rossum was also reading the +published scripts from `"Monty Python's Flying Circus" +<https://en.wikipedia.org/wiki/Monty_Python>`__, a BBC comedy series from the 1970s. Van Rossum +thought he needed a name that was short, unique, and slightly mysterious, so he +decided to call the language Python. + + +Do I have to like "Monty Python's Flying Circus"? +------------------------------------------------- + +No, but it helps. :) + + +Python in the real world +======================== + +How stable is Python? +--------------------- + +Very stable. New, stable releases have been coming out roughly every 6 to 18 +months since 1991, and this seems likely to continue. As of version 3.9, +Python will have a major new release every 12 months (:pep:`602`). + +The developers issue "bugfix" releases of older versions, so the stability of +existing releases gradually improves. Bugfix releases, indicated by a third +component of the version number (e.g. 3.5.3, 3.6.2), are managed for stability; +only fixes for known problems are included in a bugfix release, and it's +guaranteed that interfaces will remain the same throughout a series of bugfix +releases. + +The latest stable releases can always be found on the `Python download page +<https://www.python.org/downloads/>`_. There are two production-ready versions +of Python: 2.x and 3.x. The recommended version is 3.x, which is supported by +most widely used libraries. Although 2.x is still widely used, `it is not +maintained anymore <https://peps.python.org/pep-0373/>`_. + +How many people are using Python? +--------------------------------- + +There are probably millions of users, though it's difficult to obtain an exact +count. + +Python is available for free download, so there are no sales figures, and it's +available from many different sites and packaged with many Linux distributions, +so download statistics don't tell the whole story either. + +The comp.lang.python newsgroup is very active, but not all Python users post to +the group or even read it. + + +Have any significant projects been done in Python? +-------------------------------------------------- + +See https://www.python.org/about/success for a list of projects that use Python. +Consulting the proceedings for `past Python conferences +<https://www.python.org/community/workshops/>`_ will reveal contributions from many +different companies and organizations. + +High-profile Python projects include `the Mailman mailing list manager +<https://www.list.org>`_ and `the Zope application server +<https://www.zope.dev>`_. Several Linux distributions, most notably `Red Hat +<https://www.redhat.com>`_, have written part or all of their installer and +system administration software in Python. Companies that use Python internally +include Google, Yahoo, and Lucasfilm Ltd. + + +What new developments are expected for Python in the future? +------------------------------------------------------------ + +See https://peps.python.org/ for the Python Enhancement Proposals +(PEPs). PEPs are design documents describing a suggested new feature for Python, +providing a concise technical specification and a rationale. Look for a PEP +titled "Python X.Y Release Schedule", where X.Y is a version that hasn't been +publicly released yet. + +New development is discussed on `the python-dev mailing list +<https://mail.python.org/mailman3/lists/python-dev.python.org/>`_. + + +Is it reasonable to propose incompatible changes to Python? +----------------------------------------------------------- + +In general, no. There are already millions of lines of Python code around the +world, so any change in the language that invalidates more than a very small +fraction of existing programs has to be frowned upon. Even if you can provide a +conversion program, there's still the problem of updating all documentation; +many books have been written about Python, and we don't want to invalidate them +all at a single stroke. + +Providing a gradual upgrade path is necessary if a feature has to be changed. +:pep:`5` describes the procedure followed for introducing backward-incompatible +changes while minimizing disruption for users. + + +Is Python a good language for beginning programmers? +---------------------------------------------------- + +Yes. + +It is still common to start students with a procedural and statically typed +language such as Pascal, C, or a subset of C++ or Java. Students may be better +served by learning Python as their first language. Python has a very simple and +consistent syntax and a large standard library and, most importantly, using +Python in a beginning programming course lets students concentrate on important +programming skills such as problem decomposition and data type design. With +Python, students can be quickly introduced to basic concepts such as loops and +procedures. They can probably even work with user-defined objects in their very +first course. + +For a student who has never programmed before, using a statically typed language +seems unnatural. It presents additional complexity that the student must master +and slows the pace of the course. The students are trying to learn to think +like a computer, decompose problems, design consistent interfaces, and +encapsulate data. While learning to use a statically typed language is +important in the long term, it is not necessarily the best topic to address in +the students' first programming course. + +Many other aspects of Python make it a good first language. Like Java, Python +has a large standard library so that students can be assigned programming +projects very early in the course that *do* something. Assignments aren't +restricted to the standard four-function calculator and check balancing +programs. By using the standard library, students can gain the satisfaction of +working on realistic applications as they learn the fundamentals of programming. +Using the standard library also teaches students about code reuse. Third-party +modules such as PyGame are also helpful in extending the students' reach. + +Python's interactive interpreter enables students to test language features +while they're programming. They can keep a window with the interpreter running +while they enter their program's source in another window. If they can't +remember the methods for a list, they can do something like this:: + + >>> L = [] + >>> dir(L) # doctest: +NORMALIZE_WHITESPACE + ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', + '__dir__', '__doc__', '__eq__', '__format__', '__ge__', + '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', + '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', + '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', + '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', + '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', + 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', + 'reverse', 'sort'] + >>> [d for d in dir(L) if '__' not in d] + ['append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] + + >>> help(L.append) + Help on built-in function append: + <BLANKLINE> + append(...) + L.append(object) -> None -- append object to end + <BLANKLINE> + >>> L.append(1) + >>> L + [1] + +With the interpreter, documentation is never far from the student as they are +programming. + +There are also good IDEs for Python. IDLE is a cross-platform IDE for Python +that is written in Python using Tkinter. +Emacs users will be happy to know that there is a very good Python mode for +Emacs. All of these programming environments provide syntax highlighting, +auto-indenting, and access to the interactive interpreter while coding. Consult +`the Python wiki <https://wiki.python.org/moin/PythonEditors>`_ for a full list +of Python editing environments. + +If you want to discuss Python's use in education, you may be interested in +joining `the edu-sig mailing list +<https://www.python.org/community/sigs/current/edu-sig>`_.
diff --git a/Doc/faq/gui.rst b/Doc/faq/gui.rst new file mode 100644 index 0000000..023ffdf --- /dev/null +++ b/Doc/faq/gui.rst
@@ -0,0 +1,79 @@ +:tocdepth: 2 + +========================== +Graphic User Interface FAQ +========================== + +.. only:: html + + .. contents:: + +.. XXX need review for Python 3. + + +General GUI Questions +===================== + +What GUI toolkits exist for Python? +=================================== + +Standard builds of Python include an object-oriented interface to the Tcl/Tk +widget set, called :ref:`tkinter <Tkinter>`. This is probably the easiest to +install (since it comes included with most +`binary distributions <https://www.python.org/downloads/>`_ of Python) and use. +For more info about Tk, including pointers to the source, see the +`Tcl/Tk home page <https://www.tcl.tk>`_. Tcl/Tk is fully portable to the +macOS, Windows, and Unix platforms. + +Depending on what platform(s) you are aiming at, there are also several +alternatives. A `list of cross-platform +<https://wiki.python.org/moin/GuiProgramming#Cross-Platform_Frameworks>`_ and +`platform-specific +<https://wiki.python.org/moin/GuiProgramming#Platform-specific_Frameworks>`_ GUI +frameworks can be found on the python wiki. + +Tkinter questions +================= + +How do I freeze Tkinter applications? +------------------------------------- + +Freeze is a tool to create stand-alone applications. When freezing Tkinter +applications, the applications will not be truly stand-alone, as the application +will still need the Tcl and Tk libraries. + +One solution is to ship the application with the Tcl and Tk libraries, and point +to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:`TK_LIBRARY` +environment variables. + +To get truly stand-alone applications, the Tcl scripts that form the library +have to be integrated into the application as well. One tool supporting that is +SAM (stand-alone modules), which is part of the Tix distribution +(https://tix.sourceforge.net/). + +Build Tix with SAM enabled, perform the appropriate call to +:c:func:`Tclsam_init`, etc. inside Python's +:file:`Modules/tkappinit.c`, and link with libtclsam and libtksam (you +might include the Tix libraries as well). + + +Can I have Tk events handled while waiting for I/O? +--------------------------------------------------- + +On platforms other than Windows, yes, and you don't even +need threads! But you'll have to restructure your I/O +code a bit. Tk has the equivalent of Xt's :c:func:`XtAddInput()` call, which allows you +to register a callback function which will be called from the Tk mainloop when +I/O is possible on a file descriptor. See :ref:`tkinter-file-handlers`. + + +I can't get key bindings to work in Tkinter: why? +------------------------------------------------- + +An often-heard complaint is that event handlers bound to events with the +:meth:`bind` method don't get handled even when the appropriate key is pressed. + +The most common cause is that the widget to which the binding applies doesn't +have "keyboard focus". Check out the Tk documentation for the focus command. +Usually a widget is given the keyboard focus by clicking in it (but not for +labels; see the takefocus option).
diff --git a/Doc/faq/index.rst b/Doc/faq/index.rst new file mode 100644 index 0000000..46ed3db --- /dev/null +++ b/Doc/faq/index.rst
@@ -0,0 +1,17 @@ +.. _faq-index: + +################################### + Python Frequently Asked Questions +################################### + +.. toctree:: + :maxdepth: 1 + + general.rst + programming.rst + design.rst + library.rst + extending.rst + windows.rst + gui.rst + installed.rst
diff --git a/Doc/faq/installed.rst b/Doc/faq/installed.rst new file mode 100644 index 0000000..16c9a74 --- /dev/null +++ b/Doc/faq/installed.rst
@@ -0,0 +1,53 @@ +============================================= +"Why is Python Installed on my Computer?" FAQ +============================================= + +What is Python? +--------------- + +Python is a programming language. It's used for many different applications. +It's used in some high schools and colleges as an introductory programming +language because Python is easy to learn, but it's also used by professional +software developers at places such as Google, NASA, and Lucasfilm Ltd. + +If you wish to learn more about Python, start with the `Beginner's Guide to +Python <https://wiki.python.org/moin/BeginnersGuide>`_. + + +Why is Python installed on my machine? +-------------------------------------- + +If you find Python installed on your system but don't remember installing it, +there are several possible ways it could have gotten there. + +* Perhaps another user on the computer wanted to learn programming and installed + it; you'll have to figure out who's been using the machine and might have + installed it. +* A third-party application installed on the machine might have been written in + Python and included a Python installation. There are many such applications, + from GUI programs to network servers and administrative scripts. +* Some Windows machines also have Python installed. At this writing we're aware + of computers from Hewlett-Packard and Compaq that include Python. Apparently + some of HP/Compaq's administrative tools are written in Python. +* Many Unix-compatible operating systems, such as macOS and some Linux + distributions, have Python installed by default; it's included in the base + installation. + + +Can I delete Python? +-------------------- + +That depends on where Python came from. + +If someone installed it deliberately, you can remove it without hurting +anything. On Windows, use the Add/Remove Programs icon in the Control Panel. + +If Python was installed by a third-party application, you can also remove it, +but that application will no longer work. You should use that application's +uninstaller rather than removing Python directly. + +If Python came with your operating system, removing it is not recommended. If +you remove it, whatever tools were written in Python will no longer run, and +some of them might be important to you. Reinstalling the whole system would +then be required to fix things again. +
diff --git a/Doc/faq/library.rst b/Doc/faq/library.rst new file mode 100644 index 0000000..597caaa --- /dev/null +++ b/Doc/faq/library.rst
@@ -0,0 +1,840 @@ +:tocdepth: 2 + +========================= +Library and Extension FAQ +========================= + +.. only:: html + + .. contents:: + +General Library Questions +========================= + +How do I find a module or application to perform task X? +-------------------------------------------------------- + +Check :ref:`the Library Reference <library-index>` to see if there's a relevant +standard library module. (Eventually you'll learn what's in the standard +library and will be able to skip this step.) + +For third-party packages, search the `Python Package Index +<https://pypi.org>`_ or try `Google <https://www.google.com>`_ or +another web search engine. Searching for "Python" plus a keyword or two for +your topic of interest will usually find something helpful. + + +Where is the math.py (socket.py, regex.py, etc.) source file? +------------------------------------------------------------- + +If you can't find a source file for a module it may be a built-in or +dynamically loaded module implemented in C, C++ or other compiled language. +In this case you may not have the source file or it may be something like +:file:`mathmodule.c`, somewhere in a C source directory (not on the Python Path). + +There are (at least) three kinds of modules in Python: + +1) modules written in Python (.py); +2) modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc); +3) modules written in C and linked with the interpreter; to get a list of these, + type:: + + import sys + print(sys.builtin_module_names) + + +How do I make a Python script executable on Unix? +------------------------------------------------- + +You need to do two things: the script file's mode must be executable and the +first line must begin with ``#!`` followed by the path of the Python +interpreter. + +The first is done by executing ``chmod +x scriptfile`` or perhaps ``chmod 755 +scriptfile``. + +The second can be done in a number of ways. The most straightforward way is to +write :: + + #!/usr/local/bin/python + +as the very first line of your file, using the pathname for where the Python +interpreter is installed on your platform. + +If you would like the script to be independent of where the Python interpreter +lives, you can use the :program:`env` program. Almost all Unix variants support +the following, assuming the Python interpreter is in a directory on the user's +:envvar:`PATH`:: + + #!/usr/bin/env python + +*Don't* do this for CGI scripts. The :envvar:`PATH` variable for CGI scripts is +often very minimal, so you need to use the actual absolute pathname of the +interpreter. + +Occasionally, a user's environment is so full that the :program:`/usr/bin/env` +program fails; or there's no env program at all. In that case, you can try the +following hack (due to Alex Rezinsky): + +.. code-block:: sh + + #! /bin/sh + """:" + exec python $0 ${1+"$@"} + """ + +The minor disadvantage is that this defines the script's __doc__ string. +However, you can fix that by adding :: + + __doc__ = """...Whatever...""" + + + +Is there a curses/termcap package for Python? +--------------------------------------------- + +.. XXX curses *is* built by default, isn't it? + +For Unix variants: The standard Python source distribution comes with a curses +module in the :source:`Modules` subdirectory, though it's not compiled by default. +(Note that this is not available in the Windows distribution -- there is no +curses module for Windows.) + +The :mod:`curses` module supports basic curses features as well as many additional +functions from ncurses and SYSV curses such as colour, alternative character set +support, pads, and mouse support. This means the module isn't compatible with +operating systems that only have BSD curses, but there don't seem to be any +currently maintained OSes that fall into this category. + + +Is there an equivalent to C's onexit() in Python? +------------------------------------------------- + +The :mod:`atexit` module provides a register function that is similar to C's +:c:func:`onexit`. + + +Why don't my signal handlers work? +---------------------------------- + +The most common problem is that the signal handler is declared with the wrong +argument list. It is called as :: + + handler(signum, frame) + +so it should be declared with two parameters:: + + def handler(signum, frame): + ... + + +Common tasks +============ + +How do I test a Python program or component? +-------------------------------------------- + +Python comes with two testing frameworks. The :mod:`doctest` module finds +examples in the docstrings for a module and runs them, comparing the output with +the expected output given in the docstring. + +The :mod:`unittest` module is a fancier testing framework modelled on Java and +Smalltalk testing frameworks. + +To make testing easier, you should use good modular design in your program. +Your program should have almost all functionality +encapsulated in either functions or class methods -- and this sometimes has the +surprising and delightful effect of making the program run faster (because local +variable accesses are faster than global accesses). Furthermore the program +should avoid depending on mutating global variables, since this makes testing +much more difficult to do. + +The "global main logic" of your program may be as simple as :: + + if __name__ == "__main__": + main_logic() + +at the bottom of the main module of your program. + +Once your program is organized as a tractable collection of function and class +behaviours, you should write test functions that exercise the behaviours. A +test suite that automates a sequence of tests can be associated with each module. +This sounds like a lot of work, but since Python is so terse and flexible it's +surprisingly easy. You can make coding much more pleasant and fun by writing +your test functions in parallel with the "production code", since this makes it +easy to find bugs and even design flaws earlier. + +"Support modules" that are not intended to be the main module of a program may +include a self-test of the module. :: + + if __name__ == "__main__": + self_test() + +Even programs that interact with complex external interfaces may be tested when +the external interfaces are unavailable by using "fake" interfaces implemented +in Python. + + +How do I create documentation from doc strings? +----------------------------------------------- + +The :mod:`pydoc` module can create HTML from the doc strings in your Python +source code. An alternative for creating API documentation purely from +docstrings is `epydoc <https://epydoc.sourceforge.net/>`_. `Sphinx +<https://www.sphinx-doc.org>`_ can also include docstring content. + + +How do I get a single keypress at a time? +----------------------------------------- + +For Unix variants there are several solutions. It's straightforward to do this +using curses, but curses is a fairly large module to learn. + +.. XXX this doesn't work out of the box, some IO expert needs to check why + + Here's a solution without curses:: + + import termios, fcntl, sys, os + fd = sys.stdin.fileno() + + oldterm = termios.tcgetattr(fd) + newattr = termios.tcgetattr(fd) + newattr[3] = newattr[3] & ~termios.ICANON & ~termios.ECHO + termios.tcsetattr(fd, termios.TCSANOW, newattr) + + oldflags = fcntl.fcntl(fd, fcntl.F_GETFL) + fcntl.fcntl(fd, fcntl.F_SETFL, oldflags | os.O_NONBLOCK) + + try: + while True: + try: + c = sys.stdin.read(1) + print("Got character", repr(c)) + except OSError: + pass + finally: + termios.tcsetattr(fd, termios.TCSAFLUSH, oldterm) + fcntl.fcntl(fd, fcntl.F_SETFL, oldflags) + + You need the :mod:`termios` and the :mod:`fcntl` module for any of this to + work, and I've only tried it on Linux, though it should work elsewhere. In + this code, characters are read and printed one at a time. + + :func:`termios.tcsetattr` turns off stdin's echoing and disables canonical + mode. :func:`fcntl.fnctl` is used to obtain stdin's file descriptor flags + and modify them for non-blocking mode. Since reading stdin when it is empty + results in an :exc:`OSError`, this error is caught and ignored. + + .. versionchanged:: 3.3 + *sys.stdin.read* used to raise :exc:`IOError`. Starting from Python 3.3 + :exc:`IOError` is alias for :exc:`OSError`. + + +Threads +======= + +How do I program using threads? +------------------------------- + +Be sure to use the :mod:`threading` module and not the :mod:`_thread` module. +The :mod:`threading` module builds convenient abstractions on top of the +low-level primitives provided by the :mod:`_thread` module. + + +None of my threads seem to run: why? +------------------------------------ + +As soon as the main thread exits, all threads are killed. Your main thread is +running too quickly, giving the threads no time to do any work. + +A simple fix is to add a sleep to the end of the program that's long enough for +all the threads to finish:: + + import threading, time + + def thread_task(name, n): + for i in range(n): + print(name, i) + + for i in range(10): + T = threading.Thread(target=thread_task, args=(str(i), i)) + T.start() + + time.sleep(10) # <---------------------------! + +But now (on many platforms) the threads don't run in parallel, but appear to run +sequentially, one at a time! The reason is that the OS thread scheduler doesn't +start a new thread until the previous thread is blocked. + +A simple fix is to add a tiny sleep to the start of the run function:: + + def thread_task(name, n): + time.sleep(0.001) # <--------------------! + for i in range(n): + print(name, i) + + for i in range(10): + T = threading.Thread(target=thread_task, args=(str(i), i)) + T.start() + + time.sleep(10) + +Instead of trying to guess a good delay value for :func:`time.sleep`, +it's better to use some kind of semaphore mechanism. One idea is to use the +:mod:`queue` module to create a queue object, let each thread append a token to +the queue when it finishes, and let the main thread read as many tokens from the +queue as there are threads. + + +How do I parcel out work among a bunch of worker threads? +--------------------------------------------------------- + +The easiest way is to use the :mod:`concurrent.futures` module, +especially the :mod:`~concurrent.futures.ThreadPoolExecutor` class. + +Or, if you want fine control over the dispatching algorithm, you can write +your own logic manually. Use the :mod:`queue` module to create a queue +containing a list of jobs. The :class:`~queue.Queue` class maintains a +list of objects and has a ``.put(obj)`` method that adds items to the queue and +a ``.get()`` method to return them. The class will take care of the locking +necessary to ensure that each job is handed out exactly once. + +Here's a trivial example:: + + import threading, queue, time + + # The worker thread gets jobs off the queue. When the queue is empty, it + # assumes there will be no more work and exits. + # (Realistically workers will run until terminated.) + def worker(): + print('Running worker') + time.sleep(0.1) + while True: + try: + arg = q.get(block=False) + except queue.Empty: + print('Worker', threading.current_thread(), end=' ') + print('queue empty') + break + else: + print('Worker', threading.current_thread(), end=' ') + print('running with argument', arg) + time.sleep(0.5) + + # Create queue + q = queue.Queue() + + # Start a pool of 5 workers + for i in range(5): + t = threading.Thread(target=worker, name='worker %i' % (i+1)) + t.start() + + # Begin adding work to the queue + for i in range(50): + q.put(i) + + # Give threads time to run + print('Main thread sleeping') + time.sleep(5) + +When run, this will produce the following output: + +.. code-block:: none + + Running worker + Running worker + Running worker + Running worker + Running worker + Main thread sleeping + Worker <Thread(worker 1, started 130283832797456)> running with argument 0 + Worker <Thread(worker 2, started 130283824404752)> running with argument 1 + Worker <Thread(worker 3, started 130283816012048)> running with argument 2 + Worker <Thread(worker 4, started 130283807619344)> running with argument 3 + Worker <Thread(worker 5, started 130283799226640)> running with argument 4 + Worker <Thread(worker 1, started 130283832797456)> running with argument 5 + ... + +Consult the module's documentation for more details; the :class:`~queue.Queue` +class provides a featureful interface. + + +What kinds of global value mutation are thread-safe? +---------------------------------------------------- + +A :term:`global interpreter lock` (GIL) is used internally to ensure that only one +thread runs in the Python VM at a time. In general, Python offers to switch +among threads only between bytecode instructions; how frequently it switches can +be set via :func:`sys.setswitchinterval`. Each bytecode instruction and +therefore all the C implementation code reached from each instruction is +therefore atomic from the point of view of a Python program. + +In theory, this means an exact accounting requires an exact understanding of the +PVM bytecode implementation. In practice, it means that operations on shared +variables of built-in data types (ints, lists, dicts, etc) that "look atomic" +really are. + +For example, the following operations are all atomic (L, L1, L2 are lists, D, +D1, D2 are dicts, x, y are objects, i, j are ints):: + + L.append(x) + L1.extend(L2) + x = L[i] + x = L.pop() + L1[i:j] = L2 + L.sort() + x = y + x.field = y + D[x] = y + D1.update(D2) + D.keys() + +These aren't:: + + i = i+1 + L.append(L[-1]) + L[i] = L[j] + D[x] = D[x] + 1 + +Operations that replace other objects may invoke those other objects' +:meth:`__del__` method when their reference count reaches zero, and that can +affect things. This is especially true for the mass updates to dictionaries and +lists. When in doubt, use a mutex! + + +Can't we get rid of the Global Interpreter Lock? +------------------------------------------------ + +.. XXX link to dbeazley's talk about GIL? + +The :term:`global interpreter lock` (GIL) is often seen as a hindrance to Python's +deployment on high-end multiprocessor server machines, because a multi-threaded +Python program effectively only uses one CPU, due to the insistence that +(almost) all Python code can only run while the GIL is held. + +Back in the days of Python 1.5, Greg Stein actually implemented a comprehensive +patch set (the "free threading" patches) that removed the GIL and replaced it +with fine-grained locking. Adam Olsen recently did a similar experiment +in his `python-safethread <https://code.google.com/archive/p/python-safethread>`_ +project. Unfortunately, both experiments exhibited a sharp drop in single-thread +performance (at least 30% slower), due to the amount of fine-grained locking +necessary to compensate for the removal of the GIL. + +This doesn't mean that you can't make good use of Python on multi-CPU machines! +You just have to be creative with dividing the work up between multiple +*processes* rather than multiple *threads*. The +:class:`~concurrent.futures.ProcessPoolExecutor` class in the new +:mod:`concurrent.futures` module provides an easy way of doing so; the +:mod:`multiprocessing` module provides a lower-level API in case you want +more control over dispatching of tasks. + +Judicious use of C extensions will also help; if you use a C extension to +perform a time-consuming task, the extension can release the GIL while the +thread of execution is in the C code and allow other threads to get some work +done. Some standard library modules such as :mod:`zlib` and :mod:`hashlib` +already do this. + +It has been suggested that the GIL should be a per-interpreter-state lock rather +than truly global; interpreters then wouldn't be able to share objects. +Unfortunately, this isn't likely to happen either. It would be a tremendous +amount of work, because many object implementations currently have global state. +For example, small integers and short strings are cached; these caches would +have to be moved to the interpreter state. Other object types have their own +free list; these free lists would have to be moved to the interpreter state. +And so on. + +And I doubt that it can even be done in finite time, because the same problem +exists for 3rd party extensions. It is likely that 3rd party extensions are +being written at a faster rate than you can convert them to store all their +global state in the interpreter state. + +And finally, once you have multiple interpreters not sharing any state, what +have you gained over running each interpreter in a separate process? + + +Input and Output +================ + +How do I delete a file? (And other file questions...) +----------------------------------------------------- + +Use ``os.remove(filename)`` or ``os.unlink(filename)``; for documentation, see +the :mod:`os` module. The two functions are identical; :func:`~os.unlink` is simply +the name of the Unix system call for this function. + +To remove a directory, use :func:`os.rmdir`; use :func:`os.mkdir` to create one. +``os.makedirs(path)`` will create any intermediate directories in ``path`` that +don't exist. ``os.removedirs(path)`` will remove intermediate directories as +long as they're empty; if you want to delete an entire directory tree and its +contents, use :func:`shutil.rmtree`. + +To rename a file, use ``os.rename(old_path, new_path)``. + +To truncate a file, open it using ``f = open(filename, "rb+")``, and use +``f.truncate(offset)``; offset defaults to the current seek position. There's +also ``os.ftruncate(fd, offset)`` for files opened with :func:`os.open`, where +*fd* is the file descriptor (a small integer). + +The :mod:`shutil` module also contains a number of functions to work on files +including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and +:func:`~shutil.rmtree`. + + +How do I copy a file? +--------------------- + +The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. +Note that on Windows NTFS volumes, it does not copy +`alternate data streams +<https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS)>`_ +nor `resource forks <https://en.wikipedia.org/wiki/Resource_fork>`__ +on macOS HFS+ volumes, though both are now rarely used. +It also doesn't copy file permissions and metadata, though using +:func:`shutil.copy2` instead will preserve most (though not all) of it. + + +How do I read (or write) binary data? +------------------------------------- + +To read or write complex binary data formats, it's best to use the :mod:`struct` +module. It allows you to take a string containing binary data (usually numbers) +and convert it to Python objects; and vice versa. + +For example, the following code reads two 2-byte integers and one 4-byte integer +in big-endian format from a file:: + + import struct + + with open(filename, "rb") as f: + s = f.read(8) + x, y, z = struct.unpack(">hhl", s) + +The '>' in the format string forces big-endian data; the letter 'h' reads one +"short integer" (2 bytes), and 'l' reads one "long integer" (4 bytes) from the +string. + +For data that is more regular (e.g. a homogeneous list of ints or floats), +you can also use the :mod:`array` module. + +.. note:: + + To read and write binary data, it is mandatory to open the file in + binary mode (here, passing ``"rb"`` to :func:`open`). If you use + ``"r"`` instead (the default), the file will be open in text mode + and ``f.read()`` will return :class:`str` objects rather than + :class:`bytes` objects. + + +I can't seem to use os.read() on a pipe created with os.popen(); why? +--------------------------------------------------------------------- + +:func:`os.read` is a low-level function which takes a file descriptor, a small +integer representing the opened file. :func:`os.popen` creates a high-level +file object, the same type returned by the built-in :func:`open` function. +Thus, to read *n* bytes from a pipe *p* created with :func:`os.popen`, you need to +use ``p.read(n)``. + + +.. XXX update to use subprocess. See the :ref:`subprocess-replacements` section. + + How do I run a subprocess with pipes connected to both input and output? + ------------------------------------------------------------------------ + + Use the :mod:`popen2` module. For example:: + + import popen2 + fromchild, tochild = popen2.popen2("command") + tochild.write("input\n") + tochild.flush() + output = fromchild.readline() + + Warning: in general it is unwise to do this because you can easily cause a + deadlock where your process is blocked waiting for output from the child + while the child is blocked waiting for input from you. This can be caused + by the parent expecting the child to output more text than it does or + by data being stuck in stdio buffers due to lack of flushing. + The Python parent can of course explicitly flush the data it sends to the + child before it reads any output, but if the child is a naive C program it + may have been written to never explicitly flush its output, even if it is + interactive, since flushing is normally automatic. + + Note that a deadlock is also possible if you use :func:`popen3` to read + stdout and stderr. If one of the two is too large for the internal buffer + (increasing the buffer size does not help) and you ``read()`` the other one + first, there is a deadlock, too. + + Note on a bug in popen2: unless your program calls ``wait()`` or + ``waitpid()``, finished child processes are never removed, and eventually + calls to popen2 will fail because of a limit on the number of child + processes. Calling :func:`os.waitpid` with the :data:`os.WNOHANG` option can + prevent this; a good place to insert such a call would be before calling + ``popen2`` again. + + In many cases, all you really need is to run some data through a command and + get the result back. Unless the amount of data is very large, the easiest + way to do this is to write it to a temporary file and run the command with + that temporary file as input. The standard module :mod:`tempfile` exports a + :func:`~tempfile.mktemp` function to generate unique temporary file names. :: + + import tempfile + import os + + class Popen3: + """ + This is a deadlock-safe version of popen that returns + an object with errorlevel, out (a string) and err (a string). + (capturestderr may not work under windows.) + Example: print(Popen3('grep spam','\n\nhere spam\n\n').out) + """ + def __init__(self,command,input=None,capturestderr=None): + outfile=tempfile.mktemp() + command="( %s ) > %s" % (command,outfile) + if input: + infile=tempfile.mktemp() + open(infile,"w").write(input) + command=command+" <"+infile + if capturestderr: + errfile=tempfile.mktemp() + command=command+" 2>"+errfile + self.errorlevel=os.system(command) >> 8 + self.out=open(outfile,"r").read() + os.remove(outfile) + if input: + os.remove(infile) + if capturestderr: + self.err=open(errfile,"r").read() + os.remove(errfile) + + Note that many interactive programs (e.g. vi) don't work well with pipes + substituted for standard input and output. You will have to use pseudo ttys + ("ptys") instead of pipes. Or you can use a Python interface to Don Libes' + "expect" library. A Python extension that interfaces to expect is called + "expy" and available from https://expectpy.sourceforge.net. A pure Python + solution that works like expect is `pexpect + <https://pypi.org/project/pexpect/>`_. + + +How do I access the serial (RS232) port? +---------------------------------------- + +For Win32, OSX, Linux, BSD, Jython, IronPython: + + https://pypi.org/project/pyserial/ + +For Unix, see a Usenet post by Mitch Chapman: + + https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com + + +Why doesn't closing sys.stdout (stdin, stderr) really close it? +--------------------------------------------------------------- + +Python :term:`file objects <file object>` are a high-level layer of +abstraction on low-level C file descriptors. + +For most file objects you create in Python via the built-in :func:`open` +function, ``f.close()`` marks the Python file object as being closed from +Python's point of view, and also arranges to close the underlying C file +descriptor. This also happens automatically in ``f``'s destructor, when +``f`` becomes garbage. + +But stdin, stdout and stderr are treated specially by Python, because of the +special status also given to them by C. Running ``sys.stdout.close()`` marks +the Python-level file object as being closed, but does *not* close the +associated C file descriptor. + +To close the underlying C file descriptor for one of these three, you should +first be sure that's what you really want to do (e.g., you may confuse +extension modules trying to do I/O). If it is, use :func:`os.close`:: + + os.close(stdin.fileno()) + os.close(stdout.fileno()) + os.close(stderr.fileno()) + +Or you can use the numeric constants 0, 1 and 2, respectively. + + +Network/Internet Programming +============================ + +What WWW tools are there for Python? +------------------------------------ + +See the chapters titled :ref:`internet` and :ref:`netdata` in the Library +Reference Manual. Python has many modules that will help you build server-side +and client-side web systems. + +.. XXX check if wiki page is still up to date + +A summary of available frameworks is maintained by Paul Boddie at +https://wiki.python.org/moin/WebProgramming\ . + +Cameron Laird maintains a useful set of pages about Python web technologies at +https://web.archive.org/web/20210224183619/http://phaseit.net/claird/comp.lang.python/web_python. + + +How can I mimic CGI form submission (METHOD=POST)? +-------------------------------------------------- + +I would like to retrieve web pages that are the result of POSTing a form. Is +there existing code that would let me do this easily? + +Yes. Here's a simple example that uses :mod:`urllib.request`:: + + #!/usr/local/bin/python + + import urllib.request + + # build the query string + qs = "First=Josephine&MI=Q&Last=Public" + + # connect and send the server a path + req = urllib.request.urlopen('http://www.some-server.out-there' + '/cgi-bin/some-cgi-script', data=qs) + with req: + msg, hdrs = req.read(), req.info() + +Note that in general for percent-encoded POST operations, query strings must be +quoted using :func:`urllib.parse.urlencode`. For example, to send +``name=Guy Steele, Jr.``:: + + >>> import urllib.parse + >>> urllib.parse.urlencode({'name': 'Guy Steele, Jr.'}) + 'name=Guy+Steele%2C+Jr.' + +.. seealso:: :ref:`urllib-howto` for extensive examples. + + +What module should I use to help with generating HTML? +------------------------------------------------------ + +.. XXX add modern template languages + +You can find a collection of useful links on the `Web Programming wiki page +<https://wiki.python.org/moin/WebProgramming>`_. + + +How do I send mail from a Python script? +---------------------------------------- + +Use the standard library module :mod:`smtplib`. + +Here's a very simple interactive mail sender that uses it. This method will +work on any host that supports an SMTP listener. :: + + import sys, smtplib + + fromaddr = input("From: ") + toaddrs = input("To: ").split(',') + print("Enter message, end with ^D:") + msg = '' + while True: + line = sys.stdin.readline() + if not line: + break + msg += line + + # The actual mail send + server = smtplib.SMTP('localhost') + server.sendmail(fromaddr, toaddrs, msg) + server.quit() + +A Unix-only alternative uses sendmail. The location of the sendmail program +varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes +``/usr/sbin/sendmail``. The sendmail manual page will help you out. Here's +some sample code:: + + import os + + SENDMAIL = "/usr/sbin/sendmail" # sendmail location + p = os.popen("%s -t -i" % SENDMAIL, "w") + p.write("To: receiver@example.com\n") + p.write("Subject: test\n") + p.write("\n") # blank line separating headers from body + p.write("Some text\n") + p.write("some more text\n") + sts = p.close() + if sts != 0: + print("Sendmail exit status", sts) + + +How do I avoid blocking in the connect() method of a socket? +------------------------------------------------------------ + +The :mod:`select` module is commonly used to help with asynchronous I/O on +sockets. + +To prevent the TCP connect from blocking, you can set the socket to non-blocking +mode. Then when you do the :meth:`socket.connect`, you will either connect immediately +(unlikely) or get an exception that contains the error number as ``.errno``. +``errno.EINPROGRESS`` indicates that the connection is in progress, but hasn't +finished yet. Different OSes will return different values, so you're going to +have to check what's returned on your system. + +You can use the :meth:`socket.connect_ex` method to avoid creating an exception. It will +just return the errno value. To poll, you can call :meth:`socket.connect_ex` again later +-- ``0`` or ``errno.EISCONN`` indicate that you're connected -- or you can pass this +socket to :meth:`select.select` to check if it's writable. + +.. note:: + The :mod:`asyncio` module provides a general purpose single-threaded and + concurrent asynchronous library, which can be used for writing non-blocking + network code. + The third-party `Twisted <https://twisted.org/>`_ library is + a popular and feature-rich alternative. + + +Databases +========= + +Are there any interfaces to database packages in Python? +-------------------------------------------------------- + +Yes. + +Interfaces to disk-based hashes such as :mod:`DBM <dbm.ndbm>` and :mod:`GDBM +<dbm.gnu>` are also included with standard Python. There is also the +:mod:`sqlite3` module, which provides a lightweight disk-based relational +database. + +Support for most relational databases is available. See the +`DatabaseProgramming wiki page +<https://wiki.python.org/moin/DatabaseProgramming>`_ for details. + + +How do you implement persistent objects in Python? +-------------------------------------------------- + +The :mod:`pickle` library module solves this in a very general way (though you +still can't store things like open files, sockets or windows), and the +:mod:`shelve` library module uses pickle and (g)dbm to create persistent +mappings containing arbitrary Python objects. + + +Mathematics and Numerics +======================== + +How do I generate random numbers in Python? +------------------------------------------- + +The standard module :mod:`random` implements a random number generator. Usage +is simple:: + + import random + random.random() + +This returns a random floating point number in the range [0, 1). + +There are also many other specialized generators in this module, such as: + +* ``randrange(a, b)`` chooses an integer in the range [a, b). +* ``uniform(a, b)`` chooses a floating point number in the range [a, b). +* ``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution. + +Some higher-level functions operate on sequences directly, such as: + +* ``choice(S)`` chooses a random element from a given sequence. +* ``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly. + +There's also a ``Random`` class you can instantiate to create independent +multiple random number generators.
diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst new file mode 100644 index 0000000..ab5618d --- /dev/null +++ b/Doc/faq/programming.rst
@@ -0,0 +1,2216 @@ +:tocdepth: 2 + +=============== +Programming FAQ +=============== + +.. only:: html + + .. contents:: + +General Questions +================= + +Is there a source code level debugger with breakpoints, single-stepping, etc.? +------------------------------------------------------------------------------ + +Yes. + +Several debuggers for Python are described below, and the built-in function +:func:`breakpoint` allows you to drop into any of them. + +The pdb module is a simple but adequate console-mode debugger for Python. It is +part of the standard Python library, and is :mod:`documented in the Library +Reference Manual <pdb>`. You can also write your own debugger by using the code +for pdb as an example. + +The IDLE interactive development environment, which is part of the standard +Python distribution (normally available as +`Tools/scripts/idle3 <https://github.com/python/cpython/blob/main/Tools/scripts/idle3>`_), +includes a graphical debugger. + +PythonWin is a Python IDE that includes a GUI debugger based on pdb. The +PythonWin debugger colors breakpoints and has quite a few cool features such as +debugging non-PythonWin programs. PythonWin is available as part of +`pywin32 <https://github.com/mhammond/pywin32>`_ project and +as a part of the +`ActivePython <https://www.activestate.com/products/python/>`_ distribution. + +`Eric <https://eric-ide.python-projects.org/>`_ is an IDE built on PyQt +and the Scintilla editing component. + +`trepan3k <https://github.com/rocky/python3-trepan/>`_ is a gdb-like debugger. + +`Visual Studio Code <https://code.visualstudio.com/>`_ is an IDE with debugging +tools that integrates with version-control software. + +There are a number of commercial Python IDEs that include graphical debuggers. +They include: + +* `Wing IDE <https://wingware.com/>`_ +* `Komodo IDE <https://www.activestate.com/products/komodo-ide/>`_ +* `PyCharm <https://www.jetbrains.com/pycharm/>`_ + + +Are there tools to help find bugs or perform static analysis? +------------------------------------------------------------- + +Yes. + +`Pylint <https://pylint.pycqa.org/en/latest/index.html>`_ and +`Pyflakes <https://github.com/PyCQA/pyflakes>`_ do basic checking that will +help you catch bugs sooner. + +Static type checkers such as `Mypy <https://mypy-lang.org/>`_, +`Pyre <https://pyre-check.org/>`_, and +`Pytype <https://github.com/google/pytype>`_ can check type hints in Python +source code. + + +.. _faq-create-standalone-binary: + +How can I create a stand-alone binary from a Python script? +----------------------------------------------------------- + +You don't need the ability to compile Python to C code if all you want is a +stand-alone program that users can download and run without having to install +the Python distribution first. There are a number of tools that determine the +set of modules required by a program and bind these modules together with a +Python binary to produce a single executable. + +One is to use the freeze tool, which is included in the Python source tree as +`Tools/freeze <https://github.com/python/cpython/tree/main/Tools/freeze>`_. +It converts Python byte code to C arrays; with a C compiler you can +embed all your modules into a new program, which is then linked with the +standard Python modules. + +It works by scanning your source recursively for import statements (in both +forms) and looking for the modules in the standard Python path as well as in the +source directory (for built-in modules). It then turns the bytecode for modules +written in Python into C code (array initializers that can be turned into code +objects using the marshal module) and creates a custom-made config file that +only contains those built-in modules which are actually used in the program. It +then compiles the generated C code and links it with the rest of the Python +interpreter to form a self-contained binary which acts exactly like your script. + +The following packages can help with the creation of console and GUI +executables: + +* `Nuitka <https://nuitka.net/>`_ (Cross-platform) +* `PyInstaller <https://pyinstaller.org/>`_ (Cross-platform) +* `PyOxidizer <https://pyoxidizer.readthedocs.io/en/stable/>`_ (Cross-platform) +* `cx_Freeze <https://marcelotduarte.github.io/cx_Freeze/>`_ (Cross-platform) +* `py2app <https://github.com/ronaldoussoren/py2app>`_ (macOS only) +* `py2exe <https://www.py2exe.org/>`_ (Windows only) + +Are there coding standards or a style guide for Python programs? +---------------------------------------------------------------- + +Yes. The coding style required for standard library modules is documented as +:pep:`8`. + + +Core Language +============= + +.. _faq-unboundlocalerror: + +Why am I getting an UnboundLocalError when the variable has a value? +-------------------------------------------------------------------- + +It can be a surprise to get the :exc:`UnboundLocalError` in previously working +code when it is modified by adding an assignment statement somewhere in +the body of a function. + +This code: + + >>> x = 10 + >>> def bar(): + ... print(x) + ... + >>> bar() + 10 + +works, but this code: + + >>> x = 10 + >>> def foo(): + ... print(x) + ... x += 1 + +results in an :exc:`!UnboundLocalError`: + + >>> foo() + Traceback (most recent call last): + ... + UnboundLocalError: local variable 'x' referenced before assignment + +This is because when you make an assignment to a variable in a scope, that +variable becomes local to that scope and shadows any similarly named variable +in the outer scope. Since the last statement in foo assigns a new value to +``x``, the compiler recognizes it as a local variable. Consequently when the +earlier ``print(x)`` attempts to print the uninitialized local variable and +an error results. + +In the example above you can access the outer scope variable by declaring it +global: + + >>> x = 10 + >>> def foobar(): + ... global x + ... print(x) + ... x += 1 + ... + >>> foobar() + 10 + +This explicit declaration is required in order to remind you that (unlike the +superficially analogous situation with class and instance variables) you are +actually modifying the value of the variable in the outer scope: + + >>> print(x) + 11 + +You can do a similar thing in a nested scope using the :keyword:`nonlocal` +keyword: + + >>> def foo(): + ... x = 10 + ... def bar(): + ... nonlocal x + ... print(x) + ... x += 1 + ... bar() + ... print(x) + ... + >>> foo() + 10 + 11 + + +What are the rules for local and global variables in Python? +------------------------------------------------------------ + +In Python, variables that are only referenced inside a function are implicitly +global. If a variable is assigned a value anywhere within the function's body, +it's assumed to be a local unless explicitly declared as global. + +Though a bit surprising at first, a moment's consideration explains this. On +one hand, requiring :keyword:`global` for assigned variables provides a bar +against unintended side-effects. On the other hand, if ``global`` was required +for all global references, you'd be using ``global`` all the time. You'd have +to declare as global every reference to a built-in function or to a component of +an imported module. This clutter would defeat the usefulness of the ``global`` +declaration for identifying side-effects. + + +Why do lambdas defined in a loop with different values all return the same result? +---------------------------------------------------------------------------------- + +Assume you use a for loop to define a few different lambdas (or even plain +functions), e.g.:: + + >>> squares = [] + >>> for x in range(5): + ... squares.append(lambda: x**2) + +This gives you a list that contains 5 lambdas that calculate ``x**2``. You +might expect that, when called, they would return, respectively, ``0``, ``1``, +``4``, ``9``, and ``16``. However, when you actually try you will see that +they all return ``16``:: + + >>> squares[2]() + 16 + >>> squares[4]() + 16 + +This happens because ``x`` is not local to the lambdas, but is defined in +the outer scope, and it is accessed when the lambda is called --- not when it +is defined. At the end of the loop, the value of ``x`` is ``4``, so all the +functions now return ``4**2``, i.e. ``16``. You can also verify this by +changing the value of ``x`` and see how the results of the lambdas change:: + + >>> x = 8 + >>> squares[2]() + 64 + +In order to avoid this, you need to save the values in variables local to the +lambdas, so that they don't rely on the value of the global ``x``:: + + >>> squares = [] + >>> for x in range(5): + ... squares.append(lambda n=x: n**2) + +Here, ``n=x`` creates a new variable ``n`` local to the lambda and computed +when the lambda is defined so that it has the same value that ``x`` had at +that point in the loop. This means that the value of ``n`` will be ``0`` +in the first lambda, ``1`` in the second, ``2`` in the third, and so on. +Therefore each lambda will now return the correct result:: + + >>> squares[2]() + 4 + >>> squares[4]() + 16 + +Note that this behaviour is not peculiar to lambdas, but applies to regular +functions too. + + +How do I share global variables across modules? +------------------------------------------------ + +The canonical way to share information across modules within a single program is +to create a special module (often called config or cfg). Just import the config +module in all modules of your application; the module then becomes available as +a global name. Because there is only one instance of each module, any changes +made to the module object get reflected everywhere. For example: + +config.py:: + + x = 0 # Default value of the 'x' configuration setting + +mod.py:: + + import config + config.x = 1 + +main.py:: + + import config + import mod + print(config.x) + +Note that using a module is also the basis for implementing the singleton design +pattern, for the same reason. + + +What are the "best practices" for using import in a module? +----------------------------------------------------------- + +In general, don't use ``from modulename import *``. Doing so clutters the +importer's namespace, and makes it much harder for linters to detect undefined +names. + +Import modules at the top of a file. Doing so makes it clear what other modules +your code requires and avoids questions of whether the module name is in scope. +Using one import per line makes it easy to add and delete module imports, but +using multiple imports per line uses less screen space. + +It's good practice if you import modules in the following order: + +1. standard library modules -- e.g. :mod:`sys`, :mod:`os`, :mod:`argparse`, :mod:`re` +2. third-party library modules (anything installed in Python's site-packages + directory) -- e.g. :mod:`!dateutil`, :mod:`!requests`, :mod:`!PIL.Image` +3. locally developed modules + +It is sometimes necessary to move imports to a function or class to avoid +problems with circular imports. Gordon McMillan says: + + Circular imports are fine where both modules use the "import <module>" form + of import. They fail when the 2nd module wants to grab a name out of the + first ("from module import name") and the import is at the top level. That's + because names in the 1st are not yet available, because the first module is + busy importing the 2nd. + +In this case, if the second module is only used in one function, then the import +can easily be moved into that function. By the time the import is called, the +first module will have finished initializing, and the second module can do its +import. + +It may also be necessary to move imports out of the top level of code if some of +the modules are platform-specific. In that case, it may not even be possible to +import all of the modules at the top of the file. In this case, importing the +correct modules in the corresponding platform-specific code is a good option. + +Only move imports into a local scope, such as inside a function definition, if +it's necessary to solve a problem such as avoiding a circular import or are +trying to reduce the initialization time of a module. This technique is +especially helpful if many of the imports are unnecessary depending on how the +program executes. You may also want to move imports into a function if the +modules are only ever used in that function. Note that loading a module the +first time may be expensive because of the one time initialization of the +module, but loading a module multiple times is virtually free, costing only a +couple of dictionary lookups. Even if the module name has gone out of scope, +the module is probably available in :data:`sys.modules`. + + +Why are default values shared between objects? +---------------------------------------------- + +This type of bug commonly bites neophyte programmers. Consider this function:: + + def foo(mydict={}): # Danger: shared reference to one dict for all calls + ... compute something ... + mydict[key] = value + return mydict + +The first time you call this function, ``mydict`` contains a single item. The +second time, ``mydict`` contains two items because when ``foo()`` begins +executing, ``mydict`` starts out with an item already in it. + +It is often expected that a function call creates new objects for default +values. This is not what happens. Default values are created exactly once, when +the function is defined. If that object is changed, like the dictionary in this +example, subsequent calls to the function will refer to this changed object. + +By definition, immutable objects such as numbers, strings, tuples, and ``None``, +are safe from change. Changes to mutable objects such as dictionaries, lists, +and class instances can lead to confusion. + +Because of this feature, it is good programming practice to not use mutable +objects as default values. Instead, use ``None`` as the default value and +inside the function, check if the parameter is ``None`` and create a new +list/dictionary/whatever if it is. For example, don't write:: + + def foo(mydict={}): + ... + +but:: + + def foo(mydict=None): + if mydict is None: + mydict = {} # create a new dict for local namespace + +This feature can be useful. When you have a function that's time-consuming to +compute, a common technique is to cache the parameters and the resulting value +of each call to the function, and return the cached value if the same value is +requested again. This is called "memoizing", and can be implemented like this:: + + # Callers can only provide two parameters and optionally pass _cache by keyword + def expensive(arg1, arg2, *, _cache={}): + if (arg1, arg2) in _cache: + return _cache[(arg1, arg2)] + + # Calculate the value + result = ... expensive computation ... + _cache[(arg1, arg2)] = result # Store result in the cache + return result + +You could use a global variable containing a dictionary instead of the default +value; it's a matter of taste. + + +How can I pass optional or keyword parameters from one function to another? +--------------------------------------------------------------------------- + +Collect the arguments using the ``*`` and ``**`` specifiers in the function's +parameter list; this gives you the positional arguments as a tuple and the +keyword arguments as a dictionary. You can then pass these arguments when +calling another function by using ``*`` and ``**``:: + + def f(x, *args, **kwargs): + ... + kwargs['width'] = '14.3c' + ... + g(x, *args, **kwargs) + + +.. index:: + single: argument; difference from parameter + single: parameter; difference from argument + +.. _faq-argument-vs-parameter: + +What is the difference between arguments and parameters? +-------------------------------------------------------- + +:term:`Parameters <parameter>` are defined by the names that appear in a +function definition, whereas :term:`arguments <argument>` are the values +actually passed to a function when calling it. Parameters define what +:term:`kind of arguments <parameter>` a function can accept. For +example, given the function definition:: + + def func(foo, bar=None, **kwargs): + pass + +*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling +``func``, for example:: + + func(42, bar=314, extra=somevar) + +the values ``42``, ``314``, and ``somevar`` are arguments. + + +Why did changing list 'y' also change list 'x'? +------------------------------------------------ + +If you wrote code like:: + + >>> x = [] + >>> y = x + >>> y.append(10) + >>> y + [10] + >>> x + [10] + +you might be wondering why appending an element to ``y`` changed ``x`` too. + +There are two factors that produce this result: + +1) Variables are simply names that refer to objects. Doing ``y = x`` doesn't + create a copy of the list -- it creates a new variable ``y`` that refers to + the same object ``x`` refers to. This means that there is only one object + (the list), and both ``x`` and ``y`` refer to it. +2) Lists are :term:`mutable`, which means that you can change their content. + +After the call to :meth:`~list.append`, the content of the mutable object has +changed from ``[]`` to ``[10]``. Since both the variables refer to the same +object, using either name accesses the modified value ``[10]``. + +If we instead assign an immutable object to ``x``:: + + >>> x = 5 # ints are immutable + >>> y = x + >>> x = x + 1 # 5 can't be mutated, we are creating a new object here + >>> x + 6 + >>> y + 5 + +we can see that in this case ``x`` and ``y`` are not equal anymore. This is +because integers are :term:`immutable`, and when we do ``x = x + 1`` we are not +mutating the int ``5`` by incrementing its value; instead, we are creating a +new object (the int ``6``) and assigning it to ``x`` (that is, changing which +object ``x`` refers to). After this assignment we have two objects (the ints +``6`` and ``5``) and two variables that refer to them (``x`` now refers to +``6`` but ``y`` still refers to ``5``). + +Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the +object, whereas superficially similar operations (for example ``y = y + [10]`` +and :func:`sorted(y) <sorted>`) create a new object. In general in Python (and in all cases +in the standard library) a method that mutates an object will return ``None`` +to help avoid getting the two types of operations confused. So if you +mistakenly write ``y.sort()`` thinking it will give you a sorted copy of ``y``, +you'll instead end up with ``None``, which will likely cause your program to +generate an easily diagnosed error. + +However, there is one class of operations where the same operation sometimes +has different behaviors with different types: the augmented assignment +operators. For example, ``+=`` mutates lists but not tuples or ints (``a_list ++= [1, 2, 3]`` is equivalent to ``a_list.extend([1, 2, 3])`` and mutates +``a_list``, whereas ``some_tuple += (1, 2, 3)`` and ``some_int += 1`` create +new objects). + +In other words: + +* If we have a mutable object (:class:`list`, :class:`dict`, :class:`set`, + etc.), we can use some specific operations to mutate it and all the variables + that refer to it will see the change. +* If we have an immutable object (:class:`str`, :class:`int`, :class:`tuple`, + etc.), all the variables that refer to it will always see the same value, + but operations that transform that value into a new value always return a new + object. + +If you want to know if two variables refer to the same object or not, you can +use the :keyword:`is` operator, or the built-in function :func:`id`. + + +How do I write a function with output parameters (call by reference)? +--------------------------------------------------------------------- + +Remember that arguments are passed by assignment in Python. Since assignment +just creates references to objects, there's no alias between an argument name in +the caller and callee, and so no call-by-reference per se. You can achieve the +desired effect in a number of ways. + +1) By returning a tuple of the results:: + + >>> def func1(a, b): + ... a = 'new-value' # a and b are local names + ... b = b + 1 # assigned to new objects + ... return a, b # return new values + ... + >>> x, y = 'old-value', 99 + >>> func1(x, y) + ('new-value', 100) + + This is almost always the clearest solution. + +2) By using global variables. This isn't thread-safe, and is not recommended. + +3) By passing a mutable (changeable in-place) object:: + + >>> def func2(a): + ... a[0] = 'new-value' # 'a' references a mutable list + ... a[1] = a[1] + 1 # changes a shared object + ... + >>> args = ['old-value', 99] + >>> func2(args) + >>> args + ['new-value', 100] + +4) By passing in a dictionary that gets mutated:: + + >>> def func3(args): + ... args['a'] = 'new-value' # args is a mutable dictionary + ... args['b'] = args['b'] + 1 # change it in-place + ... + >>> args = {'a': 'old-value', 'b': 99} + >>> func3(args) + >>> args + {'a': 'new-value', 'b': 100} + +5) Or bundle up values in a class instance:: + + >>> class Namespace: + ... def __init__(self, /, **args): + ... for key, value in args.items(): + ... setattr(self, key, value) + ... + >>> def func4(args): + ... args.a = 'new-value' # args is a mutable Namespace + ... args.b = args.b + 1 # change object in-place + ... + >>> args = Namespace(a='old-value', b=99) + >>> func4(args) + >>> vars(args) + {'a': 'new-value', 'b': 100} + + + There's almost never a good reason to get this complicated. + +Your best choice is to return a tuple containing the multiple results. + + +How do you make a higher order function in Python? +-------------------------------------------------- + +You have two choices: you can use nested scopes or you can use callable objects. +For example, suppose you wanted to define ``linear(a,b)`` which returns a +function ``f(x)`` that computes the value ``a*x+b``. Using nested scopes:: + + def linear(a, b): + def result(x): + return a * x + b + return result + +Or using a callable object:: + + class linear: + + def __init__(self, a, b): + self.a, self.b = a, b + + def __call__(self, x): + return self.a * x + self.b + +In both cases, :: + + taxes = linear(0.3, 2) + +gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``. + +The callable object approach has the disadvantage that it is a bit slower and +results in slightly longer code. However, note that a collection of callables +can share their signature via inheritance:: + + class exponential(linear): + # __init__ inherited + def __call__(self, x): + return self.a * (x ** self.b) + +Object can encapsulate state for several methods:: + + class counter: + + value = 0 + + def set(self, x): + self.value = x + + def up(self): + self.value = self.value + 1 + + def down(self): + self.value = self.value - 1 + + count = counter() + inc, dec, reset = count.up, count.down, count.set + +Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the +same counting variable. + + +How do I copy an object in Python? +---------------------------------- + +In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general case. +Not all objects can be copied, but most can. + +Some objects can be copied more easily. Dictionaries have a :meth:`~dict.copy` +method:: + + newdict = olddict.copy() + +Sequences can be copied by slicing:: + + new_l = l[:] + + +How can I find the methods or attributes of an object? +------------------------------------------------------ + +For an instance ``x`` of a user-defined class, :func:`dir(x) <dir>` returns an alphabetized +list of the names containing the instance attributes and methods and attributes +defined by its class. + + +How can my code discover the name of an object? +----------------------------------------------- + +Generally speaking, it can't, because objects don't really have names. +Essentially, assignment always binds a name to a value; the same is true of +``def`` and ``class`` statements, but in that case the value is a +callable. Consider the following code:: + + >>> class A: + ... pass + ... + >>> B = A + >>> a = B() + >>> b = a + >>> print(b) + <__main__.A object at 0x16D07CC> + >>> print(a) + <__main__.A object at 0x16D07CC> + +Arguably the class has a name: even though it is bound to two names and invoked +through the name ``B`` the created instance is still reported as an instance of +class ``A``. However, it is impossible to say whether the instance's name is ``a`` or +``b``, since both names are bound to the same value. + +Generally speaking it should not be necessary for your code to "know the names" +of particular values. Unless you are deliberately writing introspective +programs, this is usually an indication that a change of approach might be +beneficial. + +In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer to +this question: + + The same way as you get the name of that cat you found on your porch: the cat + (object) itself cannot tell you its name, and it doesn't really care -- so + the only way to find out what it's called is to ask all your neighbours + (namespaces) if it's their cat (object)... + + ....and don't be surprised if you'll find that it's known by many names, or + no name at all! + + +What's up with the comma operator's precedence? +----------------------------------------------- + +Comma is not an operator in Python. Consider this session:: + + >>> "a" in "b", "a" + (False, 'a') + +Since the comma is not an operator, but a separator between expressions the +above is evaluated as if you had entered:: + + ("a" in "b"), "a" + +not:: + + "a" in ("b", "a") + +The same is true of the various assignment operators (``=``, ``+=`` etc). They +are not truly operators but syntactic delimiters in assignment statements. + + +Is there an equivalent of C's "?:" ternary operator? +---------------------------------------------------- + +Yes, there is. The syntax is as follows:: + + [on_true] if [expression] else [on_false] + + x, y = 50, 25 + small = x if x < y else y + +Before this syntax was introduced in Python 2.5, a common idiom was to use +logical operators:: + + [expression] and [on_true] or [on_false] + +However, this idiom is unsafe, as it can give wrong results when *on_true* +has a false boolean value. Therefore, it is always better to use +the ``... if ... else ...`` form. + + +Is it possible to write obfuscated one-liners in Python? +-------------------------------------------------------- + +Yes. Usually this is done by nesting :keyword:`lambda` within +:keyword:`!lambda`. See the following three examples, slightly adapted from Ulf Bartelt:: + + from functools import reduce + + # Primes < 1000 + print(list(filter(None,map(lambda y:y*reduce(lambda x,y:x*y!=0, + map(lambda x,y=y:y%x,range(2,int(pow(y,0.5)+1))),1),range(2,1000))))) + + # First 10 Fibonacci numbers + print(list(map(lambda x,f=lambda x,f:(f(x-1,f)+f(x-2,f)) if x>1 else 1: + f(x,f), range(10)))) + + # Mandelbrot set + print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+'\n'+y,map(lambda y, + Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM, + Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro, + i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y + >=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr( + 64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy + ))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24)) + # \___ ___/ \___ ___/ | | |__ lines on screen + # V V | |______ columns on screen + # | | |__________ maximum of "iterations" + # | |_________________ range on y axis + # |____________________________ range on x axis + +Don't try this at home, kids! + + +.. _faq-positional-only-arguments: + +What does the slash(/) in the parameter list of a function mean? +---------------------------------------------------------------- + +A slash in the argument list of a function denotes that the parameters prior to +it are positional-only. Positional-only parameters are the ones without an +externally usable name. Upon calling a function that accepts positional-only +parameters, arguments are mapped to parameters based solely on their position. +For example, :func:`divmod` is a function that accepts positional-only +parameters. Its documentation looks like this:: + + >>> help(divmod) + Help on built-in function divmod in module builtins: + + divmod(x, y, /) + Return the tuple (x//y, x%y). Invariant: div*y + mod == x. + +The slash at the end of the parameter list means that both parameters are +positional-only. Thus, calling :func:`divmod` with keyword arguments would lead +to an error:: + + >>> divmod(x=3, y=4) + Traceback (most recent call last): + File "<stdin>", line 1, in <module> + TypeError: divmod() takes no keyword arguments + + +Numbers and strings +=================== + +How do I specify hexadecimal and octal integers? +------------------------------------------------ + +To specify an octal digit, precede the octal value with a zero, and then a lower +or uppercase "o". For example, to set the variable "a" to the octal value "10" +(8 in decimal), type:: + + >>> a = 0o10 + >>> a + 8 + +Hexadecimal is just as easy. Simply precede the hexadecimal number with a zero, +and then a lower or uppercase "x". Hexadecimal digits can be specified in lower +or uppercase. For example, in the Python interpreter:: + + >>> a = 0xa5 + >>> a + 165 + >>> b = 0XB2 + >>> b + 178 + + +Why does -22 // 10 return -3? +----------------------------- + +It's primarily driven by the desire that ``i % j`` have the same sign as ``j``. +If you want that, and also want:: + + i == (i // j) * j + (i % j) + +then integer division has to return the floor. C also requires that identity to +hold, and then compilers that truncate ``i // j`` need to make ``i % j`` have +the same sign as ``i``. + +There are few real use cases for ``i % j`` when ``j`` is negative. When ``j`` +is positive, there are many, and in virtually all of them it's more useful for +``i % j`` to be ``>= 0``. If the clock says 10 now, what did it say 200 hours +ago? ``-190 % 12 == 2`` is useful; ``-190 % 12 == -10`` is a bug waiting to +bite. + + +How do I get int literal attribute instead of SyntaxError? +---------------------------------------------------------- + +Trying to lookup an ``int`` literal attribute in the normal manner gives +a :exc:`SyntaxError` because the period is seen as a decimal point:: + + >>> 1.__class__ + File "<stdin>", line 1 + 1.__class__ + ^ + SyntaxError: invalid decimal literal + +The solution is to separate the literal from the period +with either a space or parentheses. + + >>> 1 .__class__ + <class 'int'> + >>> (1).__class__ + <class 'int'> + + +How do I convert a string to a number? +-------------------------------------- + +For integers, use the built-in :func:`int` type constructor, e.g. ``int('144') +== 144``. Similarly, :func:`float` converts to floating-point, +e.g. ``float('144') == 144.0``. + +By default, these interpret the number as decimal, so that ``int('0144') == +144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. ``int(string, +base)`` takes the base to convert from as a second optional argument, so ``int( +'0x144', 16) == 324``. If the base is specified as 0, the number is interpreted +using Python's rules: a leading '0o' indicates octal, and '0x' indicates a hex +number. + +Do not use the built-in function :func:`eval` if all you need is to convert +strings to numbers. :func:`eval` will be significantly slower and it presents a +security risk: someone could pass you a Python expression that might have +unwanted side effects. For example, someone could pass +``__import__('os').system("rm -rf $HOME")`` which would erase your home +directory. + +:func:`eval` also has the effect of interpreting numbers as Python expressions, +so that e.g. ``eval('09')`` gives a syntax error because Python does not allow +leading '0' in a decimal number (except '0'). + + +How do I convert a number to a string? +-------------------------------------- + +To convert, e.g., the number ``144`` to the string ``'144'``, use the built-in type +constructor :func:`str`. If you want a hexadecimal or octal representation, use +the built-in functions :func:`hex` or :func:`oct`. For fancy formatting, see +the :ref:`f-strings` and :ref:`formatstrings` sections, +e.g. ``"{:04d}".format(144)`` yields +``'0144'`` and ``"{:.3f}".format(1.0/3.0)`` yields ``'0.333'``. + + +How do I modify a string in place? +---------------------------------- + +You can't, because strings are immutable. In most situations, you should +simply construct a new string from the various parts you want to assemble +it from. However, if you need an object with the ability to modify in-place +unicode data, try using an :class:`io.StringIO` object or the :mod:`array` +module:: + + >>> import io + >>> s = "Hello, world" + >>> sio = io.StringIO(s) + >>> sio.getvalue() + 'Hello, world' + >>> sio.seek(7) + 7 + >>> sio.write("there!") + 6 + >>> sio.getvalue() + 'Hello, there!' + + >>> import array + >>> a = array.array('u', s) + >>> print(a) + array('u', 'Hello, world') + >>> a[0] = 'y' + >>> print(a) + array('u', 'yello, world') + >>> a.tounicode() + 'yello, world' + + +How do I use strings to call functions/methods? +----------------------------------------------- + +There are various techniques. + +* The best is to use a dictionary that maps strings to functions. The primary + advantage of this technique is that the strings do not need to match the names + of the functions. This is also the primary technique used to emulate a case + construct:: + + def a(): + pass + + def b(): + pass + + dispatch = {'go': a, 'stop': b} # Note lack of parens for funcs + + dispatch[get_input()]() # Note trailing parens to call function + +* Use the built-in function :func:`getattr`:: + + import foo + getattr(foo, 'bar')() + + Note that :func:`getattr` works on any object, including classes, class + instances, modules, and so on. + + This is used in several places in the standard library, like this:: + + class Foo: + def do_foo(self): + ... + + def do_bar(self): + ... + + f = getattr(foo_instance, 'do_' + opname) + f() + + +* Use :func:`locals` to resolve the function name:: + + def myFunc(): + print("hello") + + fname = "myFunc" + + f = locals()[fname] + f() + + +Is there an equivalent to Perl's chomp() for removing trailing newlines from strings? +------------------------------------------------------------------------------------- + +You can use ``S.rstrip("\r\n")`` to remove all occurrences of any line +terminator from the end of the string ``S`` without removing other trailing +whitespace. If the string ``S`` represents more than one line, with several +empty lines at the end, the line terminators for all the blank lines will +be removed:: + + >>> lines = ("line 1 \r\n" + ... "\r\n" + ... "\r\n") + >>> lines.rstrip("\n\r") + 'line 1 ' + +Since this is typically only desired when reading text one line at a time, using +``S.rstrip()`` this way works well. + + +Is there a scanf() or sscanf() equivalent? +------------------------------------------ + +Not as such. + +For simple input parsing, the easiest approach is usually to split the line into +whitespace-delimited words using the :meth:`~str.split` method of string objects +and then convert decimal strings to numeric values using :func:`int` or +:func:`float`. :meth:`!split()` supports an optional "sep" parameter which is useful +if the line uses something other than whitespace as a separator. + +For more complicated input parsing, regular expressions are more powerful +than C's ``sscanf`` and better suited for the task. + + +What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean? +------------------------------------------------------------------- + +See the :ref:`unicode-howto`. + + +.. _faq-programming-raw-string-backslash: + +Can I end a raw string with an odd number of backslashes? +--------------------------------------------------------- + +A raw string ending with an odd number of backslashes will escape the string's quote:: + + >>> r'C:\this\will\not\work\' + File "<stdin>", line 1 + r'C:\this\will\not\work\' + ^ + SyntaxError: unterminated string literal (detected at line 1) + +There are several workarounds for this. One is to use regular strings and double +the backslashes:: + + >>> 'C:\\this\\will\\work\\' + 'C:\\this\\will\\work\\' + +Another is to concatenate a regular string containing an escaped backslash to the +raw string:: + + >>> r'C:\this\will\work' '\\' + 'C:\\this\\will\\work\\' + +It is also possible to use :func:`os.path.join` to append a backslash on Windows:: + + >>> os.path.join(r'C:\this\will\work', '') + 'C:\\this\\will\\work\\' + +Note that while a backslash will "escape" a quote for the purposes of +determining where the raw string ends, no escaping occurs when interpreting the +value of the raw string. That is, the backslash remains present in the value of +the raw string:: + + >>> r'backslash\'preserved' + "backslash\\'preserved" + +Also see the specification in the :ref:`language reference <strings>`. + +Performance +=========== + +My program is too slow. How do I speed it up? +--------------------------------------------- + +That's a tough one, in general. First, here are a list of things to +remember before diving further: + +* Performance characteristics vary across Python implementations. This FAQ + focuses on :term:`CPython`. +* Behaviour can vary across operating systems, especially when talking about + I/O or multi-threading. +* You should always find the hot spots in your program *before* attempting to + optimize any code (see the :mod:`profile` module). +* Writing benchmark scripts will allow you to iterate quickly when searching + for improvements (see the :mod:`timeit` module). +* It is highly recommended to have good code coverage (through unit testing + or any other technique) before potentially introducing regressions hidden + in sophisticated optimizations. + +That being said, there are many tricks to speed up Python code. Here are +some general principles which go a long way towards reaching acceptable +performance levels: + +* Making your algorithms faster (or changing to faster ones) can yield + much larger benefits than trying to sprinkle micro-optimization tricks + all over your code. + +* Use the right data structures. Study documentation for the :ref:`bltin-types` + and the :mod:`collections` module. + +* When the standard library provides a primitive for doing something, it is + likely (although not guaranteed) to be faster than any alternative you + may come up with. This is doubly true for primitives written in C, such + as builtins and some extension types. For example, be sure to use + either the :meth:`list.sort` built-in method or the related :func:`sorted` + function to do sorting (and see the :ref:`sortinghowto` for examples + of moderately advanced usage). + +* Abstractions tend to create indirections and force the interpreter to work + more. If the levels of indirection outweigh the amount of useful work + done, your program will be slower. You should avoid excessive abstraction, + especially under the form of tiny functions or methods (which are also often + detrimental to readability). + +If you have reached the limit of what pure Python can allow, there are tools +to take you further away. For example, `Cython <https://cython.org>`_ can +compile a slightly modified version of Python code into a C extension, and +can be used on many different platforms. Cython can take advantage of +compilation (and optional type annotations) to make your code significantly +faster than when interpreted. If you are confident in your C programming +skills, you can also :ref:`write a C extension module <extending-index>` +yourself. + +.. seealso:: + The wiki page devoted to `performance tips + <https://wiki.python.org/moin/PythonSpeed/PerformanceTips>`_. + +.. _efficient_string_concatenation: + +What is the most efficient way to concatenate many strings together? +-------------------------------------------------------------------- + +:class:`str` and :class:`bytes` objects are immutable, therefore concatenating +many strings together is inefficient as each concatenation creates a new +object. In the general case, the total runtime cost is quadratic in the +total string length. + +To accumulate many :class:`str` objects, the recommended idiom is to place +them into a list and call :meth:`str.join` at the end:: + + chunks = [] + for s in my_strings: + chunks.append(s) + result = ''.join(chunks) + +(another reasonably efficient idiom is to use :class:`io.StringIO`) + +To accumulate many :class:`bytes` objects, the recommended idiom is to extend +a :class:`bytearray` object using in-place concatenation (the ``+=`` operator):: + + result = bytearray() + for b in my_bytes_objects: + result += b + + +Sequences (Tuples/Lists) +======================== + +How do I convert between tuples and lists? +------------------------------------------ + +The type constructor ``tuple(seq)`` converts any sequence (actually, any +iterable) into a tuple with the same items in the same order. + +For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` +yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a copy +but returns the same object, so it is cheap to call :func:`tuple` when you +aren't sure that an object is already a tuple. + +The type constructor ``list(seq)`` converts any sequence or iterable into a list +with the same items in the same order. For example, ``list((1, 2, 3))`` yields +``[1, 2, 3]`` and ``list('abc')`` yields ``['a', 'b', 'c']``. If the argument +is a list, it makes a copy just like ``seq[:]`` would. + + +What's a negative index? +------------------------ + +Python sequences are indexed with positive numbers and negative numbers. For +positive numbers 0 is the first index 1 is the second index and so forth. For +negative indices -1 is the last index and -2 is the penultimate (next to last) +index and so forth. Think of ``seq[-n]`` as the same as ``seq[len(seq)-n]``. + +Using negative indices can be very convenient. For example ``S[:-1]`` is all of +the string except for its last character, which is useful for removing the +trailing newline from a string. + + +How do I iterate over a sequence in reverse order? +-------------------------------------------------- + +Use the :func:`reversed` built-in function:: + + for x in reversed(sequence): + ... # do something with x ... + +This won't touch your original sequence, but build a new copy with reversed +order to iterate over. + + +How do you remove duplicates from a list? +----------------------------------------- + +See the Python Cookbook for a long discussion of many ways to do this: + + https://code.activestate.com/recipes/52560/ + +If you don't mind reordering the list, sort it and then scan from the end of the +list, deleting duplicates as you go:: + + if mylist: + mylist.sort() + last = mylist[-1] + for i in range(len(mylist)-2, -1, -1): + if last == mylist[i]: + del mylist[i] + else: + last = mylist[i] + +If all elements of the list may be used as set keys (i.e. they are all +:term:`hashable`) this is often faster :: + + mylist = list(set(mylist)) + +This converts the list into a set, thereby removing duplicates, and then back +into a list. + + +How do you remove multiple items from a list +-------------------------------------------- + +As with removing duplicates, explicitly iterating in reverse with a +delete condition is one possibility. However, it is easier and faster +to use slice replacement with an implicit or explicit forward iteration. +Here are three variations.:: + + mylist[:] = filter(keep_function, mylist) + mylist[:] = (x for x in mylist if keep_condition) + mylist[:] = [x for x in mylist if keep_condition] + +The list comprehension may be fastest. + + +How do you make an array in Python? +----------------------------------- + +Use a list:: + + ["this", 1, "is", "an", "array"] + +Lists are equivalent to C or Pascal arrays in their time complexity; the primary +difference is that a Python list can contain objects of many different types. + +The ``array`` module also provides methods for creating arrays of fixed types +with compact representations, but they are slower to index than lists. Also +note that `NumPy <https://numpy.org/>`_ +and other third party packages define array-like structures with +various characteristics as well. + +To get Lisp-style linked lists, you can emulate *cons cells* using tuples:: + + lisp_list = ("like", ("this", ("example", None) ) ) + +If mutability is desired, you could use lists instead of tuples. Here the +analogue of a Lisp *car* is ``lisp_list[0]`` and the analogue of *cdr* is +``lisp_list[1]``. Only do this if you're sure you really need to, because it's +usually a lot slower than using Python lists. + + +.. _faq-multidimensional-list: + +How do I create a multidimensional list? +---------------------------------------- + +You probably tried to make a multidimensional array like this:: + + >>> A = [[None] * 2] * 3 + +This looks correct if you print it: + +.. testsetup:: + + A = [[None] * 2] * 3 + +.. doctest:: + + >>> A + [[None, None], [None, None], [None, None]] + +But when you assign a value, it shows up in multiple places: + +.. testsetup:: + + A = [[None] * 2] * 3 + +.. doctest:: + + >>> A[0][0] = 5 + >>> A + [[5, None], [5, None], [5, None]] + +The reason is that replicating a list with ``*`` doesn't create copies, it only +creates references to the existing objects. The ``*3`` creates a list +containing 3 references to the same list of length two. Changes to one row will +show in all rows, which is almost certainly not what you want. + +The suggested approach is to create a list of the desired length first and then +fill in each element with a newly created list:: + + A = [None] * 3 + for i in range(3): + A[i] = [None] * 2 + +This generates a list containing 3 different lists of length two. You can also +use a list comprehension:: + + w, h = 2, 3 + A = [[None] * w for i in range(h)] + +Or, you can use an extension that provides a matrix datatype; `NumPy +<https://numpy.org/>`_ is the best known. + + +How do I apply a method or function to a sequence of objects? +------------------------------------------------------------- + +To call a method or function and accumulate the return values is a list, +a :term:`list comprehension` is an elegant solution:: + + result = [obj.method() for obj in mylist] + + result = [function(obj) for obj in mylist] + +To just run the method or function without saving the return values, +a plain :keyword:`for` loop will suffice:: + + for obj in mylist: + obj.method() + + for obj in mylist: + function(obj) + +.. _faq-augmented-assignment-tuple-error: + +Why does a_tuple[i] += ['item'] raise an exception when the addition works? +--------------------------------------------------------------------------- + +This is because of a combination of the fact that augmented assignment +operators are *assignment* operators, and the difference between mutable and +immutable objects in Python. + +This discussion applies in general when augmented assignment operators are +applied to elements of a tuple that point to mutable objects, but we'll use +a ``list`` and ``+=`` as our exemplar. + +If you wrote:: + + >>> a_tuple = (1, 2) + >>> a_tuple[0] += 1 + Traceback (most recent call last): + ... + TypeError: 'tuple' object does not support item assignment + +The reason for the exception should be immediately clear: ``1`` is added to the +object ``a_tuple[0]`` points to (``1``), producing the result object, ``2``, +but when we attempt to assign the result of the computation, ``2``, to element +``0`` of the tuple, we get an error because we can't change what an element of +a tuple points to. + +Under the covers, what this augmented assignment statement is doing is +approximately this:: + + >>> result = a_tuple[0] + 1 + >>> a_tuple[0] = result + Traceback (most recent call last): + ... + TypeError: 'tuple' object does not support item assignment + +It is the assignment part of the operation that produces the error, since a +tuple is immutable. + +When you write something like:: + + >>> a_tuple = (['foo'], 'bar') + >>> a_tuple[0] += ['item'] + Traceback (most recent call last): + ... + TypeError: 'tuple' object does not support item assignment + +The exception is a bit more surprising, and even more surprising is the fact +that even though there was an error, the append worked:: + + >>> a_tuple[0] + ['foo', 'item'] + +To see why this happens, you need to know that (a) if an object implements an +:meth:`~object.__iadd__` magic method, it gets called when the ``+=`` augmented +assignment +is executed, and its return value is what gets used in the assignment statement; +and (b) for lists, :meth:`!__iadd__` is equivalent to calling :meth:`~list.extend` on the list +and returning the list. That's why we say that for lists, ``+=`` is a +"shorthand" for :meth:`!list.extend`:: + + >>> a_list = [] + >>> a_list += [1] + >>> a_list + [1] + +This is equivalent to:: + + >>> result = a_list.__iadd__([1]) + >>> a_list = result + +The object pointed to by a_list has been mutated, and the pointer to the +mutated object is assigned back to ``a_list``. The end result of the +assignment is a no-op, since it is a pointer to the same object that ``a_list`` +was previously pointing to, but the assignment still happens. + +Thus, in our tuple example what is happening is equivalent to:: + + >>> result = a_tuple[0].__iadd__(['item']) + >>> a_tuple[0] = result + Traceback (most recent call last): + ... + TypeError: 'tuple' object does not support item assignment + +The :meth:`!__iadd__` succeeds, and thus the list is extended, but even though +``result`` points to the same object that ``a_tuple[0]`` already points to, +that final assignment still results in an error, because tuples are immutable. + + +I want to do a complicated sort: can you do a Schwartzian Transform in Python? +------------------------------------------------------------------------------ + +The technique, attributed to Randal Schwartz of the Perl community, sorts the +elements of a list by a metric which maps each element to its "sort value". In +Python, use the ``key`` argument for the :meth:`list.sort` method:: + + Isorted = L[:] + Isorted.sort(key=lambda s: int(s[10:15])) + + +How can I sort one list by values from another list? +---------------------------------------------------- + +Merge them into an iterator of tuples, sort the resulting list, and then pick +out the element you want. :: + + >>> list1 = ["what", "I'm", "sorting", "by"] + >>> list2 = ["something", "else", "to", "sort"] + >>> pairs = zip(list1, list2) + >>> pairs = sorted(pairs) + >>> pairs + [("I'm", 'else'), ('by', 'sort'), ('sorting', 'to'), ('what', 'something')] + >>> result = [x[1] for x in pairs] + >>> result + ['else', 'sort', 'to', 'something'] + + +Objects +======= + +What is a class? +---------------- + +A class is the particular object type created by executing a class statement. +Class objects are used as templates to create instance objects, which embody +both the data (attributes) and code (methods) specific to a datatype. + +A class can be based on one or more other classes, called its base class(es). It +then inherits the attributes and methods of its base classes. This allows an +object model to be successively refined by inheritance. You might have a +generic ``Mailbox`` class that provides basic accessor methods for a mailbox, +and subclasses such as ``MboxMailbox``, ``MaildirMailbox``, ``OutlookMailbox`` +that handle various specific mailbox formats. + + +What is a method? +----------------- + +A method is a function on some object ``x`` that you normally call as +``x.name(arguments...)``. Methods are defined as functions inside the class +definition:: + + class C: + def meth(self, arg): + return arg * 2 + self.attribute + + +What is self? +------------- + +Self is merely a conventional name for the first argument of a method. A method +defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, c)`` for +some instance ``x`` of the class in which the definition occurs; the called +method will think it is called as ``meth(x, a, b, c)``. + +See also :ref:`why-self`. + + +How do I check if an object is an instance of a given class or of a subclass of it? +----------------------------------------------------------------------------------- + +Use the built-in function :func:`isinstance(obj, cls) <isinstance>`. You can +check if an object +is an instance of any of a number of classes by providing a tuple instead of a +single class, e.g. ``isinstance(obj, (class1, class2, ...))``, and can also +check whether an object is one of Python's built-in types, e.g. +``isinstance(obj, str)`` or ``isinstance(obj, (int, float, complex))``. + +Note that :func:`isinstance` also checks for virtual inheritance from an +:term:`abstract base class`. So, the test will return ``True`` for a +registered class even if hasn't directly or indirectly inherited from it. To +test for "true inheritance", scan the :term:`MRO` of the class: + +.. testcode:: + + from collections.abc import Mapping + + class P: + pass + + class C(P): + pass + + Mapping.register(P) + +.. doctest:: + + >>> c = C() + >>> isinstance(c, C) # direct + True + >>> isinstance(c, P) # indirect + True + >>> isinstance(c, Mapping) # virtual + True + + # Actual inheritance chain + >>> type(c).__mro__ + (<class 'C'>, <class 'P'>, <class 'object'>) + + # Test for "true inheritance" + >>> Mapping in type(c).__mro__ + False + +Note that most programs do not use :func:`isinstance` on user-defined classes +very often. If you are developing the classes yourself, a more proper +object-oriented style is to define methods on the classes that encapsulate a +particular behaviour, instead of checking the object's class and doing a +different thing based on what class it is. For example, if you have a function +that does something:: + + def search(obj): + if isinstance(obj, Mailbox): + ... # code to search a mailbox + elif isinstance(obj, Document): + ... # code to search a document + elif ... + +A better approach is to define a ``search()`` method on all the classes and just +call it:: + + class Mailbox: + def search(self): + ... # code to search a mailbox + + class Document: + def search(self): + ... # code to search a document + + obj.search() + + +What is delegation? +------------------- + +Delegation is an object oriented technique (also called a design pattern). +Let's say you have an object ``x`` and want to change the behaviour of just one +of its methods. You can create a new class that provides a new implementation +of the method you're interested in changing and delegates all other methods to +the corresponding method of ``x``. + +Python programmers can easily implement delegation. For example, the following +class implements a class that behaves like a file but converts all written data +to uppercase:: + + class UpperOut: + + def __init__(self, outfile): + self._outfile = outfile + + def write(self, s): + self._outfile.write(s.upper()) + + def __getattr__(self, name): + return getattr(self._outfile, name) + +Here the ``UpperOut`` class redefines the ``write()`` method to convert the +argument string to uppercase before calling the underlying +``self._outfile.write()`` method. All other methods are delegated to the +underlying ``self._outfile`` object. The delegation is accomplished via the +:meth:`~object.__getattr__` method; consult :ref:`the language reference <attribute-access>` +for more information about controlling attribute access. + +Note that for more general cases delegation can get trickier. When attributes +must be set as well as retrieved, the class must define a :meth:`~object.__setattr__` +method too, and it must do so carefully. The basic implementation of +:meth:`!__setattr__` is roughly equivalent to the following:: + + class X: + ... + def __setattr__(self, name, value): + self.__dict__[name] = value + ... + +Most :meth:`!__setattr__` implementations must modify +:meth:`self.__dict__ <object.__dict__>` to store +local state for self without causing an infinite recursion. + + +How do I call a method defined in a base class from a derived class that extends it? +------------------------------------------------------------------------------------ + +Use the built-in :func:`super` function:: + + class Derived(Base): + def meth(self): + super().meth() # calls Base.meth + +In the example, :func:`super` will automatically determine the instance from +which it was called (the ``self`` value), look up the :term:`method resolution +order` (MRO) with ``type(self).__mro__``, and return the next in line after +``Derived`` in the MRO: ``Base``. + + +How can I organize my code to make it easier to change the base class? +---------------------------------------------------------------------- + +You could assign the base class to an alias and derive from the alias. Then all +you have to change is the value assigned to the alias. Incidentally, this trick +is also handy if you want to decide dynamically (e.g. depending on availability +of resources) which base class to use. Example:: + + class Base: + ... + + BaseAlias = Base + + class Derived(BaseAlias): + ... + + +How do I create static class data and static class methods? +----------------------------------------------------------- + +Both static data and static methods (in the sense of C++ or Java) are supported +in Python. + +For static data, simply define a class attribute. To assign a new value to the +attribute, you have to explicitly use the class name in the assignment:: + + class C: + count = 0 # number of times C.__init__ called + + def __init__(self): + C.count = C.count + 1 + + def getcount(self): + return C.count # or return self.count + +``c.count`` also refers to ``C.count`` for any ``c`` such that ``isinstance(c, +C)`` holds, unless overridden by ``c`` itself or by some class on the base-class +search path from ``c.__class__`` back to ``C``. + +Caution: within a method of C, an assignment like ``self.count = 42`` creates a +new and unrelated instance named "count" in ``self``'s own dict. Rebinding of a +class-static data name must always specify the class whether inside a method or +not:: + + C.count = 314 + +Static methods are possible:: + + class C: + @staticmethod + def static(arg1, arg2, arg3): + # No 'self' parameter! + ... + +However, a far more straightforward way to get the effect of a static method is +via a simple module-level function:: + + def getcount(): + return C.count + +If your code is structured so as to define one class (or tightly related class +hierarchy) per module, this supplies the desired encapsulation. + + +How can I overload constructors (or methods) in Python? +------------------------------------------------------- + +This answer actually applies to all methods, but the question usually comes up +first in the context of constructors. + +In C++ you'd write + +.. code-block:: c + + class C { + C() { cout << "No arguments\n"; } + C(int i) { cout << "Argument is " << i << "\n"; } + } + +In Python you have to write a single constructor that catches all cases using +default arguments. For example:: + + class C: + def __init__(self, i=None): + if i is None: + print("No arguments") + else: + print("Argument is", i) + +This is not entirely equivalent, but close enough in practice. + +You could also try a variable-length argument list, e.g. :: + + def __init__(self, *args): + ... + +The same approach works for all method definitions. + + +I try to use __spam and I get an error about _SomeClassName__spam. +------------------------------------------------------------------ + +Variable names with double leading underscores are "mangled" to provide a simple +but effective way to define class private variables. Any identifier of the form +``__spam`` (at least two leading underscores, at most one trailing underscore) +is textually replaced with ``_classname__spam``, where ``classname`` is the +current class name with any leading underscores stripped. + +This doesn't guarantee privacy: an outside user can still deliberately access +the "_classname__spam" attribute, and private values are visible in the object's +``__dict__``. Many Python programmers never bother to use private variable +names at all. + + +My class defines __del__ but it is not called when I delete the object. +----------------------------------------------------------------------- + +There are several possible reasons for this. + +The :keyword:`del` statement does not necessarily call :meth:`~object.__del__` -- it simply +decrements the object's reference count, and if this reaches zero +:meth:`!__del__` is called. + +If your data structures contain circular links (e.g. a tree where each child has +a parent reference and each parent has a list of children) the reference counts +will never go back to zero. Once in a while Python runs an algorithm to detect +such cycles, but the garbage collector might run some time after the last +reference to your data structure vanishes, so your :meth:`!__del__` method may be +called at an inconvenient and random time. This is inconvenient if you're trying +to reproduce a problem. Worse, the order in which object's :meth:`!__del__` +methods are executed is arbitrary. You can run :func:`gc.collect` to force a +collection, but there *are* pathological cases where objects will never be +collected. + +Despite the cycle collector, it's still a good idea to define an explicit +``close()`` method on objects to be called whenever you're done with them. The +``close()`` method can then remove attributes that refer to subobjects. Don't +call :meth:`!__del__` directly -- :meth:`!__del__` should call ``close()`` and +``close()`` should make sure that it can be called more than once for the same +object. + +Another way to avoid cyclical references is to use the :mod:`weakref` module, +which allows you to point to objects without incrementing their reference count. +Tree data structures, for instance, should use weak references for their parent +and sibling references (if they need them!). + +.. XXX relevant for Python 3? + + If the object has ever been a local variable in a function that caught an + expression in an except clause, chances are that a reference to the object + still exists in that function's stack frame as contained in the stack trace. + Normally, calling :func:`sys.exc_clear` will take care of this by clearing + the last recorded exception. + +Finally, if your :meth:`!__del__` method raises an exception, a warning message +is printed to :data:`sys.stderr`. + + +How do I get a list of all instances of a given class? +------------------------------------------------------ + +Python does not keep track of all instances of a class (or of a built-in type). +You can program the class's constructor to keep track of all instances by +keeping a list of weak references to each instance. + + +Why does the result of ``id()`` appear to be not unique? +-------------------------------------------------------- + +The :func:`id` builtin returns an integer that is guaranteed to be unique during +the lifetime of the object. Since in CPython, this is the object's memory +address, it happens frequently that after an object is deleted from memory, the +next freshly created object is allocated at the same position in memory. This +is illustrated by this example: + +>>> id(1000) # doctest: +SKIP +13901272 +>>> id(2000) # doctest: +SKIP +13901272 + +The two ids belong to different integer objects that are created before, and +deleted immediately after execution of the ``id()`` call. To be sure that +objects whose id you want to examine are still alive, create another reference +to the object: + +>>> a = 1000; b = 2000 +>>> id(a) # doctest: +SKIP +13901272 +>>> id(b) # doctest: +SKIP +13891296 + + +When can I rely on identity tests with the *is* operator? +--------------------------------------------------------- + +The ``is`` operator tests for object identity. The test ``a is b`` is +equivalent to ``id(a) == id(b)``. + +The most important property of an identity test is that an object is always +identical to itself, ``a is a`` always returns ``True``. Identity tests are +usually faster than equality tests. And unlike equality tests, identity tests +are guaranteed to return a boolean ``True`` or ``False``. + +However, identity tests can *only* be substituted for equality tests when +object identity is assured. Generally, there are three circumstances where +identity is guaranteed: + +1) Assignments create new names but do not change object identity. After the +assignment ``new = old``, it is guaranteed that ``new is old``. + +2) Putting an object in a container that stores object references does not +change object identity. After the list assignment ``s[0] = x``, it is +guaranteed that ``s[0] is x``. + +3) If an object is a singleton, it means that only one instance of that object +can exist. After the assignments ``a = None`` and ``b = None``, it is +guaranteed that ``a is b`` because ``None`` is a singleton. + +In most other circumstances, identity tests are inadvisable and equality tests +are preferred. In particular, identity tests should not be used to check +constants such as :class:`int` and :class:`str` which aren't guaranteed to be +singletons:: + + >>> a = 1000 + >>> b = 500 + >>> c = b + 500 + >>> a is c + False + + >>> a = 'Python' + >>> b = 'Py' + >>> c = b + 'thon' + >>> a is c + False + +Likewise, new instances of mutable containers are never identical:: + + >>> a = [] + >>> b = [] + >>> a is b + False + +In the standard library code, you will see several common patterns for +correctly using identity tests: + +1) As recommended by :pep:`8`, an identity test is the preferred way to check +for ``None``. This reads like plain English in code and avoids confusion with +other objects that may have boolean values that evaluate to false. + +2) Detecting optional arguments can be tricky when ``None`` is a valid input +value. In those situations, you can create a singleton sentinel object +guaranteed to be distinct from other objects. For example, here is how +to implement a method that behaves like :meth:`dict.pop`:: + + _sentinel = object() + + def pop(self, key, default=_sentinel): + if key in self: + value = self[key] + del self[key] + return value + if default is _sentinel: + raise KeyError(key) + return default + +3) Container implementations sometimes need to augment equality tests with +identity tests. This prevents the code from being confused by objects such as +``float('NaN')`` that are not equal to themselves. + +For example, here is the implementation of +:meth:`collections.abc.Sequence.__contains__`:: + + def __contains__(self, value): + for v in self: + if v is value or v == value: + return True + return False + + +How can a subclass control what data is stored in an immutable instance? +------------------------------------------------------------------------ + +When subclassing an immutable type, override the :meth:`~object.__new__` method +instead of the :meth:`~object.__init__` method. The latter only runs *after* an +instance is created, which is too late to alter data in an immutable +instance. + +All of these immutable classes have a different signature than their +parent class: + +.. testcode:: + + from datetime import date + + class FirstOfMonthDate(date): + "Always choose the first day of the month" + def __new__(cls, year, month, day): + return super().__new__(cls, year, month, 1) + + class NamedInt(int): + "Allow text names for some numbers" + xlat = {'zero': 0, 'one': 1, 'ten': 10} + def __new__(cls, value): + value = cls.xlat.get(value, value) + return super().__new__(cls, value) + + class TitleStr(str): + "Convert str to name suitable for a URL path" + def __new__(cls, s): + s = s.lower().replace(' ', '-') + s = ''.join([c for c in s if c.isalnum() or c == '-']) + return super().__new__(cls, s) + +The classes can be used like this: + +.. doctest:: + + >>> FirstOfMonthDate(2012, 2, 14) + FirstOfMonthDate(2012, 2, 1) + >>> NamedInt('ten') + 10 + >>> NamedInt(20) + 20 + >>> TitleStr('Blog: Why Python Rocks') + 'blog-why-python-rocks' + + +.. _faq-cache-method-calls: + +How do I cache method calls? +---------------------------- + +The two principal tools for caching methods are +:func:`functools.cached_property` and :func:`functools.lru_cache`. The +former stores results at the instance level and the latter at the class +level. + +The *cached_property* approach only works with methods that do not take +any arguments. It does not create a reference to the instance. The +cached method result will be kept only as long as the instance is alive. + +The advantage is that when an instance is no longer used, the cached +method result will be released right away. The disadvantage is that if +instances accumulate, so too will the accumulated method results. They +can grow without bound. + +The *lru_cache* approach works with methods that have :term:`hashable` +arguments. It creates a reference to the instance unless special +efforts are made to pass in weak references. + +The advantage of the least recently used algorithm is that the cache is +bounded by the specified *maxsize*. The disadvantage is that instances +are kept alive until they age out of the cache or until the cache is +cleared. + +This example shows the various techniques:: + + class Weather: + "Lookup weather information on a government website" + + def __init__(self, station_id): + self._station_id = station_id + # The _station_id is private and immutable + + def current_temperature(self): + "Latest hourly observation" + # Do not cache this because old results + # can be out of date. + + @cached_property + def location(self): + "Return the longitude/latitude coordinates of the station" + # Result only depends on the station_id + + @lru_cache(maxsize=20) + def historic_rainfall(self, date, units='mm'): + "Rainfall on a given date" + # Depends on the station_id, date, and units. + +The above example assumes that the *station_id* never changes. If the +relevant instance attributes are mutable, the *cached_property* approach +can't be made to work because it cannot detect changes to the +attributes. + +To make the *lru_cache* approach work when the *station_id* is mutable, +the class needs to define the :meth:`~object.__eq__` and :meth:`~object.__hash__` +methods so that the cache can detect relevant attribute updates:: + + class Weather: + "Example with a mutable station identifier" + + def __init__(self, station_id): + self.station_id = station_id + + def change_station(self, station_id): + self.station_id = station_id + + def __eq__(self, other): + return self.station_id == other.station_id + + def __hash__(self): + return hash(self.station_id) + + @lru_cache(maxsize=20) + def historic_rainfall(self, date, units='cm'): + 'Rainfall on a given date' + # Depends on the station_id, date, and units. + + +Modules +======= + +How do I create a .pyc file? +---------------------------- + +When a module is imported for the first time (or when the source file has +changed since the current compiled file was created) a ``.pyc`` file containing +the compiled code should be created in a ``__pycache__`` subdirectory of the +directory containing the ``.py`` file. The ``.pyc`` file will have a +filename that starts with the same name as the ``.py`` file, and ends with +``.pyc``, with a middle component that depends on the particular ``python`` +binary that created it. (See :pep:`3147` for details.) + +One reason that a ``.pyc`` file may not be created is a permissions problem +with the directory containing the source file, meaning that the ``__pycache__`` +subdirectory cannot be created. This can happen, for example, if you develop as +one user but run as another, such as if you are testing with a web server. + +Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, +creation of a .pyc file is automatic if you're importing a module and Python +has the ability (permissions, free space, etc...) to create a ``__pycache__`` +subdirectory and write the compiled module to that subdirectory. + +Running Python on a top level script is not considered an import and no +``.pyc`` will be created. For example, if you have a top-level module +``foo.py`` that imports another module ``xyz.py``, when you run ``foo`` (by +typing ``python foo.py`` as a shell command), a ``.pyc`` will be created for +``xyz`` because ``xyz`` is imported, but no ``.pyc`` file will be created for +``foo`` since ``foo.py`` isn't being imported. + +If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a +``.pyc`` file for a module that is not imported -- you can, using the +:mod:`py_compile` and :mod:`compileall` modules. + +The :mod:`py_compile` module can manually compile any module. One way is to use +the ``compile()`` function in that module interactively:: + + >>> import py_compile + >>> py_compile.compile('foo.py') # doctest: +SKIP + +This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same +location as ``foo.py`` (or you can override that with the optional parameter +``cfile``). + +You can also automatically compile all files in a directory or directories using +the :mod:`compileall` module. You can do it from the shell prompt by running +``compileall.py`` and providing the path of a directory containing Python files +to compile:: + + python -m compileall . + + +How do I find the current module name? +-------------------------------------- + +A module can find out its own module name by looking at the predefined global +variable ``__name__``. If this has the value ``'__main__'``, the program is +running as a script. Many modules that are usually used by importing them also +provide a command-line interface or a self-test, and only execute this code +after checking ``__name__``:: + + def main(): + print('Running test...') + ... + + if __name__ == '__main__': + main() + + +How can I have modules that mutually import each other? +------------------------------------------------------- + +Suppose you have the following modules: + +:file:`foo.py`:: + + from bar import bar_var + foo_var = 1 + +:file:`bar.py`:: + + from foo import foo_var + bar_var = 2 + +The problem is that the interpreter will perform the following steps: + +* main imports ``foo`` +* Empty globals for ``foo`` are created +* ``foo`` is compiled and starts executing +* ``foo`` imports ``bar`` +* Empty globals for ``bar`` are created +* ``bar`` is compiled and starts executing +* ``bar`` imports ``foo`` (which is a no-op since there already is a module named ``foo``) +* The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set ``bar.foo_var = foo.foo_var`` + +The last step fails, because Python isn't done with interpreting ``foo`` yet and +the global symbol dictionary for ``foo`` is still empty. + +The same thing happens when you use ``import foo``, and then try to access +``foo.foo_var`` in global code. + +There are (at least) three possible workarounds for this problem. + +Guido van Rossum recommends avoiding all uses of ``from <module> import ...``, +and placing all code inside functions. Initializations of global variables and +class variables should use constants or built-in functions only. This means +everything from an imported module is referenced as ``<module>.<name>``. + +Jim Roskind suggests performing steps in the following order in each module: + +* exports (globals, functions, and classes that don't need imported base + classes) +* ``import`` statements +* active code (including globals that are initialized from imported values). + +Van Rossum doesn't like this approach much because the imports appear in a +strange place, but it does work. + +Matthias Urlichs recommends restructuring your code so that the recursive import +is not necessary in the first place. + +These solutions are not mutually exclusive. + + +__import__('x.y.z') returns <module 'x'>; how do I get z? +--------------------------------------------------------- + +Consider using the convenience function :func:`~importlib.import_module` from +:mod:`importlib` instead:: + + z = importlib.import_module('x.y.z') + + +When I edit an imported module and reimport it, the changes don't show up. Why does this happen? +------------------------------------------------------------------------------------------------- + +For reasons of efficiency as well as consistency, Python only reads the module +file on the first time a module is imported. If it didn't, in a program +consisting of many modules where each one imports the same basic module, the +basic module would be parsed and re-parsed many times. To force re-reading of a +changed module, do this:: + + import importlib + import modname + importlib.reload(modname) + +Warning: this technique is not 100% fool-proof. In particular, modules +containing statements like :: + + from modname import some_objects + +will continue to work with the old version of the imported objects. If the +module contains class definitions, existing class instances will *not* be +updated to use the new class definition. This can result in the following +paradoxical behaviour:: + + >>> import importlib + >>> import cls + >>> c = cls.C() # Create an instance of C + >>> importlib.reload(cls) + <module 'cls' from 'cls.py'> + >>> isinstance(c, cls.C) # isinstance is false?!? + False + +The nature of the problem is made clear if you print out the "identity" of the +class objects:: + + >>> hex(id(c.__class__)) + '0x7352a0' + >>> hex(id(cls.C)) + '0x4198d0'
diff --git a/Doc/faq/python-video-icon.png b/Doc/faq/python-video-icon.png new file mode 100644 index 0000000..265da50 --- /dev/null +++ b/Doc/faq/python-video-icon.png Binary files differ
diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst new file mode 100644 index 0000000..c0c92fd --- /dev/null +++ b/Doc/faq/windows.rst
@@ -0,0 +1,286 @@ +:tocdepth: 2 + +.. highlight:: none + +.. _windows-faq: + +===================== +Python on Windows FAQ +===================== + +.. only:: html + + .. contents:: + +.. XXX need review for Python 3. + XXX need review for Windows Vista/Seven? + +.. _faq-run-program-under-windows: + + +How do I run a Python program under Windows? +-------------------------------------------- + +This is not necessarily a straightforward question. If you are already familiar +with running programs from the Windows command line then everything will seem +obvious; otherwise, you might need a little more guidance. + +Unless you use some sort of integrated development environment, you will end up +*typing* Windows commands into what is referred to as a +"Command prompt window". Usually you can create such a window from your +search bar by searching for ``cmd``. You should be able to recognize +when you have started such a window because you will see a Windows "command +prompt", which usually looks like this: + +.. code-block:: doscon + + C:\> + +The letter may be different, and there might be other things after it, so you +might just as easily see something like: + +.. code-block:: doscon + + D:\YourName\Projects\Python> + +depending on how your computer has been set up and what else you have recently +done with it. Once you have started such a window, you are well on the way to +running Python programs. + +You need to realize that your Python scripts have to be processed by another +program called the Python *interpreter*. The interpreter reads your script, +compiles it into bytecodes, and then executes the bytecodes to run your +program. So, how do you arrange for the interpreter to handle your Python? + +First, you need to make sure that your command window recognises the word +"py" as an instruction to start the interpreter. If you have opened a +command window, you should try entering the command ``py`` and hitting +return: + +.. code-block:: doscon + + C:\Users\YourName> py + +You should then see something like: + +.. code-block:: pycon + + Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32 + Type "help", "copyright", "credits" or "license" for more information. + >>> + +You have started the interpreter in "interactive mode". That means you can enter +Python statements or expressions interactively and have them executed or +evaluated while you wait. This is one of Python's strongest features. Check it +by entering a few expressions of your choice and seeing the results: + +.. code-block:: pycon + + >>> print("Hello") + Hello + >>> "Hello" * 3 + 'HelloHelloHello' + +Many people use the interactive mode as a convenient yet highly programmable +calculator. When you want to end your interactive Python session, +call the :func:`exit` function or hold the :kbd:`Ctrl` key down +while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get +back to your Windows command prompt. + +You may also find that you have a Start-menu entry such as :menuselection:`Start +--> Programs --> Python 3.x --> Python (command line)` that results in you +seeing the ``>>>`` prompt in a new window. If so, the window will disappear +after you call the :func:`exit` function or enter the :kbd:`Ctrl-Z` +character; Windows is running a single "python" +command in the window, and closes it when you terminate the interpreter. + +Now that we know the ``py`` command is recognized, you can give your +Python script to it. You'll have to give either an absolute or a +relative path to the Python script. Let's say your Python script is +located in your desktop and is named ``hello.py``, and your command +prompt is nicely opened in your home directory so you're seeing something +similar to:: + + C:\Users\YourName> + +So now you'll ask the ``py`` command to give your script to Python by +typing ``py`` followed by your script path:: + + + C:\Users\YourName> py Desktop\hello.py + hello + +How do I make Python scripts executable? +---------------------------------------- + +On Windows, the standard Python installer already associates the .py +extension with a file type (Python.File) and gives that file type an open +command that runs the interpreter (``D:\Program Files\Python\python.exe "%1" +%*``). This is enough to make scripts executable from the command prompt as +'foo.py'. If you'd rather be able to execute the script by simple typing 'foo' +with no extension you need to add .py to the PATHEXT environment variable. + +Why does Python sometimes take so long to start? +------------------------------------------------ + +Usually Python starts very quickly on Windows, but occasionally there are bug +reports that Python suddenly begins to take a long time to start up. This is +made even more puzzling because Python will work fine on other Windows systems +which appear to be configured identically. + +The problem may be caused by a misconfiguration of virus checking software on +the problem machine. Some virus scanners have been known to introduce startup +overhead of two orders of magnitude when the scanner is configured to monitor +all reads from the filesystem. Try checking the configuration of virus scanning +software on your systems to ensure that they are indeed configured identically. +McAfee, when configured to scan all file system read activity, is a particular +offender. + + +How do I make an executable from a Python script? +------------------------------------------------- + +See :ref:`faq-create-standalone-binary` for a list of tools that can be used to +make executables. + + +Is a ``*.pyd`` file the same as a DLL? +-------------------------------------- + +Yes, .pyd files are dll's, but there are a few differences. If you have a DLL +named ``foo.pyd``, then it must have a function ``PyInit_foo()``. You can then +write Python "import foo", and Python will search for foo.pyd (as well as +foo.py, foo.pyc) and if it finds it, will attempt to call ``PyInit_foo()`` to +initialize it. You do not link your .exe with foo.lib, as that would cause +Windows to require the DLL to be present. + +Note that the search path for foo.pyd is PYTHONPATH, not the same as the path +that Windows uses to search for foo.dll. Also, foo.pyd need not be present to +run your program, whereas if you linked your program with a dll, the dll is +required. Of course, foo.pyd is required if you want to say ``import foo``. In +a DLL, linkage is declared in the source code with ``__declspec(dllexport)``. +In a .pyd, linkage is defined in a list of available functions. + + +How can I embed Python into a Windows application? +-------------------------------------------------- + +Embedding the Python interpreter in a Windows app can be summarized as follows: + +1. Do **not** build Python into your .exe file directly. On Windows, Python must + be a DLL to handle importing modules that are themselves DLL's. (This is the + first key undocumented fact.) Instead, link to :file:`python{NN}.dll`; it is + typically installed in ``C:\Windows\System``. *NN* is the Python version, a + number such as "33" for Python 3.3. + + You can link to Python in two different ways. Load-time linking means + linking against :file:`python{NN}.lib`, while run-time linking means linking + against :file:`python{NN}.dll`. (General note: :file:`python{NN}.lib` is the + so-called "import lib" corresponding to :file:`python{NN}.dll`. It merely + defines symbols for the linker.) + + Run-time linking greatly simplifies link options; everything happens at run + time. Your code must load :file:`python{NN}.dll` using the Windows + ``LoadLibraryEx()`` routine. The code must also use access routines and data + in :file:`python{NN}.dll` (that is, Python's C API's) using pointers obtained + by the Windows ``GetProcAddress()`` routine. Macros can make using these + pointers transparent to any C code that calls routines in Python's C API. + + .. XXX what about static linking? + +2. If you use SWIG, it is easy to create a Python "extension module" that will + make the app's data and methods available to Python. SWIG will handle just + about all the grungy details for you. The result is C code that you link + *into* your .exe file (!) You do **not** have to create a DLL file, and this + also simplifies linking. + +3. SWIG will create an init function (a C function) whose name depends on the + name of the extension module. For example, if the name of the module is leo, + the init function will be called initleo(). If you use SWIG shadow classes, + as you should, the init function will be called initleoc(). This initializes + a mostly hidden helper class used by the shadow class. + + The reason you can link the C code in step 2 into your .exe file is that + calling the initialization function is equivalent to importing the module + into Python! (This is the second key undocumented fact.) + +4. In short, you can use the following code to initialize the Python interpreter + with your extension module. + + .. code-block:: c + + #include <Python.h> + ... + Py_Initialize(); // Initialize Python. + initmyAppc(); // Initialize (import) the helper class. + PyRun_SimpleString("import myApp"); // Import the shadow class. + +5. There are two problems with Python's C API which will become apparent if you + use a compiler other than MSVC, the compiler used to build pythonNN.dll. + + Problem 1: The so-called "Very High Level" functions that take ``FILE *`` + arguments will not work in a multi-compiler environment because each + compiler's notion of a ``struct FILE`` will be different. From an implementation + standpoint these are very low level functions. + + Problem 2: SWIG generates the following code when generating wrappers to void + functions: + + .. code-block:: c + + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; + + Alas, Py_None is a macro that expands to a reference to a complex data + structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will + fail in a mult-compiler environment. Replace such code by: + + .. code-block:: c + + return Py_BuildValue(""); + + It may be possible to use SWIG's ``%typemap`` command to make the change + automatically, though I have not been able to get this to work (I'm a + complete SWIG newbie). + +6. Using a Python shell script to put up a Python interpreter window from inside + your Windows app is not a good idea; the resulting window will be independent + of your app's windowing system. Rather, you (or the wxPythonWindow class) + should create a "native" interpreter window. It is easy to connect that + window to the Python interpreter. You can redirect Python's i/o to _any_ + object that supports read and write, so all you need is a Python object + (defined in your extension module) that contains read() and write() methods. + +How do I keep editors from inserting tabs into my Python source? +---------------------------------------------------------------- + +The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`, +recommends 4 spaces for distributed Python code; this is also the Emacs +python-mode default. + +Under any editor, mixing tabs and spaces is a bad idea. MSVC is no different in +this respect, and is easily configured to use spaces: Take :menuselection:`Tools +--> Options --> Tabs`, and for file type "Default" set "Tab size" and "Indent +size" to 4, and select the "Insert spaces" radio button. + +Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs +and spaces are causing problems in leading whitespace. +You may also run the :mod:`tabnanny` module to check a directory tree +in batch mode. + + +How do I check for a keypress without blocking? +----------------------------------------------- + +Use the :mod:`msvcrt` module. This is a standard Windows-specific extension module. +It defines a function ``kbhit()`` which checks whether a keyboard hit is +present, and ``getch()`` which gets one character without echoing it. + +How do I solve the missing api-ms-win-crt-runtime-l1-1-0.dll error? +------------------------------------------------------------------- + +This can occur on Python 3.5 and later when using Windows 8.1 or earlier without all updates having been installed. +First ensure your operating system is supported and is up to date, and if that does not resolve the issue, +visit the `Microsoft support page <https://support.microsoft.com/en-us/help/3118401/>`_ +for guidance on manually installing the C Runtime update.
diff --git a/Doc/glossary.rst b/Doc/glossary.rst new file mode 100644 index 0000000..53e8cdc --- /dev/null +++ b/Doc/glossary.rst
@@ -0,0 +1,1258 @@ +.. _glossary: + +******** +Glossary +******** + +.. if you add new entries, keep the alphabetical sorting! + +.. glossary:: + + ``>>>`` + The default Python prompt of the interactive shell. Often seen for code + examples which can be executed interactively in the interpreter. + + ``...`` + Can refer to: + + * The default Python prompt of the interactive shell when entering the + code for an indented code block, when within a pair of matching left and + right delimiters (parentheses, square brackets, curly braces or triple + quotes), or after specifying a decorator. + + * The :const:`Ellipsis` built-in constant. + + 2to3 + A tool that tries to convert Python 2.x code to Python 3.x code by + handling most of the incompatibilities which can be detected by parsing the + source and traversing the parse tree. + + 2to3 is available in the standard library as :mod:`lib2to3`; a standalone + entry point is provided as :file:`Tools/scripts/2to3`. See + :ref:`2to3-reference`. + + abstract base class + Abstract base classes complement :term:`duck-typing` by + providing a way to define interfaces when other techniques like + :func:`hasattr` would be clumsy or subtly wrong (for example with + :ref:`magic methods <special-lookup>`). ABCs introduce virtual + subclasses, which are classes that don't inherit from a class but are + still recognized by :func:`isinstance` and :func:`issubclass`; see the + :mod:`abc` module documentation. Python comes with many built-in ABCs for + data structures (in the :mod:`collections.abc` module), numbers (in the + :mod:`numbers` module), streams (in the :mod:`io` module), import finders + and loaders (in the :mod:`importlib.abc` module). You can create your own + ABCs with the :mod:`abc` module. + + annotation + A label associated with a variable, a class + attribute or a function parameter or return value, + used by convention as a :term:`type hint`. + + Annotations of local variables cannot be accessed at runtime, but + annotations of global variables, class attributes, and functions + are stored in the :attr:`__annotations__` + special attribute of modules, classes, and functions, + respectively. + + See :term:`variable annotation`, :term:`function annotation`, :pep:`484` + and :pep:`526`, which describe this functionality. + Also see :ref:`annotations-howto` + for best practices on working with annotations. + + argument + A value passed to a :term:`function` (or :term:`method`) when calling the + function. There are two kinds of argument: + + * :dfn:`keyword argument`: an argument preceded by an identifier (e.g. + ``name=``) in a function call or passed as a value in a dictionary + preceded by ``**``. For example, ``3`` and ``5`` are both keyword + arguments in the following calls to :func:`complex`:: + + complex(real=3, imag=5) + complex(**{'real': 3, 'imag': 5}) + + * :dfn:`positional argument`: an argument that is not a keyword argument. + Positional arguments can appear at the beginning of an argument list + and/or be passed as elements of an :term:`iterable` preceded by ``*``. + For example, ``3`` and ``5`` are both positional arguments in the + following calls:: + + complex(3, 5) + complex(*(3, 5)) + + Arguments are assigned to the named local variables in a function body. + See the :ref:`calls` section for the rules governing this assignment. + Syntactically, any expression can be used to represent an argument; the + evaluated value is assigned to the local variable. + + See also the :term:`parameter` glossary entry, the FAQ question on + :ref:`the difference between arguments and parameters + <faq-argument-vs-parameter>`, and :pep:`362`. + + asynchronous context manager + An object which controls the environment seen in an + :keyword:`async with` statement by defining :meth:`__aenter__` and + :meth:`__aexit__` methods. Introduced by :pep:`492`. + + asynchronous generator + A function which returns an :term:`asynchronous generator iterator`. It + looks like a coroutine function defined with :keyword:`async def` except + that it contains :keyword:`yield` expressions for producing a series of + values usable in an :keyword:`async for` loop. + + Usually refers to an asynchronous generator function, but may refer to an + *asynchronous generator iterator* in some contexts. In cases where the + intended meaning isn't clear, using the full terms avoids ambiguity. + + An asynchronous generator function may contain :keyword:`await` + expressions as well as :keyword:`async for`, and :keyword:`async with` + statements. + + asynchronous generator iterator + An object created by a :term:`asynchronous generator` function. + + This is an :term:`asynchronous iterator` which when called using the + :meth:`__anext__` method returns an awaitable object which will execute + the body of the asynchronous generator function until the next + :keyword:`yield` expression. + + Each :keyword:`yield` temporarily suspends processing, remembering the + location execution state (including local variables and pending + try-statements). When the *asynchronous generator iterator* effectively + resumes with another awaitable returned by :meth:`__anext__`, it + picks up where it left off. See :pep:`492` and :pep:`525`. + + asynchronous iterable + An object, that can be used in an :keyword:`async for` statement. + Must return an :term:`asynchronous iterator` from its + :meth:`__aiter__` method. Introduced by :pep:`492`. + + asynchronous iterator + An object that implements the :meth:`__aiter__` and :meth:`__anext__` + methods. ``__anext__`` must return an :term:`awaitable` object. + :keyword:`async for` resolves the awaitables returned by an asynchronous + iterator's :meth:`__anext__` method until it raises a + :exc:`StopAsyncIteration` exception. Introduced by :pep:`492`. + + attribute + A value associated with an object which is usually referenced by name + using dotted expressions. + For example, if an object *o* has an attribute + *a* it would be referenced as *o.a*. + + It is possible to give an object an attribute whose name is not an + identifier as defined by :ref:`identifiers`, for example using + :func:`setattr`, if the object allows it. + Such an attribute will not be accessible using a dotted expression, + and would instead need to be retrieved with :func:`getattr`. + + awaitable + An object that can be used in an :keyword:`await` expression. Can be + a :term:`coroutine` or an object with an :meth:`__await__` method. + See also :pep:`492`. + + BDFL + Benevolent Dictator For Life, a.k.a. `Guido van Rossum + <https://gvanrossum.github.io/>`_, Python's creator. + + binary file + A :term:`file object` able to read and write + :term:`bytes-like objects <bytes-like object>`. + Examples of binary files are files opened in binary mode (``'rb'``, + ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer`, + :data:`sys.stdout.buffer`, and instances of :class:`io.BytesIO` and + :class:`gzip.GzipFile`. + + See also :term:`text file` for a file object able to read and write + :class:`str` objects. + + borrowed reference + In Python's C API, a borrowed reference is a reference to an object. + It does not modify the object reference count. It becomes a dangling + pointer if the object is destroyed. For example, a garbage collection can + remove the last :term:`strong reference` to the object and so destroy it. + + Calling :c:func:`Py_INCREF` on the :term:`borrowed reference` is + recommended to convert it to a :term:`strong reference` in-place, except + when the object cannot be destroyed before the last usage of the borrowed + reference. The :c:func:`Py_NewRef` function can be used to create a new + :term:`strong reference`. + + bytes-like object + An object that supports the :ref:`bufferobjects` and can + export a C-:term:`contiguous` buffer. This includes all :class:`bytes`, + :class:`bytearray`, and :class:`array.array` objects, as well as many + common :class:`memoryview` objects. Bytes-like objects can + be used for various operations that work with binary data; these include + compression, saving to a binary file, and sending over a socket. + + Some operations need the binary data to be mutable. The documentation + often refers to these as "read-write bytes-like objects". Example + mutable buffer objects include :class:`bytearray` and a + :class:`memoryview` of a :class:`bytearray`. + Other operations require the binary data to be stored in + immutable objects ("read-only bytes-like objects"); examples + of these include :class:`bytes` and a :class:`memoryview` + of a :class:`bytes` object. + + bytecode + Python source code is compiled into bytecode, the internal representation + of a Python program in the CPython interpreter. The bytecode is also + cached in ``.pyc`` files so that executing the same file is + faster the second time (recompilation from source to bytecode can be + avoided). This "intermediate language" is said to run on a + :term:`virtual machine` that executes the machine code corresponding to + each bytecode. Do note that bytecodes are not expected to work between + different Python virtual machines, nor to be stable between Python + releases. + + A list of bytecode instructions can be found in the documentation for + :ref:`the dis module <bytecodes>`. + + callable + A callable is an object that can be called, possibly with a set + of arguments (see :term:`argument`), with the following syntax:: + + callable(argument1, argument2, argumentN) + + A :term:`function`, and by extension a :term:`method`, is a callable. + An instance of a class that implements the :meth:`~object.__call__` + method is also a callable. + + callback + A subroutine function which is passed as an argument to be executed at + some point in the future. + + class + A template for creating user-defined objects. Class definitions + normally contain method definitions which operate on instances of the + class. + + class variable + A variable defined in a class and intended to be modified only at + class level (i.e., not in an instance of the class). + + complex number + An extension of the familiar real number system in which all numbers are + expressed as a sum of a real part and an imaginary part. Imaginary + numbers are real multiples of the imaginary unit (the square root of + ``-1``), often written ``i`` in mathematics or ``j`` in + engineering. Python has built-in support for complex numbers, which are + written with this latter notation; the imaginary part is written with a + ``j`` suffix, e.g., ``3+1j``. To get access to complex equivalents of the + :mod:`math` module, use :mod:`cmath`. Use of complex numbers is a fairly + advanced mathematical feature. If you're not aware of a need for them, + it's almost certain you can safely ignore them. + + context manager + An object which controls the environment seen in a :keyword:`with` + statement by defining :meth:`__enter__` and :meth:`__exit__` methods. + See :pep:`343`. + + context variable + A variable which can have different values depending on its context. + This is similar to Thread-Local Storage in which each execution + thread may have a different value for a variable. However, with context + variables, there may be several contexts in one execution thread and the + main usage for context variables is to keep track of variables in + concurrent asynchronous tasks. + See :mod:`contextvars`. + + contiguous + .. index:: C-contiguous, Fortran contiguous + + A buffer is considered contiguous exactly if it is either + *C-contiguous* or *Fortran contiguous*. Zero-dimensional buffers are + C and Fortran contiguous. In one-dimensional arrays, the items + must be laid out in memory next to each other, in order of + increasing indexes starting from zero. In multidimensional + C-contiguous arrays, the last index varies the fastest when + visiting items in order of memory address. However, in + Fortran contiguous arrays, the first index varies the fastest. + + coroutine + Coroutines are a more generalized form of subroutines. Subroutines are + entered at one point and exited at another point. Coroutines can be + entered, exited, and resumed at many different points. They can be + implemented with the :keyword:`async def` statement. See also + :pep:`492`. + + coroutine function + A function which returns a :term:`coroutine` object. A coroutine + function may be defined with the :keyword:`async def` statement, + and may contain :keyword:`await`, :keyword:`async for`, and + :keyword:`async with` keywords. These were introduced + by :pep:`492`. + + CPython + The canonical implementation of the Python programming language, as + distributed on `python.org <https://www.python.org>`_. The term "CPython" + is used when necessary to distinguish this implementation from others + such as Jython or IronPython. + + decorator + A function returning another function, usually applied as a function + transformation using the ``@wrapper`` syntax. Common examples for + decorators are :func:`classmethod` and :func:`staticmethod`. + + The decorator syntax is merely syntactic sugar, the following two + function definitions are semantically equivalent:: + + def f(arg): + ... + f = staticmethod(f) + + @staticmethod + def f(arg): + ... + + The same concept exists for classes, but is less commonly used there. See + the documentation for :ref:`function definitions <function>` and + :ref:`class definitions <class>` for more about decorators. + + descriptor + Any object which defines the methods :meth:`__get__`, :meth:`__set__`, or + :meth:`__delete__`. When a class attribute is a descriptor, its special + binding behavior is triggered upon attribute lookup. Normally, using + *a.b* to get, set or delete an attribute looks up the object named *b* in + the class dictionary for *a*, but if *b* is a descriptor, the respective + descriptor method gets called. Understanding descriptors is a key to a + deep understanding of Python because they are the basis for many features + including functions, methods, properties, class methods, static methods, + and reference to super classes. + + For more information about descriptors' methods, see :ref:`descriptors` + or the :ref:`Descriptor How To Guide <descriptorhowto>`. + + dictionary + An associative array, where arbitrary keys are mapped to values. The + keys can be any object with :meth:`__hash__` and :meth:`__eq__` methods. + Called a hash in Perl. + + dictionary comprehension + A compact way to process all or part of the elements in an iterable and + return a dictionary with the results. ``results = {n: n ** 2 for n in + range(10)}`` generates a dictionary containing key ``n`` mapped to + value ``n ** 2``. See :ref:`comprehensions`. + + dictionary view + The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and + :meth:`dict.items` are called dictionary views. They provide a dynamic + view on the dictionary’s entries, which means that when the dictionary + changes, the view reflects these changes. To force the + dictionary view to become a full list use ``list(dictview)``. See + :ref:`dict-views`. + + docstring + A string literal which appears as the first expression in a class, + function or module. While ignored when the suite is executed, it is + recognized by the compiler and put into the :attr:`__doc__` attribute + of the enclosing class, function or module. Since it is available via + introspection, it is the canonical place for documentation of the + object. + + duck-typing + A programming style which does not look at an object's type to determine + if it has the right interface; instead, the method or attribute is simply + called or used ("If it looks like a duck and quacks like a duck, it + must be a duck.") By emphasizing interfaces rather than specific types, + well-designed code improves its flexibility by allowing polymorphic + substitution. Duck-typing avoids tests using :func:`type` or + :func:`isinstance`. (Note, however, that duck-typing can be complemented + with :term:`abstract base classes <abstract base class>`.) Instead, it + typically employs :func:`hasattr` tests or :term:`EAFP` programming. + + EAFP + Easier to ask for forgiveness than permission. This common Python coding + style assumes the existence of valid keys or attributes and catches + exceptions if the assumption proves false. This clean and fast style is + characterized by the presence of many :keyword:`try` and :keyword:`except` + statements. The technique contrasts with the :term:`LBYL` style + common to many other languages such as C. + + expression + A piece of syntax which can be evaluated to some value. In other words, + an expression is an accumulation of expression elements like literals, + names, attribute access, operators or function calls which all return a + value. In contrast to many other languages, not all language constructs + are expressions. There are also :term:`statement`\s which cannot be used + as expressions, such as :keyword:`while`. Assignments are also statements, + not expressions. + + extension module + A module written in C or C++, using Python's C API to interact with the + core and with user code. + + f-string + String literals prefixed with ``'f'`` or ``'F'`` are commonly called + "f-strings" which is short for + :ref:`formatted string literals <f-strings>`. See also :pep:`498`. + + file object + An object exposing a file-oriented API (with methods such as + :meth:`read()` or :meth:`write()`) to an underlying resource. Depending + on the way it was created, a file object can mediate access to a real + on-disk file or to another type of storage or communication device + (for example standard input/output, in-memory buffers, sockets, pipes, + etc.). File objects are also called :dfn:`file-like objects` or + :dfn:`streams`. + + There are actually three categories of file objects: raw + :term:`binary files <binary file>`, buffered + :term:`binary files <binary file>` and :term:`text files <text file>`. + Their interfaces are defined in the :mod:`io` module. The canonical + way to create a file object is by using the :func:`open` function. + + file-like object + A synonym for :term:`file object`. + + filesystem encoding and error handler + Encoding and error handler used by Python to decode bytes from the + operating system and encode Unicode to the operating system. + + The filesystem encoding must guarantee to successfully decode all bytes + below 128. If the file system encoding fails to provide this guarantee, + API functions can raise :exc:`UnicodeError`. + + The :func:`sys.getfilesystemencoding` and + :func:`sys.getfilesystemencodeerrors` functions can be used to get the + filesystem encoding and error handler. + + The :term:`filesystem encoding and error handler` are configured at + Python startup by the :c:func:`PyConfig_Read` function: see + :c:member:`~PyConfig.filesystem_encoding` and + :c:member:`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`. + + See also the :term:`locale encoding`. + + finder + An object that tries to find the :term:`loader` for a module that is + being imported. + + Since Python 3.3, there are two types of finder: :term:`meta path finders + <meta path finder>` for use with :data:`sys.meta_path`, and :term:`path + entry finders <path entry finder>` for use with :data:`sys.path_hooks`. + + See :pep:`302`, :pep:`420` and :pep:`451` for much more detail. + + floor division + Mathematical division that rounds down to nearest integer. The floor + division operator is ``//``. For example, the expression ``11 // 4`` + evaluates to ``2`` in contrast to the ``2.75`` returned by float true + division. Note that ``(-11) // 4`` is ``-3`` because that is ``-2.75`` + rounded *downward*. See :pep:`238`. + + function + A series of statements which returns some value to a caller. It can also + be passed zero or more :term:`arguments <argument>` which may be used in + the execution of the body. See also :term:`parameter`, :term:`method`, + and the :ref:`function` section. + + function annotation + An :term:`annotation` of a function parameter or return value. + + Function annotations are usually used for + :term:`type hints <type hint>`: for example, this function is expected to take two + :class:`int` arguments and is also expected to have an :class:`int` + return value:: + + def sum_two_numbers(a: int, b: int) -> int: + return a + b + + Function annotation syntax is explained in section :ref:`function`. + + See :term:`variable annotation` and :pep:`484`, + which describe this functionality. + Also see :ref:`annotations-howto` + for best practices on working with annotations. + + __future__ + A :ref:`future statement <future>`, ``from __future__ import <feature>``, + directs the compiler to compile the current module using syntax or + semantics that will become standard in a future release of Python. + The :mod:`__future__` module documents the possible values of + *feature*. By importing this module and evaluating its variables, + you can see when a new feature was first added to the language and + when it will (or did) become the default:: + + >>> import __future__ + >>> __future__.division + _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192) + + garbage collection + The process of freeing memory when it is not used anymore. Python + performs garbage collection via reference counting and a cyclic garbage + collector that is able to detect and break reference cycles. The + garbage collector can be controlled using the :mod:`gc` module. + + .. index:: single: generator + + generator + A function which returns a :term:`generator iterator`. It looks like a + normal function except that it contains :keyword:`yield` expressions + for producing a series of values usable in a for-loop or that can be + retrieved one at a time with the :func:`next` function. + + Usually refers to a generator function, but may refer to a + *generator iterator* in some contexts. In cases where the intended + meaning isn't clear, using the full terms avoids ambiguity. + + generator iterator + An object created by a :term:`generator` function. + + Each :keyword:`yield` temporarily suspends processing, remembering the + location execution state (including local variables and pending + try-statements). When the *generator iterator* resumes, it picks up where + it left off (in contrast to functions which start fresh on every + invocation). + + .. index:: single: generator expression + + generator expression + An expression that returns an iterator. It looks like a normal expression + followed by a :keyword:`!for` clause defining a loop variable, range, + and an optional :keyword:`!if` clause. The combined expression + generates values for an enclosing function:: + + >>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81 + 285 + + generic function + A function composed of multiple functions implementing the same operation + for different types. Which implementation should be used during a call is + determined by the dispatch algorithm. + + See also the :term:`single dispatch` glossary entry, the + :func:`functools.singledispatch` decorator, and :pep:`443`. + + generic type + A :term:`type` that can be parameterized; typically a + :ref:`container class<sequence-types>` such as :class:`list` or + :class:`dict`. Used for :term:`type hints <type hint>` and + :term:`annotations <annotation>`. + + For more details, see :ref:`generic alias types<types-genericalias>`, + :pep:`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module. + + GIL + See :term:`global interpreter lock`. + + global interpreter lock + The mechanism used by the :term:`CPython` interpreter to assure that + only one thread executes Python :term:`bytecode` at a time. + This simplifies the CPython implementation by making the object model + (including critical built-in types such as :class:`dict`) implicitly + safe against concurrent access. Locking the entire interpreter + makes it easier for the interpreter to be multi-threaded, at the + expense of much of the parallelism afforded by multi-processor + machines. + + However, some extension modules, either standard or third-party, + are designed so as to release the GIL when doing computationally intensive + tasks such as compression or hashing. Also, the GIL is always released + when doing I/O. + + Past efforts to create a "free-threaded" interpreter (one which locks + shared data at a much finer granularity) have not been successful + because performance suffered in the common single-processor case. It + is believed that overcoming this performance issue would make the + implementation much more complicated and therefore costlier to maintain. + + + hash-based pyc + A bytecode cache file that uses the hash rather than the last-modified + time of the corresponding source file to determine its validity. See + :ref:`pyc-invalidation`. + + hashable + An object is *hashable* if it has a hash value which never changes during + its lifetime (it needs a :meth:`__hash__` method), and can be compared to + other objects (it needs an :meth:`__eq__` method). Hashable objects which + compare equal must have the same hash value. + + Hashability makes an object usable as a dictionary key and a set member, + because these data structures use the hash value internally. + + Most of Python's immutable built-in objects are hashable; mutable + containers (such as lists or dictionaries) are not; immutable + containers (such as tuples and frozensets) are only hashable if + their elements are hashable. Objects which are + instances of user-defined classes are hashable by default. They all + compare unequal (except with themselves), and their hash value is derived + from their :func:`id`. + + IDLE + An Integrated Development and Learning Environment for Python. + :ref:`idle` is a basic editor and interpreter environment + which ships with the standard distribution of Python. + + immutable + An object with a fixed value. Immutable objects include numbers, strings and + tuples. Such an object cannot be altered. A new object has to + be created if a different value has to be stored. They play an important + role in places where a constant hash value is needed, for example as a key + in a dictionary. + + import path + A list of locations (or :term:`path entries <path entry>`) that are + searched by the :term:`path based finder` for modules to import. During + import, this list of locations usually comes from :data:`sys.path`, but + for subpackages it may also come from the parent package's ``__path__`` + attribute. + + importing + The process by which Python code in one module is made available to + Python code in another module. + + importer + An object that both finds and loads a module; both a + :term:`finder` and :term:`loader` object. + + interactive + Python has an interactive interpreter which means you can enter + statements and expressions at the interpreter prompt, immediately + execute them and see their results. Just launch ``python`` with no + arguments (possibly by selecting it from your computer's main + menu). It is a very powerful way to test out new ideas or inspect + modules and packages (remember ``help(x)``). + + interpreted + Python is an interpreted language, as opposed to a compiled one, + though the distinction can be blurry because of the presence of the + bytecode compiler. This means that source files can be run directly + without explicitly creating an executable which is then run. + Interpreted languages typically have a shorter development/debug cycle + than compiled ones, though their programs generally also run more + slowly. See also :term:`interactive`. + + interpreter shutdown + When asked to shut down, the Python interpreter enters a special phase + where it gradually releases all allocated resources, such as modules + and various critical internal structures. It also makes several calls + to the :term:`garbage collector <garbage collection>`. This can trigger + the execution of code in user-defined destructors or weakref callbacks. + Code executed during the shutdown phase can encounter various + exceptions as the resources it relies on may not function anymore + (common examples are library modules or the warnings machinery). + + The main reason for interpreter shutdown is that the ``__main__`` module + or the script being run has finished executing. + + iterable + An object capable of returning its members one at a time. Examples of + iterables include all sequence types (such as :class:`list`, :class:`str`, + and :class:`tuple`) and some non-sequence types like :class:`dict`, + :term:`file objects <file object>`, and objects of any classes you define + with an :meth:`__iter__` method or with a :meth:`__getitem__` method + that implements :term:`sequence` semantics. + + Iterables can be + used in a :keyword:`for` loop and in many other places where a sequence is + needed (:func:`zip`, :func:`map`, ...). When an iterable object is passed + as an argument to the built-in function :func:`iter`, it returns an + iterator for the object. This iterator is good for one pass over the set + of values. When using iterables, it is usually not necessary to call + :func:`iter` or deal with iterator objects yourself. The ``for`` + statement does that automatically for you, creating a temporary unnamed + variable to hold the iterator for the duration of the loop. See also + :term:`iterator`, :term:`sequence`, and :term:`generator`. + + iterator + An object representing a stream of data. Repeated calls to the iterator's + :meth:`~iterator.__next__` method (or passing it to the built-in function + :func:`next`) return successive items in the stream. When no more data + are available a :exc:`StopIteration` exception is raised instead. At this + point, the iterator object is exhausted and any further calls to its + :meth:`__next__` method just raise :exc:`StopIteration` again. Iterators + are required to have an :meth:`__iter__` method that returns the iterator + object itself so every iterator is also iterable and may be used in most + places where other iterables are accepted. One notable exception is code + which attempts multiple iteration passes. A container object (such as a + :class:`list`) produces a fresh new iterator each time you pass it to the + :func:`iter` function or use it in a :keyword:`for` loop. Attempting this + with an iterator will just return the same exhausted iterator object used + in the previous iteration pass, making it appear like an empty container. + + More information can be found in :ref:`typeiter`. + + .. impl-detail:: + + CPython does not consistently apply the requirement that an iterator + define :meth:`__iter__`. + + key function + A key function or collation function is a callable that returns a value + used for sorting or ordering. For example, :func:`locale.strxfrm` is + used to produce a sort key that is aware of locale specific sort + conventions. + + A number of tools in Python accept key functions to control how elements + are ordered or grouped. They include :func:`min`, :func:`max`, + :func:`sorted`, :meth:`list.sort`, :func:`heapq.merge`, + :func:`heapq.nsmallest`, :func:`heapq.nlargest`, and + :func:`itertools.groupby`. + + There are several ways to create a key function. For example. the + :meth:`str.lower` method can serve as a key function for case insensitive + sorts. Alternatively, a key function can be built from a + :keyword:`lambda` expression such as ``lambda r: (r[0], r[2])``. Also, + :func:`operator.attrgetter`, :func:`operator.itemgetter`, and + :func:`operator.methodcaller` are three key function constructors. See the :ref:`Sorting HOW TO + <sortinghowto>` for examples of how to create and use key functions. + + keyword argument + See :term:`argument`. + + lambda + An anonymous inline function consisting of a single :term:`expression` + which is evaluated when the function is called. The syntax to create + a lambda function is ``lambda [parameters]: expression`` + + LBYL + Look before you leap. This coding style explicitly tests for + pre-conditions before making calls or lookups. This style contrasts with + the :term:`EAFP` approach and is characterized by the presence of many + :keyword:`if` statements. + + In a multi-threaded environment, the LBYL approach can risk introducing a + race condition between "the looking" and "the leaping". For example, the + code, ``if key in mapping: return mapping[key]`` can fail if another + thread removes *key* from *mapping* after the test, but before the lookup. + This issue can be solved with locks or by using the EAFP approach. + + locale encoding + On Unix, it is the encoding of the LC_CTYPE locale. It can be set with + :func:`locale.setlocale(locale.LC_CTYPE, new_locale) <locale.setlocale>`. + + On Windows, it is the ANSI code page (ex: ``"cp1252"``). + + On Android and VxWorks, Python uses ``"utf-8"`` as the locale encoding. + + ``locale.getencoding()`` can be used to get the locale encoding. + + See also the :term:`filesystem encoding and error handler`. + + list + A built-in Python :term:`sequence`. Despite its name it is more akin + to an array in other languages than to a linked list since access to + elements is O(1). + + list comprehension + A compact way to process all or part of the elements in a sequence and + return a list with the results. ``result = ['{:#04x}'.format(x) for x in + range(256) if x % 2 == 0]`` generates a list of strings containing + even hex numbers (0x..) in the range from 0 to 255. The :keyword:`if` + clause is optional. If omitted, all elements in ``range(256)`` are + processed. + + loader + An object that loads a module. It must define a method named + :meth:`load_module`. A loader is typically returned by a + :term:`finder`. See :pep:`302` for details and + :class:`importlib.abc.Loader` for an :term:`abstract base class`. + + magic method + .. index:: pair: magic; method + + An informal synonym for :term:`special method`. + + mapping + A container object that supports arbitrary key lookups and implements the + methods specified in the :class:`collections.abc.Mapping` or + :class:`collections.abc.MutableMapping` + :ref:`abstract base classes <collections-abstract-base-classes>`. Examples + include :class:`dict`, :class:`collections.defaultdict`, + :class:`collections.OrderedDict` and :class:`collections.Counter`. + + meta path finder + A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path + finders are related to, but different from :term:`path entry finders + <path entry finder>`. + + See :class:`importlib.abc.MetaPathFinder` for the methods that meta path + finders implement. + + metaclass + The class of a class. Class definitions create a class name, a class + dictionary, and a list of base classes. The metaclass is responsible for + taking those three arguments and creating the class. Most object oriented + programming languages provide a default implementation. What makes Python + special is that it is possible to create custom metaclasses. Most users + never need this tool, but when the need arises, metaclasses can provide + powerful, elegant solutions. They have been used for logging attribute + access, adding thread-safety, tracking object creation, implementing + singletons, and many other tasks. + + More information can be found in :ref:`metaclasses`. + + method + A function which is defined inside a class body. If called as an attribute + of an instance of that class, the method will get the instance object as + its first :term:`argument` (which is usually called ``self``). + See :term:`function` and :term:`nested scope`. + + method resolution order + Method Resolution Order is the order in which base classes are searched + for a member during lookup. See `The Python 2.3 Method Resolution Order + <https://www.python.org/download/releases/2.3/mro/>`_ for details of the + algorithm used by the Python interpreter since the 2.3 release. + + module + An object that serves as an organizational unit of Python code. Modules + have a namespace containing arbitrary Python objects. Modules are loaded + into Python by the process of :term:`importing`. + + See also :term:`package`. + + module spec + A namespace containing the import-related information used to load a + module. An instance of :class:`importlib.machinery.ModuleSpec`. + + MRO + See :term:`method resolution order`. + + mutable + Mutable objects can change their value but keep their :func:`id`. See + also :term:`immutable`. + + named tuple + The term "named tuple" applies to any type or class that inherits from + tuple and whose indexable elements are also accessible using named + attributes. The type or class may have other features as well. + + Several built-in types are named tuples, including the values returned + by :func:`time.localtime` and :func:`os.stat`. Another example is + :data:`sys.float_info`:: + + >>> sys.float_info[1] # indexed access + 1024 + >>> sys.float_info.max_exp # named field access + 1024 + >>> isinstance(sys.float_info, tuple) # kind of tuple + True + + Some named tuples are built-in types (such as the above examples). + Alternatively, a named tuple can be created from a regular class + definition that inherits from :class:`tuple` and that defines named + fields. Such a class can be written by hand or it can be created with + the factory function :func:`collections.namedtuple`. The latter + technique also adds some extra methods that may not be found in + hand-written or built-in named tuples. + + namespace + The place where a variable is stored. Namespaces are implemented as + dictionaries. There are the local, global and built-in namespaces as well + as nested namespaces in objects (in methods). Namespaces support + modularity by preventing naming conflicts. For instance, the functions + :func:`builtins.open <.open>` and :func:`os.open` are distinguished by + their namespaces. Namespaces also aid readability and maintainability by + making it clear which module implements a function. For instance, writing + :func:`random.seed` or :func:`itertools.islice` makes it clear that those + functions are implemented by the :mod:`random` and :mod:`itertools` + modules, respectively. + + namespace package + A :pep:`420` :term:`package` which serves only as a container for + subpackages. Namespace packages may have no physical representation, + and specifically are not like a :term:`regular package` because they + have no ``__init__.py`` file. + + See also :term:`module`. + + nested scope + The ability to refer to a variable in an enclosing definition. For + instance, a function defined inside another function can refer to + variables in the outer function. Note that nested scopes by default work + only for reference and not for assignment. Local variables both read and + write in the innermost scope. Likewise, global variables read and write + to the global namespace. The :keyword:`nonlocal` allows writing to outer + scopes. + + new-style class + Old name for the flavor of classes now used for all class objects. In + earlier Python versions, only new-style classes could use Python's newer, + versatile features like :attr:`~object.__slots__`, descriptors, + properties, :meth:`__getattribute__`, class methods, and static methods. + + object + Any data with state (attributes or value) and defined behavior + (methods). Also the ultimate base class of any :term:`new-style + class`. + + package + A Python :term:`module` which can contain submodules or recursively, + subpackages. Technically, a package is a Python module with a + ``__path__`` attribute. + + See also :term:`regular package` and :term:`namespace package`. + + parameter + A named entity in a :term:`function` (or method) definition that + specifies an :term:`argument` (or in some cases, arguments) that the + function can accept. There are five kinds of parameter: + + * :dfn:`positional-or-keyword`: specifies an argument that can be passed + either :term:`positionally <argument>` or as a :term:`keyword argument + <argument>`. This is the default kind of parameter, for example *foo* + and *bar* in the following:: + + def func(foo, bar=None): ... + + .. _positional-only_parameter: + + * :dfn:`positional-only`: specifies an argument that can be supplied only + by position. Positional-only parameters can be defined by including a + ``/`` character in the parameter list of the function definition after + them, for example *posonly1* and *posonly2* in the following:: + + def func(posonly1, posonly2, /, positional_or_keyword): ... + + .. _keyword-only_parameter: + + * :dfn:`keyword-only`: specifies an argument that can be supplied only + by keyword. Keyword-only parameters can be defined by including a + single var-positional parameter or bare ``*`` in the parameter list + of the function definition before them, for example *kw_only1* and + *kw_only2* in the following:: + + def func(arg, *, kw_only1, kw_only2): ... + + * :dfn:`var-positional`: specifies that an arbitrary sequence of + positional arguments can be provided (in addition to any positional + arguments already accepted by other parameters). Such a parameter can + be defined by prepending the parameter name with ``*``, for example + *args* in the following:: + + def func(*args, **kwargs): ... + + * :dfn:`var-keyword`: specifies that arbitrarily many keyword arguments + can be provided (in addition to any keyword arguments already accepted + by other parameters). Such a parameter can be defined by prepending + the parameter name with ``**``, for example *kwargs* in the example + above. + + Parameters can specify both optional and required arguments, as well as + default values for some optional arguments. + + See also the :term:`argument` glossary entry, the FAQ question on + :ref:`the difference between arguments and parameters + <faq-argument-vs-parameter>`, the :class:`inspect.Parameter` class, the + :ref:`function` section, and :pep:`362`. + + path entry + A single location on the :term:`import path` which the :term:`path + based finder` consults to find modules for importing. + + path entry finder + A :term:`finder` returned by a callable on :data:`sys.path_hooks` + (i.e. a :term:`path entry hook`) which knows how to locate modules given + a :term:`path entry`. + + See :class:`importlib.abc.PathEntryFinder` for the methods that path entry + finders implement. + + path entry hook + A callable on the :data:`sys.path_hook` list which returns a :term:`path + entry finder` if it knows how to find modules on a specific :term:`path + entry`. + + path based finder + One of the default :term:`meta path finders <meta path finder>` which + searches an :term:`import path` for modules. + + path-like object + An object representing a file system path. A path-like object is either + a :class:`str` or :class:`bytes` object representing a path, or an object + implementing the :class:`os.PathLike` protocol. An object that supports + the :class:`os.PathLike` protocol can be converted to a :class:`str` or + :class:`bytes` file system path by calling the :func:`os.fspath` function; + :func:`os.fsdecode` and :func:`os.fsencode` can be used to guarantee a + :class:`str` or :class:`bytes` result instead, respectively. Introduced + by :pep:`519`. + + PEP + Python Enhancement Proposal. A PEP is a design document + providing information to the Python community, or describing a new + feature for Python or its processes or environment. PEPs should + provide a concise technical specification and a rationale for proposed + features. + + PEPs are intended to be the primary mechanisms for proposing major new + features, for collecting community input on an issue, and for documenting + the design decisions that have gone into Python. The PEP author is + responsible for building consensus within the community and documenting + dissenting opinions. + + See :pep:`1`. + + portion + A set of files in a single directory (possibly stored in a zip file) + that contribute to a namespace package, as defined in :pep:`420`. + + positional argument + See :term:`argument`. + + provisional API + A provisional API is one which has been deliberately excluded from + the standard library's backwards compatibility guarantees. While major + changes to such interfaces are not expected, as long as they are marked + provisional, backwards incompatible changes (up to and including removal + of the interface) may occur if deemed necessary by core developers. Such + changes will not be made gratuitously -- they will occur only if serious + fundamental flaws are uncovered that were missed prior to the inclusion + of the API. + + Even for provisional APIs, backwards incompatible changes are seen as + a "solution of last resort" - every attempt will still be made to find + a backwards compatible resolution to any identified problems. + + This process allows the standard library to continue to evolve over + time, without locking in problematic design errors for extended periods + of time. See :pep:`411` for more details. + + provisional package + See :term:`provisional API`. + + Python 3000 + Nickname for the Python 3.x release line (coined long ago when the + release of version 3 was something in the distant future.) This is also + abbreviated "Py3k". + + Pythonic + An idea or piece of code which closely follows the most common idioms + of the Python language, rather than implementing code using concepts + common to other languages. For example, a common idiom in Python is + to loop over all elements of an iterable using a :keyword:`for` + statement. Many other languages don't have this type of construct, so + people unfamiliar with Python sometimes use a numerical counter instead:: + + for i in range(len(food)): + print(food[i]) + + As opposed to the cleaner, Pythonic method:: + + for piece in food: + print(piece) + + qualified name + A dotted name showing the "path" from a module's global scope to a + class, function or method defined in that module, as defined in + :pep:`3155`. For top-level functions and classes, the qualified name + is the same as the object's name:: + + >>> class C: + ... class D: + ... def meth(self): + ... pass + ... + >>> C.__qualname__ + 'C' + >>> C.D.__qualname__ + 'C.D' + >>> C.D.meth.__qualname__ + 'C.D.meth' + + When used to refer to modules, the *fully qualified name* means the + entire dotted path to the module, including any parent packages, + e.g. ``email.mime.text``:: + + >>> import email.mime.text + >>> email.mime.text.__name__ + 'email.mime.text' + + reference count + The number of references to an object. When the reference count of an + object drops to zero, it is deallocated. Reference counting is + generally not visible to Python code, but it is a key element of the + :term:`CPython` implementation. Programmers can call the + :func:`sys.getrefcount` function to return the + reference count for a particular object. + + regular package + A traditional :term:`package`, such as a directory containing an + ``__init__.py`` file. + + See also :term:`namespace package`. + + __slots__ + A declaration inside a class that saves memory by pre-declaring space for + instance attributes and eliminating instance dictionaries. Though + popular, the technique is somewhat tricky to get right and is best + reserved for rare cases where there are large numbers of instances in a + memory-critical application. + + sequence + An :term:`iterable` which supports efficient element access using integer + indices via the :meth:`__getitem__` special method and defines a + :meth:`__len__` method that returns the length of the sequence. + Some built-in sequence types are :class:`list`, :class:`str`, + :class:`tuple`, and :class:`bytes`. Note that :class:`dict` also + supports :meth:`__getitem__` and :meth:`__len__`, but is considered a + mapping rather than a sequence because the lookups use arbitrary + :term:`immutable` keys rather than integers. + + The :class:`collections.abc.Sequence` abstract base class + defines a much richer interface that goes beyond just + :meth:`__getitem__` and :meth:`__len__`, adding :meth:`count`, + :meth:`index`, :meth:`__contains__`, and + :meth:`__reversed__`. Types that implement this expanded + interface can be registered explicitly using + :func:`~abc.ABCMeta.register`. + + set comprehension + A compact way to process all or part of the elements in an iterable and + return a set with the results. ``results = {c for c in 'abracadabra' if + c not in 'abc'}`` generates the set of strings ``{'r', 'd'}``. See + :ref:`comprehensions`. + + single dispatch + A form of :term:`generic function` dispatch where the implementation is + chosen based on the type of a single argument. + + slice + An object usually containing a portion of a :term:`sequence`. A slice is + created using the subscript notation, ``[]`` with colons between numbers + when several are given, such as in ``variable_name[1:3:5]``. The bracket + (subscript) notation uses :class:`slice` objects internally. + + special method + .. index:: pair: special; method + + A method that is called implicitly by Python to execute a certain + operation on a type, such as addition. Such methods have names starting + and ending with double underscores. Special methods are documented in + :ref:`specialnames`. + + statement + A statement is part of a suite (a "block" of code). A statement is either + an :term:`expression` or one of several constructs with a keyword, such + as :keyword:`if`, :keyword:`while` or :keyword:`for`. + + strong reference + In Python's C API, a strong reference is a reference to an object + which increments the object's reference count when it is created and + decrements the object's reference count when it is deleted. + + The :c:func:`Py_NewRef` function can be used to create a strong reference + to an object. Usually, the :c:func:`Py_DECREF` function must be called on + the strong reference before exiting the scope of the strong reference, to + avoid leaking one reference. + + See also :term:`borrowed reference`. + + text encoding + A string in Python is a sequence of Unicode code points (in range + ``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be + serialized as a sequence of bytes. + + Serializing a string into a sequence of bytes is known as "encoding", and + recreating the string from the sequence of bytes is known as "decoding". + + There are a variety of different text serialization + :ref:`codecs <standard-encodings>`, which are collectively referred to as + "text encodings". + + text file + A :term:`file object` able to read and write :class:`str` objects. + Often, a text file actually accesses a byte-oriented datastream + and handles the :term:`text encoding` automatically. + Examples of text files are files opened in text mode (``'r'`` or ``'w'``), + :data:`sys.stdin`, :data:`sys.stdout`, and instances of + :class:`io.StringIO`. + + See also :term:`binary file` for a file object able to read and write + :term:`bytes-like objects <bytes-like object>`. + + triple-quoted string + A string which is bound by three instances of either a quotation mark + (") or an apostrophe ('). While they don't provide any functionality + not available with single-quoted strings, they are useful for a number + of reasons. They allow you to include unescaped single and double + quotes within a string and they can span multiple lines without the + use of the continuation character, making them especially useful when + writing docstrings. + + type + The type of a Python object determines what kind of object it is; every + object has a type. An object's type is accessible as its + :attr:`~instance.__class__` attribute or can be retrieved with + ``type(obj)``. + + type alias + A synonym for a type, created by assigning the type to an identifier. + + Type aliases are useful for simplifying :term:`type hints <type hint>`. + For example:: + + def remove_gray_shades( + colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]: + pass + + could be made more readable like this:: + + Color = tuple[int, int, int] + + def remove_gray_shades(colors: list[Color]) -> list[Color]: + pass + + See :mod:`typing` and :pep:`484`, which describe this functionality. + + type hint + An :term:`annotation` that specifies the expected type for a variable, a class + attribute, or a function parameter or return value. + + Type hints are optional and are not enforced by Python but + they are useful to static type analysis tools, and aid IDEs with code + completion and refactoring. + + Type hints of global variables, class attributes, and functions, + but not local variables, can be accessed using + :func:`typing.get_type_hints`. + + See :mod:`typing` and :pep:`484`, which describe this functionality. + + universal newlines + A manner of interpreting text streams in which all of the following are + recognized as ending a line: the Unix end-of-line convention ``'\n'``, + the Windows convention ``'\r\n'``, and the old Macintosh convention + ``'\r'``. See :pep:`278` and :pep:`3116`, as well as + :func:`bytes.splitlines` for an additional use. + + variable annotation + An :term:`annotation` of a variable or a class attribute. + + When annotating a variable or a class attribute, assignment is optional:: + + class C: + field: 'annotation' + + Variable annotations are usually used for + :term:`type hints <type hint>`: for example this variable is expected to take + :class:`int` values:: + + count: int = 0 + + Variable annotation syntax is explained in section :ref:`annassign`. + + See :term:`function annotation`, :pep:`484` + and :pep:`526`, which describe this functionality. + Also see :ref:`annotations-howto` + for best practices on working with annotations. + + virtual environment + A cooperatively isolated runtime environment that allows Python users + and applications to install and upgrade Python distribution packages + without interfering with the behaviour of other Python applications + running on the same system. + + See also :mod:`venv`. + + virtual machine + A computer defined entirely in software. Python's virtual machine + executes the :term:`bytecode` emitted by the bytecode compiler. + + Zen of Python + Listing of Python design principles and philosophies that are helpful in + understanding and using the language. The listing can be found by typing + "``import this``" at the interactive prompt.
diff --git a/Doc/howto/annotations.rst b/Doc/howto/annotations.rst new file mode 100644 index 0000000..4720690 --- /dev/null +++ b/Doc/howto/annotations.rst
@@ -0,0 +1,232 @@ +.. _annotations-howto: + +************************** +Annotations Best Practices +************************** + +:author: Larry Hastings + +.. topic:: Abstract + + This document is designed to encapsulate the best practices + for working with annotations dicts. If you write Python code + that examines ``__annotations__`` on Python objects, we + encourage you to follow the guidelines described below. + + The document is organized into four sections: + best practices for accessing the annotations of an object + in Python versions 3.10 and newer, + best practices for accessing the annotations of an object + in Python versions 3.9 and older, + other best practices + for ``__annotations__`` that apply to any Python version, + and + quirks of ``__annotations__``. + + Note that this document is specifically about working with + ``__annotations__``, not uses *for* annotations. + If you're looking for information on how to use "type hints" + in your code, please see the :mod:`typing` module. + + +Accessing The Annotations Dict Of An Object In Python 3.10 And Newer +==================================================================== + + Python 3.10 adds a new function to the standard library: + :func:`inspect.get_annotations`. In Python versions 3.10 + and newer, calling this function is the best practice for + accessing the annotations dict of any object that supports + annotations. This function can also "un-stringize" + stringized annotations for you. + + If for some reason :func:`inspect.get_annotations` isn't + viable for your use case, you may access the + ``__annotations__`` data member manually. Best practice + for this changed in Python 3.10 as well: as of Python 3.10, + ``o.__annotations__`` is guaranteed to *always* work + on Python functions, classes, and modules. If you're + certain the object you're examining is one of these three + *specific* objects, you may simply use ``o.__annotations__`` + to get at the object's annotations dict. + + However, other types of callables--for example, + callables created by :func:`functools.partial`--may + not have an ``__annotations__`` attribute defined. When + accessing the ``__annotations__`` of a possibly unknown + object, best practice in Python versions 3.10 and + newer is to call :func:`getattr` with three arguments, + for example ``getattr(o, '__annotations__', None)``. + + Before Python 3.10, accessing ``__annotations__`` on a class that + defines no annotations but that has a parent class with + annotations would return the parent's ``__annotations__``. + In Python 3.10 and newer, the child class's annotations + will be an empty dict instead. + + +Accessing The Annotations Dict Of An Object In Python 3.9 And Older +=================================================================== + + In Python 3.9 and older, accessing the annotations dict + of an object is much more complicated than in newer versions. + The problem is a design flaw in these older versions of Python, + specifically to do with class annotations. + + Best practice for accessing the annotations dict of other + objects--functions, other callables, and modules--is the same + as best practice for 3.10, assuming you aren't calling + :func:`inspect.get_annotations`: you should use three-argument + :func:`getattr` to access the object's ``__annotations__`` + attribute. + + Unfortunately, this isn't best practice for classes. The problem + is that, since ``__annotations__`` is optional on classes, and + because classes can inherit attributes from their base classes, + accessing the ``__annotations__`` attribute of a class may + inadvertently return the annotations dict of a *base class.* + As an example:: + + class Base: + a: int = 3 + b: str = 'abc' + + class Derived(Base): + pass + + print(Derived.__annotations__) + + This will print the annotations dict from ``Base``, not + ``Derived``. + + Your code will have to have a separate code path if the object + you're examining is a class (``isinstance(o, type)``). + In that case, best practice relies on an implementation detail + of Python 3.9 and before: if a class has annotations defined, + they are stored in the class's ``__dict__`` dictionary. Since + the class may or may not have annotations defined, best practice + is to call the ``get`` method on the class dict. + + To put it all together, here is some sample code that safely + accesses the ``__annotations__`` attribute on an arbitrary + object in Python 3.9 and before:: + + if isinstance(o, type): + ann = o.__dict__.get('__annotations__', None) + else: + ann = getattr(o, '__annotations__', None) + + After running this code, ``ann`` should be either a + dictionary or ``None``. You're encouraged to double-check + the type of ``ann`` using :func:`isinstance` before further + examination. + + Note that some exotic or malformed type objects may not have + a ``__dict__`` attribute, so for extra safety you may also wish + to use :func:`getattr` to access ``__dict__``. + + +Manually Un-Stringizing Stringized Annotations +============================================== + + In situations where some annotations may be "stringized", + and you wish to evaluate those strings to produce the + Python values they represent, it really is best to + call :func:`inspect.get_annotations` to do this work + for you. + + If you're using Python 3.9 or older, or if for some reason + you can't use :func:`inspect.get_annotations`, you'll need + to duplicate its logic. You're encouraged to examine the + implementation of :func:`inspect.get_annotations` in the + current Python version and follow a similar approach. + + In a nutshell, if you wish to evaluate a stringized annotation + on an arbitrary object ``o``: + + * If ``o`` is a module, use ``o.__dict__`` as the + ``globals`` when calling :func:`eval`. + * If ``o`` is a class, use ``sys.modules[o.__module__].__dict__`` + as the ``globals``, and ``dict(vars(o))`` as the ``locals``, + when calling :func:`eval`. + * If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, + :func:`functools.wraps`, or :func:`functools.partial`, iteratively + unwrap it by accessing either ``o.__wrapped__`` or ``o.func`` as + appropriate, until you have found the root unwrapped function. + * If ``o`` is a callable (but not a class), use + ``o.__globals__`` as the globals when calling :func:`eval`. + + However, not all string values used as annotations can + be successfully turned into Python values by :func:`eval`. + String values could theoretically contain any valid string, + and in practice there are valid use cases for type hints that + require annotating with string values that specifically + *can't* be evaluated. For example: + + * :pep:`604` union types using ``|``, before support for this + was added to Python 3.10. + * Definitions that aren't needed at runtime, only imported + when :const:`typing.TYPE_CHECKING` is true. + + If :func:`eval` attempts to evaluate such values, it will + fail and raise an exception. So, when designing a library + API that works with annotations, it's recommended to only + attempt to evaluate string values when explicitly requested + to by the caller. + + +Best Practices For ``__annotations__`` In Any Python Version +============================================================ + + * You should avoid assigning to the ``__annotations__`` member + of objects directly. Let Python manage setting ``__annotations__``. + + * If you do assign directly to the ``__annotations__`` member + of an object, you should always set it to a ``dict`` object. + + * If you directly access the ``__annotations__`` member + of an object, you should ensure that it's a + dictionary before attempting to examine its contents. + + * You should avoid modifying ``__annotations__`` dicts. + + * You should avoid deleting the ``__annotations__`` attribute + of an object. + + +``__annotations__`` Quirks +========================== + + In all versions of Python 3, function + objects lazy-create an annotations dict if no annotations + are defined on that object. You can delete the ``__annotations__`` + attribute using ``del fn.__annotations__``, but if you then + access ``fn.__annotations__`` the object will create a new empty dict + that it will store and return as its annotations. Deleting the + annotations on a function before it has lazily created its annotations + dict will throw an ``AttributeError``; using ``del fn.__annotations__`` + twice in a row is guaranteed to always throw an ``AttributeError``. + + Everything in the above paragraph also applies to class and module + objects in Python 3.10 and newer. + + In all versions of Python 3, you can set ``__annotations__`` + on a function object to ``None``. However, subsequently + accessing the annotations on that object using ``fn.__annotations__`` + will lazy-create an empty dictionary as per the first paragraph of + this section. This is *not* true of modules and classes, in any Python + version; those objects permit setting ``__annotations__`` to any + Python value, and will retain whatever value is set. + + If Python stringizes your annotations for you + (using ``from __future__ import annotations``), and you + specify a string as an annotation, the string will + itself be quoted. In effect the annotation is quoted + *twice.* For example:: + + from __future__ import annotations + def foo(a: "str"): pass + + print(foo.__annotations__) + + This prints ``{'a': "'str'"}``. This shouldn't really be considered + a "quirk"; it's mentioned here simply because it might be surprising.
diff --git a/Doc/howto/argparse.rst b/Doc/howto/argparse.rst new file mode 100644 index 0000000..9ea140c --- /dev/null +++ b/Doc/howto/argparse.rst
@@ -0,0 +1,768 @@ +.. _argparse-tutorial: + +***************** +Argparse Tutorial +***************** + +:author: Tshepang Lekhonkhobe + +.. currentmodule:: argparse + +This tutorial is intended to be a gentle introduction to :mod:`argparse`, the +recommended command-line parsing module in the Python standard library. + +.. note:: + + There are two other modules that fulfill the same task, namely + :mod:`getopt` (an equivalent for ``getopt()`` from the C + language) and the deprecated :mod:`optparse`. + Note also that :mod:`argparse` is based on :mod:`optparse`, + and therefore very similar in terms of usage. + + +Concepts +======== + +Let's show the sort of functionality that we are going to explore in this +introductory tutorial by making use of the :command:`ls` command: + +.. code-block:: shell-session + + $ ls + cpython devguide prog.py pypy rm-unused-function.patch + $ ls pypy + ctypes_configure demo dotviewer include lib_pypy lib-python ... + $ ls -l + total 20 + drwxr-xr-x 19 wena wena 4096 Feb 18 18:51 cpython + drwxr-xr-x 4 wena wena 4096 Feb 8 12:04 devguide + -rwxr-xr-x 1 wena wena 535 Feb 19 00:05 prog.py + drwxr-xr-x 14 wena wena 4096 Feb 7 00:59 pypy + -rw-r--r-- 1 wena wena 741 Feb 18 01:01 rm-unused-function.patch + $ ls --help + Usage: ls [OPTION]... [FILE]... + List information about the FILEs (the current directory by default). + Sort entries alphabetically if none of -cftuvSUX nor --sort is specified. + ... + +A few concepts we can learn from the four commands: + +* The :command:`ls` command is useful when run without any options at all. It defaults + to displaying the contents of the current directory. + +* If we want beyond what it provides by default, we tell it a bit more. In + this case, we want it to display a different directory, ``pypy``. + What we did is specify what is known as a positional argument. It's named so + because the program should know what to do with the value, solely based on + where it appears on the command line. This concept is more relevant + to a command like :command:`cp`, whose most basic usage is ``cp SRC DEST``. + The first position is *what you want copied,* and the second + position is *where you want it copied to*. + +* Now, say we want to change behaviour of the program. In our example, + we display more info for each file instead of just showing the file names. + The ``-l`` in that case is known as an optional argument. + +* That's a snippet of the help text. It's very useful in that you can + come across a program you have never used before, and can figure out + how it works simply by reading its help text. + + +The basics +========== + +Let us start with a very simple example which does (almost) nothing:: + + import argparse + parser = argparse.ArgumentParser() + parser.parse_args() + +Following is a result of running the code: + +.. code-block:: shell-session + + $ python3 prog.py + $ python3 prog.py --help + usage: prog.py [-h] + + options: + -h, --help show this help message and exit + $ python3 prog.py --verbose + usage: prog.py [-h] + prog.py: error: unrecognized arguments: --verbose + $ python3 prog.py foo + usage: prog.py [-h] + prog.py: error: unrecognized arguments: foo + +Here is what is happening: + +* Running the script without any options results in nothing displayed to + stdout. Not so useful. + +* The second one starts to display the usefulness of the :mod:`argparse` + module. We have done almost nothing, but already we get a nice help message. + +* The ``--help`` option, which can also be shortened to ``-h``, is the only + option we get for free (i.e. no need to specify it). Specifying anything + else results in an error. But even then, we do get a useful usage message, + also for free. + + +Introducing Positional arguments +================================ + +An example:: + + import argparse + parser = argparse.ArgumentParser() + parser.add_argument("echo") + args = parser.parse_args() + print(args.echo) + +And running the code: + +.. code-block:: shell-session + + $ python3 prog.py + usage: prog.py [-h] echo + prog.py: error: the following arguments are required: echo + $ python3 prog.py --help + usage: prog.py [-h] echo + + positional arguments: + echo + + options: + -h, --help show this help message and exit + $ python3 prog.py foo + foo + +Here is what's happening: + +* We've added the :meth:`~ArgumentParser.add_argument` method, which is what we use to specify + which command-line options the program is willing to accept. In this case, + I've named it ``echo`` so that it's in line with its function. + +* Calling our program now requires us to specify an option. + +* The :meth:`~ArgumentParser.parse_args` method actually returns some data from the + options specified, in this case, ``echo``. + +* The variable is some form of 'magic' that :mod:`argparse` performs for free + (i.e. no need to specify which variable that value is stored in). + You will also notice that its name matches the string argument given + to the method, ``echo``. + +Note however that, although the help display looks nice and all, it currently +is not as helpful as it can be. For example we see that we got ``echo`` as a +positional argument, but we don't know what it does, other than by guessing or +by reading the source code. So, let's make it a bit more useful:: + + import argparse + parser = argparse.ArgumentParser() + parser.add_argument("echo", help="echo the string you use here") + args = parser.parse_args() + print(args.echo) + +And we get: + +.. code-block:: shell-session + + $ python3 prog.py -h + usage: prog.py [-h] echo