FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Modules/_testinternalcapi/tuple.c at main · python/cpython · GitHub
python
/
cpython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
37.4k
Star
77.5k
Code
Issues
5k+
Pull requests
2.7k
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Modules
/
_testinternalcapi
/
tuple.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (30 loc) · 853 Bytes
Breadcrumbs
cpython
/
Modules
/
_testinternalcapi
/
tuple.c
Copy path
File metadata and controls
39 lines (30 loc) · 853 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#include
"parts.h"
#include
"pycore_tuple.h"
static
PyObject
*
tuple_from_pair
(
PyObject
*
Py_UNUSED
(
module
),
PyObject
*
args
)
{
PyObject
*
first
,
*
second
;
if
(!
PyArg_ParseTuple
(
args
,
"OO"
,
&
first
,
&
second
)) {
return
NULL
;
}
return
_PyTuple_FromPair
(
first
,
second
);
}
static
PyObject
*
tuple_from_pair_steal
(
PyObject
*
Py_UNUSED
(
module
),
PyObject
*
args
)
{
PyObject
*
first
,
*
second
;
if
(!
PyArg_ParseTuple
(
args
,
"OO"
,
&
first
,
&
second
)) {
return
NULL
;
}
return
_PyTuple_FromPairSteal
(
Py_NewRef
(
first
),
Py_NewRef
(
second
));
}
static
PyMethodDef
test_methods
[]
=
{
{
"tuple_from_pair"
,
tuple_from_pair
,
METH_VARARGS
},
{
"tuple_from_pair_steal"
,
tuple_from_pair_steal
,
METH_VARARGS
},
{
NULL
},
};
int
_PyTestInternalCapi_Init_Tuple
(
PyObject
*
m
)
{
return
PyModule_AddFunctions
(
m
,
test_methods
);
}
Back
|
FazBrowse Home
|
New Git URL