cpython/Modules/_testcapi_feature_macros.inc
Victor Stinner 82ab13c49a
[3.12] gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) (#105371)
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)

* Add "limited-c-api" and "stable-api" references.
* Rename "stable-abi-list" reference to "limited-api-list".
* Makefile: Document files regenerated by "make regen-limited-abi"
* Remove first empty line in generated files:

  - Lib/test/test_stable_abi_ctypes.py
  - PC/python3dll.c

(cherry picked from commit bae415ad02)

* gh-102304: Fix up Simple ABI doc (GH-105351)

(cherry picked from commit 0202aa002e)
2023-06-06 13:11:28 +00:00

49 lines
1.2 KiB
C++

// Generated by Tools/build/stable_abi.py
// Add an entry in dict `result` for each Stable ABI feature macro.
#ifdef HAVE_FORK
res = PyDict_SetItemString(result, "HAVE_FORK", Py_True);
#else
res = PyDict_SetItemString(result, "HAVE_FORK", Py_False);
#endif
if (res) {
Py_DECREF(result); return NULL;
}
#ifdef MS_WINDOWS
res = PyDict_SetItemString(result, "MS_WINDOWS", Py_True);
#else
res = PyDict_SetItemString(result, "MS_WINDOWS", Py_False);
#endif
if (res) {
Py_DECREF(result); return NULL;
}
#ifdef PY_HAVE_THREAD_NATIVE_ID
res = PyDict_SetItemString(result, "PY_HAVE_THREAD_NATIVE_ID", Py_True);
#else
res = PyDict_SetItemString(result, "PY_HAVE_THREAD_NATIVE_ID", Py_False);
#endif
if (res) {
Py_DECREF(result); return NULL;
}
#ifdef Py_REF_DEBUG
res = PyDict_SetItemString(result, "Py_REF_DEBUG", Py_True);
#else
res = PyDict_SetItemString(result, "Py_REF_DEBUG", Py_False);
#endif
if (res) {
Py_DECREF(result); return NULL;
}
#ifdef USE_STACKCHECK
res = PyDict_SetItemString(result, "USE_STACKCHECK", Py_True);
#else
res = PyDict_SetItemString(result, "USE_STACKCHECK", Py_False);
#endif
if (res) {
Py_DECREF(result); return NULL;
}