mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-91324: List feature macros in the stable ABI manifest, improve tests (GH-32415)
This commit is contained in:
parent
d1de10784d
commit
6dcbc08c95
6 changed files with 232 additions and 23 deletions
|
@ -5919,6 +5919,18 @@ frame_getlasti(PyObject *self, PyObject *frame)
|
|||
return PyLong_FromLong(lasti);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
get_feature_macros(PyObject *self, PyObject *Py_UNUSED(args))
|
||||
{
|
||||
PyObject *result = PyDict_New();
|
||||
if (!result) {
|
||||
return NULL;
|
||||
}
|
||||
int res;
|
||||
#include "_testcapi_feature_macros.inc"
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *negative_dictoffset(PyObject *, PyObject *);
|
||||
static PyObject *test_buildvalue_issue38913(PyObject *, PyObject *);
|
||||
|
@ -6214,6 +6226,7 @@ static PyMethodDef TestMethods[] = {
|
|||
{"frame_getgenerator", frame_getgenerator, METH_O, NULL},
|
||||
{"frame_getbuiltins", frame_getbuiltins, METH_O, NULL},
|
||||
{"frame_getlasti", frame_getlasti, METH_O, NULL},
|
||||
{"get_feature_macros", get_feature_macros, METH_NOARGS, NULL},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue