cpython/Doc/c-api
Victor Stinner 8bea6c411d
gh-115754: Add Py_GetConstant() function (#116883)
Add Py_GetConstant() and Py_GetConstantBorrowed() functions.

In the limited C API version 3.13, getting Py_None, Py_False,
Py_True, Py_Ellipsis and Py_NotImplemented singletons is now
implemented as function calls at the stable ABI level to hide
implementation details. Getting these constants still return borrowed
references.

Add _testlimitedcapi/object.c and test_capi/test_object.py to test
Py_GetConstant() and Py_GetConstantBorrowed() functions.
2024-03-21 16:07:00 +00:00
..
abstract.rst gh-85275: Remove old buffer APIs (#105137) 2023-06-02 01:12:40 +00:00
allocation.rst gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) 2023-08-07 15:40:59 -06:00
apiabiversion.rst gh-107298: Fix Sphinx warnings in the C API doc (#107302) 2023-07-27 01:41:15 +02:00
arg.rst gh-65210: Add const qualifiers in PyArg_VaParseTupleAndKeywords() (GH-105958) 2023-12-04 13:14:56 +02:00
bool.rst gh-110481, doc: Add "immortal" term to the glossary (#112180) 2023-11-17 15:09:19 +01:00
buffer.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
bytearray.rst GH-97950: Use new-style index directive ('object') (#104158) 2023-05-04 13:04:41 +03:00
bytes.rst docs: specify that PyBytes_AsStringAndSize returns 0 on success (GH-110888) 2023-11-03 14:51:28 +01:00
call.rst Add a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET (#110963) 2023-10-23 19:00:52 +03:00
capsule.rst gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) 2023-07-27 18:44:32 +03:00
cell.rst gh-107298: Fix Sphinx warnings in the C API doc (#107302) 2023-07-27 01:41:15 +02:00
code.rst gh-115756: make PyCode_GetFirstFree an unstable API (GH-115781) 2024-03-19 09:20:38 +00:00
codec.rst gh-107298: Fix doc references to undocumented modules (#107300) 2023-07-26 18:59:06 +02:00
complex.rst gh-109598: make PyComplex_RealAsDouble/ImagAsDouble use __complex__ (GH-109647) 2024-01-15 16:04:17 +01:00
concrete.rst GH-97950: Use new-style index directive ('object') (#104158) 2023-05-04 13:04:41 +03:00
contextvars.rst gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
conversion.rst Document PyOS_strtoul and PyOS_strtol (GH-114048) 2024-01-26 19:44:45 +02:00
coro.rst
datetime.rst gh-107298: Fix C API datetime documentation (GH-108034) 2023-08-21 21:15:46 +03:00
descriptor.rst
dict.rst gh-112066: Add `PyDict_SetDefaultRef` function. (#112123) 2024-02-06 11:36:23 -05:00
exceptions.rst gh-115799: Add missing double-quote in docs (#115884) 2024-02-25 14:07:08 -08:00
file.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
float.rst gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) 2023-07-21 10:52:07 +03:00
frame.rst gh-101100: Properly document frame object attributes (#112735) 2023-12-05 19:27:59 +00:00
function.rst gh-101100: Further improve docs on function attributes (#113001) 2023-12-12 20:21:12 +00:00
gcsupport.rst gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (#114786) 2024-02-10 15:59:23 -07:00
gen.rst
hash.rst gh-111389: expose PyHASH_INF/BITS/MODULUS/IMAG macros as public (#111418) 2024-03-09 21:32:05 +01:00
import.rst gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
index.rst
init.rst gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
init_config.rst gh-110481, doc: Add "immortal" term to the glossary (#112180) 2023-11-17 15:09:19 +01:00
intro.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
iter.rst More minor fixes to C API docs (GH-31525) 2022-04-02 12:31:05 -07:00
iterator.rst gh-107298: Fix Sphinx warnings in the C API doc (#107302) 2023-07-27 01:41:15 +02:00
list.rst gh-114329: Add `PyList_GetItemRef` function (GH-114504) 2024-02-02 14:03:15 +01:00
long.rst Docs: PyUnstable_Long_IsCompact() docs now mention PyLong_AsNativeBytes() (#116634) 2024-03-14 00:01:13 +01:00
mapping.rst gh-108511: Add C API functions which do not silently ignore errors (GH-109025) 2023-09-17 14:23:31 +03:00
marshal.rst gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (#105185) 2023-06-02 08:59:18 +01:00
memory.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
memoryview.rst gh-101100: Fix sphinx warnings in `Doc/c-api/memoryview.rst` (GH-114669) 2024-01-29 11:56:11 +02:00
method.rst gh-107091: Fix the use of some C domain roles (#107092) 2023-07-23 12:27:05 +02:00
module.rst gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) 2023-08-22 15:50:30 +03:00
none.rst gh-110481, doc: Add "immortal" term to the glossary (#112180) 2023-11-17 15:09:19 +01:00
number.rst GH-97950: Use new-style index directive ('builtin') (#104164) 2023-05-06 06:54:08 +03:00
object.rst gh-115754: Add Py_GetConstant() function (#116883) 2024-03-21 16:07:00 +00:00
objimpl.rst
perfmaps.rst gh-103295: expose API for writing perf map files (#103546) 2023-05-21 11:12:24 +01:00
refcounting.rst gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
reflection.rst bpo-46836: Add Doc/c-api/frame.rst (GH-32051) 2022-03-23 13:19:13 +01:00
sequence.rst gh-101100: Fix some broken sphinx references (#107095) 2023-07-23 03:23:44 -06:00
set.rst gh-101100: Fix Sphinx reference warnings (GH-112416) 2023-11-25 15:40:19 -08:00
slice.rst gh-110481, doc: Add "immortal" term to the glossary (#112180) 2023-11-17 15:09:19 +01:00
stable.rst gh-112092: clarify unstable ABI recompilation requirements (#112093) 2024-01-18 21:04:40 +01:00
structures.rst Fix the PyGetSetDef documentation (GH-116056) 2024-03-05 17:48:20 +02:00
sys.rst gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (GH-114825) 2024-02-11 18:51:07 +00:00
time.rst gh-110850: Add PyTime_t C API (GH-115215) 2024-02-12 18:13:10 +01:00
tuple.rst gh-107298: Docs: add targets for some :c:member: and :c:macro: references (GH-107316) 2023-07-27 09:04:02 +03:00
type.rst gh-111696, PEP 737: Add PyType_GetModuleName() function (#116824) 2024-03-14 18:17:43 +00:00
typehints.rst gh-107298: Fix Sphinx warnings in the C API doc (#107302) 2023-07-27 01:41:15 +02:00
typeobj.rst gh-111178: Docs: fix `traverseproc`, `inquiry`, and `destructor` parameters in slot typedefs table (GH-112742) 2023-12-06 10:44:41 +01:00
unicode.rst gh-111696, PEP 737: Add %T and %N to PyUnicode_FromFormat() (#116839) 2024-03-14 22:23:00 +00:00
utilities.rst gh-110850: Add PyTime_t C API (GH-115215) 2024-02-12 18:13:10 +01:00
veryhigh.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
weakref.rst gh-105927: PyWeakref_GetRef() returns 1 on success (#106561) 2023-07-09 15:50:26 +00:00