File tree Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
- .. _bad-api :
1
+ .. _bad-c- api :
2
2
3
3
+++++++++
4
4
Bad C API
5
5
+++++++++
6
6
7
7
The first step to change the Python C API is to define what is a good and a bad
8
- C API. This page describes bad API.
8
+ C API. The goal is to hide :ref: `implementation details <impl-details >`. The
9
+ :ref: `new C API <new-c-api >` must not leak implementation details anymore.
9
10
10
- **Goal: ** Hide implementation details.
11
-
12
- The C API must not leak implementation details anymore.
11
+ See also :ref: `Remove functions <remove-funcs >`.
13
12
14
13
.. _borrowed-ref :
15
14
Original file line number Diff line number Diff line change @@ -31,9 +31,13 @@ Non-goal
31
31
development harder. Cython will still be able to access directly the full C
32
32
API which includes implementation details and low-level "private" APIs.
33
33
34
+ .. _impl-details :
35
+
34
36
Hide implementation details
35
37
===========================
36
38
39
+ See also :ref: `Bad C API <bad-c-api >`.
40
+
37
41
What are implementation details?
38
42
--------------------------------
39
43
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ The C API must not leak implementation details anymore
79
79
80
80
**Goal: ** Hide implementation details.
81
81
82
- See :ref: `Bad C API <bad-api >`.
82
+ See :ref: `Bad C API <bad-c- api >`.
83
83
84
84
85
85
Performance slowdown
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ exposing so many functions is an issue: CPython has to keep backward
12
12
compatibility, PyPy has to implement all these functions, etc. Third party
13
13
C extensions should call abstract functions like ``PyObject_GetItem() ``.
14
14
15
+ See :ref: `Bad C API <bad-c-api >`.
16
+
15
17
Good: abstract functions
16
18
========================
17
19
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Roadmap for a new Python C API
5
5
Roadmap
6
6
=======
7
7
8
- * Step 1: Identify :ref: `Bad C API <bad-api >` and list functions that should
8
+ * Step 1: Identify :ref: `Bad C API <bad-c- api >` and list functions that should
9
9
<
4478
td data-grid-cell-id="diff-f167ab4321c00c059a1d923d820185ef11fd2e38e682e6b254d2f37a7c6fe231-9-9-2" data-line-anchor="diff-f167ab4321c00c059a1d923d820185ef11fd2e38e682e6b254d2f37a7c6fe231R9" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side"> be modified or even removed
10
10
* Step 2: Add an **opt-in ** :ref: `new C API <new-c-api >` with these cleanups. Test :ref: `popular
11
11
C extensions <consumers>` to measure how much code is broken. Start to fix
You can’t perform that action at this time.
0 commit comments