forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlong.c.h
More file actions
166 lines (130 loc) · 5.24 KB
/
long.c.h
File metadata and controls
166 lines (130 loc) · 5.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/*[clinic input]
preserve
[clinic start generated code]*/
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
PyDoc_STRVAR(_testcapi_test_long_api__doc__,
"test_long_api($module, /)\n"
"--\n"
"\n");
#define _TESTCAPI_TEST_LONG_API_METHODDEF \
{"test_long_api", (PyCFunction)_testcapi_test_long_api, METH_NOARGS, _testcapi_test_long_api__doc__},
static PyObject *
_testcapi_test_long_api_impl(PyObject *module);
static PyObject *
_testcapi_test_long_api(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_long_api_impl(module);
}
PyDoc_STRVAR(_testcapi_test_longlong_api__doc__,
"test_longlong_api($module, /)\n"
"--\n"
"\n");
#define _TESTCAPI_TEST_LONGLONG_API_METHODDEF \
{"test_longlong_api", (PyCFunction)_testcapi_test_longlong_api, METH_NOARGS, _testcapi_test_longlong_api__doc__},
static PyObject *
_testcapi_test_longlong_api_impl(PyObject *module);
static PyObject *
_testcapi_test_longlong_api(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_longlong_api_impl(module);
}
PyDoc_STRVAR(_testcapi_test_long_and_overflow__doc__,
"test_long_and_overflow($module, /)\n"
"--\n"
"\n"
"Test the PyLong_AsLongAndOverflow API.\n"
"\n"
"General conversion to PY_LONG is tested by test_long_api_inner.\n"
"This test will concentrate on proper handling of overflow.");
#define _TESTCAPI_TEST_LONG_AND_OVERFLOW_METHODDEF \
{"test_long_and_overflow", (PyCFunction)_testcapi_test_long_and_overflow, METH_NOARGS, _testcapi_test_long_and_overflow__doc__},
static PyObject *
_testcapi_test_long_and_overflow_impl(PyObject *module);
static PyObject *
_testcapi_test_long_and_overflow(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_long_and_overflow_impl(module);
}
PyDoc_STRVAR(_testcapi_test_long_long_and_overflow__doc__,
"test_long_long_and_overflow($module, /)\n"
"--\n"
"\n"
"Test the PyLong_AsLongLongAndOverflow API.\n"
"\n"
"General conversion to long long is tested by test_long_api_inner.\n"
"This test will concentrate on proper handling of overflow.");
#define _TESTCAPI_TEST_LONG_LONG_AND_OVERFLOW_METHODDEF \
{"test_long_long_and_overflow", (PyCFunction)_testcapi_test_long_long_and_overflow, METH_NOARGS, _testcapi_test_long_long_and_overflow__doc__},
static PyObject *
_testcapi_test_long_long_and_overflow_impl(PyObject *module);
static PyObject *
_testcapi_test_long_long_and_overflow(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_long_long_and_overflow_impl(module);
}
PyDoc_STRVAR(_testcapi_test_long_as_size_t__doc__,
"test_long_as_size_t($module, /)\n"
"--\n"
"\n"
"Test the PyLong_As{Size,Ssize}_t API.\n"
"\n"
"At present this just tests that non-integer arguments are handled correctly.\n"
"It should be extended to test overflow handling.");
#define _TESTCAPI_TEST_LONG_AS_SIZE_T_METHODDEF \
{"test_long_as_size_t", (PyCFunction)_testcapi_test_long_as_size_t, METH_NOARGS, _testcapi_test_long_as_size_t__doc__},
static PyObject *
_testcapi_test_long_as_size_t_impl(PyObject *module);
static PyObject *
_testcapi_test_long_as_size_t(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_long_as_size_t_impl(module);
}
PyDoc_STRVAR(_testcapi_test_long_as_unsigned_long_long_mask__doc__,
"test_long_as_unsigned_long_long_mask($module, /)\n"
"--\n"
"\n");
#define _TESTCAPI_TEST_LONG_AS_UNSIGNED_LONG_LONG_MASK_METHODDEF \
{"test_long_as_unsigned_long_long_mask", (PyCFunction)_testcapi_test_long_as_unsigned_long_long_mask, METH_NOARGS, _testcapi_test_long_as_unsigned_long_long_mask__doc__},
static PyObject *
_testcapi_test_long_as_unsigned_long_long_mask_impl(PyObject *module);
static PyObject *
_testcapi_test_long_as_unsigned_long_long_mask(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_long_as_unsigned_long_long_mask_impl(module);
}
PyDoc_STRVAR(_testcapi_test_long_as_double__doc__,
"test_long_as_double($module, /)\n"
"--\n"
"\n");
#define _TESTCAPI_TEST_LONG_AS_DOUBLE_METHODDEF \
{"test_long_as_double", (PyCFunction)_testcapi_test_long_as_double, METH_NOARGS, _testcapi_test_long_as_double__doc__},
static PyObject *
_testcapi_test_long_as_double_impl(PyObject *module);
static PyObject *
_testcapi_test_long_as_double(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_long_as_double_impl(module);
}
PyDoc_STRVAR(_testcapi_test_long_numbits__doc__,
"test_long_numbits($module, /)\n"
"--\n"
"\n");
#define _TESTCAPI_TEST_LONG_NUMBITS_METHODDEF \
{"test_long_numbits", (PyCFunction)_testcapi_test_long_numbits, METH_NOARGS, _testcapi_test_long_numbits__doc__},
static PyObject *
_testcapi_test_long_numbits_impl(PyObject *module);
static PyObject *
_testcapi_test_long_numbits(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _testcapi_test_long_numbits_impl(module);
}
PyDoc_STRVAR(_testcapi_call_long_compact_api__doc__,
"call_long_compact_api($module, arg, /)\n"
"--\n"
"\n");
#define _TESTCAPI_CALL_LONG_COMPACT_API_METHODDEF \
{"call_long_compact_api", (PyCFunction)_testcapi_call_long_compact_api, METH_O, _testcapi_call_long_compact_api__doc__},
/*[clinic end generated code: output=d000a1b58fa81eab input=a9049054013a1b77]*/