|
13 | 13 | # The current format is TOML.
|
14 | 14 |
|
15 | 15 | # There are these kinds of top-level "items":
|
16 |
| -# - struct: A C struct. Currently this file does not distinguish between: |
17 |
| -# - opaque structs, which the Limited API only handles via pointers |
18 |
| -# (so these can change at any time) |
19 |
| -# - structs where only certain members are part of the stable ABI (e.g. |
20 |
| -# PyObject) |
21 |
| -# - structs which must not be changed at all (e.g. PyType_Slot, which is |
22 |
| -# fully defined and used in arrays) |
| 16 | +# - struct: A C struct. See `struct_abi_kind` for how much of the struct is |
| 17 | +# exposed. |
23 | 18 | # - function: A function that must be kept available (and exported, i.e. not
|
24 | 19 | # converted to a macro).
|
25 | 20 | # - const: A simple value, defined with `#define`.
|
|
42 | 37 | # of the stable ABI.
|
43 | 38 | # - a combination of the above (functions that were called by macros that
|
44 | 39 | # were public in the past)
|
| 40 | +# - struct_abi_kind: for `struct`, defines how much of the struct is exposed: |
| 41 | +# - 'full-abi': All of the struct is part of the ABI, including the size |
| 42 | +# (users may define arrays of these structs). |
| 43 | +# Typically used for initalization, rather than at runtime. |
| 44 | +# - 'opaque': No members are part of the ABI, nor is the size. The Limited |
| 45 | +# API only handles these via pointers. The C definition should be |
| 46 | +# incomplete (opaque). |
| 47 | +# - 'members': Only specific members are part of the stable ABI. |
| 48 | +# The struct's size may change, so it can't be used in arrays. |
| 49 | +# Do not add new structs of this kind without an extremely good reason. |
| 50 | +# - members: For `struct` with struct_abi_kind = 'members', a list of the |
| 51 | +# exposed members. |
45 | 52 | # - doc: for `feature_macro`, the blurb added in documentation
|
46 | 53 | # - windows: for `feature_macro`, this macro is defined on Windows.
|
47 | 54 | # (This info is used to generate the DLL manifest and needs to be available
|
|
0 commit comments