Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e8725e66
Commit
e8725e66
authored
Apr 04, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #23492: Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
parent
4adc9d28
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
320 additions
and
302 deletions
+320
-302
Misc/NEWS
Misc/NEWS
+8
-6
Modules/clinic/_bz2module.c.h
Modules/clinic/_bz2module.c.h
+4
-4
Modules/clinic/_codecsmodule.c.h
Modules/clinic/_codecsmodule.c.h
+4
-4
Modules/clinic/_lzmamodule.c.h
Modules/clinic/_lzmamodule.c.h
+10
-10
Modules/clinic/arraymodule.c.h
Modules/clinic/arraymodule.c.h
+10
-10
Modules/clinic/binascii.c.h
Modules/clinic/binascii.c.h
+37
-37
Modules/clinic/cmathmodule.c.h
Modules/clinic/cmathmodule.c.h
+61
-61
Modules/clinic/posixmodule.c.h
Modules/clinic/posixmodule.c.h
+88
-88
Modules/clinic/pwdmodule.c.h
Modules/clinic/pwdmodule.c.h
+4
-4
Modules/clinic/pyexpat.c.h
Modules/clinic/pyexpat.c.h
+10
-10
Modules/clinic/spwdmodule.c.h
Modules/clinic/spwdmodule.c.h
+4
-4
Modules/clinic/zlibmodule.c.h
Modules/clinic/zlibmodule.c.h
+4
-4
Objects/clinic/bytearrayobject.c.h
Objects/clinic/bytearrayobject.c.h
+10
-10
Objects/clinic/bytesobject.c.h
Objects/clinic/bytesobject.c.h
+10
-10
Python/clinic/bltinmodule.c.h
Python/clinic/bltinmodule.c.h
+4
-4
Python/clinic/import.c.h
Python/clinic/import.c.h
+19
-19
Tools/clinic/clinic.py
Tools/clinic/clinic.py
+33
-17
No files found.
Misc/NEWS
View file @
e8725e66
...
...
@@ -63,7 +63,7 @@ Library
Build
-----
-
Issue
#
23501
:
Argumen
Clinic
now
generates
code
into
separate
files
by
default
.
-
Issue
#
23501
:
Argumen
t
Clinic
now
generates
code
into
separate
files
by
default
.
Tests
-----
...
...
@@ -71,6 +71,13 @@ Tests
Tools
/
Demos
-----------
-
Issue
#
23492
:
Argument
Clinic
now
generates
argument
parsing
code
with
PyArg_Parse
instead
of
PyArg_ParseTuple
if
possible
.
-
Issue
#
23500
:
Argument
Clinic
is
now
smarter
about
generating
the
"#ifndef"
(
empty
)
definition
of
the
methoddef
macro
:
it
's only generated once, even
if Argument Clinic processes the same symbol multiple times, and it'
s
emitted
at
the
end
of
all
processing
rather
than
immediately
after
the
first
use
.
What
's New in Python 3.5.0 alpha 3?
...
...
@@ -270,11 +277,6 @@ Tests
Tools/Demos
-----------
- Issue #23500: Argument Clinic is now smarter about generating the "#ifndef"
(empty) definition of the methoddef macro: it'
s
only
generated
once
,
even
if
Argument
Clinic
processes
the
same
symbol
multiple
times
,
and
it
's emitted
at the end of all processing rather than immediately after the first use.
- Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better
compatible with regular files (in particular it now supports the context
management protocol).
...
...
Modules/clinic/_bz2module.c.h
View file @
e8725e66
...
...
@@ -14,18 +14,18 @@ PyDoc_STRVAR(_bz2_BZ2Compressor_compress__doc__,
"flush() method to finish the compression process."
);
#define _BZ2_BZ2COMPRESSOR_COMPRESS_METHODDEF \
{"compress", (PyCFunction)_bz2_BZ2Compressor_compress, METH_
VARARGS
, _bz2_BZ2Compressor_compress__doc__},
{"compress", (PyCFunction)_bz2_BZ2Compressor_compress, METH_
O
, _bz2_BZ2Compressor_compress__doc__},
static
PyObject
*
_bz2_BZ2Compressor_compress_impl
(
BZ2Compressor
*
self
,
Py_buffer
*
data
);
static
PyObject
*
_bz2_BZ2Compressor_compress
(
BZ2Compressor
*
self
,
PyObject
*
arg
s
)
_bz2_BZ2Compressor_compress
(
BZ2Compressor
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:compress"
,
&
data
))
goto
exit
;
...
...
@@ -168,4 +168,4 @@ _bz2_BZ2Decompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
exit:
return
return_value
;
}
/*[clinic end generated code: output=
8e65e3953430bc3d
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
3565d163a360af01
input=a9049054013a1b77]*/
Modules/clinic/_codecsmodule.c.h
View file @
e8725e66
...
...
@@ -9,18 +9,18 @@ PyDoc_STRVAR(_codecs__forget_codec__doc__,
"Purge the named codec from the internal codec lookup cache"
);
#define _CODECS__FORGET_CODEC_METHODDEF \
{"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_
VARARGS
, _codecs__forget_codec__doc__},
{"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_
O
, _codecs__forget_codec__doc__},
static
PyObject
*
_codecs__forget_codec_impl
(
PyModuleDef
*
module
,
const
char
*
encoding
);
static
PyObject
*
_codecs__forget_codec
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_codecs__forget_codec
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
const
char
*
encoding
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"s:_forget_codec"
,
&
encoding
))
goto
exit
;
...
...
@@ -29,4 +29,4 @@ _codecs__forget_codec(PyModuleDef *module, PyObject *args)
exit:
return
return_value
;
}
/*[clinic end generated code: output=
cdea83e21d76a900
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
fc5ce4d3166f7d96
input=a9049054013a1b77]*/
Modules/clinic/_lzmamodule.c.h
View file @
e8725e66
...
...
@@ -14,18 +14,18 @@ PyDoc_STRVAR(_lzma_LZMACompressor_compress__doc__,
"flush() method to finish the compression process."
);
#define _LZMA_LZMACOMPRESSOR_COMPRESS_METHODDEF \
{"compress", (PyCFunction)_lzma_LZMACompressor_compress, METH_
VARARGS
, _lzma_LZMACompressor_compress__doc__},
{"compress", (PyCFunction)_lzma_LZMACompressor_compress, METH_
O
, _lzma_LZMACompressor_compress__doc__},
static
PyObject
*
_lzma_LZMACompressor_compress_impl
(
Compressor
*
self
,
Py_buffer
*
data
);
static
PyObject
*
_lzma_LZMACompressor_compress
(
Compressor
*
self
,
PyObject
*
arg
s
)
_lzma_LZMACompressor_compress
(
Compressor
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:compress"
,
&
data
))
goto
exit
;
...
...
@@ -162,18 +162,18 @@ PyDoc_STRVAR(_lzma_is_check_supported__doc__,
"Always returns True for CHECK_NONE and CHECK_CRC32."
);
#define _LZMA_IS_CHECK_SUPPORTED_METHODDEF \
{"is_check_supported", (PyCFunction)_lzma_is_check_supported, METH_
VARARGS
, _lzma_is_check_supported__doc__},
{"is_check_supported", (PyCFunction)_lzma_is_check_supported, METH_
O
, _lzma_is_check_supported__doc__},
static
PyObject
*
_lzma_is_check_supported_impl
(
PyModuleDef
*
module
,
int
check_id
);
static
PyObject
*
_lzma_is_check_supported
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_lzma_is_check_supported
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
check_id
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:is_check_supported"
,
&
check_id
))
goto
exit
;
...
...
@@ -192,18 +192,18 @@ PyDoc_STRVAR(_lzma__encode_filter_properties__doc__,
"The result does not include the filter ID itself, only the options."
);
#define _LZMA__ENCODE_FILTER_PROPERTIES_METHODDEF \
{"_encode_filter_properties", (PyCFunction)_lzma__encode_filter_properties, METH_
VARARGS
, _lzma__encode_filter_properties__doc__},
{"_encode_filter_properties", (PyCFunction)_lzma__encode_filter_properties, METH_
O
, _lzma__encode_filter_properties__doc__},
static
PyObject
*
_lzma__encode_filter_properties_impl
(
PyModuleDef
*
module
,
lzma_filter
filter
);
static
PyObject
*
_lzma__encode_filter_properties
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_lzma__encode_filter_properties
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
lzma_filter
filter
=
{
LZMA_VLI_UNKNOWN
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:_encode_filter_properties"
,
lzma_filter_converter
,
&
filter
))
goto
exit
;
...
...
@@ -251,4 +251,4 @@ exit:
return
return_value
;
}
/*[clinic end generated code: output=
dc42b73890609369
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
ea7f2b2c4019fe86
input=a9049054013a1b77]*/
Modules/clinic/arraymodule.c.h
View file @
e8725e66
...
...
@@ -267,18 +267,18 @@ PyDoc_STRVAR(array_array_fromstring__doc__,
"This method is deprecated. Use frombytes instead."
);
#define ARRAY_ARRAY_FROMSTRING_METHODDEF \
{"fromstring", (PyCFunction)array_array_fromstring, METH_
VARARGS
, array_array_fromstring__doc__},
{"fromstring", (PyCFunction)array_array_fromstring, METH_
O
, array_array_fromstring__doc__},
static
PyObject
*
array_array_fromstring_impl
(
arrayobject
*
self
,
Py_buffer
*
buffer
);
static
PyObject
*
array_array_fromstring
(
arrayobject
*
self
,
PyObject
*
arg
s
)
array_array_fromstring
(
arrayobject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
buffer
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"s*:fromstring"
,
&
buffer
))
goto
exit
;
...
...
@@ -299,18 +299,18 @@ PyDoc_STRVAR(array_array_frombytes__doc__,
"Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method)."
);
#define ARRAY_ARRAY_FROMBYTES_METHODDEF \
{"frombytes", (PyCFunction)array_array_frombytes, METH_
VARARGS
, array_array_frombytes__doc__},
{"frombytes", (PyCFunction)array_array_frombytes, METH_
O
, array_array_frombytes__doc__},
static
PyObject
*
array_array_frombytes_impl
(
arrayobject
*
self
,
Py_buffer
*
buffer
);
static
PyObject
*
array_array_frombytes
(
arrayobject
*
self
,
PyObject
*
arg
s
)
array_array_frombytes
(
arrayobject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
buffer
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:frombytes"
,
&
buffer
))
goto
exit
;
...
...
@@ -373,19 +373,19 @@ PyDoc_STRVAR(array_array_fromunicode__doc__,
"some other type."
);
#define ARRAY_ARRAY_FROMUNICODE_METHODDEF \
{"fromunicode", (PyCFunction)array_array_fromunicode, METH_
VARARGS
, array_array_fromunicode__doc__},
{"fromunicode", (PyCFunction)array_array_fromunicode, METH_
O
, array_array_fromunicode__doc__},
static
PyObject
*
array_array_fromunicode_impl
(
arrayobject
*
self
,
Py_UNICODE
*
ustr
,
Py_ssize_clean_t
ustr_length
);
static
PyObject
*
array_array_fromunicode
(
arrayobject
*
self
,
PyObject
*
arg
s
)
array_array_fromunicode
(
arrayobject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_UNICODE
*
ustr
;
Py_ssize_clean_t
ustr_length
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"u#:fromunicode"
,
&
ustr
,
&
ustr_length
))
goto
exit
;
...
...
@@ -502,4 +502,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
/*[clinic end generated code: output=
e1deb61c6a3bc8c8
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
a8fbe83c2026fa83
input=a9049054013a1b77]*/
Modules/clinic/binascii.c.h
View file @
e8725e66
...
...
@@ -9,18 +9,18 @@ PyDoc_STRVAR(binascii_a2b_uu__doc__,
"Decode a line of uuencoded data."
);
#define BINASCII_A2B_UU_METHODDEF \
{"a2b_uu", (PyCFunction)binascii_a2b_uu, METH_
VARARGS
, binascii_a2b_uu__doc__},
{"a2b_uu", (PyCFunction)binascii_a2b_uu, METH_
O
, binascii_a2b_uu__doc__},
static
PyObject
*
binascii_a2b_uu_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_a2b_uu
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_a2b_uu
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:a2b_uu"
,
ascii_buffer_converter
,
&
data
))
goto
exit
;
...
...
@@ -41,18 +41,18 @@ PyDoc_STRVAR(binascii_b2a_uu__doc__,
"Uuencode line of data."
);
#define BINASCII_B2A_UU_METHODDEF \
{"b2a_uu", (PyCFunction)binascii_b2a_uu, METH_
VARARGS
, binascii_b2a_uu__doc__},
{"b2a_uu", (PyCFunction)binascii_b2a_uu, METH_
O
, binascii_b2a_uu__doc__},
static
PyObject
*
binascii_b2a_uu_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_b2a_uu
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_b2a_uu
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:b2a_uu"
,
&
data
))
goto
exit
;
...
...
@@ -73,18 +73,18 @@ PyDoc_STRVAR(binascii_a2b_base64__doc__,
"Decode a line of base64 data."
);
#define BINASCII_A2B_BASE64_METHODDEF \
{"a2b_base64", (PyCFunction)binascii_a2b_base64, METH_
VARARGS
, binascii_a2b_base64__doc__},
{"a2b_base64", (PyCFunction)binascii_a2b_base64, METH_
O
, binascii_a2b_base64__doc__},
static
PyObject
*
binascii_a2b_base64_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_a2b_base64
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_a2b_base64
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:a2b_base64"
,
ascii_buffer_converter
,
&
data
))
goto
exit
;
...
...
@@ -105,18 +105,18 @@ PyDoc_STRVAR(binascii_b2a_base64__doc__,
"Base64-code line of data."
);
#define BINASCII_B2A_BASE64_METHODDEF \
{"b2a_base64", (PyCFunction)binascii_b2a_base64, METH_
VARARGS
, binascii_b2a_base64__doc__},
{"b2a_base64", (PyCFunction)binascii_b2a_base64, METH_
O
, binascii_b2a_base64__doc__},
static
PyObject
*
binascii_b2a_base64_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_b2a_base64
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_b2a_base64
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:b2a_base64"
,
&
data
))
goto
exit
;
...
...
@@ -137,18 +137,18 @@ PyDoc_STRVAR(binascii_a2b_hqx__doc__,
"Decode .hqx coding."
);
#define BINASCII_A2B_HQX_METHODDEF \
{"a2b_hqx", (PyCFunction)binascii_a2b_hqx, METH_
VARARGS
, binascii_a2b_hqx__doc__},
{"a2b_hqx", (PyCFunction)binascii_a2b_hqx, METH_
O
, binascii_a2b_hqx__doc__},
static
PyObject
*
binascii_a2b_hqx_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_a2b_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_a2b_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:a2b_hqx"
,
ascii_buffer_converter
,
&
data
))
goto
exit
;
...
...
@@ -169,18 +169,18 @@ PyDoc_STRVAR(binascii_rlecode_hqx__doc__,
"Binhex RLE-code binary data."
);
#define BINASCII_RLECODE_HQX_METHODDEF \
{"rlecode_hqx", (PyCFunction)binascii_rlecode_hqx, METH_
VARARGS
, binascii_rlecode_hqx__doc__},
{"rlecode_hqx", (PyCFunction)binascii_rlecode_hqx, METH_
O
, binascii_rlecode_hqx__doc__},
static
PyObject
*
binascii_rlecode_hqx_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_rlecode_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_rlecode_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:rlecode_hqx"
,
&
data
))
goto
exit
;
...
...
@@ -201,18 +201,18 @@ PyDoc_STRVAR(binascii_b2a_hqx__doc__,
"Encode .hqx data."
);
#define BINASCII_B2A_HQX_METHODDEF \
{"b2a_hqx", (PyCFunction)binascii_b2a_hqx, METH_
VARARGS
, binascii_b2a_hqx__doc__},
{"b2a_hqx", (PyCFunction)binascii_b2a_hqx, METH_
O
, binascii_b2a_hqx__doc__},
static
PyObject
*
binascii_b2a_hqx_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_b2a_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_b2a_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:b2a_hqx"
,
&
data
))
goto
exit
;
...
...
@@ -233,18 +233,18 @@ PyDoc_STRVAR(binascii_rledecode_hqx__doc__,
"Decode hexbin RLE-coded string."
);
#define BINASCII_RLEDECODE_HQX_METHODDEF \
{"rledecode_hqx", (PyCFunction)binascii_rledecode_hqx, METH_
VARARGS
, binascii_rledecode_hqx__doc__},
{"rledecode_hqx", (PyCFunction)binascii_rledecode_hqx, METH_
O
, binascii_rledecode_hqx__doc__},
static
PyObject
*
binascii_rledecode_hqx_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_rledecode_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_rledecode_hqx
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:rledecode_hqx"
,
&
data
))
goto
exit
;
...
...
@@ -342,18 +342,18 @@ PyDoc_STRVAR(binascii_b2a_hex__doc__,
"available as
\"
hexlify()
\"
."
);
#define BINASCII_B2A_HEX_METHODDEF \
{"b2a_hex", (PyCFunction)binascii_b2a_hex, METH_
VARARGS
, binascii_b2a_hex__doc__},
{"b2a_hex", (PyCFunction)binascii_b2a_hex, METH_
O
, binascii_b2a_hex__doc__},
static
PyObject
*
binascii_b2a_hex_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_b2a_hex
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_b2a_hex
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:b2a_hex"
,
&
data
))
goto
exit
;
...
...
@@ -376,18 +376,18 @@ PyDoc_STRVAR(binascii_hexlify__doc__,
"The return value is a bytes object."
);
#define BINASCII_HEXLIFY_METHODDEF \
{"hexlify", (PyCFunction)binascii_hexlify, METH_
VARARGS
, binascii_hexlify__doc__},
{"hexlify", (PyCFunction)binascii_hexlify, METH_
O
, binascii_hexlify__doc__},
static
PyObject
*
binascii_hexlify_impl
(
PyModuleDef
*
module
,
Py_buffer
*
data
);
static
PyObject
*
binascii_hexlify
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_hexlify
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:hexlify"
,
&
data
))
goto
exit
;
...
...
@@ -411,18 +411,18 @@ PyDoc_STRVAR(binascii_a2b_hex__doc__,
"This function is also available as
\"
unhexlify()
\"
."
);
#define BINASCII_A2B_HEX_METHODDEF \
{"a2b_hex", (PyCFunction)binascii_a2b_hex, METH_
VARARGS
, binascii_a2b_hex__doc__},
{"a2b_hex", (PyCFunction)binascii_a2b_hex, METH_
O
, binascii_a2b_hex__doc__},
static
PyObject
*
binascii_a2b_hex_impl
(
PyModuleDef
*
module
,
Py_buffer
*
hexstr
);
static
PyObject
*
binascii_a2b_hex
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_a2b_hex
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
hexstr
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:a2b_hex"
,
ascii_buffer_converter
,
&
hexstr
))
goto
exit
;
...
...
@@ -445,18 +445,18 @@ PyDoc_STRVAR(binascii_unhexlify__doc__,
"hexstr must contain an even number of hex digits (upper or lower case)."
);
#define BINASCII_UNHEXLIFY_METHODDEF \
{"unhexlify", (PyCFunction)binascii_unhexlify, METH_
VARARGS
, binascii_unhexlify__doc__},
{"unhexlify", (PyCFunction)binascii_unhexlify, METH_
O
, binascii_unhexlify__doc__},
static
PyObject
*
binascii_unhexlify_impl
(
PyModuleDef
*
module
,
Py_buffer
*
hexstr
);
static
PyObject
*
binascii_unhexlify
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
binascii_unhexlify
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
hexstr
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:unhexlify"
,
ascii_buffer_converter
,
&
hexstr
))
goto
exit
;
...
...
@@ -543,4 +543,4 @@ exit:
return
return_value
;
}
/*[clinic end generated code: output=
771126f8f53e84e7
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
31ccbd5fddc8fd75
input=a9049054013a1b77]*/
Modules/clinic/cmathmodule.c.h
View file @
e8725e66
...
...
@@ -9,19 +9,19 @@ PyDoc_STRVAR(cmath_acos__doc__,
"Return the arc cosine of z."
);
#define CMATH_ACOS_METHODDEF \
{"acos", (PyCFunction)cmath_acos, METH_
VARARGS
, cmath_acos__doc__},
{"acos", (PyCFunction)cmath_acos, METH_
O
, cmath_acos__doc__},
static
Py_complex
cmath_acos_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_acos
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_acos
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:acos"
,
&
z
))
goto
exit
;
...
...
@@ -52,19 +52,19 @@ PyDoc_STRVAR(cmath_acosh__doc__,
"Return the inverse hyperbolic cosine of z."
);
#define CMATH_ACOSH_METHODDEF \
{"acosh", (PyCFunction)cmath_acosh, METH_
VARARGS
, cmath_acosh__doc__},
{"acosh", (PyCFunction)cmath_acosh, METH_
O
, cmath_acosh__doc__},
static
Py_complex
cmath_acosh_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_acosh
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_acosh
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:acosh"
,
&
z
))
goto
exit
;
...
...
@@ -95,19 +95,19 @@ PyDoc_STRVAR(cmath_asin__doc__,
"Return the arc sine of z."
);
#define CMATH_ASIN_METHODDEF \
{"asin", (PyCFunction)cmath_asin, METH_
VARARGS
, cmath_asin__doc__},
{"asin", (PyCFunction)cmath_asin, METH_
O
, cmath_asin__doc__},
static
Py_complex
cmath_asin_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_asin
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_asin
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:asin"
,
&
z
))
goto
exit
;
...
...
@@ -138,19 +138,19 @@ PyDoc_STRVAR(cmath_asinh__doc__,
"Return the inverse hyperbolic sine of z."
);
#define CMATH_ASINH_METHODDEF \
{"asinh", (PyCFunction)cmath_asinh, METH_
VARARGS
, cmath_asinh__doc__},
{"asinh", (PyCFunction)cmath_asinh, METH_
O
, cmath_asinh__doc__},
static
Py_complex
cmath_asinh_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_asinh
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_asinh
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:asinh"
,
&
z
))
goto
exit
;
...
...
@@ -181,19 +181,19 @@ PyDoc_STRVAR(cmath_atan__doc__,
"Return the arc tangent of z."
);
#define CMATH_ATAN_METHODDEF \
{"atan", (PyCFunction)cmath_atan, METH_
VARARGS
, cmath_atan__doc__},
{"atan", (PyCFunction)cmath_atan, METH_
O
, cmath_atan__doc__},
static
Py_complex
cmath_atan_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_atan
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_atan
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:atan"
,
&
z
))
goto
exit
;
...
...
@@ -224,19 +224,19 @@ PyDoc_STRVAR(cmath_atanh__doc__,
"Return the inverse hyperbolic tangent of z."
);
#define CMATH_ATANH_METHODDEF \
{"atanh", (PyCFunction)cmath_atanh, METH_
VARARGS
, cmath_atanh__doc__},
{"atanh", (PyCFunction)cmath_atanh, METH_
O
, cmath_atanh__doc__},
static
Py_complex
cmath_atanh_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_atanh
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_atanh
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:atanh"
,
&
z
))
goto
exit
;
...
...
@@ -267,19 +267,19 @@ PyDoc_STRVAR(cmath_cos__doc__,
"Return the cosine of z."
);
#define CMATH_COS_METHODDEF \
{"cos", (PyCFunction)cmath_cos, METH_
VARARGS
, cmath_cos__doc__},
{"cos", (PyCFunction)cmath_cos, METH_
O
, cmath_cos__doc__},
static
Py_complex
cmath_cos_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_cos
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_cos
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:cos"
,
&
z
))
goto
exit
;
...
...
@@ -310,19 +310,19 @@ PyDoc_STRVAR(cmath_cosh__doc__,
"Return the hyperbolic cosine of z."
);
#define CMATH_COSH_METHODDEF \
{"cosh", (PyCFunction)cmath_cosh, METH_
VARARGS
, cmath_cosh__doc__},
{"cosh", (PyCFunction)cmath_cosh, METH_
O
, cmath_cosh__doc__},
static
Py_complex
cmath_cosh_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_cosh
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_cosh
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:cosh"
,
&
z
))
goto
exit
;
...
...
@@ -353,19 +353,19 @@ PyDoc_STRVAR(cmath_exp__doc__,
"Return the exponential value e**z."
);
#define CMATH_EXP_METHODDEF \
{"exp", (PyCFunction)cmath_exp, METH_
VARARGS
, cmath_exp__doc__},
{"exp", (PyCFunction)cmath_exp, METH_
O
, cmath_exp__doc__},
static
Py_complex
cmath_exp_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_exp
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_exp
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:exp"
,
&
z
))
goto
exit
;
...
...
@@ -396,19 +396,19 @@ PyDoc_STRVAR(cmath_log10__doc__,
"Return the base-10 logarithm of z."
);
#define CMATH_LOG10_METHODDEF \
{"log10", (PyCFunction)cmath_log10, METH_
VARARGS
, cmath_log10__doc__},
{"log10", (PyCFunction)cmath_log10, METH_
O
, cmath_log10__doc__},
static
Py_complex
cmath_log10_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_log10
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_log10
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:log10"
,
&
z
))
goto
exit
;
...
...
@@ -439,19 +439,19 @@ PyDoc_STRVAR(cmath_sin__doc__,
"Return the sine of z."
);
#define CMATH_SIN_METHODDEF \
{"sin", (PyCFunction)cmath_sin, METH_
VARARGS
, cmath_sin__doc__},
{"sin", (PyCFunction)cmath_sin, METH_
O
, cmath_sin__doc__},
static
Py_complex
cmath_sin_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_sin
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_sin
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:sin"
,
&
z
))
goto
exit
;
...
...
@@ -482,19 +482,19 @@ PyDoc_STRVAR(cmath_sinh__doc__,
"Return the hyperbolic sine of z."
);
#define CMATH_SINH_METHODDEF \
{"sinh", (PyCFunction)cmath_sinh, METH_
VARARGS
, cmath_sinh__doc__},
{"sinh", (PyCFunction)cmath_sinh, METH_
O
, cmath_sinh__doc__},
static
Py_complex
cmath_sinh_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_sinh
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_sinh
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:sinh"
,
&
z
))
goto
exit
;
...
...
@@ -525,19 +525,19 @@ PyDoc_STRVAR(cmath_sqrt__doc__,
"Return the square root of z."
);
#define CMATH_SQRT_METHODDEF \
{"sqrt", (PyCFunction)cmath_sqrt, METH_
VARARGS
, cmath_sqrt__doc__},
{"sqrt", (PyCFunction)cmath_sqrt, METH_
O
, cmath_sqrt__doc__},
static
Py_complex
cmath_sqrt_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_sqrt
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_sqrt
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:sqrt"
,
&
z
))
goto
exit
;
...
...
@@ -568,19 +568,19 @@ PyDoc_STRVAR(cmath_tan__doc__,
"Return the tangent of z."
);
#define CMATH_TAN_METHODDEF \
{"tan", (PyCFunction)cmath_tan, METH_
VARARGS
, cmath_tan__doc__},
{"tan", (PyCFunction)cmath_tan, METH_
O
, cmath_tan__doc__},
static
Py_complex
cmath_tan_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_tan
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_tan
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:tan"
,
&
z
))
goto
exit
;
...
...
@@ -611,19 +611,19 @@ PyDoc_STRVAR(cmath_tanh__doc__,
"Return the hyperbolic tangent of z."
);
#define CMATH_TANH_METHODDEF \
{"tanh", (PyCFunction)cmath_tanh, METH_
VARARGS
, cmath_tanh__doc__},
{"tanh", (PyCFunction)cmath_tanh, METH_
O
, cmath_tanh__doc__},
static
Py_complex
cmath_tanh_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_tanh
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_tanh
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
Py_complex
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:tanh"
,
&
z
))
goto
exit
;
...
...
@@ -685,18 +685,18 @@ PyDoc_STRVAR(cmath_phase__doc__,
"Return argument, also known as the phase angle, of a complex."
);
#define CMATH_PHASE_METHODDEF \
{"phase", (PyCFunction)cmath_phase, METH_
VARARGS
, cmath_phase__doc__},
{"phase", (PyCFunction)cmath_phase, METH_
O
, cmath_phase__doc__},
static
PyObject
*
cmath_phase_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_phase
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_phase
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:phase"
,
&
z
))
goto
exit
;
...
...
@@ -715,18 +715,18 @@ PyDoc_STRVAR(cmath_polar__doc__,
"r is the distance from 0 and phi the phase angle."
);
#define CMATH_POLAR_METHODDEF \
{"polar", (PyCFunction)cmath_polar, METH_
VARARGS
, cmath_polar__doc__},
{"polar", (PyCFunction)cmath_polar, METH_
O
, cmath_polar__doc__},
static
PyObject
*
cmath_polar_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_polar
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_polar
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:polar"
,
&
z
))
goto
exit
;
...
...
@@ -772,18 +772,18 @@ PyDoc_STRVAR(cmath_isfinite__doc__,
"Return True if both the real and imaginary parts of z are finite, else False."
);
#define CMATH_ISFINITE_METHODDEF \
{"isfinite", (PyCFunction)cmath_isfinite, METH_
VARARGS
, cmath_isfinite__doc__},
{"isfinite", (PyCFunction)cmath_isfinite, METH_
O
, cmath_isfinite__doc__},
static
PyObject
*
cmath_isfinite_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_isfinite
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_isfinite
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:isfinite"
,
&
z
))
goto
exit
;
...
...
@@ -800,18 +800,18 @@ PyDoc_STRVAR(cmath_isnan__doc__,
"Checks if the real or imaginary part of z not a number (NaN)."
);
#define CMATH_ISNAN_METHODDEF \
{"isnan", (PyCFunction)cmath_isnan, METH_
VARARGS
, cmath_isnan__doc__},
{"isnan", (PyCFunction)cmath_isnan, METH_
O
, cmath_isnan__doc__},
static
PyObject
*
cmath_isnan_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_isnan
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_isnan
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:isnan"
,
&
z
))
goto
exit
;
...
...
@@ -828,18 +828,18 @@ PyDoc_STRVAR(cmath_isinf__doc__,
"Checks if the real or imaginary part of z is infinite."
);
#define CMATH_ISINF_METHODDEF \
{"isinf", (PyCFunction)cmath_isinf, METH_
VARARGS
, cmath_isinf__doc__},
{"isinf", (PyCFunction)cmath_isinf, METH_
O
, cmath_isinf__doc__},
static
PyObject
*
cmath_isinf_impl
(
PyModuleDef
*
module
,
Py_complex
z
);
static
PyObject
*
cmath_isinf
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
cmath_isinf
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_complex
z
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"D:isinf"
,
&
z
))
goto
exit
;
...
...
@@ -848,4 +848,4 @@ cmath_isinf(PyModuleDef *module, PyObject *args)
exit:
return
return_value
;
}
/*[clinic end generated code: output=9
b6d81711e4e3c4b
input=a9049054013a1b77]*/
/*[clinic end generated code: output=9
143b8dcc8069024
input=a9049054013a1b77]*/
Modules/clinic/posixmodule.c.h
View file @
e8725e66
...
...
@@ -168,19 +168,19 @@ PyDoc_STRVAR(os_ttyname__doc__,
" Integer file descriptor handle."
);
#define OS_TTYNAME_METHODDEF \
{"ttyname", (PyCFunction)os_ttyname, METH_
VARARGS
, os_ttyname__doc__},
{"ttyname", (PyCFunction)os_ttyname, METH_
O
, os_ttyname__doc__},
static
char
*
os_ttyname_impl
(
PyModuleDef
*
module
,
int
fd
);
static
PyObject
*
os_ttyname
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_ttyname
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
fd
;
char
*
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:ttyname"
,
&
fd
))
goto
exit
;
...
...
@@ -911,18 +911,18 @@ PyDoc_STRVAR(os__getfinalpathname__doc__,
"A helper function for samepath on windows."
);
#define OS__GETFINALPATHNAME_METHODDEF \
{"_getfinalpathname", (PyCFunction)os__getfinalpathname, METH_
VARARGS
, os__getfinalpathname__doc__},
{"_getfinalpathname", (PyCFunction)os__getfinalpathname, METH_
O
, os__getfinalpathname__doc__},
static
PyObject
*
os__getfinalpathname_impl
(
PyModuleDef
*
module
,
PyObject
*
path
);
static
PyObject
*
os__getfinalpathname
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os__getfinalpathname
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
path
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:_getfinalpathname"
,
&
path
))
goto
exit
;
...
...
@@ -1017,18 +1017,18 @@ PyDoc_STRVAR(os_nice__doc__,
"Add increment to the priority of process and return the new priority."
);
#define OS_NICE_METHODDEF \
{"nice", (PyCFunction)os_nice, METH_
VARARGS
, os_nice__doc__},
{"nice", (PyCFunction)os_nice, METH_
O
, os_nice__doc__},
static
PyObject
*
os_nice_impl
(
PyModuleDef
*
module
,
int
increment
);
static
PyObject
*
os_nice
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_nice
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
increment
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:nice"
,
&
increment
))
goto
exit
;
...
...
@@ -1317,18 +1317,18 @@ PyDoc_STRVAR(os_umask__doc__,
"Set the current numeric umask and return the previous umask."
);
#define OS_UMASK_METHODDEF \
{"umask", (PyCFunction)os_umask, METH_
VARARGS
, os_umask__doc__},
{"umask", (PyCFunction)os_umask, METH_
O
, os_umask__doc__},
static
PyObject
*
os_umask_impl
(
PyModuleDef
*
module
,
int
mask
);
static
PyObject
*
os_umask
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_umask
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
mask
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:umask"
,
&
mask
))
goto
exit
;
...
...
@@ -1829,18 +1829,18 @@ PyDoc_STRVAR(os_sched_getscheduler__doc__,
"Passing 0 for pid returns the scheduling policy for the calling process."
);
#define OS_SCHED_GETSCHEDULER_METHODDEF \
{"sched_getscheduler", (PyCFunction)os_sched_getscheduler, METH_
VARARGS
, os_sched_getscheduler__doc__},
{"sched_getscheduler", (PyCFunction)os_sched_getscheduler, METH_
O
, os_sched_getscheduler__doc__},
static
PyObject
*
os_sched_getscheduler_impl
(
PyModuleDef
*
module
,
pid_t
pid
);
static
PyObject
*
os_sched_getscheduler
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_sched_getscheduler
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
pid_t
pid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
""
_Py_PARSE_PID
":sched_getscheduler"
,
&
pid
))
goto
exit
;
...
...
@@ -1934,18 +1934,18 @@ PyDoc_STRVAR(os_sched_getparam__doc__,
"Return value is an instance of sched_param."
);
#define OS_SCHED_GETPARAM_METHODDEF \
{"sched_getparam", (PyCFunction)os_sched_getparam, METH_
VARARGS
, os_sched_getparam__doc__},
{"sched_getparam", (PyCFunction)os_sched_getparam, METH_
O
, os_sched_getparam__doc__},
static
PyObject
*
os_sched_getparam_impl
(
PyModuleDef
*
module
,
pid_t
pid
);
static
PyObject
*
os_sched_getparam
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_sched_getparam
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
pid_t
pid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
""
_Py_PARSE_PID
":sched_getparam"
,
&
pid
))
goto
exit
;
...
...
@@ -2004,19 +2004,19 @@ PyDoc_STRVAR(os_sched_rr_get_interval__doc__,
"Value returned is a float."
);
#define OS_SCHED_RR_GET_INTERVAL_METHODDEF \
{"sched_rr_get_interval", (PyCFunction)os_sched_rr_get_interval, METH_
VARARGS
, os_sched_rr_get_interval__doc__},
{"sched_rr_get_interval", (PyCFunction)os_sched_rr_get_interval, METH_
O
, os_sched_rr_get_interval__doc__},
static
double
os_sched_rr_get_interval_impl
(
PyModuleDef
*
module
,
pid_t
pid
);
static
PyObject
*
os_sched_rr_get_interval
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_sched_rr_get_interval
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
pid_t
pid
;
double
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
""
_Py_PARSE_PID
":sched_rr_get_interval"
,
&
pid
))
goto
exit
;
...
...
@@ -2099,18 +2099,18 @@ PyDoc_STRVAR(os_sched_getaffinity__doc__,
"The affinity is returned as a set of CPU identifiers."
);
#define OS_SCHED_GETAFFINITY_METHODDEF \
{"sched_getaffinity", (PyCFunction)os_sched_getaffinity, METH_
VARARGS
, os_sched_getaffinity__doc__},
{"sched_getaffinity", (PyCFunction)os_sched_getaffinity, METH_
O
, os_sched_getaffinity__doc__},
static
PyObject
*
os_sched_getaffinity_impl
(
PyModuleDef
*
module
,
pid_t
pid
);
static
PyObject
*
os_sched_getaffinity
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_sched_getaffinity
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
pid_t
pid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
""
_Py_PARSE_PID
":sched_getaffinity"
,
&
pid
))
goto
exit
;
...
...
@@ -2501,18 +2501,18 @@ PyDoc_STRVAR(os_plock__doc__,
"Lock program segments into memory.
\"
);"
);
#define OS_PLOCK_METHODDEF \
{"plock", (PyCFunction)os_plock, METH_
VARARGS
, os_plock__doc__},
{"plock", (PyCFunction)os_plock, METH_
O
, os_plock__doc__},
static
PyObject
*
os_plock_impl
(
PyModuleDef
*
module
,
int
op
);
static
PyObject
*
os_plock
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_plock
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
op
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:plock"
,
&
op
))
goto
exit
;
...
...
@@ -2533,18 +2533,18 @@ PyDoc_STRVAR(os_setuid__doc__,
"Set the current process
\'
s user id."
);
#define OS_SETUID_METHODDEF \
{"setuid", (PyCFunction)os_setuid, METH_
VARARGS
, os_setuid__doc__},
{"setuid", (PyCFunction)os_setuid, METH_
O
, os_setuid__doc__},
static
PyObject
*
os_setuid_impl
(
PyModuleDef
*
module
,
uid_t
uid
);
static
PyObject
*
os_setuid
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_setuid
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
uid_t
uid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:setuid"
,
_Py_Uid_Converter
,
&
uid
))
goto
exit
;
...
...
@@ -2565,18 +2565,18 @@ PyDoc_STRVAR(os_seteuid__doc__,
"Set the current process
\'
s effective user id."
);
#define OS_SETEUID_METHODDEF \
{"seteuid", (PyCFunction)os_seteuid, METH_
VARARGS
, os_seteuid__doc__},
{"seteuid", (PyCFunction)os_seteuid, METH_
O
, os_seteuid__doc__},
static
PyObject
*
os_seteuid_impl
(
PyModuleDef
*
module
,
uid_t
euid
);
static
PyObject
*
os_seteuid
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_seteuid
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
uid_t
euid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:seteuid"
,
_Py_Uid_Converter
,
&
euid
))
goto
exit
;
...
...
@@ -2597,18 +2597,18 @@ PyDoc_STRVAR(os_setegid__doc__,
"Set the current process
\'
s effective group id."
);
#define OS_SETEGID_METHODDEF \
{"setegid", (PyCFunction)os_setegid, METH_
VARARGS
, os_setegid__doc__},
{"setegid", (PyCFunction)os_setegid, METH_
O
, os_setegid__doc__},
static
PyObject
*
os_setegid_impl
(
PyModuleDef
*
module
,
gid_t
egid
);
static
PyObject
*
os_setegid
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_setegid
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
gid_t
egid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:setegid"
,
_Py_Gid_Converter
,
&
egid
))
goto
exit
;
...
...
@@ -2695,18 +2695,18 @@ PyDoc_STRVAR(os_setgid__doc__,
"Set the current process
\'
s group id."
);
#define OS_SETGID_METHODDEF \
{"setgid", (PyCFunction)os_setgid, METH_
VARARGS
, os_setgid__doc__},
{"setgid", (PyCFunction)os_setgid, METH_
O
, os_setgid__doc__},
static
PyObject
*
os_setgid_impl
(
PyModuleDef
*
module
,
gid_t
gid
);
static
PyObject
*
os_setgid
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_setgid
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
gid_t
gid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:setgid"
,
_Py_Gid_Converter
,
&
gid
))
goto
exit
;
...
...
@@ -3036,18 +3036,18 @@ PyDoc_STRVAR(os_getsid__doc__,
"Call the system call getsid(pid) and return the result."
);
#define OS_GETSID_METHODDEF \
{"getsid", (PyCFunction)os_getsid, METH_
VARARGS
, os_getsid__doc__},
{"getsid", (PyCFunction)os_getsid, METH_
O
, os_getsid__doc__},
static
PyObject
*
os_getsid_impl
(
PyModuleDef
*
module
,
pid_t
pid
);
static
PyObject
*
os_getsid
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_getsid
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
pid_t
pid
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
""
_Py_PARSE_PID
":getsid"
,
&
pid
))
goto
exit
;
...
...
@@ -3123,18 +3123,18 @@ PyDoc_STRVAR(os_tcgetpgrp__doc__,
"Return the process group associated with the terminal specified by fd."
);
#define OS_TCGETPGRP_METHODDEF \
{"tcgetpgrp", (PyCFunction)os_tcgetpgrp, METH_
VARARGS
, os_tcgetpgrp__doc__},
{"tcgetpgrp", (PyCFunction)os_tcgetpgrp, METH_
O
, os_tcgetpgrp__doc__},
static
PyObject
*
os_tcgetpgrp_impl
(
PyModuleDef
*
module
,
int
fd
);
static
PyObject
*
os_tcgetpgrp
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_tcgetpgrp
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
fd
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:tcgetpgrp"
,
&
fd
))
goto
exit
;
...
...
@@ -3288,19 +3288,19 @@ PyDoc_STRVAR(os_dup__doc__,
"Return a duplicate of a file descriptor."
);
#define OS_DUP_METHODDEF \
{"dup", (PyCFunction)os_dup, METH_
VARARGS
, os_dup__doc__},
{"dup", (PyCFunction)os_dup, METH_
O
, os_dup__doc__},
static
int
os_dup_impl
(
PyModuleDef
*
module
,
int
fd
);
static
PyObject
*
os_dup
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_dup
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
fd
;
int
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:dup"
,
&
fd
))
goto
exit
;
...
...
@@ -3612,19 +3612,19 @@ PyDoc_STRVAR(os_isatty__doc__,
"connected to the slave end of a terminal."
);
#define OS_ISATTY_METHODDEF \
{"isatty", (PyCFunction)os_isatty, METH_
VARARGS
, os_isatty__doc__},
{"isatty", (PyCFunction)os_isatty, METH_
O
, os_isatty__doc__},
static
int
os_isatty_impl
(
PyModuleDef
*
module
,
int
fd
);
static
PyObject
*
os_isatty
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_isatty
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
fd
;
int
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:isatty"
,
&
fd
))
goto
exit
;
...
...
@@ -3677,18 +3677,18 @@ PyDoc_STRVAR(os_pipe2__doc__,
"O_NONBLOCK, O_CLOEXEC."
);
#define OS_PIPE2_METHODDEF \
{"pipe2", (PyCFunction)os_pipe2, METH_
VARARGS
, os_pipe2__doc__},
{"pipe2", (PyCFunction)os_pipe2, METH_
O
, os_pipe2__doc__},
static
PyObject
*
os_pipe2_impl
(
PyModuleDef
*
module
,
int
flags
);
static
PyObject
*
os_pipe2
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_pipe2
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
flags
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:pipe2"
,
&
flags
))
goto
exit
;
...
...
@@ -3889,19 +3889,19 @@ PyDoc_STRVAR(os_major__doc__,
"Extracts a device major number from a raw device number."
);
#define OS_MAJOR_METHODDEF \
{"major", (PyCFunction)os_major, METH_
VARARGS
, os_major__doc__},
{"major", (PyCFunction)os_major, METH_
O
, os_major__doc__},
static
unsigned
int
os_major_impl
(
PyModuleDef
*
module
,
dev_t
device
);
static
PyObject
*
os_major
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_major
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
dev_t
device
;
unsigned
int
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:major"
,
_Py_Dev_Converter
,
&
device
))
goto
exit
;
...
...
@@ -3925,19 +3925,19 @@ PyDoc_STRVAR(os_minor__doc__,
"Extracts a device minor number from a raw device number."
);
#define OS_MINOR_METHODDEF \
{"minor", (PyCFunction)os_minor, METH_
VARARGS
, os_minor__doc__},
{"minor", (PyCFunction)os_minor, METH_
O
, os_minor__doc__},
static
unsigned
int
os_minor_impl
(
PyModuleDef
*
module
,
dev_t
device
);
static
PyObject
*
os_minor
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_minor
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
dev_t
device
;
unsigned
int
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:minor"
,
_Py_Dev_Converter
,
&
device
))
goto
exit
;
...
...
@@ -4222,18 +4222,18 @@ PyDoc_STRVAR(os_unsetenv__doc__,
"Delete an environment variable."
);
#define OS_UNSETENV_METHODDEF \
{"unsetenv", (PyCFunction)os_unsetenv, METH_
VARARGS
, os_unsetenv__doc__},
{"unsetenv", (PyCFunction)os_unsetenv, METH_
O
, os_unsetenv__doc__},
static
PyObject
*
os_unsetenv_impl
(
PyModuleDef
*
module
,
PyObject
*
name
);
static
PyObject
*
os_unsetenv
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_unsetenv
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
name
=
NULL
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:unsetenv"
,
PyUnicode_FSConverter
,
&
name
))
goto
exit
;
...
...
@@ -4255,18 +4255,18 @@ PyDoc_STRVAR(os_strerror__doc__,
"Translate an error code to a message string."
);
#define OS_STRERROR_METHODDEF \
{"strerror", (PyCFunction)os_strerror, METH_
VARARGS
, os_strerror__doc__},
{"strerror", (PyCFunction)os_strerror, METH_
O
, os_strerror__doc__},
static
PyObject
*
os_strerror_impl
(
PyModuleDef
*
module
,
int
code
);
static
PyObject
*
os_strerror
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_strerror
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
code
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:strerror"
,
&
code
))
goto
exit
;
...
...
@@ -4285,19 +4285,19 @@ PyDoc_STRVAR(os_WCOREDUMP__doc__,
"Return True if the process returning status was dumped to a core file."
);
#define OS_WCOREDUMP_METHODDEF \
{"WCOREDUMP", (PyCFunction)os_WCOREDUMP, METH_
VARARGS
, os_WCOREDUMP__doc__},
{"WCOREDUMP", (PyCFunction)os_WCOREDUMP, METH_
O
, os_WCOREDUMP__doc__},
static
int
os_WCOREDUMP_impl
(
PyModuleDef
*
module
,
int
status
);
static
PyObject
*
os_WCOREDUMP
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_WCOREDUMP
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
status
;
int
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:WCOREDUMP"
,
&
status
))
goto
exit
;
...
...
@@ -4585,18 +4585,18 @@ PyDoc_STRVAR(os_fstatvfs__doc__,
"Equivalent to statvfs(fd)."
);
#define OS_FSTATVFS_METHODDEF \
{"fstatvfs", (PyCFunction)os_fstatvfs, METH_
VARARGS
, os_fstatvfs__doc__},
{"fstatvfs", (PyCFunction)os_fstatvfs, METH_
O
, os_fstatvfs__doc__},
static
PyObject
*
os_fstatvfs_impl
(
PyModuleDef
*
module
,
int
fd
);
static
PyObject
*
os_fstatvfs
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_fstatvfs
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
fd
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:fstatvfs"
,
&
fd
))
goto
exit
;
...
...
@@ -4774,18 +4774,18 @@ PyDoc_STRVAR(os_confstr__doc__,
"Return a string-valued system configuration variable."
);
#define OS_CONFSTR_METHODDEF \
{"confstr", (PyCFunction)os_confstr, METH_
VARARGS
, os_confstr__doc__},
{"confstr", (PyCFunction)os_confstr, METH_
O
, os_confstr__doc__},
static
PyObject
*
os_confstr_impl
(
PyModuleDef
*
module
,
int
name
);
static
PyObject
*
os_confstr
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_confstr
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
name
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:confstr"
,
conv_confstr_confname
,
&
name
))
goto
exit
;
...
...
@@ -4806,19 +4806,19 @@ PyDoc_STRVAR(os_sysconf__doc__,
"Return an integer-valued system configuration variable."
);
#define OS_SYSCONF_METHODDEF \
{"sysconf", (PyCFunction)os_sysconf, METH_
VARARGS
, os_sysconf__doc__},
{"sysconf", (PyCFunction)os_sysconf, METH_
O
, os_sysconf__doc__},
static
long
os_sysconf_impl
(
PyModuleDef
*
module
,
int
name
);
static
PyObject
*
os_sysconf
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_sysconf
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
name
;
long
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:sysconf"
,
conv_sysconf_confname
,
&
name
))
goto
exit
;
...
...
@@ -5215,18 +5215,18 @@ PyDoc_STRVAR(os_urandom__doc__,
"Return a bytes object containing random bytes suitable for cryptographic use."
);
#define OS_URANDOM_METHODDEF \
{"urandom", (PyCFunction)os_urandom, METH_
VARARGS
, os_urandom__doc__},
{"urandom", (PyCFunction)os_urandom, METH_
O
, os_urandom__doc__},
static
PyObject
*
os_urandom_impl
(
PyModuleDef
*
module
,
Py_ssize_t
size
);
static
PyObject
*
os_urandom
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_urandom
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_ssize_t
size
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"n:urandom"
,
&
size
))
goto
exit
;
...
...
@@ -5261,19 +5261,19 @@ PyDoc_STRVAR(os_get_inheritable__doc__,
"Get the close-on-exe flag of the specified file descriptor."
);
#define OS_GET_INHERITABLE_METHODDEF \
{"get_inheritable", (PyCFunction)os_get_inheritable, METH_
VARARGS
, os_get_inheritable__doc__},
{"get_inheritable", (PyCFunction)os_get_inheritable, METH_
O
, os_get_inheritable__doc__},
static
int
os_get_inheritable_impl
(
PyModuleDef
*
module
,
int
fd
);
static
PyObject
*
os_get_inheritable
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_get_inheritable
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
fd
;
int
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:get_inheritable"
,
&
fd
))
goto
exit
;
...
...
@@ -5324,19 +5324,19 @@ PyDoc_STRVAR(os_get_handle_inheritable__doc__,
"Get the close-on-exe flag of the specified file descriptor."
);
#define OS_GET_HANDLE_INHERITABLE_METHODDEF \
{"get_handle_inheritable", (PyCFunction)os_get_handle_inheritable, METH_
VARARGS
, os_get_handle_inheritable__doc__},
{"get_handle_inheritable", (PyCFunction)os_get_handle_inheritable, METH_
O
, os_get_handle_inheritable__doc__},
static
int
os_get_handle_inheritable_impl
(
PyModuleDef
*
module
,
Py_intptr_t
handle
);
static
PyObject
*
os_get_handle_inheritable
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
os_get_handle_inheritable
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_intptr_t
handle
;
int
_return_value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
""
_Py_PARSE_INTPTR
":get_handle_inheritable"
,
&
handle
))
goto
exit
;
...
...
@@ -5847,4 +5847,4 @@ exit:
#ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
#define OS_SET_HANDLE_INHERITABLE_METHODDEF
#endif
/* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
/*[clinic end generated code: output=
d17c625afa72886b
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
b15ceac3a8ff0eae
input=a9049054013a1b77]*/
Modules/clinic/pwdmodule.c.h
View file @
e8725e66
...
...
@@ -22,18 +22,18 @@ PyDoc_STRVAR(pwd_getpwnam__doc__,
"See `help(pwd)` for more on password database entries."
);
#define PWD_GETPWNAM_METHODDEF \
{"getpwnam", (PyCFunction)pwd_getpwnam, METH_
VARARGS
, pwd_getpwnam__doc__},
{"getpwnam", (PyCFunction)pwd_getpwnam, METH_
O
, pwd_getpwnam__doc__},
static
PyObject
*
pwd_getpwnam_impl
(
PyModuleDef
*
module
,
PyObject
*
arg
);
static
PyObject
*
pwd_getpwnam
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
pwd_getpwnam
(
PyModuleDef
*
module
,
PyObject
*
arg
_
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
arg
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg_
,
"U:getpwnam"
,
&
arg
))
goto
exit
;
...
...
@@ -70,4 +70,4 @@ pwd_getpwall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
#ifndef PWD_GETPWALL_METHODDEF
#define PWD_GETPWALL_METHODDEF
#endif
/* !defined(PWD_GETPWALL_METHODDEF) */
/*[clinic end generated code: output=
2e23f920020a750a
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
e7d5ac24b20e91ae
input=a9049054013a1b77]*/
Modules/clinic/pyexpat.c.h
View file @
e8725e66
...
...
@@ -49,18 +49,18 @@ PyDoc_STRVAR(pyexpat_xmlparser_SetBase__doc__,
"Set the base URL for the parser."
);
#define PYEXPAT_XMLPARSER_SETBASE_METHODDEF \
{"SetBase", (PyCFunction)pyexpat_xmlparser_SetBase, METH_
VARARGS
, pyexpat_xmlparser_SetBase__doc__},
{"SetBase", (PyCFunction)pyexpat_xmlparser_SetBase, METH_
O
, pyexpat_xmlparser_SetBase__doc__},
static
PyObject
*
pyexpat_xmlparser_SetBase_impl
(
xmlparseobject
*
self
,
const
char
*
base
);
static
PyObject
*
pyexpat_xmlparser_SetBase
(
xmlparseobject
*
self
,
PyObject
*
arg
s
)
pyexpat_xmlparser_SetBase
(
xmlparseobject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
const
char
*
base
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"s:SetBase"
,
&
base
))
goto
exit
;
...
...
@@ -150,18 +150,18 @@ PyDoc_STRVAR(pyexpat_xmlparser_SetParamEntityParsing__doc__,
"was successful."
);
#define PYEXPAT_XMLPARSER_SETPARAMENTITYPARSING_METHODDEF \
{"SetParamEntityParsing", (PyCFunction)pyexpat_xmlparser_SetParamEntityParsing, METH_
VARARGS
, pyexpat_xmlparser_SetParamEntityParsing__doc__},
{"SetParamEntityParsing", (PyCFunction)pyexpat_xmlparser_SetParamEntityParsing, METH_
O
, pyexpat_xmlparser_SetParamEntityParsing__doc__},
static
PyObject
*
pyexpat_xmlparser_SetParamEntityParsing_impl
(
xmlparseobject
*
self
,
int
flag
);
static
PyObject
*
pyexpat_xmlparser_SetParamEntityParsing
(
xmlparseobject
*
self
,
PyObject
*
arg
s
)
pyexpat_xmlparser_SetParamEntityParsing
(
xmlparseobject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
flag
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:SetParamEntityParsing"
,
&
flag
))
goto
exit
;
...
...
@@ -262,18 +262,18 @@ PyDoc_STRVAR(pyexpat_ErrorString__doc__,
"Returns string error for given number."
);
#define PYEXPAT_ERRORSTRING_METHODDEF \
{"ErrorString", (PyCFunction)pyexpat_ErrorString, METH_
VARARGS
, pyexpat_ErrorString__doc__},
{"ErrorString", (PyCFunction)pyexpat_ErrorString, METH_
O
, pyexpat_ErrorString__doc__},
static
PyObject
*
pyexpat_ErrorString_impl
(
PyModuleDef
*
module
,
long
code
);
static
PyObject
*
pyexpat_ErrorString
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
pyexpat_ErrorString
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
long
code
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"l:ErrorString"
,
&
code
))
goto
exit
;
...
...
@@ -286,4 +286,4 @@ exit:
#ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#endif
/* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
/*[clinic end generated code: output=
0198390005e40e1c
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
9715b916f2d618fa
input=a9049054013a1b77]*/
Modules/clinic/spwdmodule.c.h
View file @
e8725e66
...
...
@@ -13,18 +13,18 @@ PyDoc_STRVAR(spwd_getspnam__doc__,
"See `help(spwd)` for more on shadow password database entries."
);
#define SPWD_GETSPNAM_METHODDEF \
{"getspnam", (PyCFunction)spwd_getspnam, METH_
VARARGS
, spwd_getspnam__doc__},
{"getspnam", (PyCFunction)spwd_getspnam, METH_
O
, spwd_getspnam__doc__},
static
PyObject
*
spwd_getspnam_impl
(
PyModuleDef
*
module
,
PyObject
*
arg
);
static
PyObject
*
spwd_getspnam
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
spwd_getspnam
(
PyModuleDef
*
module
,
PyObject
*
arg
_
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
arg
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg_
,
"U:getspnam"
,
&
arg
))
goto
exit
;
...
...
@@ -67,4 +67,4 @@ spwd_getspall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
#ifndef SPWD_GETSPALL_METHODDEF
#define SPWD_GETSPALL_METHODDEF
#endif
/* !defined(SPWD_GETSPALL_METHODDEF) */
/*[clinic end generated code: output=
ab16125c5e5f2b1b
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
67a4f8c47008f28f
input=a9049054013a1b77]*/
Modules/clinic/zlibmodule.c.h
View file @
e8725e66
...
...
@@ -189,18 +189,18 @@ PyDoc_STRVAR(zlib_Compress_compress__doc__,
"Call the flush() method to clear these buffers."
);
#define ZLIB_COMPRESS_COMPRESS_METHODDEF \
{"compress", (PyCFunction)zlib_Compress_compress, METH_
VARARGS
, zlib_Compress_compress__doc__},
{"compress", (PyCFunction)zlib_Compress_compress, METH_
O
, zlib_Compress_compress__doc__},
static
PyObject
*
zlib_Compress_compress_impl
(
compobject
*
self
,
Py_buffer
*
data
);
static
PyObject
*
zlib_Compress_compress
(
compobject
*
self
,
PyObject
*
arg
s
)
zlib_Compress_compress
(
compobject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
data
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:compress"
,
&
data
))
goto
exit
;
...
...
@@ -446,4 +446,4 @@ exit:
#ifndef ZLIB_COMPRESS_COPY_METHODDEF
#define ZLIB_COMPRESS_COPY_METHODDEF
#endif
/* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
/*[clinic end generated code: output=
901c18189767dc0
8 input=a9049054013a1b77]*/
/*[clinic end generated code: output=
0743b1aa908f0b6
8 input=a9049054013a1b77]*/
Objects/clinic/bytearrayobject.c.h
View file @
e8725e66
...
...
@@ -339,18 +339,18 @@ PyDoc_STRVAR(bytearray_append__doc__,
" The item to be appended."
);
#define BYTEARRAY_APPEND_METHODDEF \
{"append", (PyCFunction)bytearray_append, METH_
VARARGS
, bytearray_append__doc__},
{"append", (PyCFunction)bytearray_append, METH_
O
, bytearray_append__doc__},
static
PyObject
*
bytearray_append_impl
(
PyByteArrayObject
*
self
,
int
item
);
static
PyObject
*
bytearray_append
(
PyByteArrayObject
*
self
,
PyObject
*
arg
s
)
bytearray_append
(
PyByteArrayObject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
item
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:append"
,
_getbytevalue
,
&
item
))
goto
exit
;
...
...
@@ -416,18 +416,18 @@ PyDoc_STRVAR(bytearray_remove__doc__,
" The value to remove."
);
#define BYTEARRAY_REMOVE_METHODDEF \
{"remove", (PyCFunction)bytearray_remove, METH_
VARARGS
, bytearray_remove__doc__},
{"remove", (PyCFunction)bytearray_remove, METH_
O
, bytearray_remove__doc__},
static
PyObject
*
bytearray_remove_impl
(
PyByteArrayObject
*
self
,
int
value
);
static
PyObject
*
bytearray_remove
(
PyByteArrayObject
*
self
,
PyObject
*
arg
s
)
bytearray_remove
(
PyByteArrayObject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
value
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"O&:remove"
,
_getbytevalue
,
&
value
))
goto
exit
;
...
...
@@ -621,18 +621,18 @@ PyDoc_STRVAR(bytearray_fromhex__doc__,
"Example: bytearray.fromhex(
\'
B9 01EF
\'
) -> bytearray(b
\'\\\\
xb9
\\\\
x01
\\\\
xef
\'
)"
);
#define BYTEARRAY_FROMHEX_METHODDEF \
{"fromhex", (PyCFunction)bytearray_fromhex, METH_
VARARGS
|METH_CLASS, bytearray_fromhex__doc__},
{"fromhex", (PyCFunction)bytearray_fromhex, METH_
O
|METH_CLASS, bytearray_fromhex__doc__},
static
PyObject
*
bytearray_fromhex_impl
(
PyObject
*
cls
,
PyObject
*
string
);
static
PyObject
*
bytearray_fromhex
(
PyTypeObject
*
cls
,
PyObject
*
arg
s
)
bytearray_fromhex
(
PyTypeObject
*
cls
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
string
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:fromhex"
,
&
string
))
goto
exit
;
...
...
@@ -705,4 +705,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
{
return
bytearray_sizeof_impl
(
self
);
}
/*[clinic end generated code: output=
70ea384faeca8d16
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
d763876718a66fc3
input=a9049054013a1b77]*/
Objects/clinic/bytesobject.c.h
View file @
e8725e66
...
...
@@ -54,18 +54,18 @@ PyDoc_STRVAR(bytes_partition__doc__,
"object and two empty bytes objects."
);
#define BYTES_PARTITION_METHODDEF \
{"partition", (PyCFunction)bytes_partition, METH_
VARARGS
, bytes_partition__doc__},
{"partition", (PyCFunction)bytes_partition, METH_
O
, bytes_partition__doc__},
static
PyObject
*
bytes_partition_impl
(
PyBytesObject
*
self
,
Py_buffer
*
sep
);
static
PyObject
*
bytes_partition
(
PyBytesObject
*
self
,
PyObject
*
arg
s
)
bytes_partition
(
PyBytesObject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
sep
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:partition"
,
&
sep
))
goto
exit
;
...
...
@@ -93,18 +93,18 @@ PyDoc_STRVAR(bytes_rpartition__doc__,
"objects and the original bytes object."
);
#define BYTES_RPARTITION_METHODDEF \
{"rpartition", (PyCFunction)bytes_rpartition, METH_
VARARGS
, bytes_rpartition__doc__},
{"rpartition", (PyCFunction)bytes_rpartition, METH_
O
, bytes_rpartition__doc__},
static
PyObject
*
bytes_rpartition_impl
(
PyBytesObject
*
self
,
Py_buffer
*
sep
);
static
PyObject
*
bytes_rpartition
(
PyBytesObject
*
self
,
PyObject
*
arg
s
)
bytes_rpartition
(
PyBytesObject
*
self
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
Py_buffer
sep
=
{
NULL
,
NULL
};
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"y*:rpartition"
,
&
sep
))
goto
exit
;
...
...
@@ -473,18 +473,18 @@ PyDoc_STRVAR(bytes_fromhex__doc__,
"Example: bytes.fromhex(
\'
B9 01EF
\'
) -> b
\'\\\\
xb9
\\\\
x01
\\\\
xef
\'
."
);
#define BYTES_FROMHEX_METHODDEF \
{"fromhex", (PyCFunction)bytes_fromhex, METH_
VARARGS
|METH_CLASS, bytes_fromhex__doc__},
{"fromhex", (PyCFunction)bytes_fromhex, METH_
O
|METH_CLASS, bytes_fromhex__doc__},
static
PyObject
*
bytes_fromhex_impl
(
PyTypeObject
*
type
,
PyObject
*
string
);
static
PyObject
*
bytes_fromhex
(
PyTypeObject
*
type
,
PyObject
*
arg
s
)
bytes_fromhex
(
PyTypeObject
*
type
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
string
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:fromhex"
,
&
string
))
goto
exit
;
...
...
@@ -493,4 +493,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *args)
exit:
return
return_value
;
}
/*[clinic end generated code: output=
dfe5c9a317b99f49
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
b9e69e1f7c8ccd14
input=a9049054013a1b77]*/
Python/clinic/bltinmodule.c.h
View file @
e8725e66
...
...
@@ -109,18 +109,18 @@ PyDoc_STRVAR(builtin_chr__doc__,
"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."
);
#define BUILTIN_CHR_METHODDEF \
{"chr", (PyCFunction)builtin_chr, METH_
VARARGS
, builtin_chr__doc__},
{"chr", (PyCFunction)builtin_chr, METH_
O
, builtin_chr__doc__},
static
PyObject
*
builtin_chr_impl
(
PyModuleDef
*
module
,
int
i
);
static
PyObject
*
builtin_chr
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
builtin_chr
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
int
i
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"i:chr"
,
&
i
))
goto
exit
;
...
...
@@ -656,4 +656,4 @@ builtin_issubclass(PyModuleDef *module, PyObject *args)
exit:
return
return_value
;
}
/*[clinic end generated code: output=
2da46de189e48d26
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
12db4cde92eb11b3
input=a9049054013a1b77]*/
Python/clinic/import.c.h
View file @
e8725e66
...
...
@@ -122,18 +122,18 @@ PyDoc_STRVAR(_imp_init_builtin__doc__,
"Initializes a built-in module."
);
#define _IMP_INIT_BUILTIN_METHODDEF \
{"init_builtin", (PyCFunction)_imp_init_builtin, METH_
VARARGS
, _imp_init_builtin__doc__},
{"init_builtin", (PyCFunction)_imp_init_builtin, METH_
O
, _imp_init_builtin__doc__},
static
PyObject
*
_imp_init_builtin_impl
(
PyModuleDef
*
module
,
PyObject
*
name
);
static
PyObject
*
_imp_init_builtin
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_imp_init_builtin
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
name
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:init_builtin"
,
&
name
))
goto
exit
;
...
...
@@ -150,18 +150,18 @@ PyDoc_STRVAR(_imp_init_frozen__doc__,
"Initializes a frozen module."
);
#define _IMP_INIT_FROZEN_METHODDEF \
{"init_frozen", (PyCFunction)_imp_init_frozen, METH_
VARARGS
, _imp_init_frozen__doc__},
{"init_frozen", (PyCFunction)_imp_init_frozen, METH_
O
, _imp_init_frozen__doc__},
static
PyObject
*
_imp_init_frozen_impl
(
PyModuleDef
*
module
,
PyObject
*
name
);
static
PyObject
*
_imp_init_frozen
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_imp_init_frozen
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
name
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:init_frozen"
,
&
name
))
goto
exit
;
...
...
@@ -178,18 +178,18 @@ PyDoc_STRVAR(_imp_get_frozen_object__doc__,
"Create a code object for a frozen module."
);
#define _IMP_GET_FROZEN_OBJECT_METHODDEF \
{"get_frozen_object", (PyCFunction)_imp_get_frozen_object, METH_
VARARGS
, _imp_get_frozen_object__doc__},
{"get_frozen_object", (PyCFunction)_imp_get_frozen_object, METH_
O
, _imp_get_frozen_object__doc__},
static
PyObject
*
_imp_get_frozen_object_impl
(
PyModuleDef
*
module
,
PyObject
*
name
);
static
PyObject
*
_imp_get_frozen_object
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_imp_get_frozen_object
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
name
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:get_frozen_object"
,
&
name
))
goto
exit
;
...
...
@@ -206,18 +206,18 @@ PyDoc_STRVAR(_imp_is_frozen_package__doc__,
"Returns True if the module name is of a frozen package."
);
#define _IMP_IS_FROZEN_PACKAGE_METHODDEF \
{"is_frozen_package", (PyCFunction)_imp_is_frozen_package, METH_
VARARGS
, _imp_is_frozen_package__doc__},
{"is_frozen_package", (PyCFunction)_imp_is_frozen_package, METH_
O
, _imp_is_frozen_package__doc__},
static
PyObject
*
_imp_is_frozen_package_impl
(
PyModuleDef
*
module
,
PyObject
*
name
);
static
PyObject
*
_imp_is_frozen_package
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_imp_is_frozen_package
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
name
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:is_frozen_package"
,
&
name
))
goto
exit
;
...
...
@@ -234,18 +234,18 @@ PyDoc_STRVAR(_imp_is_builtin__doc__,
"Returns True if the module name corresponds to a built-in module."
);
#define _IMP_IS_BUILTIN_METHODDEF \
{"is_builtin", (PyCFunction)_imp_is_builtin, METH_
VARARGS
, _imp_is_builtin__doc__},
{"is_builtin", (PyCFunction)_imp_is_builtin, METH_
O
, _imp_is_builtin__doc__},
static
PyObject
*
_imp_is_builtin_impl
(
PyModuleDef
*
module
,
PyObject
*
name
);
static
PyObject
*
_imp_is_builtin
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_imp_is_builtin
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
name
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:is_builtin"
,
&
name
))
goto
exit
;
...
...
@@ -262,18 +262,18 @@ PyDoc_STRVAR(_imp_is_frozen__doc__,
"Returns True if the module name corresponds to a frozen module."
);
#define _IMP_IS_FROZEN_METHODDEF \
{"is_frozen", (PyCFunction)_imp_is_frozen, METH_
VARARGS
, _imp_is_frozen__doc__},
{"is_frozen", (PyCFunction)_imp_is_frozen, METH_
O
, _imp_is_frozen__doc__},
static
PyObject
*
_imp_is_frozen_impl
(
PyModuleDef
*
module
,
PyObject
*
name
);
static
PyObject
*
_imp_is_frozen
(
PyModuleDef
*
module
,
PyObject
*
arg
s
)
_imp_is_frozen
(
PyModuleDef
*
module
,
PyObject
*
arg
)
{
PyObject
*
return_value
=
NULL
;
PyObject
*
name
;
if
(
!
PyArg_Parse
Tuple
(
args
,
if
(
!
PyArg_Parse
(
arg
,
"U:is_frozen"
,
&
name
))
goto
exit
;
...
...
@@ -320,4 +320,4 @@ exit:
#ifndef _IMP_LOAD_DYNAMIC_METHODDEF
#define _IMP_LOAD_DYNAMIC_METHODDEF
#endif
/* !defined(_IMP_LOAD_DYNAMIC_METHODDEF) */
/*[clinic end generated code: output=
087a1f22e9febcc7
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
d41c392510815c5b
input=a9049054013a1b77]*/
Tools/clinic/clinic.py
View file @
e8725e66
...
...
@@ -593,8 +593,6 @@ class CLanguage(Language):
meth_o
=
(
len
(
parameters
)
==
1
and
parameters
[
0
].
kind
==
inspect
.
Parameter
.
POSITIONAL_ONLY
and
not
converters
[
0
].
is_optional
()
and
isinstance
(
converters
[
0
],
object_converter
)
and
converters
[
0
].
format_unit
==
'O'
and
not
new_or_init
)
# we have to set these things before we're done:
...
...
@@ -700,6 +698,8 @@ class CLanguage(Language):
elif
meth_o
:
flags
=
"METH_O"
if
(
isinstance
(
converters
[
0
],
object_converter
)
and
converters
[
0
].
format_unit
==
'O'
):
meth_o_prototype
=
normalize_snippet
(
"""
static PyObject *
{c_basename}({impl_parameters})
...
...
@@ -717,6 +717,22 @@ class CLanguage(Language):
parser_prototype
=
meth_o_prototype
parser_definition
=
parser_body
(
parser_prototype
)
else
:
argname
=
'arg'
if
parameters
[
0
].
name
==
argname
:
argname
+=
'_'
parser_prototype
=
normalize_snippet
(
"""
static PyObject *
{c_basename}({self_type}{self_name}, PyObject *%s)
"""
%
argname
)
parser_definition
=
parser_body
(
parser_prototype
,
normalize_snippet
(
"""
if (!PyArg_Parse(%s,
"{format_units}:{name}",
{parse_arguments}))
goto exit;
"""
%
argname
,
indent
=
4
))
elif
has_option_groups
:
# positional parameters with option groups
# (we have to generate lots of PyArg_ParseTuple calls
...
...
@@ -1025,7 +1041,7 @@ class CLanguage(Language):
# METH_O, we have exactly one anyway, so we know exactly
# where it is.
if
(
"METH_O"
in
templates
[
'methoddef_define'
]
and
not
default_return_converter
):
'{impl_parameters}'
in
templates
[
'parser_prototype'
]
):
data
.
declarations
.
pop
(
0
)
template_dict
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment