8000 rename c_api to old_c_api · mscherer/pythoncapi@4c8a66a · GitHub
[go: up one dir, main page]

Skip to content

Commit 4c8a66a

Browse files
committed
rename c_api to old_c_api
1 parent 67b84f6 commit 4c8a66a

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

doc/backward_compatibility.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Backward compatibility
55
++++++++++++++++++++++
66

77
To reduce the risk of failure, :ref:`changing the C API <new-c-api>` should be
8-
as much as possible compatible with the :ref:`Python 3.7 C API <c-api>`. One
8+
as much as possible compatible with the :ref:`Python 3.7 C API <old-c-api>`. One
99
solution for that is to provide a backward compatible header file and/or
1010
library.
1111

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Pages
3333

3434
roadmap
3535
runtimes
36-
c_api
36+
old_c_api
3737
bad_api
3838
new_api
3939
private_c_api

doc/new_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Design goals
2020
* Reduce the size of the ABI, especially export less symbols.
2121

2222
The :ref:`backward compatibility <back-compat>` issue is partially solved by
23-
keeping the existing :ref:`old C API <c-api>` available as an opt-in option:
23+
keeping the existing :ref:`old C API <old-c-api>` available as an opt-in option:
2424
see the :ref:`Regular runtime <regular-runtime>`.
2525

2626
Non-goal
@@ -86,5 +86,5 @@ C extensions must be modified to use functions to access fields.
8686

8787
In the worst case, there will be no way to access to hidden field from the
8888
public C API. For these users, the only option will be to stick at the
89-
:ref:`old C API <c-api>` which remains backward compatible and still expose
89+
:ref:`old C API <old-c-api>` which remains backward compatible and still expose
9090
implementation details like C structure fields.

doc/c_api.rst renamed to doc/old_c_api.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
.. _c-api:
1+
.. _old-c-api:
22

3-
++++++++++++++++
4-
Python 3.7 C API
5-
++++++++++++++++
3+
+++++++++
4+
Old C API
5+
+++++++++
6+
7+
The "Old C API" is the Python 3.7 API which "leaks" implementation details like
8+
``PyObject.ob_refcnt`` through :ref:`Py_INCREF() <incref>`. This API will
9+
remain available for CPython internals but also for specific use cases like
10+
Cython (for best performances) and debugging tools.
611

712
See also :ref:`Calling conventensions <calling-conventions>`.
813

doc/roadmap.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Roadmap
1717
Decide what to do.
1818
* Step 4: if step 3 gone fine and most people are still ok to continue, make
1919
the :ref:`new C API <new-c-api>` as the default in CPython and add an option
20-
for **opt-out** to stick with the :ref:`old C API <c-api>`.
20+
for **opt-out** to stick with the :ref:`old C API <old-c-api>`.
2121

2222
Status
2323
======

doc/runtimes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Regular Python: /usr/bin/python3
2020
* Python compiled in release mode
2121
* This runtime still provides ``Py_INCREF()`` macro:
2222
modify ``PyObject.ob_refcnt`` at the ABI level.
23-
* Should be fully compatible with :ref:`Python 3.7 C API <c-api>`
23+
* Should be fully compatible with :ref:`Python 3.7 C API <old-c-api>`
2424
* Should be fully compatible with Python 3.7 stable **ABI** (it may become
2525
incompatible with the Python 3.7 full ABI).
2626

0 commit comments

Comments
 (0)
0