Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update
  • Loading branch information
corona10 committed May 21, 2023
commit 5c417a64f475d55b77985bf4f7e511187e79c478
10 changes: 9 additions & 1 deletion Modules/_testcapi/clinic/long.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Modules/_testcapi/long.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,16 @@ _testcapi_test_long_numbits_impl(PyObject *module)
Py_RETURN_NONE;
}

/*[clinic input]
_testcapi.call_long_compact_api
arg: object
/
[clinic start generated code]*/

static PyObject *
check_long_compact_api(PyObject *self, PyObject *arg)
_testcapi_call_long_compact_api(PyObject *module, PyObject *arg)
/*[clinic end generated code: output=7e3894f611b1b2b7 input=87b87396967af14c]*/

{
assert(PyLong_Check(arg));
int is_compact = PyUnstable_Long_IsCompact((PyLongObject*)arg);
Expand All @@ -587,7 +595,7 @@ static PyMethodDef test_methods[] = {
_TESTCAPI_TEST_LONG_LONG_AND_OVERFLOW_METHODDEF
_TESTCAPI_TEST_LONG_NUMBITS_METHODDEF
_TESTCAPI_TEST_LONGLONG_API_METHODDEF
{"call_long_compact_api", check_long_compact_api, METH_O},
_TESTCAPI_CALL_LONG_COMPACT_API_METHODDEF
{NULL},
};

Expand Down