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
update
  • Loading branch information
corona10 committed May 22, 2023
commit 48c366b1fd39dd51f4a18b8e60de229ac06b8db3
5 changes: 1 addition & 4 deletions Modules/_testcapi/clinic/long.c.h

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

9 changes: 3 additions & 6 deletions Modules/_testcapi/long.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ _testcapi.test_long_and_overflow
Test the PyLong_AsLongAndOverflow API.

General conversion to PY_LONG is tested by test_long_api_inner.

This test will concentrate on proper handling of overflow.
[clinic start generated code]*/

static PyObject *
_testcapi_test_long_and_overflow_impl(PyObject *module)
/*[clinic end generated code: output=f8460ca115e31d8e input=8e7eb2d3401c8623]*/
/*[clinic end generated code: output=f8460ca115e31d8e input=762f6b62da0a3cdc]*/
{
PyObject *num, *one, *temp;
long value;
Expand Down Expand Up @@ -272,13 +271,12 @@ _testcapi.test_long_long_and_overflow
Test the PyLong_AsLongLongAndOverflow API.

General conversion to long long is tested by test_long_api_inner.

This test will concentrate on proper handling of overflow.
[clinic start generated code]*/

static PyObject *
_testcapi_test_long_long_and_overflow_impl(PyObject *module)
/*[clinic end generated code: output=0b92330786f45483 input=2496093514367165]*/
/*[clinic end generated code: output=0b92330786f45483 input=544bb0aefe5e8a9e]*/
{
PyObject *num, *one, *temp;
long long value;
Expand Down Expand Up @@ -440,13 +438,12 @@ _testcapi.test_long_as_size_t
Test the PyLong_As{Size,Ssize}_t API.

At present this just tests that non-integer arguments are handled correctly.

It should be extended to test overflow handling.
[clinic start generated code]*/

static PyObject *
_testcapi_test_long_as_size_t_impl(PyObject *module)
/*[clinic end generated code: output=f6490ea2b41e6173 input=4d2aafa054f3f9b4]*/
/*[clinic end generated code: output=f6490ea2b41e6173 input=922990c4a3edfb0d]*/
{
size_t out_u;
Py_ssize_t out_s;
Expand Down