Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Doc/c-api/apiabiversion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,23 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
This can be ``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for release
candidate or ``0xF`` for final.


.. c:namespace:: NULL
.. c:macro:: PY_RELEASE_LEVEL_ALPHA
:no-typesetting:
.. c:macro:: PY_RELEASE_LEVEL_BETA
:no-typesetting:
.. c:macro:: PY_RELEASE_LEVEL_GAMMA
:no-typesetting:
.. c:macro:: PY_RELEASE_LEVEL_FINAL
:no-typesetting:

For completeness, the values are available as macros:
:c:macro:`!PY_RELEASE_LEVEL_ALPHA` (``0xA``),
:c:macro:`!PY_RELEASE_LEVEL_BETA` (``0xB``),
:c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and
:c:macro:`!PY_RELEASE_LEVEL_FINAL` (``0xF``).

.. c:macro:: PY_RELEASE_SERIAL

The ``2`` in ``3.4.1a2``. Zero for final releases.
Expand All @@ -46,6 +63,10 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
Use this for numeric comparisons, for example,
``#if PY_VERSION_HEX >= ...``.

.. c:macro:: PY_VERSION

The Python version as a string, for example, ``"3.4.1a2"``.


Run-time version
----------------
Expand Down
7 changes: 5 additions & 2 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -820,15 +820,18 @@ struct:
.. versionadded:: 3.5

.. c:macro:: PYTHON_API_VERSION
PYTHON_API_STRING

The C API version. Defined for backwards compatibility.
The C API version, as an integer (``1013``) and string (``"1013"``), respectively.
Defined for backwards compatibility.

Currently, this constant is not updated in new Python versions, and is not
useful for versioning. This may change in the future.

.. c:macro:: PYTHON_ABI_VERSION
PYTHON_ABI_STRING

Defined as ``3`` for backwards compatibility.
Defined as ``3`` and ``"3"``, respectively, for backwards compatibility.

Currently, this constant is not updated in new Python versions, and is not
useful for versioning. This may change in the future.
Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ _PyJit_TryInitializeTracing(PyThreadState *tstate, _PyInterpreterFrame *frame,
int oparg);

void _PyJit_FinalizeTracing(PyThreadState *tstate);
void _PyJit_TracerFree(_PyThreadStateImpl *_tstate);

void _PyJit_Tracer_InvalidateDependency(PyThreadState *old_tstate, void *obj);

Expand Down
6 changes: 3 additions & 3 deletions Include/internal/pycore_tstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ typedef struct _PyJitTracerState {
_PyJitTracerInitialState initial_state;
_PyJitTracerPreviousState prev_state;
_PyJitTracerTranslatorState translator_state;
JitOptContext *opt_context;
_PyUOpInstruction *code_buffer;
JitOptContext opt_context;
_PyUOpInstruction code_buffer[UOP_MAX_TRACE_LENGTH];
} _PyJitTracerState;

#endif
Expand Down Expand Up @@ -153,7 +153,7 @@ typedef struct _PyThreadStateImpl {
Py_ssize_t reftotal; // this thread's total refcount operations
#endif
#if _Py_TIER2
_PyJitTracerState jit_tracer_state;
_PyJitTracerState *jit_tracer_state;
#endif
_PyPolicy policy;
} _PyThreadStateImpl;
Expand Down
Loading
Loading