#if CONDITION_E || CONDITION_F
#warning "different type of CPP directive"
/*[clinic input]
+@permit_long_summary
test_preprocessor_guarded_if_e_or_f
Makes sure cpp.Monitor handles other directives than preprocessor conditionals.
[clinic start generated code]*/
static PyObject *
test_preprocessor_guarded_if_e_or_f_impl(PyObject *module)
-/*[clinic end generated code: output=e49d24ff64ad88bc input=57b9c37f938bc4f1]*/
+/*[clinic end generated code: output=e49d24ff64ad88bc input=3ca9ab4e883300ed]*/
#endif
/*[clinic input]
#define COLLECTION_FLAGS (Py_TPFLAGS_SEQUENCE | Py_TPFLAGS_MAPPING)
/*[clinic input]
+@permit_long_summary
_abc._abc_init
self: object
static PyObject *
_abc__abc_init(PyObject *module, PyObject *self)
-/*[clinic end generated code: output=594757375714cda1 input=8d7fe470ff77f029]*/
+/*[clinic end generated code: output=594757375714cda1 input=0b3513f947736d39]*/
{
_abcmodule_state *state = get_abc_state(module);
PyObject *data;
}
/*[clinic input]
+@permit_long_summary
_abc._abc_register
self: object
static PyObject *
_abc__abc_register_impl(PyObject *module, PyObject *self, PyObject *subclass)
-/*[clinic end generated code: output=7851e7668c963524 input=ca589f8c3080e67f]*/
+/*[clinic end generated code: output=7851e7668c963524 input=135ab13a581b4414]*/
{
if (!PyType_Check(subclass)) {
PyErr_SetString(PyExc_TypeError, "Can only register classes");
/*[clinic input]
+@permit_long_summary
_abc._abc_instancecheck
self: object
static PyObject *
_abc__abc_instancecheck_impl(PyObject *module, PyObject *self,
PyObject *instance)
-/*[clinic end generated code: output=b8b5148f63b6b56f input=a4f4525679261084]*/
+/*[clinic end generated code: output=b8b5148f63b6b56f input=0bbc8da0ea346719]*/
{
PyObject *subtype, *result = NULL, *subclass = NULL;
_abc_data *impl = _get_impl(module, self);
PyObject **result);
/*[clinic input]
+@permit_long_summary
_abc._abc_subclasscheck
self: object
static PyObject *
_abc__abc_subclasscheck_impl(PyObject *module, PyObject *self,
PyObject *subclass)
-/*[clinic end generated code: output=b56c9e4a530e3894 input=1d947243409d10b8]*/
+/*[clinic end generated code: output=b56c9e4a530e3894 input=5bf1ef712f5d3610]*/
{
if (!PyType_Check(subclass)) {
PyErr_SetString(PyExc_TypeError, "issubclass() arg 1 must be a class");
}
/*[clinic input]
+@permit_long_docstring_body
_bz2.BZ2Decompressor.decompress
data: Py_buffer
static PyObject *
_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data,
Py_ssize_t max_length)
-/*[clinic end generated code: output=23e41045deb240a3 input=52e1ffc66a8ea624]*/
+/*[clinic end generated code: output=23e41045deb240a3 input=3703e78f91757655]*/
{
PyObject *result = NULL;
}
/*[clinic input]
+@permit_long_summary
_codecs.lookup
encoding: str
/
static PyObject *
_codecs_lookup_impl(PyObject *module, const char *encoding)
-/*[clinic end generated code: output=9f0afa572080c36d input=3c572c0db3febe9c]*/
+/*[clinic end generated code: output=9f0afa572080c36d input=02227d5429491ab3]*/
{
return _PyCodec_Lookup(encoding);
}
/*[clinic input]
+@permit_long_summary
@critical_section obj
_ctypes.byref
obj: object(subclass_of="clinic_state()->PyCData_Type")
static PyObject *
_ctypes_byref_impl(PyObject *module, PyObject *obj, Py_ssize_t offset)
-/*[clinic end generated code: output=60dec5ed520c71de input=6ec02d95d15fbd56]*/
+/*[clinic end generated code: output=60dec5ed520c71de input=870076149a2de427]*/
{
ctypes_state *st = get_module_state(module);
}
/*[clinic input]
+@permit_long_docstring_body
_curses_panel.panel.hide
Hide the panel.
static PyObject *
_curses_panel_panel_hide_impl(PyCursesPanelObject *self)
-/*[clinic end generated code: output=a7bbbd523e1eab49 input=f6ab884e99386118]*/
+/*[clinic end generated code: output=a7bbbd523e1eab49 input=9071b463a39a1a6a]*/
{
int rtn = hide_panel(self->pan);
return curses_panel_panel_check_err(self, rtn, "hide_panel", "hide");
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.border
ls: object(c_default="NULL") = _curses.ACS_VLINE
PyObject *rs, PyObject *ts, PyObject *bs,
PyObject *tl, PyObject *tr, PyObject *bl,
PyObject *br)
-/*[clinic end generated code: output=670ef38d3d7c2aa3 input=e015f735d67a240b]*/
+/*[clinic end generated code: output=670ef38d3d7c2aa3 input=adaafca87488ee35]*/
{
chtype ch[8];
int i, rtn;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.derwin
[
static PyObject *
_curses_window_derwin_impl(PyCursesWindowObject *self, int group_left_1,
int nlines, int ncols, int begin_y, int begin_x)
-/*[clinic end generated code: output=7924b112d9f70d6e input=966d9481f7f5022e]*/
+/*[clinic end generated code: output=7924b112d9f70d6e input=ebe95ded1c284c8e]*/
{
WINDOW *win;
#ifdef NCURSES_MOUSE_VERSION
/*[clinic input]
+@permit_long_summary
_curses.window.enclose
y: int
static PyObject *
_curses_window_enclose_impl(PyCursesWindowObject *self, int y, int x)
-/*[clinic end generated code: output=8679beef50502648 input=4fd3355d723f7bc9]*/
+/*[clinic end generated code: output=8679beef50502648 input=9ba7c894cffe5507]*/
{
return PyBool_FromLong(wenclose(self->win, y, x));
}
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.getch
[
static PyObject *
_curses_window_getch_impl(PyCursesWindowObject *self, int group_right_1,
int y, int x)
-/*[clinic end generated code: output=e1639e87d545e676 input=73f350336b1ee8c8]*/
+/*[clinic end generated code: output=e1639e87d545e676 input=9a053077373e2a30]*/
{
int rtn;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.getkey
[
static PyObject *
_curses_window_getkey_impl(PyCursesWindowObject *self, int group_right_1,
int y, int x)
-/*[clinic end generated code: output=8490a182db46b10f input=be2dee34f5cf57f8]*/
+/*[clinic end generated code: output=8490a182db46b10f input=5177f03fb6c31ea6]*/
{
int rtn;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.insch
[
_curses_window_insch_impl(PyCursesWindowObject *self, int group_left_1,
int y, int x, PyObject *ch, int group_right_1,
long attr)
-/*[clinic end generated code: output=ade8cfe3a3bf3e34 input=336342756ee19812]*/
+/*[clinic end generated code: output=ade8cfe3a3bf3e34 input=3f2a230cb09fed5a]*/
{
int rtn;
chtype ch_ = 0;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.inch
[
static PyObject *
_curses_window_inch_impl(PyCursesWindowObject *self, int group_right_1,
int y, int x)
-/*[clinic end generated code: output=97ca8581baaafd06 input=4b4fb43d85b177c3]*/
+/*[clinic end generated code: output=97ca8581baaafd06 input=a5846f315464dc86]*/
{
chtype rtn;
const char *funcname;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.insnstr
[
_curses_window_insnstr_impl(PyCursesWindowObject *self, int group_left_1,
int y, int x, PyObject *str, int n,
int group_right_1, long attr)
-/*[clinic end generated code: output=971a32ea6328ec8b input=70fa0cd543901a4c]*/
+/*[clinic end generated code: output=971a32ea6328ec8b input=dcdc554102fbcd5d]*/
{
int rtn;
int strtype;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.is_linetouched
line: int
static PyObject *
_curses_window_is_linetouched_impl(PyCursesWindowObject *self, int line)
-/*[clinic end generated code: output=ad4a4edfee2db08c input=a7be0c189f243914]*/
+/*[clinic end generated code: output=ad4a4edfee2db08c input=af71c040b951c467]*/
{
int erg;
erg = is_linetouched(self->win, line);
#ifdef py_is_pad
/*[clinic input]
+@permit_long_docstring_body
_curses.window.noutrefresh
[
int group_right_1, int pminrow, int pmincol,
int sminrow, int smincol, int smaxrow,
int smaxcol)
-/*[clinic end generated code: output=809a1f3c6a03e23e input=3e56898388cd739e]*/
+/*[clinic end generated code: output=809a1f3c6a03e23e input=b39fe8fc79b9980b]*/
#else
/*[clinic input]
+@permit_long_docstring_body
_curses.window.noutrefresh
Mark for refresh but wait.
static PyObject *
_curses_window_noutrefresh_impl(PyCursesWindowObject *self)
-/*[clinic end generated code: output=6ef6dec666643fee input=876902e3fa431dbd]*/
+/*[clinic end generated code: output=6ef6dec666643fee input=6a9f59ae5e4c139e]*/
#endif
{
int rtn;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.overlay
destwin: object(type="PyCursesWindowObject *", subclass_of="clinic_state()->window_type")
PyCursesWindowObject *destwin, int group_right_1,
int sminrow, int smincol, int dminrow,
int dmincol, int dmaxrow, int dmaxcol)
-/*[clinic end generated code: output=82bb2c4cb443ca58 input=6e4b32a7c627a356]*/
+/*[clinic end generated code: output=82bb2c4cb443ca58 input=dd6af34deb892a65]*/
{
int rtn;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.overwrite
destwin: object(type="PyCursesWindowObject *", subclass_of="clinic_state()->window_type")
int group_right_1, int sminrow, int smincol,
int dminrow, int dmincol, int dmaxrow,
int dmaxcol)
-/*[clinic end generated code: output=12ae007d1681be28 input=d83dd8b24ff2bcc9]*/
+/*[clinic end generated code: output=12ae007d1681be28 input=e84d8ebdf1c09596]*/
{
int rtn;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.refresh
[
_curses_window_refresh_impl(PyCursesWindowObject *self, int group_right_1,
int pminrow, int pmincol, int sminrow,
int smincol, int smaxrow, int smaxcol)
-/*[clinic end generated code: output=42199543115e6e63 input=95e01cb5ffc635d0]*/
+/*[clinic end generated code: output=42199543115e6e63 input=65405c03290496a6]*/
{
int rtn;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.subwin
[
static PyObject *
_curses_window_subwin_impl(PyCursesWindowObject *self, int group_left_1,
int nlines, int ncols, int begin_y, int begin_x)
-/*[clinic end generated code: output=93e898afc348f59a input=2129fa47fd57721c]*/
+/*[clinic end generated code: output=93e898afc348f59a input=5292cf610e2f3585]*/
{
WINDOW *win;
const char *funcname;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.scroll
[
static PyObject *
_curses_window_scroll_impl(PyCursesWindowObject *self, int group_right_1,
int lines)
-/*[clinic end generated code: output=4541a8a11852d360 input=c969ca0cfabbdbec]*/
+/*[clinic end generated code: output=4541a8a11852d360 input=386456524c550113]*/
{
int rtn;
const char *funcname;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.window.touchline
start: int
static PyObject *
_curses_window_touchline_impl(PyCursesWindowObject *self, int start,
int count, int group_right_1, int changed)
-/*[clinic end generated code: output=65d05b3f7438c61d input=a98aa4f79b6be845]*/
+/*[clinic end generated code: output=65d05b3f7438c61d input=36e13b6f5eb591f5]*/
{
int rtn;
const char *funcname;
NoArgNoReturnFunctionBody(beep)
/*[clinic input]
+@permit_long_summary
_curses.can_change_color
Return True if the programmer can change the colors displayed by the terminal.
static PyObject *
_curses_can_change_color_impl(PyObject *module)
-/*[clinic end generated code: output=359df8c3c77d8bf1 input=d7718884de0092f2]*/
+/*[clinic end generated code: output=359df8c3c77d8bf1 input=8315c364ba1e5b4c]*/
NoArgTrueFalseFunctionBody(can_change_color)
/*[clinic input]
NoArgOrFlagNoReturnFunctionBody(cbreak, flag)
/*[clinic input]
+@permit_long_docstring_body
_curses.color_content
color_number: color
static PyObject *
_curses_color_content_impl(PyObject *module, int color_number)
-/*[clinic end generated code: output=17b466df7054e0de input=03b5ed0472662aea]*/
+/*[clinic end generated code: output=17b466df7054e0de input=baffe25b351eb916]*/
{
_CURSES_COLOR_VAL_TYPE r,g,b;
}
/*[clinic input]
+@permit_long_docstring_body
_curses.flash
Flash the screen.
static PyObject *
_curses_flash_impl(PyObject *module)
-/*[clinic end generated code: output=488b8a0ebd9ea9b8 input=02fdfb06c8fc3171]*/
+/*[clinic end generated code: output=488b8a0ebd9ea9b8 input=dd33d718e6edf436]*/
NoArgNoReturnFunctionBody(flash)
/*[clinic input]
#ifdef HAVE_CURSES_IS_TERM_RESIZED
/*[clinic input]
+@permit_long_summary
_curses.is_term_resized
nlines: int
static PyObject *
_curses_is_term_resized_impl(PyObject *module, int nlines, int ncols)
-/*[clinic end generated code: output=aafe04afe50f1288 input=ca9c0bd0fb8ab444]*/
+/*[clinic end generated code: output=aafe04afe50f1288 input=5792a3f40cecb010]*/
{
PyCursesStatefulInitialised(module);
}
/*[clinic input]
+@permit_long_docstring_body
_curses.longname
Return the terminfo long name field describing the current terminal.
static PyObject *
_curses_longname_impl(PyObject *module)
-/*[clinic end generated code: output=fdf30433727ef568 input=84c3f20201b1098e]*/
+/*[clinic end generated code: output=fdf30433727ef568 input=5de06852f2230ddb]*/
NoArgReturnStringFunctionBody(longname)
/*[clinic input]
}
/*[clinic input]
+@permit_long_summary
_curses.mousemask
newmask: unsigned_long(bitwise=True)
static PyObject *
_curses_mousemask_impl(PyObject *module, unsigned long newmask)
-/*[clinic end generated code: output=9406cf1b8a36e485 input=bdf76b7568a3c541]*/
+/*[clinic end generated code: output=9406cf1b8a36e485 input=b92ff4fbe5ce61b1]*/
{
mmask_t oldmask, availmask;
NoArgOrFlagNoReturnFunctionBody(raw, flag)
/*[clinic input]
+@permit_long_summary
_curses.reset_prog_mode
Restore the terminal to "program" mode, as previously saved by def_prog_mode().
static PyObject *
_curses_reset_prog_mode_impl(PyObject *module)
-/*[clinic end generated code: output=15eb765abf0b6575 input=3d82bea2b3243471]*/
+/*[clinic end generated code: output=15eb765abf0b6575 input=a8b44b5261c8cf3a]*/
NoArgNoReturnFunctionBody(reset_prog_mode)
/*[clinic input]
+@permit_long_summary
_curses.reset_shell_mode
Restore the terminal to "shell" mode, as previously saved by def_shell_mode().
static PyObject *
_curses_reset_shell_mode_impl(PyObject *module)
-/*[clinic end generated code: output=0238de2962090d33 input=1c738fa64bd1a24f]*/
+/*[clinic end generated code: output=0238de2962090d33 input=f5224034a2c95931]*/
NoArgNoReturnFunctionBody(reset_shell_mode)
/*[clinic input]
#ifdef HAVE_CURSES_RESIZE_TERM
/*[clinic input]
+@permit_long_docstring_body
_curses.resize_term
nlines: short
static PyObject *
_curses_resize_term_impl(PyObject *module, short nlines, short ncols)
-/*[clinic end generated code: output=46c6d749fa291dbd input=276afa43d8ea7091]*/
+/*[clinic end generated code: output=46c6d749fa291dbd input=ebfa840f6b5f03fa]*/
{
PyObject *result;
int code;
NoArgReturnIntFunctionBody(termattrs)
/*[clinic input]
+@permit_long_summary
_curses.termname
Return the value of the environment variable TERM, truncated to 14 characters.
static PyObject *
_curses_termname_impl(PyObject *module)
-/*[clinic end generated code: output=96375577ebbd67fd input=33c08d000944f33f]*/
+/*[clinic end generated code: output=96375577ebbd67fd input=c34f724d8ce8fc4e]*/
NoArgReturnStringFunctionBody(termname)
/*[clinic input]
#ifdef HAVE_CURSES_USE_ENV
/*[clinic input]
+@permit_long_docstring_body
_curses.use_env
flag: bool
static PyObject *
_curses_use_env_impl(PyObject *module, int flag)
-/*[clinic end generated code: output=b2c445e435c0b164 input=06ac30948f2d78e4]*/
+/*[clinic end generated code: output=b2c445e435c0b164 input=eaa9047ec73c27d3]*/
{
use_env(flag);
Py_RETURN_NONE;
}
/*[clinic input]
+@permit_long_docstring_body
@classmethod
datetime.date.fromtimestamp
static PyObject *
datetime_date_fromtimestamp_impl(PyTypeObject *type, PyObject *timestamp)
-/*[clinic end generated code: output=59def4e32c028fb6 input=eabb3fe7f40491fe]*/
+/*[clinic end generated code: output=59def4e32c028fb6 input=55ff6940f0a8339f]*/
{
return date_fromtimestamp(type, timestamp);
}
}
/*[clinic input]
+@permit_long_docstring_body
datetime.time.strftime
format: unicode
static PyObject *
datetime_time_strftime_impl(PyDateTime_Time *self, PyObject *format)
-/*[clinic end generated code: output=10f65af20e2a78c7 input=7dd9df1acbf37b50]*/
+/*[clinic end generated code: output=10f65af20e2a78c7 input=541934a2860f7db5]*/
{
PyObject *result;
PyObject *tuple;
}
/*[clinic input]
+@permit_long_docstring_body
@classmethod
datetime.datetime.fromtimestamp
static PyObject *
datetime_datetime_fromtimestamp_impl(PyTypeObject *type, PyObject *timestamp,
PyObject *tzinfo)
-/*[clinic end generated code: output=9c47ea2b2ebdaded input=34721a5facc94215]*/
+/*[clinic end generated code: output=9c47ea2b2ebdaded input=d6b5b2095c5a34b2]*/
{
PyObject *self;
if (check_tzinfo_subclass(tzinfo) < 0)
}
/*[clinic input]
+@permit_long_summary
@classmethod
datetime.datetime.strptime
static PyObject *
datetime_datetime_strptime_impl(PyTypeObject *type, PyObject *string,
PyObject *format)
-/*[clinic end generated code: output=af2c2d024f3203f5 input=b3918835524a1f22]*/
+/*[clinic end generated code: output=af2c2d024f3203f5 input=d7597c7f5327117b]*/
{
PyObject *result;
/* reduce (used to be a builtin) ********************************************/
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
_functools.reduce
function as func: object
static PyObject *
_functools_reduce_impl(PyObject *module, PyObject *func, PyObject *seq,
PyObject *result)
-/*[clinic end generated code: output=30d898fe1267c79d input=1511e9a8c38581ac]*/
+/*[clinic end generated code: output=30d898fe1267c79d input=4ccfb74548ce5170]*/
{
PyObject *args, *it;
}
/*[clinic input]
+@permit_long_summary
@critical_section
_gdbm.gdbm.setdefault
static PyObject *
_gdbm_gdbm_setdefault_impl(gdbmobject *self, PyObject *key,
PyObject *default_value)
-/*[clinic end generated code: output=f3246e880509f142 input=854374cd81ab51b6]*/
+/*[clinic end generated code: output=f3246e880509f142 input=f4008b358165bbb8]*/
{
PyObject *res;
#ifdef PY_OPENSSL_HAS_SHAKE
/*[clinic input]
+@permit_long_summary
_hashlib.openssl_shake_128
data: object(c_default="NULL") = b''
static PyObject *
_hashlib_openssl_shake_128_impl(PyObject *module, PyObject *data,
int usedforsecurity, PyObject *string)
-/*[clinic end generated code: output=4e6afed8d18980ad input=373c3f1c93d87b37]*/
+/*[clinic end generated code: output=4e6afed8d18980ad input=0d2803af1158b23c]*/
{
CALL_HASHLIB_NEW(module, Py_hash_shake_128, data, string, usedforsecurity);
}
/*[clinic input]
+@permit_long_summary
_hashlib.openssl_shake_256
data: object(c_default="NULL") = b''
static PyObject *
_hashlib_openssl_shake_256_impl(PyObject *module, PyObject *data,
int usedforsecurity, PyObject *string)
-/*[clinic end generated code: output=62481bce4a77d16c input=101c139ea2ddfcbf]*/
+/*[clinic end generated code: output=62481bce4a77d16c input=f27b98d9c749f55d]*/
{
CALL_HASHLIB_NEW(module, Py_hash_shake_256, data, string, usedforsecurity);
}
#undef CALL_HASHLIB_NEW
/*[clinic input]
+@permit_long_summary
_hashlib.pbkdf2_hmac as pbkdf2_hmac
hash_name: str
pbkdf2_hmac_impl(PyObject *module, const char *hash_name,
Py_buffer *password, Py_buffer *salt, long iterations,
PyObject *dklen_obj)
-/*[clinic end generated code: output=144b76005416599b input=ed3ab0d2d28b5d5c]*/
+/*[clinic end generated code: output=144b76005416599b input=83417fbd9ec2b8a3]*/
{
_hashlibstate *state = get_hashlib_state(module);
PyObject *key_obj = NULL;
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
_hashlib.HMAC.hexdigest
Return hexadecimal digest of the bytes passed to the update() method so far.
static PyObject *
_hashlib_HMAC_hexdigest_impl(HMACobject *self)
-/*[clinic end generated code: output=80d825be1eaae6a7 input=5abc42702874ddcf]*/
+/*[clinic end generated code: output=80d825be1eaae6a7 input=5e48db83ab1a4d19]*/
{
unsigned char digest[EVP_MAX_MD_SIZE];
unsigned int digest_size = _hashlib_hmac_digest_size(self);
/*[clinic input]
+@permit_long_summary
_interpreters.is_shareable
obj: object
static PyObject *
_interpreters_is_shareable_impl(PyObject *module, PyObject *obj)
-/*[clinic end generated code: output=227856926a22940b input=72b9a36bdf1d2a53]*/
+/*[clinic end generated code: output=227856926a22940b input=95f888d35a6d4bb3]*/
{
PyThreadState *tstate = _PyThreadState_GET();
if (_PyObject_CheckXIData(tstate, obj) == 0) {
/*[clinic input]
+@permit_long_docstring_body
_interpreters.capture_exception
exc as exc_arg: object = None
static PyObject *
_interpreters_capture_exception_impl(PyObject *module, PyObject *exc_arg)
-/*[clinic end generated code: output=ef3f5393ef9c88a6 input=32045341e979bc9e]*/
+/*[clinic end generated code: output=ef3f5393ef9c88a6 input=6c4dcb78fb722217]*/
{
PyObject *exc = exc_arg;
if (exc == NULL || exc == Py_None) {
/*[clinic input]
module _io
+@permit_long_docstring_body
_io.open
file: object
mode: str = "r"
_io_open_impl(PyObject *module, PyObject *file, const char *mode,
int buffering, const char *encoding, const char *errors,
const char *newline, int closefd, PyObject *opener)
-/*[clinic end generated code: output=aefafc4ce2b46dc0 input=28027fdaabb8d744]*/
+/*[clinic end generated code: output=aefafc4ce2b46dc0 input=8629579a442a99e3]*/
{
size_t i;
/*[clinic input]
+@permit_long_docstring_body
_io.open_code
path : unicode
static PyObject *
_io_open_code_impl(PyObject *module, PyObject *path)
-/*[clinic end generated code: output=2fe4ecbd6f3d6844 input=f5c18e23f4b2ed9f]*/
+/*[clinic end generated code: output=2fe4ecbd6f3d6844 input=53d38a37d780d034]*/
{
return PyFile_OpenCodeObject(path);
}
}
/*[clinic input]
+@permit_long_summary
_io._BufferedIOBase.read1
cls: defining_class
static PyObject *
_io__BufferedIOBase_read1_impl(PyObject *self, PyTypeObject *cls,
int Py_UNUSED(size))
-/*[clinic end generated code: output=2e7fc62972487eaa input=af76380e020fd9e6]*/
+/*[clinic end generated code: output=2e7fc62972487eaa input=1e76df255063afd6]*/
{
_PyIO_State *state = get_io_state_by_cls(cls);
return bufferediobase_unsupported(state, "read1");
}
/*[clinic input]
+@permit_long_docstring_body
_io.FileIO.readall
Read all data from the file, returned as bytes.
static PyObject *
_io_FileIO_readall_impl(fileio *self)
-/*[clinic end generated code: output=faa0292b213b4022 input=1e19849857f5d0a1]*/
+/*[clinic end generated code: output=faa0292b213b4022 input=10d8b2ec403302dc]*/
{
Py_off_t pos, end;
PyObject *result;
}
/*[clinic input]
+@permit_long_docstring_body
_io.FileIO.read
cls: defining_class
size: Py_ssize_t(accept={int, NoneType}) = -1
static PyObject *
_io_FileIO_read_impl(fileio *self, PyTypeObject *cls, Py_ssize_t size)
-/*[clinic end generated code: output=bbd749c7c224143e input=cf21fddef7d38ab6]*/
+/*[clinic end generated code: output=bbd749c7c224143e input=752d1ad3db8564a5]*/
{
char *ptr;
Py_ssize_t n;
}
/*[clinic input]
+@permit_long_docstring_body
_io.FileIO.seek
pos: object
whence: int = 0
static PyObject *
_io_FileIO_seek_impl(fileio *self, PyObject *pos, int whence)
-/*[clinic end generated code: output=c976acdf054e6655 input=0439194b0774d454]*/
+/*[clinic end generated code: output=c976acdf054e6655 input=f077c492a84c9e62]*/
{
if (self->fd < 0)
return err_closed();
/* Positioning */
/*[clinic input]
+@permit_long_docstring_body
_io._IOBase.seek
cls: defining_class
offset: int(unused=True)
static PyObject *
_io__IOBase_seek_impl(PyObject *self, PyTypeObject *cls,
int Py_UNUSED(offset), int Py_UNUSED(whence))
-/*[clinic end generated code: output=8bd74ea6538ded53 input=74211232b363363e]*/
+/*[clinic end generated code: output=8bd74ea6538ded53 input=a21b5aad416ff6a9]*/
{
_PyIO_State *state = get_io_state_by_cls(cls);
return iobase_unsupported(state, "seek");
}
/*[clinic input]
+@permit_long_docstring_body
_io._TextIOBase.detach
cls: defining_class
/
static PyObject *
_io__TextIOBase_detach_impl(PyObject *self, PyTypeObject *cls)
-/*[clinic end generated code: output=50915f40c609eaa4 input=987ca3640d0a3776]*/
+/*[clinic end generated code: output=50915f40c609eaa4 input=8cd0652c17d7f015]*/
{
_PyIO_State *state = get_io_state_by_cls(cls);
return _unsupported(state, "detach");
}
/*[clinic input]
+@permit_long_docstring_body
_lzma.LZMADecompressor.decompress
data: Py_buffer
static PyObject *
_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data,
Py_ssize_t max_length)
-/*[clinic end generated code: output=ef4e20ec7122241d input=60c1f135820e309d]*/
+/*[clinic end generated code: output=ef4e20ec7122241d input=d5cbd45801b4b8b0]*/
{
PyObject *result = NULL;
/*[clinic input]
+@permit_long_summary
_lzma._decode_filter_properties
filter_id: lzma_vli
encoded_props: Py_buffer
static PyObject *
_lzma__decode_filter_properties_impl(PyObject *module, lzma_vli filter_id,
Py_buffer *encoded_props)
-/*[clinic end generated code: output=714fd2ef565d5c60 input=246410800782160c]*/
+/*[clinic end generated code: output=714fd2ef565d5c60 input=b9750bf909109bbe]*/
{
lzma_filter filter;
lzma_ret lzret;
}
/*[clinic input]
+@permit_long_docstring_body
_posixsubprocess.fork_exec as subprocess_fork_exec
args as process_args: object
executable_list: object
PyObject *extra_groups_packed,
PyObject *uid_object, int child_umask,
PyObject *preexec_fn)
-/*[clinic end generated code: output=288464dc56e373c7 input=f311c3bcb5dd55c8]*/
+/*[clinic end generated code: output=288464dc56e373c7 input=58e0db771686f4f6]*/
{
PyObject *converted_args = NULL, *fast_args = NULL;
PyObject *preexec_fn_args_tuple = NULL;
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=55f164d8803318be]*/
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
_remote_debugging.RemoteUnwinder.__init__
pid: int
*
int pid, int all_threads,
int only_active_thread,
int debug)
-/*[clinic end generated code: output=13ba77598ecdcbe1 input=8f8f12504e17da04]*/
+/*[clinic end generated code: output=13ba77598ecdcbe1 input=cfc21663fbe263c4]*/
{
// Validate that all_threads and only_active_thread are not both True
if (all_threads && only_active_thread) {
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
_remote_debugging.RemoteUnwinder.get_stack_trace
static PyObject *
_remote_debugging_RemoteUnwinder_get_stack_trace_impl(RemoteUnwinderObject *self)
-/*[clinic end generated code: output=666192b90c69d567 input=f756f341206f9116]*/
+/*[clinic end generated code: output=666192b90c69d567 input=c527a4b858601408]*/
{
PyObject* result = NULL;
// Read interpreter state into opaque buffer
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@critical_section
_remote_debugging.RemoteUnwinder.get_all_awaited_by
static PyObject *
_remote_debugging_RemoteUnwinder_get_all_awaited_by_impl(RemoteUnwinderObject *self)
-/*[clinic end generated code: output=6a49cd345e8aec53 input=a452c652bb00701a]*/
+/*[clinic end generated code: output=6a49cd345e8aec53 input=307f754cbe38250c]*/
{
if (!self->async_debug_offsets_available) {
PyErr_SetString(PyExc_RuntimeError, "AsyncioDebug section not available");
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@critical_section
_remote_debugging.RemoteUnwinder.get_async_stack_trace
static PyObject *
_remote_debugging_RemoteUnwinder_get_async_stack_trace_impl(RemoteUnwinderObject *self)
-/*[clinic end generated code: output=6433d52b55e87bbe input=8744b47c9ec2220a]*/
+/*[clinic end generated code: output=6433d52b55e87bbe input=6129b7d509a887c9]*/
{
if (!self->async_debug_offsets_available) {
PyErr_SetString(PyExc_RuntimeError, "AsyncioDebug section not available");
/*[clinic input]
+@permit_long_docstring_body
_sqlite3.Blob.read as blob_read
length: int = -1
static PyObject *
blob_read_impl(pysqlite_Blob *self, int length)
-/*[clinic end generated code: output=1fc99b2541360dde input=f2e4aa4378837250]*/
+/*[clinic end generated code: output=1fc99b2541360dde input=e5715bcddbcfca5a]*/
{
if (!check_blob(self)) {
return NULL;
/*[clinic input]
+@permit_long_docstring_body
_sqlite3.Blob.write as blob_write
data: Py_buffer
static PyObject *
blob_write_impl(pysqlite_Blob *self, Py_buffer *data)
-/*[clinic end generated code: output=b34cf22601b570b2 input=a84712f24a028e6d]*/
+/*[clinic end generated code: output=b34cf22601b570b2 input=203d3458f244814b]*/
{
if (!check_blob(self)) {
return NULL;
/*[clinic input]
+@permit_long_docstring_body
_sqlite3.Blob.seek as blob_seek
offset: int
static PyObject *
blob_seek_impl(pysqlite_Blob *self, int offset, int origin)
-/*[clinic end generated code: output=854c5a0e208547a5 input=5da9a07e55fe6bb6]*/
+/*[clinic end generated code: output=854c5a0e208547a5 input=ee4d88e1dc0b1048]*/
{
if (!check_blob(self)) {
return NULL;
}
/*[clinic input]
+@permit_long_docstring_body
_sqlite3.Connection.set_progress_handler as pysqlite_connection_set_progress_handler
cls: defining_class
pysqlite_connection_set_progress_handler_impl(pysqlite_Connection *self,
PyTypeObject *cls,
PyObject *callable, int n)
-/*[clinic end generated code: output=0739957fd8034a50 input=74c943f1ae7d8880]*/
+/*[clinic end generated code: output=0739957fd8034a50 input=3ecce6c915922ad4]*/
{
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
return NULL;
#ifdef PY_SQLITE_HAVE_SERIALIZE
/*[clinic input]
+@permit_long_docstring_body
_sqlite3.Connection.serialize as serialize
*
static PyObject *
serialize_impl(pysqlite_Connection *self, const char *name)
-/*[clinic end generated code: output=97342b0e55239dd3 input=d2eb5194a65abe2b]*/
+/*[clinic end generated code: output=97342b0e55239dd3 input=963e617cdf75c747]*/
{
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
return NULL;
}
/*[clinic input]
+@permit_long_docstring_body
_sqlite3.Connection.deserialize as deserialize
data: Py_buffer(accept={buffer, str})
static PyObject *
deserialize_impl(pysqlite_Connection *self, Py_buffer *data,
const char *name)
-/*[clinic end generated code: output=e394c798b98bad89 input=1be4ca1faacf28f2]*/
+/*[clinic end generated code: output=e394c798b98bad89 input=037e94599aaa5b5c]*/
{
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
return NULL;
}
/*[clinic input]
+@permit_long_docstring_body
_sqlite3.Connection.setlimit as setlimit
category: int
static PyObject *
setlimit_impl(pysqlite_Connection *self, int category, int limit)
-/*[clinic end generated code: output=0d208213f8d68ccd input=9bd469537e195635]*/
+/*[clinic end generated code: output=0d208213f8d68ccd input=bf06e06a21eb37e2]*/
{
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
return NULL;
}
/*[clinic input]
+@permit_long_summary
_sre.SRE_Pattern.search
cls: defining_class
_sre_SRE_Pattern_search_impl(PatternObject *self, PyTypeObject *cls,
PyObject *string, Py_ssize_t pos,
Py_ssize_t endpos)
-/*[clinic end generated code: output=bd7f2d9d583e1463 input=afa9afb66a74a4b3]*/
+/*[clinic end generated code: output=bd7f2d9d583e1463 input=05e9feee0334c156]*/
{
_sremodulestate *module_state = get_sre_module_state_by_class(cls);
SRE_STATE state;
}
/*[clinic input]
+@permit_long_summary
_sre.SRE_Pattern.finditer
cls: defining_class
_sre_SRE_Pattern_finditer_impl(PatternObject *self, PyTypeObject *cls,
PyObject *string, Py_ssize_t pos,
Py_ssize_t endpos)
-/*[clinic end generated code: output=1791dbf3618ade56 input=812e332a4848cbaf]*/
+/*[clinic end generated code: output=1791dbf3618ade56 input=ee28865796048023]*/
{
_sremodulestate *module_state = get_sre_module_state_by_class(cls);
PyObject* scanner;
}
/*[clinic input]
+@permit_long_summary
_sre.SRE_Pattern.sub
cls: defining_class
static PyObject *
_sre_SRE_Pattern_sub_impl(PatternObject *self, PyTypeObject *cls,
PyObject *repl, PyObject *string, Py_ssize_t count)
-/*[clinic end generated code: output=4be141ab04bca60d input=d8d1d4ac2311a07c]*/
+/*[clinic end generated code: output=4be141ab04bca60d input=eba511fd1c4908b7]*/
{
_sremodulestate *module_state = get_sre_module_state_by_class(cls);
}
/*[clinic input]
+@permit_long_summary
_sre.SRE_Pattern.subn
cls: defining_class
_sre_SRE_Pattern_subn_impl(PatternObject *self, PyTypeObject *cls,
PyObject *repl, PyObject *string,
Py_ssize_t count)
-/*[clinic end generated code: output=da02fd85258b1e1f input=8b78a65b8302e58d]*/
+/*[clinic end generated code: output=da02fd85258b1e1f input=6a5bb5b61717abf0]*/
{
_sremodulestate *module_state = get_sre_module_state_by_class(cls);
}
/*[clinic input]
+@permit_long_summary
_sre.SRE_Match.expand
template: object
static PyObject *
_sre_SRE_Match_expand_impl(MatchObject *self, PyObject *template)
-/*[clinic end generated code: output=931b58ccc323c3a1 input=4bfdb22c2f8b146a]*/
+/*[clinic end generated code: output=931b58ccc323c3a1 input=dc74d81265376ac3]*/
{
_sremodulestate *module_state = get_sre_module_state_by_class(Py_TYPE(self));
PyObject *filter = compile_template(module_state, self->pattern, template);
}
/*[clinic input]
+@permit_long_summary
_sre.SRE_Match.groupdict
default: object = None
static PyObject *
_sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value)
-/*[clinic end generated code: output=29917c9073e41757 input=0ded7960b23780aa]*/
+/*[clinic end generated code: output=29917c9073e41757 input=a8d3a1dc80336872]*/
{
PyObject *result;
PyObject *key;
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
@getter
_ssl._SSLSocket.context
static PyObject *
_ssl__SSLSocket_context_get_impl(PySSLSocket *self)
-/*[clinic end generated code: output=d23e82f72f32e3d7 input=7cbb97407c2ace30]*/
+/*[clinic end generated code: output=d23e82f72f32e3d7 input=0cc8e773a079295e]*/
{
return Py_NewRef(self->ctx);
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
@setter
_ssl._SSLSocket.context
static int
_ssl__SSLSocket_context_set_impl(PySSLSocket *self, PyObject *value)
-/*[clinic end generated code: output=6b0a6cc5cf33d9fe input=48ece77724fd9dd4]*/
+/*[clinic end generated code: output=6b0a6cc5cf33d9fe input=f7fc1674b660df96]*/
{
if (PyObject_TypeCheck(value, self->ctx->state->PySSLContext_Type)) {
Py_SETREF(self->ctx, (PySSLContext *)Py_NewRef(value));
#ifdef BIO_get_ktls_send
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@critical_section
_ssl._SSLSocket.sendfile
fd: int
static PyObject *
_ssl__SSLSocket_sendfile_impl(PySSLSocket *self, int fd, Py_off_t offset,
size_t size, int flags)
-/*[clinic end generated code: output=0c6815b0719ca8d5 input=dfc1b162bb020de1]*/
+/*[clinic end generated code: output=0c6815b0719ca8d5 input=1f193e681bbae664]*/
{
Py_ssize_t retval;
int sockstate;
}
/*[clinic input]
+@permit_long_summary
@critical_section
_ssl._SSLSocket.pending
static PyObject *
_ssl__SSLSocket_pending_impl(PySSLSocket *self)
-/*[clinic end generated code: output=983d9fecdc308a83 input=32ab982a254e8866]*/
+/*[clinic end generated code: output=983d9fecdc308a83 input=042dcc48bdf3e312]*/
{
int count = 0;
_PySSLError err;
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
_ssl._SSLSocket.get_channel_binding
cb_type: str = "tls-unique"
static PyObject *
_ssl__SSLSocket_get_channel_binding_impl(PySSLSocket *self,
const char *cb_type)
-/*[clinic end generated code: output=34bac9acb6a61d31 input=e008004fc08744db]*/
+/*[clinic end generated code: output=34bac9acb6a61d31 input=26fad522435ecca1]*/
{
char buf[PySSL_CB_MAXLEN];
size_t len;
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@critical_section
@getter
_ssl._SSLContext.sni_callback
static PyObject *
_ssl__SSLContext_sni_callback_get_impl(PySSLContext *self)
-/*[clinic end generated code: output=961e6575cdfaf036 input=9b2473c5e984cfe6]*/
+/*[clinic end generated code: output=961e6575cdfaf036 input=3aee06696b0874d9]*/
{
PyObject *cb = self->set_sni_cb;
if (cb == NULL) {
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@critical_section
@setter
_ssl._SSLContext.sni_callback
static int
_ssl__SSLContext_sni_callback_set_impl(PySSLContext *self, PyObject *value)
-/*[clinic end generated code: output=b32736c6b891f61a input=c3c4ff33540b3c85]*/
+/*[clinic end generated code: output=b32736c6b891f61a input=332def1d8c81d549]*/
{
if (self->protocol == PY_SSL_VERSION_TLS_CLIENT) {
PyErr_SetString(PyExc_ValueError,
/*[clinic input]
+@permit_long_summary
@critical_section
_ssl.RAND_status
static PyObject *
_ssl_RAND_status_impl(PyObject *module)
-/*[clinic end generated code: output=7e0aaa2d39fdc1ad input=636fb5659ea2e727]*/
+/*[clinic end generated code: output=7e0aaa2d39fdc1ad input=aba24a3f3af3b184]*/
{
return PyBool_FromLong(RAND_status());
}
/*[clinic input]
+@permit_long_summary
@critical_section
_ssl.get_default_verify_paths
static PyObject *
_ssl_get_default_verify_paths_impl(PyObject *module)
-/*[clinic end generated code: output=e5b62a466271928b input=c6ae00bc04eb2b6e]*/
+/*[clinic end generated code: output=e5b62a466271928b input=255507e1be890095]*/
{
PyObject *ofile_env = NULL;
PyObject *ofile = NULL;
#endif
/*[clinic input]
+@permit_long_summary
_sysconfig.config_vars
Returns a dictionary containing build variables intended to be exposed by sysconfig.
static PyObject *
_sysconfig_config_vars_impl(PyObject *module)
-/*[clinic end generated code: output=9c41cdee63ea9487 input=391ff42f3af57d01]*/
+/*[clinic end generated code: output=9c41cdee63ea9487 input=fdda9cab12ca19fe]*/
{
PyObject *config = PyDict_New();
if (config == NULL) {
}
/*[clinic input]
+@permit_long_summary
_testcapi.make_exception_with_doc
name: str
doc: str = NULL
_testcapi_make_exception_with_doc_impl(PyObject *module, const char *name,
const char *doc, PyObject *base,
PyObject *dict)
-/*[clinic end generated code: output=439f0d963c1ce2c4 input=23a73013f8a8795a]*/
+/*[clinic end generated code: output=439f0d963c1ce2c4 input=508b420b7f9253ed]*/
{
return PyErr_NewExceptionWithDoc(name, doc, base, dict);
}
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=95c63c1a47f9a995]*/
/*[clinic input]
+@permit_long_summary
_testcapi.VectorCallClass.set_vectorcall
type: object(subclass_of="&PyType_Type", type="PyTypeObject *")
static PyObject *
_testcapi_VectorCallClass_set_vectorcall_impl(PyObject *self,
PyTypeObject *type)
-/*[clinic end generated code: output=b37f0466f15da903 input=840de66182c7d71a]*/
+/*[clinic end generated code: output=b37f0466f15da903 input=170fefc7ee77fd36]*/
{
if (!PyObject_TypeCheck(self, type)) {
return PyErr_Format(
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
_tkinter.setbusywaitinterval
new_val: int
static PyObject *
_tkinter_setbusywaitinterval_impl(PyObject *module, int new_val)
-/*[clinic end generated code: output=42bf7757dc2d0ab6 input=deca1d6f9e6dae47]*/
+/*[clinic end generated code: output=42bf7757dc2d0ab6 input=07b82a04b56625e1]*/
{
if (new_val < 0) {
PyErr_SetString(PyExc_ValueError,
}
/*[clinic input]
+@permit_long_summary
_tkinter.getbusywaitinterval -> int
Return the current busy-wait interval between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.
static int
_tkinter_getbusywaitinterval_impl(PyObject *module)
-/*[clinic end generated code: output=23b72d552001f5c7 input=a695878d2d576a84]*/
+/*[clinic end generated code: output=23b72d552001f5c7 input=62d5b36ddab3976b]*/
{
return Tkinter_busywaitinterval;
}
}
/*[clinic input]
+@permit_long_summary
_tracemalloc.reset_peak
Set the peak size of memory blocks traced by tracemalloc to the current size.
static PyObject *
_tracemalloc_reset_peak_impl(PyObject *module)
-/*[clinic end generated code: output=140c2870f691dbb2 input=18afd0635066e9ce]*/
+/*[clinic end generated code: output=140c2870f691dbb2 input=4103319210f46286]*/
{
_PyTraceMalloc_ResetPeak();
Py_RETURN_NONE;
}
/*[clinic input]
+@permit_long_summary
zoneinfo.ZoneInfo.utcoffset
cls: defining_class
static PyObject *
zoneinfo_ZoneInfo_utcoffset_impl(PyObject *self, PyTypeObject *cls,
PyObject *dt)
-/*[clinic end generated code: output=b71016c319ba1f91 input=2bb6c5364938f19c]*/
+/*[clinic end generated code: output=b71016c319ba1f91 input=8ce0dc2d179f01c5]*/
{
zoneinfo_state *state = zoneinfo_get_state_by_cls(cls);
_ttinfo *tti = find_ttinfo(state, PyZoneInfo_ZoneInfo_CAST(self), dt);
}
/*[clinic input]
+@permit_long_summary
zoneinfo.ZoneInfo.dst
cls: defining_class
static PyObject *
zoneinfo_ZoneInfo_dst_impl(PyObject *self, PyTypeObject *cls, PyObject *dt)
-/*[clinic end generated code: output=cb6168d7723a6ae6 input=2167fb80cf8645c6]*/
+/*[clinic end generated code: output=cb6168d7723a6ae6 input=22b2abdf9388423c]*/
{
zoneinfo_state *state = zoneinfo_get_state_by_cls(cls);
_ttinfo *tti = find_ttinfo(state, PyZoneInfo_ZoneInfo_CAST(self), dt);
}
/*[clinic input]
+@permit_long_summary
zoneinfo.ZoneInfo.tzname
cls: defining_class
static PyObject *
zoneinfo_ZoneInfo_tzname_impl(PyObject *self, PyTypeObject *cls,
PyObject *dt)
-/*[clinic end generated code: output=3b6ae6c3053ea75a input=15a59a4f92ed1f1f]*/
+/*[clinic end generated code: output=3b6ae6c3053ea75a input=0882926c4e95a1e2]*/
{
zoneinfo_state *state = zoneinfo_get_state_by_cls(cls);
_ttinfo *tti = find_ttinfo(state, PyZoneInfo_ZoneInfo_CAST(self), dt);
}
/*[clinic input]
+@permit_long_summary
_zstd.get_frame_size
frame_buffer: Py_buffer
static PyObject *
_zstd_get_frame_size_impl(PyObject *module, Py_buffer *frame_buffer)
-/*[clinic end generated code: output=a7384c2f8780f442 input=3b9f73f8c8129d38]*/
+/*[clinic end generated code: output=a7384c2f8780f442 input=aac83b33045b5f43]*/
{
size_t frame_size;
}
/*[clinic input]
+@permit_long_summary
_zstd.set_parameter_types
c_parameter_type: object(subclass_of='&PyType_Type')
static PyObject *
_zstd_set_parameter_types_impl(PyObject *module, PyObject *c_parameter_type,
PyObject *d_parameter_type)
-/*[clinic end generated code: output=f3313b1294f19502 input=75d7a953580fae5f]*/
+/*[clinic end generated code: output=f3313b1294f19502 input=0529e918dfe54863]*/
{
_zstd_state* mod_state = get_zstd_state(module);
}
/*[clinic input]
+@permit_long_docstring_body
_zstd.ZstdCompressor.compress
data: Py_buffer
static PyObject *
_zstd_ZstdCompressor_compress_impl(ZstdCompressor *self, Py_buffer *data,
int mode)
-/*[clinic end generated code: output=ed7982d1cf7b4f98 input=ac2c21d180f579ea]*/
+/*[clinic end generated code: output=ed7982d1cf7b4f98 input=6018ed6cc729cea6]*/
{
PyObject *ret;
}
/*[clinic input]
+@permit_long_docstring_body
_zstd.ZstdCompressor.flush
mode: int(c_default="ZSTD_e_end") = ZstdCompressor.FLUSH_FRAME
static PyObject *
_zstd_ZstdCompressor_flush_impl(ZstdCompressor *self, int mode)
-/*[clinic end generated code: output=b7cf2c8d64dcf2e3 input=0ab19627f323cdbc]*/
+/*[clinic end generated code: output=b7cf2c8d64dcf2e3 input=a9871ec742d79003]*/
{
PyObject *ret;
/*[clinic input]
+@permit_long_docstring_body
_zstd.ZstdCompressor.set_pledged_input_size
size: zstd_contentsize
static PyObject *
_zstd_ZstdCompressor_set_pledged_input_size_impl(ZstdCompressor *self,
unsigned long long size)
-/*[clinic end generated code: output=3a09e55cc0e3b4f9 input=afd8a7d78cff2eb5]*/
+/*[clinic end generated code: output=3a09e55cc0e3b4f9 input=b4c87bcbd5ce6111]*/
{
// Error occured while converting argument, should be unreachable
assert(size != ZSTD_CONTENTSIZE_ERROR);
/*[clinic input]
+@permit_long_docstring_body
@classmethod
_zstd.ZstdDecompressor.__new__ as _zstd_ZstdDecompressor_new
zstd_dict: object = None
static PyObject *
_zstd_ZstdDecompressor_new_impl(PyTypeObject *type, PyObject *zstd_dict,
PyObject *options)
-/*[clinic end generated code: output=590ca65c1102ff4a input=213daa57e3ea4062]*/
+/*[clinic end generated code: output=590ca65c1102ff4a input=ed8891edfd14cdaa]*/
{
ZstdDecompressor* self = PyObject_GC_New(ZstdDecompressor, type);
if (self == NULL) {
}
/*[clinic input]
+@permit_long_docstring_body
@getter
_zstd.ZstdDecompressor.unused_data
static PyObject *
_zstd_ZstdDecompressor_unused_data_get_impl(ZstdDecompressor *self)
-/*[clinic end generated code: output=f3a20940f11b6b09 input=54d41ecd681a3444]*/
+/*[clinic end generated code: output=f3a20940f11b6b09 input=37c2c531ab56f914]*/
{
PyObject *ret;
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
_zstd.ZstdDecompressor.decompress
data: Py_buffer
_zstd_ZstdDecompressor_decompress_impl(ZstdDecompressor *self,
Py_buffer *data,
Py_ssize_t max_length)
-/*[clinic end generated code: output=a4302b3c940dbec6 input=6463dfdf98091caa]*/
+/*[clinic end generated code: output=a4302b3c940dbec6 input=e5c905a774df1553]*/
{
PyObject *ret;
/* Thread-safe code */
#define ZstdDict_CAST(op) ((ZstdDict *)op)
/*[clinic input]
+@permit_long_docstring_body
@classmethod
_zstd.ZstdDict.__new__ as _zstd_ZstdDict_new
dict_content: Py_buffer
static PyObject *
_zstd_ZstdDict_new_impl(PyTypeObject *type, Py_buffer *dict_content,
int is_raw)
-/*[clinic end generated code: output=685b7406a48b0949 input=9e8c493e31c98383]*/
+/*[clinic end generated code: output=685b7406a48b0949 input=b132ee40b784c293]*/
{
/* All dictionaries must be at least 8 bytes */
if (dict_content->len < 8) {
}
/*[clinic input]
+@permit_long_docstring_body
@getter
_zstd.ZstdDict.as_digested_dict
static PyObject *
_zstd_ZstdDict_as_digested_dict_get_impl(ZstdDict *self)
-/*[clinic end generated code: output=09b086e7a7320dbb input=ee45e1b4a48f6f2c]*/
+/*[clinic end generated code: output=09b086e7a7320dbb input=8d01ff0b8b043f2e]*/
{
return Py_BuildValue("Oi", self, DICT_TYPE_DIGESTED);
}
/*[clinic input]
+@permit_long_docstring_body
@getter
_zstd.ZstdDict.as_undigested_dict
static PyObject *
_zstd_ZstdDict_as_undigested_dict_get_impl(ZstdDict *self)
-/*[clinic end generated code: output=43c7a989e6d4253a input=d39210eedec76fed]*/
+/*[clinic end generated code: output=43c7a989e6d4253a input=b1bdb306c3798ad4]*/
{
return Py_BuildValue("Oi", self, DICT_TYPE_UNDIGESTED);
}
/*[clinic input]
+@permit_long_docstring_body
@getter
_zstd.ZstdDict.as_prefix
static PyObject *
_zstd_ZstdDict_as_prefix_get_impl(ZstdDict *self)
-/*[clinic end generated code: output=6f7130c356595a16 input=45b3b6110f36d127]*/
+/*[clinic end generated code: output=6f7130c356595a16 input=77966c012d15e6ab]*/
{
return Py_BuildValue("Oi", self, DICT_TYPE_PREFIX);
}
}
/*[clinic input]
+@permit_long_summary
array.array.buffer_info
Return a tuple (address, length) giving the current memory address and the length in items of the buffer used to hold array's contents.
static PyObject *
array_array_buffer_info_impl(arrayobject *self)
-/*[clinic end generated code: output=9b2a4ec3ae7e98e7 input=a58bae5c6e1ac6a6]*/
+/*[clinic end generated code: output=9b2a4ec3ae7e98e7 input=63d9ad83ba60cda8]*/
{
PyObject *retval = NULL, *v;
}
/*[clinic input]
+@permit_long_docstring_body
array.array.byteswap
Byteswap all items of the array.
static PyObject *
array_array_byteswap_impl(arrayobject *self)
-/*[clinic end generated code: output=5f8236cbdf0d90b5 input=6a85591b950a0186]*/
+/*[clinic end generated code: output=5f8236cbdf0d90b5 input=9af1d1749000b14f]*/
{
char *p;
Py_ssize_t i;
}
/*[clinic input]
+@permit_long_summary
array.array.fromfile
cls: defining_class
static PyObject *
array_array_fromfile_impl(arrayobject *self, PyTypeObject *cls, PyObject *f,
Py_ssize_t n)
-/*[clinic end generated code: output=83a667080b345ebc input=3822e907c1c11f1a]*/
+/*[clinic end generated code: output=83a667080b345ebc input=b2b4bdfb7ad4d4ae]*/
{
PyObject *b, *res;
Py_ssize_t itemsize = self->ob_descr->itemsize;
}
/*[clinic input]
+@permit_long_summary
array.array.frombytes
buffer: Py_buffer
static PyObject *
array_array_frombytes_impl(arrayobject *self, Py_buffer *buffer)
-/*[clinic end generated code: output=d9842c8f7510a516 input=378db226dfac949e]*/
+/*[clinic end generated code: output=d9842c8f7510a516 input=6b90ce5895f677a4]*/
{
return frombytes(self, buffer);
}
/*[clinic input]
+@permit_long_summary
array.array.tobytes
Convert the array to an array of machine values and return the bytes representation.
static PyObject *
array_array_tobytes_impl(arrayobject *self)
-/*[clinic end generated code: output=87318e4edcdc2bb6 input=90ee495f96de34f5]*/
+/*[clinic end generated code: output=87318e4edcdc2bb6 input=41081256b97f9d7a]*/
{
if (Py_SIZE(self) <= PY_SSIZE_T_MAX / self->ob_descr->itemsize) {
return PyBytes_FromStringAndSize(self->ob_item,
}
/*[clinic input]
+@permit_long_docstring_body
array.array.fromunicode
ustr: unicode
static PyObject *
array_array_fromunicode_impl(arrayobject *self, PyObject *ustr)
-/*[clinic end generated code: output=24359f5e001a7f2b input=025db1fdade7a4ce]*/
+/*[clinic end generated code: output=24359f5e001a7f2b input=158d47c302f27ca1]*/
{
int typecode = self->ob_descr->typecode;
if (typecode != 'u' && typecode != 'w') {
}
/*[clinic input]
+@permit_long_docstring_body
array.array.tounicode
Extends this array with data from the unicode string ustr.
static PyObject *
array_array_tounicode_impl(arrayobject *self)
-/*[clinic end generated code: output=08e442378336e1ef input=127242eebe70b66d]*/
+/*[clinic end generated code: output=08e442378336e1ef input=6690997213d219db]*/
{
int typecode = self->ob_descr->typecode;
if (typecode != 'u' && typecode != 'w') {
}
/*[clinic input]
+@permit_long_docstring_body
binascii.a2b_base64
data: ascii_buffer
static PyObject *
binascii_a2b_base64_impl(PyObject *module, Py_buffer *data, int strict_mode)
-/*[clinic end generated code: output=5409557788d4f975 input=c0c15fd0f8f9a62d]*/
+/*[clinic end generated code: output=5409557788d4f975 input=13c797187acc9c40]*/
{
assert(data->len >= 0);
}
/*[clinic input]
+@permit_long_docstring_body
_multibytecodec.MultibyteCodec.encode
input: object
_multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
PyObject *input,
const char *errors)
-/*[clinic end generated code: output=7b26652045ba56a9 input=2841745b95ed338f]*/
+/*[clinic end generated code: output=7b26652045ba56a9 input=0980aede2c564df8]*/
{
MultibyteCodec_State state;
PyObject *errorcb, *r, *ucvt;
}
/*[clinic input]
+@permit_long_docstring_body
_multibytecodec.MultibyteCodec.decode
input: Py_buffer
_multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
Py_buffer *input,
const char *errors)
-/*[clinic end generated code: output=ff419f65bad6cc77 input=e0c78fc7ab190def]*/
+/*[clinic end generated code: output=ff419f65bad6cc77 input=2c657ef914600c7c]*/
{
MultibyteCodec_State state;
MultibyteDecodeBuffer buf;
}
/*[clinic input]
+@permit_long_summary
cmath.isfinite = cmath.polar
Return True if both the real and imaginary parts of z are finite, else False.
static PyObject *
cmath_isfinite_impl(PyObject *module, Py_complex z)
-/*[clinic end generated code: output=ac76611e2c774a36 input=848e7ee701895815]*/
+/*[clinic end generated code: output=ac76611e2c774a36 input=e224f5c36d94f5da]*/
{
return PyBool_FromLong(isfinite(z.real) && isfinite(z.imag));
}
}
/*[clinic input]
+@permit_long_docstring_body
cmath.isclose -> bool
a: Py_complex
static int
cmath_isclose_impl(PyObject *module, Py_complex a, Py_complex b,
double rel_tol, double abs_tol)
-/*[clinic end generated code: output=8a2486cc6e0014d1 input=df9636d7de1d4ac3]*/
+/*[clinic end generated code: output=8a2486cc6e0014d1 input=0d45feea7c626f47]*/
{
double diff;
/*[clinic input]
+@permit_long_docstring_body
fcntl.ioctl
fd: fildes
static PyObject *
fcntl_ioctl_impl(PyObject *module, int fd, unsigned long code, PyObject *arg,
int mutate_arg)
-/*[clinic end generated code: output=f72baba2454d7a62 input=9c6cca5e2c339622]*/
+/*[clinic end generated code: output=f72baba2454d7a62 input=d7fe504d335449e2]*/
{
/* We use the unsigned non-checked 'I' format for the 'code' parameter
because the system expects it to be a 32bit bit field value
/*[clinic input]
+@permit_long_docstring_body
fcntl.lockf
fd: fildes
static PyObject *
fcntl_lockf_impl(PyObject *module, int fd, int code, PyObject *lenobj,
PyObject *startobj, int whence)
-/*[clinic end generated code: output=4985e7a172e7461a input=5480479fc63a04b8]*/
+/*[clinic end generated code: output=4985e7a172e7461a input=f666662ec2edd775]*/
{
int ret;
int async_err = 0;
}
/*[clinic input]
+@permit_long_summary
gc.get_objects
generation: Py_ssize_t(accept={int, NoneType}, c_default="-1") = None
Generation to extract the objects from.
static PyObject *
gc_get_objects_impl(PyObject *module, Py_ssize_t generation)
-/*[clinic end generated code: output=48b35fea4ba6cb0e input=ef7da9df9806754c]*/
+/*[clinic end generated code: output=48b35fea4ba6cb0e input=a887f1d9924be7cf]*/
{
if (PySys_Audit("gc.get_objects", "n", generation) < 0) {
return NULL;
}
/*[clinic input]
+@permit_long_docstring_body
gc.freeze
Freeze all current tracked objects and ignore them for future collections.
static PyObject *
gc_freeze_impl(PyObject *module)
-/*[clinic end generated code: output=502159d9cdc4c139 input=b602b16ac5febbe5]*/
+/*[clinic end generated code: output=502159d9cdc4c139 input=11fb59b0a75dcf3d]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
_PyGC_Freeze(interp);
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
_hmac.HMAC.hexdigest
Return hexadecimal digest of the bytes passed to the update() method so far.
static PyObject *
_hmac_HMAC_hexdigest_impl(HMACObject *self)
-/*[clinic end generated code: output=6659807a09ae14ec input=493b2db8013982b9]*/
+/*[clinic end generated code: output=6659807a09ae14ec input=6e0e796e38d82fc8]*/
{
assert(self->digest_size <= Py_hmac_hash_max_digest_size);
uint8_t digest[Py_hmac_hash_max_digest_size];
#define cycleobject_CAST(op) ((cycleobject *)(op))
/*[clinic input]
+@permit_long_summary
@classmethod
itertools.cycle.__new__
iterable: object
static PyObject *
itertools_cycle_impl(PyTypeObject *type, PyObject *iterable)
-/*[clinic end generated code: output=f60e5ec17a45b35c input=9d1d84bcf66e908b]*/
+/*[clinic end generated code: output=f60e5ec17a45b35c input=ead392f4aac7afd8]*/
{
PyObject *it;
PyObject *saved;
#define takewhileobject_CAST(op) ((takewhileobject *)(op))
/*[clinic input]
+@permit_long_summary
@classmethod
itertools.takewhile.__new__
predicate as func: object
static PyObject *
itertools_takewhile_impl(PyTypeObject *type, PyObject *func, PyObject *seq)
-/*[clinic end generated code: output=bb179ea7864e2ef6 input=ba5255f7519aa119]*/
+/*[clinic end generated code: output=bb179ea7864e2ef6 input=61e42255dd0a7657]*/
{
PyObject *it;
takewhileobject *lz;
#define starmapobject_CAST(op) ((starmapobject *)(op))
/*[clinic input]
+@permit_long_summary
@classmethod
itertools.starmap.__new__
function as func: object
static PyObject *
itertools_starmap_impl(PyTypeObject *type, PyObject *func, PyObject *seq)
-/*[clinic end generated code: output=79eeb81d452c6e8d input=844766df6a0d4dad]*/
+/*[clinic end generated code: output=79eeb81d452c6e8d input=8c9068da0692d6d2]*/
{
PyObject *it;
starmapobject *lz;
}
/*[clinic input]
+@permit_long_summary
@classmethod
itertools.chain.from_iterable
iterable as arg: object
static PyObject *
itertools_chain_from_iterable_impl(PyTypeObject *type, PyObject *arg)
-/*[clinic end generated code: output=3d7ea7d46b9e43f5 input=72c39e3a2ca3be85]*/
+/*[clinic end generated code: output=3d7ea7d46b9e43f5 input=a9bf8227221c75b3]*/
{
PyObject *source;
#define cwrobject_CAST(op) ((cwrobject *)(op))
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@classmethod
itertools.combinations_with_replacement.__new__
iterable: object
itertools_combinations_with_replacement_impl(PyTypeObject *type,
PyObject *iterable,
Py_ssize_t r)
-/*[clinic end generated code: output=48b26856d4e659ca input=1dc58e82a0878fdc]*/
+/*[clinic end generated code: output=48b26856d4e659ca input=26ebe0e42149e9fb]*/
{
cwrobject *co;
Py_ssize_t n;
}
/*[clinic input]
+@permit_long_summary
math.perm
n: object
static PyObject *
math_perm_impl(PyObject *module, PyObject *n, PyObject *k)
-/*[clinic end generated code: output=e021a25469653e23 input=5311c5a00f359b53]*/
+/*[clinic end generated code: output=e021a25469653e23 input=9d54b8e13c0a3683]*/
{
PyObject *result = NULL;
int overflow, cmp;
}
/*[clinic input]
+@permit_long_summary
math.comb
n: object
static PyObject *
math_comb_impl(PyObject *module, PyObject *n, PyObject *k)
-/*[clinic end generated code: output=bd2cec8d854f3493 input=9a05315af2518709]*/
+/*[clinic end generated code: output=bd2cec8d854f3493 input=7ad3c763d442d64c]*/
{
PyObject *result = NULL, *temp;
int overflow, cmp;
/*[clinic input]
+@permit_long_docstring_body
math.nextafter
x: double
static PyObject *
math_nextafter_impl(PyObject *module, double x, double y, PyObject *steps)
-/*[clinic end generated code: output=cc6511f02afc099e input=7f2a5842112af2b4]*/
+/*[clinic end generated code: output=cc6511f02afc099e input=cc8f0dad1b27a8a4]*/
{
#if defined(_AIX)
if (x == y) {
/*[clinic input]
+@permit_long_summary
os.lstat
path : path_t
static PyObject *
os_lstat_impl(PyObject *module, path_t *path, int dir_fd)
-/*[clinic end generated code: output=ef82a5d35ce8ab37 input=0b7474765927b925]*/
+/*[clinic end generated code: output=ef82a5d35ce8ab37 input=024102124f88e743]*/
{
int follow_symlinks = 0;
return posix_do_stat(module, "lstat", path, dir_fd, follow_symlinks);
#ifdef HAVE_LINK
/*[clinic input]
+@permit_long_docstring_body
os.link
src : path_t
static PyObject *
os_link_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
int dst_dir_fd, int follow_symlinks)
-/*[clinic end generated code: output=7f00f6007fd5269a input=1d5e602d115fed7b]*/
+/*[clinic end generated code: output=7f00f6007fd5269a input=e2a50a6497050e44]*/
{
#ifdef MS_WINDOWS
BOOL result = FALSE;
/*[clinic input]
+@permit_long_docstring_body
os.listdir
path : path_t(nullable=True, allow_fd='PATH_HAVE_FDOPENDIR') = None
static PyObject *
os_listdir_impl(PyObject *module, path_t *path)
-/*[clinic end generated code: output=293045673fcd1a75 input=e3f58030f538295d]*/
+/*[clinic end generated code: output=293045673fcd1a75 input=0bd1728387391b9a]*/
{
if (PySys_Audit("os.listdir", "O",
path->object ? path->object : Py_None) < 0) {
/*[clinic input]
+@permit_long_docstring_body
os.rename
src : path_t
static PyObject *
os_rename_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
int dst_dir_fd)
-/*[clinic end generated code: output=59e803072cf41230 input=faa61c847912c850]*/
+/*[clinic end generated code: output=59e803072cf41230 input=11aae8c091162766]*/
{
return internal_rename(src, dst, src_dir_fd, dst_dir_fd, 0);
}
/*[clinic input]
+@permit_long_docstring_body
os.replace = os.rename
Rename a file or directory, overwriting the destination.
static PyObject *
os_replace_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
int dst_dir_fd)
-/*[clinic end generated code: output=1968c02e7857422b input=c003f0def43378ef]*/
+/*[clinic end generated code: output=1968c02e7857422b input=78d6c8087e90994c]*/
{
return internal_rename(src, dst, src_dir_fd, dst_dir_fd, 1);
}
#ifdef HAVE_SCHED_RR_GET_INTERVAL
/*[clinic input]
+@permit_long_summary
os.sched_rr_get_interval -> double
pid: pid_t
/
static double
os_sched_rr_get_interval_impl(PyObject *module, pid_t pid)
-/*[clinic end generated code: output=7e2d935833ab47dc input=2a973da15cca6fae]*/
+/*[clinic end generated code: output=7e2d935833ab47dc input=cab0b83586776b10]*/
{
struct timespec interval;
if (sched_rr_get_interval(pid, &interval)) {
/*[clinic input]
+@permit_long_summary
os.sched_getaffinity
pid: pid_t
/
static PyObject *
os_sched_getaffinity_impl(PyObject *module, pid_t pid)
-/*[clinic end generated code: output=f726f2c193c17a4f input=983ce7cb4a565980]*/
+/*[clinic end generated code: output=f726f2c193c17a4f input=cb79ff13579ef091]*/
{
int ncpus = NCPUS_START;
size_t setsize;
}
/*[clinic input]
+@permit_long_summary
os.timerfd_gettime
fd: fildes
static PyObject *
os_timerfd_gettime_impl(PyObject *module, int fd)
-/*[clinic end generated code: output=ec5a94a66cfe6ab4 input=8148e3430870da1c]*/
+/*[clinic end generated code: output=ec5a94a66cfe6ab4 input=05f7d568a4820dc6]*/
{
struct itimerspec curr_value;
int result;
/*[clinic input]
+@permit_long_summary
os.timerfd_gettime_ns
fd: fildes
static PyObject *
os_timerfd_gettime_ns_impl(PyObject *module, int fd)
-/*[clinic end generated code: output=580633a4465f39fe input=a825443e4c6b40ac]*/
+/*[clinic end generated code: output=580633a4465f39fe input=d0de95b9782179c5]*/
{
struct itimerspec curr_value;
int result;
/*[clinic input]
+@permit_long_docstring_body
os.lseek -> Py_off_t
fd: int
static Py_off_t
os_lseek_impl(PyObject *module, int fd, Py_off_t position, int how)
-/*[clinic end generated code: output=971e1efb6b30bd2f input=f096e754c5367504]*/
+/*[clinic end generated code: output=971e1efb6b30bd2f input=4a3de549f07e1c40]*/
{
Py_off_t result;
}
/*[clinic input]
+@permit_long_docstring_body
os.readinto -> Py_ssize_t
fd: int
buffer: Py_buffer(accept={rwbuffer})
static Py_ssize_t
os_readinto_impl(PyObject *module, int fd, Py_buffer *buffer)
-/*[clinic end generated code: output=8091a3513c683a80 input=d40074d0a68de575]*/
+/*[clinic end generated code: output=8091a3513c683a80 input=a770382bd3d32f9a]*/
{
assert(buffer->len >= 0);
Py_ssize_t result = _Py_read(fd, buffer->buf, buffer->len);
#ifdef HAVE_PREAD
/*[clinic input]
+@permit_long_summary
os.pread
fd: int
static PyObject *
os_pread_impl(PyObject *module, int fd, Py_ssize_t length, Py_off_t offset)
-/*[clinic end generated code: output=3f875c1eef82e32f input=85cb4a5589627144]*/
+/*[clinic end generated code: output=3f875c1eef82e32f input=5943beb009d3da04]*/
{
Py_ssize_t n;
int async_err = 0;
#if defined(HAVE_PREADV) || defined (HAVE_PREADV2)
/*[clinic input]
+@permit_long_docstring_body
os.preadv -> Py_ssize_t
fd: int
static Py_ssize_t
os_preadv_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
int flags)
-/*[clinic end generated code: output=26fc9c6e58e7ada5 input=4173919dc1f7ed99]*/
+/*[clinic end generated code: output=26fc9c6e58e7ada5 input=c1f876866fcd9d41]*/
{
Py_ssize_t cnt, n;
int async_err = 0;
#if defined(HAVE_PWRITEV) || defined (HAVE_PWRITEV2)
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
os.pwritev -> Py_ssize_t
fd: int
static Py_ssize_t
os_pwritev_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
int flags)
-/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=35358c327e1a2a8e]*/
+/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=99d8a21493ff76ca]*/
{
Py_ssize_t cnt;
Py_ssize_t result;
#if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
/*[clinic input]
+@permit_long_docstring_body
os.mknod
path: path_t
static PyObject *
os_mknod_impl(PyObject *module, path_t *path, int mode, dev_t device,
int dir_fd)
-/*[clinic end generated code: output=92e55d3ca8917461 input=ee44531551a4d83b]*/
+/*[clinic end generated code: output=92e55d3ca8917461 input=7121c4723d22545b]*/
{
int result;
int async_err = 0;
#ifdef WIFEXITED
/*[clinic input]
+@permit_long_summary
os.WIFEXITED -> bool
status: int
static int
os_WIFEXITED_impl(PyObject *module, int status)
-/*[clinic end generated code: output=01c09d6ebfeea397 input=d63775a6791586c0]*/
+/*[clinic end generated code: output=01c09d6ebfeea397 input=8c24a82148709b30]*/
{
WAIT_TYPE wait_status;
WAIT_STATUS_INT(wait_status) = status;
#ifdef WTERMSIG
/*[clinic input]
+@permit_long_summary
os.WTERMSIG -> int
status: int
static int
os_WTERMSIG_impl(PyObject *module, int status)
-/*[clinic end generated code: output=172f7dfc8dcfc3ad input=727fd7f84ec3f243]*/
+/*[clinic end generated code: output=172f7dfc8dcfc3ad input=89072f6cbf3f8050]*/
{
WAIT_TYPE wait_status;
WAIT_STATUS_INT(wait_status) = status;
#ifdef HAVE_GETRESGID
/*[clinic input]
+@permit_long_summary
os.getresgid
Return a tuple of the current process's real, effective, and saved group ids.
static PyObject *
os_getresgid_impl(PyObject *module)
-/*[clinic end generated code: output=2719c4bfcf27fb9f input=517e68db9ca32df6]*/
+/*[clinic end generated code: output=2719c4bfcf27fb9f input=ad9adadc86fbdb17]*/
{
gid_t rgid, egid, sgid;
if (getresgid(&rgid, &egid, &sgid) < 0)
/*[clinic input]
+@permit_long_docstring_body
os.setxattr
path: path_t(allow_fd=True)
static PyObject *
os_setxattr_impl(PyObject *module, path_t *path, path_t *attribute,
Py_buffer *value, int flags, int follow_symlinks)
-/*[clinic end generated code: output=98b83f63fdde26bb input=c17c0103009042f0]*/
+/*[clinic end generated code: output=98b83f63fdde26bb input=4098e6f68699f3d7]*/
{
ssize_t result;
/*[clinic input]
+@permit_long_docstring_body
os.listxattr
path: path_t(allow_fd=True, nullable=True) = None
static PyObject *
os_listxattr_impl(PyObject *module, path_t *path, int follow_symlinks)
-/*[clinic end generated code: output=bebdb4e2ad0ce435 input=9826edf9fdb90869]*/
+/*[clinic end generated code: output=bebdb4e2ad0ce435 input=48aa9ac8be47dea1]*/
{
Py_ssize_t i;
PyObject *result = NULL;
/*[clinic input]
+@permit_long_summary
os.urandom
size: Py_ssize_t
static PyObject *
os_urandom_impl(PyObject *module, Py_ssize_t size)
-/*[clinic end generated code: output=42c5cca9d18068e9 input=4067cdb1b6776c29]*/
+/*[clinic end generated code: output=42c5cca9d18068e9 input=ade19e6b362e7388]*/
{
PyObject *bytes;
int result;
}
/*[clinic input]
+@permit_long_docstring_body
os.fspath
path: object
static PyObject *
os_fspath_impl(PyObject *module, PyObject *path)
-/*[clinic end generated code: output=c3c3b78ecff2914f input=e357165f7b22490f]*/
+/*[clinic end generated code: output=c3c3b78ecff2914f input=f608743e60a3211e]*/
{
return PyOS_FSPath(path);
}
#ifdef HAVE_GETPWENT
/*[clinic input]
+@permit_long_summary
pwd.getpwall
Return a list of all available password database entries, in arbitrary order.
static PyObject *
pwd_getpwall_impl(PyObject *module)
-/*[clinic end generated code: output=4853d2f5a0afac8a input=d7ecebfd90219b85]*/
+/*[clinic end generated code: output=4853d2f5a0afac8a input=f8145e0d9a79e32c]*/
{
PyObject *d;
struct passwd *p;
}
/*[clinic input]
+@permit_long_summary
pyexpat.xmlparser.GetReparseDeferralEnabled
Retrieve reparse deferral enabled status; always returns false with Expat <2.6.0.
static PyObject *
pyexpat_xmlparser_GetReparseDeferralEnabled_impl(xmlparseobject *self)
-/*[clinic end generated code: output=4e91312e88a595a8 input=54b5f11d32b20f3e]*/
+/*[clinic end generated code: output=4e91312e88a595a8 input=ae02d7152ab9e2d0]*/
{
return PyBool_FromLong(self->reparse_deferral_enabled);
}
}
/*[clinic input]
+@permit_long_docstring_body
pyexpat.xmlparser.GetInputContext
Return the untranslated text of the input that caused the current event.
static PyObject *
pyexpat_xmlparser_GetInputContext_impl(xmlparseobject *self)
-/*[clinic end generated code: output=a88026d683fc22cc input=034df8712db68379]*/
+/*[clinic end generated code: output=a88026d683fc22cc input=925cea010fdfa682]*/
{
if (self->in_callback) {
int offset, size;
}
/*[clinic input]
+@permit_long_summary
pyexpat.xmlparser.ExternalEntityParserCreate
cls: defining_class
PyTypeObject *cls,
const char *context,
const char *encoding)
-/*[clinic end generated code: output=01d4472b49cb3f92 input=ec70c6b9e6e9619a]*/
+/*[clinic end generated code: output=01d4472b49cb3f92 input=550479eaff952cc0]*/
{
xmlparseobject *new_parser;
pyexpat_state *state = PyType_GetModuleState(cls);
}
/*[clinic input]
+@permit_long_summary
pyexpat.xmlparser.SetParamEntityParsing
flag: int
static PyObject *
pyexpat_xmlparser_SetParamEntityParsing_impl(xmlparseobject *self, int flag)
-/*[clinic end generated code: output=18668ee8e760d64c input=8aea19b4b15e9af1]*/
+/*[clinic end generated code: output=18668ee8e760d64c input=1c43532fcb405879]*/
{
flag = XML_SetParamEntityParsing(self->itself, flag);
return PyLong_FromLong(flag);
#if XML_COMBINED_VERSION >= 19505
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
pyexpat.xmlparser.UseForeignDTD
cls: defining_class
static PyObject *
pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, PyTypeObject *cls,
int flag)
-/*[clinic end generated code: output=d7d98252bd25a20f input=23440ecb0573fb29]*/
+/*[clinic end generated code: output=d7d98252bd25a20f input=c2264845d8c0029c]*/
{
pyexpat_state *state = PyType_GetModuleState(cls);
enum XML_Error rc;
/* Redisplay the line buffer */
/*[clinic input]
+@permit_long_summary
@critical_section
readline.redisplay
static PyObject *
readline_redisplay_impl(PyObject *module)
-/*[clinic end generated code: output=a8b9725827c3c34b input=5895fd014615ff58]*/
+/*[clinic end generated code: output=a8b9725827c3c34b input=fb6ce76959c6f0ec]*/
{
rl_redisplay();
Py_RETURN_NONE;
#endif /* FD_SETSIZE > 1024 */
/*[clinic input]
+@permit_long_docstring_body
select.select
rlist: object
static PyObject *
select_select_impl(PyObject *module, PyObject *rlist, PyObject *wlist,
PyObject *xlist, PyObject *timeout_obj)
-/*[clinic end generated code: output=2b3cfa824f7ae4cf input=1199d5e101abca4a]*/
+/*[clinic end generated code: output=2b3cfa824f7ae4cf input=df20779a9c2f5c1e]*/
{
#ifdef SELECT_USES_HEAP
pylist *rfd2obj, *wfd2obj, *efd2obj;
/*[clinic input]
+@permit_long_docstring_body
select.poll
Returns a polling object.
static PyObject *
select_poll_impl(PyObject *module)
-/*[clinic end generated code: output=16a665a4e1d228c5 input=3f877909d5696bbf]*/
+/*[clinic end generated code: output=16a665a4e1d228c5 input=5e07eea8ad564e7f]*/
{
return (PyObject *)newPollObject(module);
}
#ifdef HAVE_SYS_DEVPOLL_H
/*[clinic input]
+@permit_long_docstring_body
select.devpoll
Returns a polling object.
static PyObject *
select_devpoll_impl(PyObject *module)
-/*[clinic end generated code: output=ea9213cc87fd9581 input=53a1af94564f00a3]*/
+/*[clinic end generated code: output=ea9213cc87fd9581 input=048506faef19d947]*/
{
return (PyObject *)newDevPollObject(module);
}
}
/*[clinic input]
+@permit_long_docstring_body
signal.signal
signalnum: int
static PyObject *
signal_signal_impl(PyObject *module, int signalnum, PyObject *handler)
-/*[clinic end generated code: output=b44cfda43780f3a1 input=deee84af5fa0432c]*/
+/*[clinic end generated code: output=b44cfda43780f3a1 input=7608656f34fa378b]*/
{
_signal_module_state *modstate = get_signal_state(module);
PyObject *old_handler;
/*[clinic input]
+@permit_long_summary
signal.set_wakeup_fd
fd as fdobj: object
static PyObject *
signal_set_wakeup_fd_impl(PyObject *module, PyObject *fdobj,
int warn_on_full_buffer)
-/*[clinic end generated code: output=2280d72dd2a54c4f input=5b545946a28b8339]*/
+/*[clinic end generated code: output=2280d72dd2a54c4f input=1b914d48079e9274]*/
{
struct _Py_stat_struct status;
#ifdef MS_WINDOWS
#ifdef HAVE_SETITIMER
/*[clinic input]
+@permit_long_docstring_body
signal.setitimer
which: int
static PyObject *
signal_setitimer_impl(PyObject *module, int which, PyObject *seconds,
PyObject *interval)
-/*[clinic end generated code: output=65f9dcbddc35527b input=de43daf194e6f66f]*/
+/*[clinic end generated code: output=65f9dcbddc35527b input=ab5bf2b8f5cff3f4]*/
{
_signal_module_state *modstate = get_signal_state(module);
}
/*[clinic input]
+@permit_long_docstring_body
_socket.socket.send
self as s: self(type="PySocketSockObject *")
data as pbuf: Py_buffer
static PyObject *
_socket_socket_send_impl(PySocketSockObject *s, Py_buffer *pbuf, int flags)
-/*[clinic end generated code: output=3ddf83f17d0c875b input=befe7d7790ccb035]*/
+/*[clinic end generated code: output=3ddf83f17d0c875b input=e776a48af2e3d615]*/
{
struct sock_send ctx;
/* socket.inet_aton() and socket.inet_ntoa() functions. */
/*[clinic input]
+@permit_long_summary
_socket.inet_aton
ip_addr: str
/
static PyObject *
_socket_inet_aton_impl(PyObject *module, const char *ip_addr)
-/*[clinic end generated code: output=f2c2f772eb721b6e input=3a52dec207bf8956]*/
+/*[clinic end generated code: output=f2c2f772eb721b6e input=0bd9e5ee400fafd6]*/
{
#ifdef HAVE_INET_ATON
struct in_addr buf;
}
/*[clinic input]
+@permit_long_docstring_body
termios.tcsetwinsize
fd: fildes
static PyObject *
termios_tcsetwinsize_impl(PyObject *module, int fd, PyObject *winsz)
-/*[clinic end generated code: output=2ac3c9bb6eda83e1 input=4a06424465b24aee]*/
+/*[clinic end generated code: output=2ac3c9bb6eda83e1 input=9a163c4e06fc4a41]*/
{
if (!PySequence_Check(winsz) || PySequence_Size(winsz) != 2) {
PyErr_SetString(PyExc_TypeError,
}
/*[clinic input]
+@permit_long_summary
unicodedata.UCD.combining -> int
self: self
static int
unicodedata_UCD_combining_impl(PyObject *self, int chr)
-/*[clinic end generated code: output=cad056d0cb6a5920 input=9f2d6b2a95d0a22a]*/
+/*[clinic end generated code: output=cad056d0cb6a5920 input=e05edfbb882ebfed]*/
{
int index;
Py_UCS4 c = (Py_UCS4)chr;
}
/*[clinic input]
+@permit_long_summary
unicodedata.UCD.decomposition
self: self
static PyObject *
unicodedata_UCD_decomposition_impl(PyObject *self, int chr)
-/*[clinic end generated code: output=7d699f3ec7565d27 input=e4c12459ad68507b]*/
+/*[clinic end generated code: output=7d699f3ec7565d27 input=84d628d1abfd01ec]*/
{
char decomp[256];
int code, index, count;
}
/*[clinic input]
+@permit_long_docstring_body
zlib.Decompress.decompress
cls: defining_class
static PyObject *
zlib_Decompress_decompress_impl(compobject *self, PyTypeObject *cls,
Py_buffer *data, Py_ssize_t max_length)
-/*[clinic end generated code: output=b024a93c2c922d57 input=bfb37b3864cfb606]*/
+/*[clinic end generated code: output=b024a93c2c922d57 input=205667f8c387fce4]*/
{
int err = Z_OK;
Py_ssize_t ibuflen;
}
/*[clinic input]
+@permit_long_docstring_body
zlib.ZlibDecompressor.decompress
data: Py_buffer
static PyObject *
zlib_ZlibDecompressor_decompress_impl(ZlibDecompressor *self,
Py_buffer *data, Py_ssize_t max_length)
-/*[clinic end generated code: output=990d32787b775f85 input=0b29d99715250b96]*/
+/*[clinic end generated code: output=990d32787b775f85 input=fcf9f974de5d02b1]*/
{
PyObject *result = NULL;
/*[clinic input]
+@permit_long_summary
@critical_section
@text_signature "($self, sub[, start[, end]], /)"
bytearray.find
static PyObject *
bytearray_find_impl(PyByteArrayObject *self, PyObject *sub, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=413e1cab2ae87da0 input=1de9f4558df68336]*/
+/*[clinic end generated code: output=413e1cab2ae87da0 input=df3aa94840d893a7]*/
{
return _Py_bytes_find(PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
@critical_section
bytearray.count = bytearray.find
static PyObject *
bytearray_count_impl(PyByteArrayObject *self, PyObject *sub,
Py_ssize_t start, Py_ssize_t end)
-/*[clinic end generated code: output=a21ee2692e4f1233 input=2608c30644614724]*/
+/*[clinic end generated code: output=a21ee2692e4f1233 input=e8fcdca8272857e0]*/
{
return _Py_bytes_count(PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
@critical_section
bytearray.index = bytearray.find
static PyObject *
bytearray_index_impl(PyByteArrayObject *self, PyObject *sub,
Py_ssize_t start, Py_ssize_t end)
-/*[clinic end generated code: output=067a1e78efc672a7 input=0086ba0ab9bf44a5]*/
+/*[clinic end generated code: output=067a1e78efc672a7 input=c37f177cfee19fe4]*/
{
return _Py_bytes_index(PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
@critical_section
bytearray.rfind = bytearray.find
static PyObject *
bytearray_rfind_impl(PyByteArrayObject *self, PyObject *sub,
Py_ssize_t start, Py_ssize_t end)
-/*[clinic end generated code: output=51bf886f932b283c input=ac73593305d5c1d1]*/
+/*[clinic end generated code: output=51bf886f932b283c input=1265b11c437d2750]*/
{
return _Py_bytes_rfind(PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
@critical_section
bytearray.rindex = bytearray.find
static PyObject *
bytearray_rindex_impl(PyByteArrayObject *self, PyObject *sub,
Py_ssize_t start, Py_ssize_t end)
-/*[clinic end generated code: output=38e1cf66bafb08b9 input=0cf331bf5ebe0e91]*/
+/*[clinic end generated code: output=38e1cf66bafb08b9 input=7d198b3d6b0a62ce]*/
{
return _Py_bytes_rindex(PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
@critical_section
@text_signature "($self, prefix[, start[, end]], /)"
bytearray.startswith
static PyObject *
bytearray_startswith_impl(PyByteArrayObject *self, PyObject *subobj,
Py_ssize_t start, Py_ssize_t end)
-/*[clinic end generated code: output=a3d9b6d44d3662a6 input=ea8d036d09df34b2]*/
+/*[clinic end generated code: output=a3d9b6d44d3662a6 input=93f9ffee684f109a]*/
{
return _Py_bytes_startswith(PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
subobj, start, end);
}
/*[clinic input]
+@permit_long_summary
@critical_section
@text_signature "($self, suffix[, start[, end]], /)"
bytearray.endswith
static PyObject *
bytearray_endswith_impl(PyByteArrayObject *self, PyObject *subobj,
Py_ssize_t start, Py_ssize_t end)
-/*[clinic end generated code: output=e75ea8c227954caa input=c61b90bb23a689ce]*/
+/*[clinic end generated code: output=e75ea8c227954caa input=d158b030a11d0b06]*/
{
return _Py_bytes_endswith(PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
subobj, start, end);
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@staticmethod
bytearray.maketrans
static PyObject *
bytearray_maketrans_impl(Py_buffer *frm, Py_buffer *to)
-/*[clinic end generated code: output=1df267d99f56b15e input=b10de38c85950a63]*/
+/*[clinic end generated code: output=1df267d99f56b15e input=1146b43a592eca13]*/
{
return _Py_bytes_maketrans(frm, to);
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
bytearray.replace
static PyObject *
bytearray_replace_impl(PyByteArrayObject *self, Py_buffer *old,
Py_buffer *new, Py_ssize_t count)
-/*[clinic end generated code: output=d39884c4dc59412a input=6992755672c8a807]*/
+/*[clinic end generated code: output=d39884c4dc59412a input=66afec32f4e095e0]*/
{
return stringlib_replace((PyObject *)self,
(const char *)old->buf, old->len,
}
/*[clinic input]
+@permit_long_summary
@critical_section
bytearray.split
static PyObject *
bytearray_split_impl(PyByteArrayObject *self, PyObject *sep,
Py_ssize_t maxsplit)
-/*[clinic end generated code: output=833e2cf385d9a04d input=1c367486b9938909]*/
+/*[clinic end generated code: output=833e2cf385d9a04d input=dd9f6e2910cc3a34]*/
{
Py_ssize_t len = PyByteArray_GET_SIZE(self), n;
const char *s = PyByteArray_AS_STRING(self), *sub;
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
bytearray.partition
static PyObject *
bytearray_partition_impl(PyByteArrayObject *self, PyObject *sep)
-/*[clinic end generated code: output=b5fa1e03f10cfccb input=632855f986733f34]*/
+/*[clinic end generated code: output=b5fa1e03f10cfccb input=b87276af883f39d9]*/
{
PyObject *bytesep, *result;
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
bytearray.rpartition
static PyObject *
bytearray_rpartition_impl(PyByteArrayObject *self, PyObject *sep)
-/*[clinic end generated code: output=0186ce7b1ef61289 input=4318e3d125497450]*/
+/*[clinic end generated code: output=0186ce7b1ef61289 input=5bdcfc4c333bcfab]*/
{
PyObject *bytesep, *result;
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@critical_section
bytearray.rsplit = bytearray.split
static PyObject *
bytearray_rsplit_impl(PyByteArrayObject *self, PyObject *sep,
Py_ssize_t maxsplit)
-/*[clinic end generated code: output=a55e0b5a03cb6190 input=3cd513c2b94a53c1]*/
+/*[clinic end generated code: output=a55e0b5a03cb6190 input=60e9abf305128ff4]*/
{
Py_ssize_t len = PyByteArray_GET_SIZE(self), n;
const char *s = PyByteArray_AS_STRING(self), *sub;
}
/*[clinic input]
+@permit_long_summary
@critical_section
bytearray.extend
static PyObject *
bytearray_extend_impl(PyByteArrayObject *self, PyObject *iterable_of_ints)
-/*[clinic end generated code: output=2f25e0ce72b98748 input=86e65beaba444650]*/
+/*[clinic end generated code: output=2f25e0ce72b98748 input=aeed44b025146632]*/
{
PyObject *it, *item, *bytearray_obj;
Py_ssize_t buf_size = 0, len = 0;
}
/*[clinic input]
+@permit_long_docstring_body
@critical_section
bytearray.strip
static PyObject *
bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes)
-/*[clinic end generated code: output=760412661a34ad5a input=1f9026e5ad35388a]*/
+/*[clinic end generated code: output=760412661a34ad5a input=6acaf88b2ec9daa7]*/
{
return bytearray_strip_impl_helper(self, bytes, BOTHSTRIP);
}
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@critical_section
bytearray.splitlines
static PyObject *
bytearray_splitlines_impl(PyByteArrayObject *self, int keepends)
-/*[clinic end generated code: output=4223c94b895f6ad9 input=874cd662866a66a1]*/
+/*[clinic end generated code: output=4223c94b895f6ad9 input=21bc3f02bf1be832]*/
{
return stringlib_splitlines(
(PyObject*) self, PyByteArray_AS_STRING(self),
}
/*[clinic input]
+@permit_long_docstring_body
bytes.partition
sep: Py_buffer
static PyObject *
bytes_partition_impl(PyBytesObject *self, Py_buffer *sep)
-/*[clinic end generated code: output=f532b392a17ff695 input=61cca95519406099]*/
+/*[clinic end generated code: output=f532b392a17ff695 input=31c55a0cebaf7722]*/
{
return stringlib_partition(
(PyObject*) self,
}
/*[clinic input]
+@permit_long_docstring_body
bytes.rpartition
sep: Py_buffer
static PyObject *
bytes_rpartition_impl(PyBytesObject *self, Py_buffer *sep)
-/*[clinic end generated code: output=191b114cbb028e50 input=d78db010c8cfdbe1]*/
+/*[clinic end generated code: output=191b114cbb028e50 input=9ea5a3ab0b02bf52]*/
{
return stringlib_rpartition(
(PyObject*) self,
}
/*[clinic input]
+@permit_long_docstring_body
bytes.rsplit = bytes.split
Return a list of the sections in the bytes, using sep as the delimiter.
static PyObject *
bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit)
-/*[clinic end generated code: output=ba698d9ea01e1c8f input=0f86c9f28f7d7b7b]*/
+/*[clinic end generated code: output=ba698d9ea01e1c8f input=55b6eaea1f3d7046]*/
{
Py_ssize_t len = PyBytes_GET_SIZE(self), n;
const char *s = PyBytes_AS_STRING(self), *sub;
}
/*[clinic input]
+@permit_long_summary
@text_signature "($self, sub[, start[, end]], /)"
bytes.find
static PyObject *
bytes_find_impl(PyBytesObject *self, PyObject *sub, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=d5961a1c77b472a1 input=3171e62a8ae7f240]*/
+/*[clinic end generated code: output=d5961a1c77b472a1 input=47d0929adafc6b0b]*/
{
return _Py_bytes_find(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
bytes.index = bytes.find
Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
static PyObject *
bytes_index_impl(PyBytesObject *self, PyObject *sub, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=0da25cc74683ba42 input=aa34ad71ba0bafe3]*/
+/*[clinic end generated code: output=0da25cc74683ba42 input=1cb45ce71456a269]*/
{
return _Py_bytes_index(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
bytes.rfind = bytes.find
Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
static PyObject *
bytes_rfind_impl(PyBytesObject *self, PyObject *sub, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=51b60fa4ad011c09 input=864c3e7f3010b33c]*/
+/*[clinic end generated code: output=51b60fa4ad011c09 input=c9473d714251f1ab]*/
{
return _Py_bytes_rfind(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_summary
bytes.rindex = bytes.find
Return the highest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].
static PyObject *
bytes_rindex_impl(PyBytesObject *self, PyObject *sub, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=42bf674e0a0aabf6 input=21051fc5cfeacf2c]*/
+/*[clinic end generated code: output=42bf674e0a0aabf6 input=bb5f473c64610c43]*/
{
return _Py_bytes_rindex(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
sub, start, end);
}
/*[clinic input]
+@permit_long_docstring_body
bytes.strip
bytes: object = None
static PyObject *
bytes_strip_impl(PyBytesObject *self, PyObject *bytes)
-/*[clinic end generated code: output=c7c228d3bd104a1b input=8a354640e4e0b3ef]*/
+/*[clinic end generated code: output=c7c228d3bd104a1b input=71904cd278c0ee03]*/
{
return do_argstrip(self, BOTHSTRIP, bytes);
}
/*[clinic input]
+@permit_long_summary
bytes.count = bytes.find
Return the number of non-overlapping occurrences of subsection 'sub' in bytes B[start:end].
static PyObject *
bytes_count_impl(PyBytesObject *self, PyObject *sub, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=9848140b9be17d0f input=b6e4a5ed515e1e59]*/
+/*[clinic end generated code: output=9848140b9be17d0f input=bb2f136f83f0d30e]*/
{
return _Py_bytes_count(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
sub, start, end);
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
@staticmethod
bytes.maketrans
static PyObject *
bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to)
-/*[clinic end generated code: output=a36f6399d4b77f6f input=a3bd00d430a0979f]*/
+/*[clinic end generated code: output=a36f6399d4b77f6f input=a06b75f44d933fb3]*/
{
return _Py_bytes_maketrans(frm, to);
}
/*[clinic input]
+@permit_long_docstring_body
bytes.replace
old: Py_buffer
static PyObject *
bytes_replace_impl(PyBytesObject *self, Py_buffer *old, Py_buffer *new,
Py_ssize_t count)
-/*[clinic end generated code: output=994fa588b6b9c104 input=b2fbbf0bf04de8e5]*/
+/*[clinic end generated code: output=994fa588b6b9c104 input=8b99a9ab32bc06a2]*/
{
return stringlib_replace((PyObject *)self,
(const char *)old->buf, old->len,
}
/*[clinic input]
+@permit_long_summary
@text_signature "($self, prefix[, start[, end]], /)"
bytes.startswith
static PyObject *
bytes_startswith_impl(PyBytesObject *self, PyObject *subobj,
Py_ssize_t start, Py_ssize_t end)
-/*[clinic end generated code: output=b1e8da1cbd528e8c input=8a4165df8adfa6c9]*/
+/*[clinic end generated code: output=b1e8da1cbd528e8c input=a14efd070f15be80]*/
{
return _Py_bytes_startswith(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
subobj, start, end);
}
/*[clinic input]
+@permit_long_summary
@text_signature "($self, suffix[, start[, end]], /)"
bytes.endswith
static PyObject *
bytes_endswith_impl(PyBytesObject *self, PyObject *subobj, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=038b633111f3629d input=b5c3407a2a5c9aac]*/
+/*[clinic end generated code: output=038b633111f3629d input=49e383eaaf292713]*/
{
return _Py_bytes_endswith(PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
subobj, start, end);
/*[clinic input]
+@permit_long_docstring_body
bytes.splitlines
keepends: bool = False
static PyObject *
bytes_splitlines_impl(PyBytesObject *self, int keepends)
-/*[clinic end generated code: output=3484149a5d880ffb input=5d7b898af2fe55c0]*/
+/*[clinic end generated code: output=3484149a5d880ffb input=d17968d2a355fe55]*/
{
return stringlib_splitlines(
(PyObject*) self, PyBytes_AS_STRING(self),
}
/*[clinic input]
+@permit_long_summary
@text_signature "($self, /, **changes)"
code.replace
PyObject *co_filename, PyObject *co_name,
PyObject *co_qualname, PyObject *co_linetable,
PyObject *co_exceptiontable)
-/*[clinic end generated code: output=e75c48a15def18b9 input=a455a89c57ac9d42]*/
+/*[clinic end generated code: output=e75c48a15def18b9 input=e944fdac8b456114]*/
{
#define CHECK_INT_ARG(ARG) \
if (ARG < 0) { \
}
/*[clinic input]
+@permit_long_summary
complex.conjugate
Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.
static PyObject *
complex_conjugate_impl(PyComplexObject *self)
-/*[clinic end generated code: output=5059ef162edfc68e input=5fea33e9747ec2c4]*/
+/*[clinic end generated code: output=5059ef162edfc68e input=71b8ab003e1cec95]*/
{
Py_complex c = self->cval;
c.imag = -c.imag;
}
/*[clinic input]
+@permit_long_summary
dict.pop
key: object
static PyObject *
dict_pop_impl(PyDictObject *self, PyObject *key, PyObject *default_value)
-/*[clinic end generated code: output=3abb47b89f24c21c input=e221baa01044c44c]*/
+/*[clinic end generated code: output=3abb47b89f24c21c input=d409c7eb2de67e38]*/
{
return dict_pop_default((PyObject*)self, key, default_value);
}
}
/*[clinic input]
+@permit_long_summary
float.as_integer_ratio
Return a pair of integers, whose ratio is exactly equal to the original float.
static PyObject *
float_as_integer_ratio_impl(PyObject *self)
-/*[clinic end generated code: output=65f25f0d8d30a712 input=d5ba7765655d75bd]*/
+/*[clinic end generated code: output=65f25f0d8d30a712 input=75ae9be7cecd82a3]*/
{
double self_double;
double float_part;
/*[clinic input]
+@permit_long_docstring_body
@classmethod
float.__getformat__
static PyObject *
float___getformat___impl(PyTypeObject *type, const char *typestr)
-/*[clinic end generated code: output=2bfb987228cc9628 input=90d5e246409a246e]*/
+/*[clinic end generated code: output=2bfb987228cc9628 input=d2735823bfe8e81e]*/
{
float_format_type r;
}
/*[clinic input]
+@permit_long_summary
@critical_section
@getter
frame.f_trace as frame_trace
static PyObject *
frame_trace_get_impl(PyFrameObject *self)
-/*[clinic end generated code: output=5475cbfce07826cd input=f382612525829773]*/
+/*[clinic end generated code: output=5475cbfce07826cd input=e4eacf2c68cac577]*/
{
PyObject* trace = self->f_trace;
if (trace == NULL) {
}
/*[clinic input]
+@permit_long_summary
@critical_section
@setter
frame.f_trace as frame_trace
static int
frame_trace_set_impl(PyFrameObject *self, PyObject *value)
-/*[clinic end generated code: output=d6fe08335cf76ae4 input=d96a18bda085707f]*/
+/*[clinic end generated code: output=d6fe08335cf76ae4 input=e57380734815dac5]*/
{
if (value == Py_None) {
value = NULL;
* duplicated).
*/
/*[clinic input]
+@permit_long_docstring_body
@critical_section
list.sort
static PyObject *
list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse)
-/*[clinic end generated code: output=57b9f9c5e23fbe42 input=667bf25d0e3a3676]*/
+/*[clinic end generated code: output=57b9f9c5e23fbe42 input=e4f6b6069181ad7d]*/
{
MergeState ms;
Py_ssize_t nremaining;
}
/*[clinic input]
+@permit_long_summary
int.bit_count
Number of ones in the binary representation of the absolute value of self.
static PyObject *
int_bit_count_impl(PyObject *self)
-/*[clinic end generated code: output=2e571970daf1e5c3 input=7e0adef8e8ccdf2e]*/
+/*[clinic end generated code: output=2e571970daf1e5c3 input=f2510a306761db15]*/
{
assert(self != NULL);
assert(PyLong_Check(self));
}
/*[clinic input]
+@permit_long_docstring_body
memoryview.tobytes
order: str(accept={str, NoneType}, c_default="NULL") = 'C'
static PyObject *
memoryview_tobytes_impl(PyMemoryViewObject *self, const char *order)
-/*[clinic end generated code: output=1288b62560a32a23 input=0efa3ddaeda573a8]*/
+/*[clinic end generated code: output=1288b62560a32a23 input=23c9faf372cfdbcc]*/
{
Py_buffer *src = VIEW_ADDR(self);
char ord = 'C';
/* fromkeys() */
/*[clinic input]
+@permit_long_summary
@classmethod
OrderedDict.fromkeys
static PyObject *
OrderedDict_fromkeys_impl(PyTypeObject *type, PyObject *seq, PyObject *value)
-/*[clinic end generated code: output=c10390d452d78d6d input=1a0476c229c597b3]*/
+/*[clinic end generated code: output=c10390d452d78d6d input=1277ae0769083848]*/
{
return _PyDict_FromKeys((PyObject *)type, seq, value);
}
/* Skips __missing__() calls. */
/*[clinic input]
+@permit_long_summary
OrderedDict.pop
key: object
static PyObject *
OrderedDict_pop_impl(PyODictObject *self, PyObject *key,
PyObject *default_value)
-/*[clinic end generated code: output=7a6447d104e7494b input=7efe36601007dff7]*/
+/*[clinic end generated code: output=7a6447d104e7494b input=eebd40ac51666d33]*/
{
Py_hash_t hash = PyObject_Hash(key);
if (hash == -1)
}
/*[clinic input]
+@permit_long_summary
set.symmetric_difference_update
so: setobject
other: object
static PyObject *
set_symmetric_difference_update_impl(PySetObject *so, PyObject *other)
-/*[clinic end generated code: output=79f80b4ee5da66c1 input=a50acf0365e1f0a5]*/
+/*[clinic end generated code: output=79f80b4ee5da66c1 input=86a3dddac9bfb15e]*/
{
if (Py_Is((PyObject *)so, other)) {
return set_clear((PyObject *)so, NULL);
}
/*[clinic input]
+@permit_long_summary
B.zfill as stringlib_zfill
width: Py_ssize_t
static PyObject *
stringlib_zfill_impl(PyObject *self, Py_ssize_t width)
-/*[clinic end generated code: output=0b3c684a7f1b2319 input=2da6d7b8e9bcb19a]*/
+/*[clinic end generated code: output=0b3c684a7f1b2319 input=dfb9cbb16f521756]*/
{
Py_ssize_t fill;
PyObject *s;
/* --- Unicode Object Methods --------------------------------------------- */
/*[clinic input]
+@permit_long_docstring_body
str.title as unicode_title
Return a version of the string where each word is titlecased.
static PyObject *
unicode_title_impl(PyObject *self)
-/*[clinic end generated code: output=c75ae03809574902 input=fa945d669b26e683]*/
+/*[clinic end generated code: output=c75ae03809574902 input=533ce0eb6a7f5d1b]*/
{
return case_operation(self, do_title);
}
/*[clinic input]
+@permit_long_docstring_body
str.capitalize as unicode_capitalize
Return a capitalized version of the string.
static PyObject *
unicode_capitalize_impl(PyObject *self)
-/*[clinic end generated code: output=e49a4c333cdb7667 input=f4cbf1016938da6d]*/
+/*[clinic end generated code: output=e49a4c333cdb7667 input=a4a15ade41f6f9e9]*/
{
if (PyUnicode_GET_LENGTH(self) == 0)
return unicode_result_unchanged(self);
}
/*[clinic input]
+@permit_long_summary
@text_signature "($self, sub[, start[, end]], /)"
str.count as unicode_count -> Py_ssize_t
static Py_ssize_t
unicode_count_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=8fcc3aef0b18edbf input=6f168ffd94be8785]*/
+/*[clinic end generated code: output=8fcc3aef0b18edbf input=8590716ee228b935]*/
{
assert(PyUnicode_Check(str));
assert(PyUnicode_Check(substr));
}
/*[clinic input]
+@permit_long_summary
str.find as unicode_find = str.count
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
static Py_ssize_t
unicode_find_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=51dbe6255712e278 input=4a89d2d68ef57256]*/
+/*[clinic end generated code: output=51dbe6255712e278 input=3a9d650fe4c24695]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, 1);
if (result < 0) {
}
/*[clinic input]
+@permit_long_summary
str.index as unicode_index = str.count
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
static Py_ssize_t
unicode_index_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=77558288837cdf40 input=d986aeac0be14a1c]*/
+/*[clinic end generated code: output=77558288837cdf40 input=ae5e48f69ed75b06]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, 1);
if (result == -1) {
}
/*[clinic input]
+@permit_long_docstring_body
str.islower as unicode_islower
Return True if the string is a lowercase string, False otherwise.
static PyObject *
unicode_islower_impl(PyObject *self)
-/*[clinic end generated code: output=dbd41995bd005b81 input=acec65ac6821ae47]*/
+/*[clinic end generated code: output=dbd41995bd005b81 input=c6fc0295241a1aaa]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.isupper as unicode_isupper
Return True if the string is an uppercase string, False otherwise.
static PyObject *
unicode_isupper_impl(PyObject *self)
-/*[clinic end generated code: output=049209c8e7f15f59 input=e9b1feda5d17f2d3]*/
+/*[clinic end generated code: output=049209c8e7f15f59 input=8d5cb33e67efde72]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.isspace as unicode_isspace
Return True if the string is a whitespace string, False otherwise.
static PyObject *
unicode_isspace_impl(PyObject *self)
-/*[clinic end generated code: output=163a63bfa08ac2b9 input=fe462cb74f8437d8]*/
+/*[clinic end generated code: output=163a63bfa08ac2b9 input=44fe05e248c6e159]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.isalpha as unicode_isalpha
Return True if the string is an alphabetic string, False otherwise.
static PyObject *
unicode_isalpha_impl(PyObject *self)
-/*[clinic end generated code: output=cc81b9ac3883ec4f input=d0fd18a96cbca5eb]*/
+/*[clinic end generated code: output=cc81b9ac3883ec4f input=c233000624a56e0d]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.isalnum as unicode_isalnum
Return True if the string is an alpha-numeric string, False otherwise.
static PyObject *
unicode_isalnum_impl(PyObject *self)
-/*[clinic end generated code: output=a5a23490ffc3660c input=5c6579bf2e04758c]*/
+/*[clinic end generated code: output=a5a23490ffc3660c input=5d63ba9c9bafdb6b]*/
{
int kind;
const void *data;
}
/*[clinic input]
+@permit_long_docstring_body
str.isdecimal as unicode_isdecimal
Return True if the string is a decimal string, False otherwise.
static PyObject *
unicode_isdecimal_impl(PyObject *self)
-/*[clinic end generated code: output=fb2dcdb62d3fc548 input=336bc97ab4c8268f]*/
+/*[clinic end generated code: output=fb2dcdb62d3fc548 input=8e84a58b414935a3]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.isdigit as unicode_isdigit
Return True if the string is a digit string, False otherwise.
static PyObject *
unicode_isdigit_impl(PyObject *self)
-/*[clinic end generated code: output=10a6985311da6858 input=901116c31deeea4c]*/
+/*[clinic end generated code: output=10a6985311da6858 input=99e284affb54d4a0]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.isnumeric as unicode_isnumeric
Return True if the string is a numeric string, False otherwise.
static PyObject *
unicode_isnumeric_impl(PyObject *self)
-/*[clinic end generated code: output=9172a32d9013051a input=722507db976f826c]*/
+/*[clinic end generated code: output=9172a32d9013051a input=e9f5b6b8b29b0ee6]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.isidentifier as unicode_isidentifier
Return True if the string is a valid Python identifier, False otherwise.
static PyObject *
unicode_isidentifier_impl(PyObject *self)
-/*[clinic end generated code: output=fe585a9666572905 input=2d807a104f21c0c5]*/
+/*[clinic end generated code: output=fe585a9666572905 input=86315dd889d7bd04]*/
{
return PyBool_FromLong(PyUnicode_IsIdentifier(self));
}
/*[clinic input]
+@permit_long_summary
str.isprintable as unicode_isprintable
Return True if all characters in the string are printable, False otherwise.
static PyObject *
unicode_isprintable_impl(PyObject *self)
-/*[clinic end generated code: output=3ab9626cd32dd1a0 input=4e56bcc6b06ca18c]*/
+/*[clinic end generated code: output=3ab9626cd32dd1a0 input=18345ba847084ec5]*/
{
Py_ssize_t i, length;
int kind;
}
/*[clinic input]
+@permit_long_docstring_body
str.join as unicode_join
iterable: object
static PyObject *
unicode_join(PyObject *self, PyObject *iterable)
-/*[clinic end generated code: output=6857e7cecfe7bf98 input=2f70422bfb8fa189]*/
+/*[clinic end generated code: output=6857e7cecfe7bf98 input=bac724ed412ef3f8]*/
{
return PyUnicode_Join(self, iterable);
}
/*[clinic input]
+@permit_long_summary
str.strip as unicode_strip
chars: object = None
static PyObject *
unicode_strip_impl(PyObject *self, PyObject *chars)
-/*[clinic end generated code: output=ca19018454345d57 input=385289c6f423b954]*/
+/*[clinic end generated code: output=ca19018454345d57 input=8bc6353450345fbd]*/
{
return do_argstrip(self, BOTHSTRIP, chars);
}
}
/*[clinic input]
+@permit_long_docstring_body
str.replace as unicode_replace
old: unicode
static PyObject *
unicode_replace_impl(PyObject *self, PyObject *old, PyObject *new,
Py_ssize_t count)
-/*[clinic end generated code: output=b63f1a8b5eebf448 input=3345c455d60a5499]*/
+/*[clinic end generated code: output=b63f1a8b5eebf448 input=f27ca92ac46b65a1]*/
{
return replace(self, old, new, count);
}
/*[clinic input]
+@permit_long_docstring_body
str.removeprefix as unicode_removeprefix
prefix: unicode
static PyObject *
unicode_removeprefix_impl(PyObject *self, PyObject *prefix)
-/*[clinic end generated code: output=f1e5945e9763bcb9 input=27ec40b99a37eb88]*/
+/*[clinic end generated code: output=f1e5945e9763bcb9 input=1989a856dbb813f1]*/
{
int match = tailmatch(self, prefix, 0, PY_SSIZE_T_MAX, -1);
if (match == -1) {
}
/*[clinic input]
+@permit_long_summary
str.rfind as unicode_rfind = str.count
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
static Py_ssize_t
unicode_rfind_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=880b29f01dd014c8 input=898361fb71f59294]*/
+/*[clinic end generated code: output=880b29f01dd014c8 input=7f7e97d5cd3299a2]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, -1);
if (result < 0) {
}
/*[clinic input]
+@permit_long_summary
str.rindex as unicode_rindex = str.count
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
static Py_ssize_t
unicode_rindex_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=5f3aef124c867fe1 input=35943dead6c1ea9d]*/
+/*[clinic end generated code: output=5f3aef124c867fe1 input=0363a324740b3e62]*/
{
Py_ssize_t result = any_find_slice(str, substr, start, end, -1);
if (result == -1) {
}
/*[clinic input]
+@permit_long_summary
str.split as unicode_split
sep: object = None
static PyObject *
unicode_split_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit)
-/*[clinic end generated code: output=3a65b1db356948dc input=a29bcc0c7a5af0eb]*/
+/*[clinic end generated code: output=3a65b1db356948dc input=2c1fd08a78e038b8]*/
{
if (sep == Py_None)
return split(self, NULL, maxsplit);
}
/*[clinic input]
+@permit_long_docstring_body
str.partition as unicode_partition
sep: object
static PyObject *
unicode_partition(PyObject *self, PyObject *sep)
-/*[clinic end generated code: output=e4ced7bd253ca3c4 input=f29b8d06c63e50be]*/
+/*[clinic end generated code: output=e4ced7bd253ca3c4 input=4d854b520d7b0e97]*/
{
return PyUnicode_Partition(self, sep);
}
/*[clinic input]
+@permit_long_docstring_body
str.rpartition as unicode_rpartition = str.partition
Partition the string into three parts using the given separator.
static PyObject *
unicode_rpartition(PyObject *self, PyObject *sep)
-/*[clinic end generated code: output=1aa13cf1156572aa input=c4b7db3ef5cf336a]*/
+/*[clinic end generated code: output=1aa13cf1156572aa input=a6adabe91e75b486]*/
{
return PyUnicode_RPartition(self, sep);
}
}
/*[clinic input]
+@permit_long_summary
str.rsplit as unicode_rsplit = str.split
Return a list of the substrings in the string, using sep as the separator string.
static PyObject *
unicode_rsplit_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit)
-/*[clinic end generated code: output=c2b815c63bcabffc input=ea78406060fce33c]*/
+/*[clinic end generated code: output=c2b815c63bcabffc input=0f762e30d267fa83]*/
{
if (sep == Py_None)
return rsplit(self, NULL, maxsplit);
}
/*[clinic input]
+@permit_long_docstring_body
str.splitlines as unicode_splitlines
keepends: bool = False
static PyObject *
unicode_splitlines_impl(PyObject *self, int keepends)
-/*[clinic end generated code: output=f664dcdad153ec40 input=ba6ad05ee85d2b55]*/
+/*[clinic end generated code: output=f664dcdad153ec40 input=39eeafbfef61c827]*/
{
return PyUnicode_Splitlines(self, keepends);
}
}
/*[clinic input]
+@permit_long_summary
str.swapcase as unicode_swapcase
Convert uppercase characters to lowercase and lowercase characters to uppercase.
static PyObject *
unicode_swapcase_impl(PyObject *self)
-/*[clinic end generated code: output=5d28966bf6d7b2af input=3f3ef96d5798a7bb]*/
+/*[clinic end generated code: output=5d28966bf6d7b2af input=85bc39a9b4e8ee91]*/
{
return case_operation(self, do_swapcase);
}
}
/*[clinic input]
+@permit_long_docstring_body
str.translate as unicode_translate
table: object
static PyObject *
unicode_translate(PyObject *self, PyObject *table)
-/*[clinic end generated code: output=3cb448ff2fd96bf3 input=6d38343db63d8eb0]*/
+/*[clinic end generated code: output=3cb448ff2fd96bf3 input=699e5fa0ebf9f5e9]*/
{
return _PyUnicode_TranslateCharmap(self, table, "ignore");
}
}
/*[clinic input]
+@permit_long_summary
str.zfill as unicode_zfill
width: Py_ssize_t
static PyObject *
unicode_zfill_impl(PyObject *self, Py_ssize_t width)
-/*[clinic end generated code: output=e13fb6bdf8e3b9df input=c6b2f772c6f27799]*/
+/*[clinic end generated code: output=e13fb6bdf8e3b9df input=25a4ee0ea3e58ce0]*/
{
Py_ssize_t fill;
PyObject *u;
}
/*[clinic input]
+@permit_long_summary
@text_signature "($self, prefix[, start[, end]], /)"
str.startswith as unicode_startswith
static PyObject *
unicode_startswith_impl(PyObject *self, PyObject *subobj, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=4bd7cfd0803051d4 input=5f918b5f5f89d856]*/
+/*[clinic end generated code: output=4bd7cfd0803051d4 input=766bdbd33df251dc]*/
{
if (PyTuple_Check(subobj)) {
Py_ssize_t i;
/*[clinic input]
+@permit_long_summary
@text_signature "($self, suffix[, start[, end]], /)"
str.endswith as unicode_endswith
static PyObject *
unicode_endswith_impl(PyObject *self, PyObject *subobj, Py_ssize_t start,
Py_ssize_t end)
-/*[clinic end generated code: output=cce6f8ceb0102ca9 input=00fbdc774a7d4d71]*/
+/*[clinic end generated code: output=cce6f8ceb0102ca9 input=b66bf6d5547ba1aa]*/
{
if (PyTuple_Check(subobj)) {
Py_ssize_t i;
/*[clinic input]
+@permit_long_docstring_body
_wmi.exec_query
query: unicode
static PyObject *
_wmi_exec_query_impl(PyObject *module, PyObject *query)
-/*[clinic end generated code: output=a62303d5bb5e003f input=48d2d0a1e1a7e3c2]*/
+/*[clinic end generated code: output=a62303d5bb5e003f input=621f5c50c56d06d0]*/
/*[clinic end generated code]*/
{
/* Console I/O */
/*[clinic input]
+@permit_long_summary
msvcrt.kbhit -> long
Returns a nonzero value if a keypress is waiting to be read. Otherwise, return 0.
static long
msvcrt_kbhit_impl(PyObject *module)
-/*[clinic end generated code: output=940dfce6587c1890 input=d0f4cb3289ff51e2]*/
+/*[clinic end generated code: output=940dfce6587c1890 input=52c0c44143f3fba5]*/
{
return _kbhit();
}
Internal helper function used by the class statement.");
/*[clinic input]
+@permit_long_docstring_body
__import__ as builtin___import__
name: object
static PyObject *
builtin___import___impl(PyObject *module, PyObject *name, PyObject *globals,
PyObject *locals, PyObject *fromlist, int level)
-/*[clinic end generated code: output=4febeda88a0cd245 input=73f4b960ea5b9dd6]*/
+/*[clinic end generated code: output=4febeda88a0cd245 input=01a3283590eae93a]*/
{
return PyImport_ImportModuleLevelObject(name, globals, locals,
fromlist, level);
/*[clinic input]
+@permit_long_docstring_body
_contextvars.ContextVar.get
default: object = NULL
/
static PyObject *
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value)
-/*[clinic end generated code: output=0746bd0aa2ced7bf input=30aa2ab9e433e401]*/
+/*[clinic end generated code: output=0746bd0aa2ced7bf input=da66664d5d0af4ad]*/
{
if (!PyContextVar_CheckExact(self)) {
PyErr_SetString(
}
/*[clinic input]
+@permit_long_docstring_body
_contextvars.ContextVar.set
value: object
/
static PyObject *
_contextvars_ContextVar_set_impl(PyContextVar *self, PyObject *value)
-/*[clinic end generated code: output=1b562d35cc79c806 input=c0a6887154227453]*/
+/*[clinic end generated code: output=1b562d35cc79c806 input=73ebbbfc7c98f6cd]*/
{
return PyContextVar_Set((PyObject *)self, value);
}
/*[clinic input]
+@permit_long_docstring_body
_contextvars.ContextVar.reset
token: object
/
static PyObject *
_contextvars_ContextVar_reset_impl(PyContextVar *self, PyObject *token)
-/*[clinic end generated code: output=3205d2bdff568521 input=ebe2881e5af4ffda]*/
+/*[clinic end generated code: output=3205d2bdff568521 input=b8bc514a9245242a]*/
{
if (!PyContextToken_CheckExact(token)) {
PyErr_Format(PyExc_TypeError,
}
/*[clinic input]
+@permit_long_docstring_body
_imp.acquire_lock
Acquires the interpreter's import lock for the current thread.
static PyObject *
_imp_acquire_lock_impl(PyObject *module)
-/*[clinic end generated code: output=1aff58cb0ee1b026 input=4a2d4381866d5fdc]*/
+/*[clinic end generated code: output=1aff58cb0ee1b026 input=e1a4ef049d34e7dd]*/
{
PyInterpreterState *interp = _PyInterpreterState_GET();
_PyImport_AcquireLock(interp);
}
/*[clinic input]
+@permit_long_summary
+@permit_long_docstring_body
marshal.dumps
value: object
static PyObject *
marshal_dumps_impl(PyObject *module, PyObject *value, int version,
int allow_code)
-/*[clinic end generated code: output=115f90da518d1d49 input=167eaecceb63f0a8]*/
+/*[clinic end generated code: output=115f90da518d1d49 input=80cd3f30c1637ade]*/
{
return _PyMarshal_WriteObjectToString(value, version, allow_code);
}
}
/*[clinic input]
+@permit_long_summary
sys._settraceallthreads
function as arg: object
static PyObject *
sys__settraceallthreads(PyObject *module, PyObject *arg)
-/*[clinic end generated code: output=161cca30207bf3ca input=d4bde1f810d73675]*/
+/*[clinic end generated code: output=161cca30207bf3ca input=e5750f5dc01142eb]*/
{
PyObject* argument = NULL;
Py_tracefunc func = NULL;
}
/*[clinic input]
+@permit_long_summary
sys._setprofileallthreads
function as arg: object
static PyObject *
sys__setprofileallthreads(PyObject *module, PyObject *arg)
-/*[clinic end generated code: output=2d61319e27b309fe input=a10589439ba20cee]*/
+/*[clinic end generated code: output=2d61319e27b309fe input=9a3dc3352c63b471]*/
{
PyObject* argument = NULL;
Py_tracefunc func = NULL;
}
/*[clinic input]
+@permit_long_summary
sys._current_exceptions
Return a dict mapping each thread's identifier to its current raised exception.
static PyObject *
sys__current_exceptions_impl(PyObject *module)
-/*[clinic end generated code: output=2ccfd838c746f0ba input=0e91818fbf2edc1f]*/
+/*[clinic end generated code: output=2ccfd838c746f0ba input=4ba429b6cfcd736d]*/
{
return _PyThread_CurrentExceptions();
}
}
/*[clinic input]
+@permit_long_docstring_body
sys._stats_dump -> bool
Dump stats to file, and clears the stats.
static int
sys__stats_dump_impl(PyObject *module)
-/*[clinic end generated code: output=6e346b4ba0de4489 input=31a489e39418b2a5]*/
+/*[clinic end generated code: output=6e346b4ba0de4489 input=5a3ab40d2fb5af47]*/
{
int res = _Py_PrintSpecializationStats(1);
_Py_StatsClear();
PyDoc_STRVAR(_jit_doc, "Utilities for observing just-in-time compilation.");
/*[clinic input]
+@permit_long_summary
_jit.is_available -> bool
Return True if the current Python executable supports JIT compilation, and False otherwise.
[clinic start generated code]*/
static int
_jit_is_available_impl(PyObject *module)
-/*[clinic end generated code: output=6849a9cd2ff4aac9 input=03add84aa8347cf1]*/
+/*[clinic end generated code: output=6849a9cd2ff4aac9 input=d009d751ae64c9ef]*/
{
(void)module;
#ifdef _Py_TIER2
}
/*[clinic input]
+@permit_long_summary
_jit.is_enabled -> bool
Return True if JIT compilation is enabled for the current Python process (implies sys._jit.is_available()), and False otherwise.
[clinic start generated code]*/
static int
_jit_is_enabled_impl(PyObject *module)
-/*[clinic end generated code: output=55865f8de993fe42 input=02439394da8e873f]*/
+/*[clinic end generated code: output=55865f8de993fe42 input=0524151e857f4f3a]*/
{
(void)module;
return _PyInterpreterState_GET()->jit;
}
/*[clinic input]
+@permit_long_summary
_jit.is_active -> bool
Return True if the topmost Python frame is currently executing JIT code (implies sys._jit.is_enabled()), and False otherwise.
[clinic start generated code]*/
static int
_jit_is_active_impl(PyObject *module)
-/*[clinic end generated code: output=7facca06b10064d4 input=be2fcd8a269d9b72]*/
+/*[clinic end generated code: output=7facca06b10064d4 input=081ee32563dc2086]*/
{
(void)module;
return _PyThreadState_GET()->current_executor != NULL;
+++ /dev/null
-OVERLONG_SUMMARY = frozenset((
- # Lib/test/
- 'test_preprocessor_guarded_if_e_or_f',
-
- # Modules/
- '_abc._abc_init',
- '_abc._abc_instancecheck',
- '_abc._abc_register',
- '_abc._abc_subclasscheck',
- '_codecs.lookup',
- '_ctypes.byref',
- '_curses.can_change_color',
- '_curses.is_term_resized',
- '_curses.mousemask',
- '_curses.reset_prog_mode',
- '_curses.reset_shell_mode',
- '_curses.termname',
- '_curses.window.enclose',
- '_functools.reduce',
- '_gdbm.gdbm.setdefault',
- '_hashlib.HMAC.hexdigest',
- '_hashlib.openssl_shake_128',
- '_hashlib.openssl_shake_256',
- '_hashlib.pbkdf2_hmac',
- '_hmac.HMAC.hexdigest',
- '_interpreters.is_shareable',
- '_io._BufferedIOBase.read1',
- '_lzma._decode_filter_properties',
- '_remote_debugging.RemoteUnwinder.__init__',
- '_remote_debugging.RemoteUnwinder.get_all_awaited_by',
- '_remote_debugging.RemoteUnwinder.get_async_stack_trace',
- '_socket.inet_aton',
- '_sre.SRE_Match.expand',
- '_sre.SRE_Match.groupdict',
- '_sre.SRE_Pattern.finditer',
- '_sre.SRE_Pattern.search',
- '_sre.SRE_Pattern.sub',
- '_sre.SRE_Pattern.subn',
- '_ssl._SSLContext.sni_callback',
- '_ssl._SSLSocket.pending',
- '_ssl._SSLSocket.sendfile',
- '_ssl.get_default_verify_paths',
- '_ssl.RAND_status',
- '_sysconfig.config_vars',
- '_testcapi.make_exception_with_doc',
- '_testcapi.VectorCallClass.set_vectorcall',
- '_tkinter.getbusywaitinterval',
- '_tkinter.setbusywaitinterval',
- '_tracemalloc.reset_peak',
- '_zstd.get_frame_size',
- '_zstd.set_parameter_types',
- '_zstd.ZstdDecompressor.decompress',
- 'array.array.buffer_info',
- 'array.array.frombytes',
- 'array.array.fromfile',
- 'array.array.tobytes',
- 'cmath.isfinite',
- 'datetime.datetime.strptime',
- 'gc.get_objects',
- 'itertools.chain.from_iterable',
- 'itertools.combinations_with_replacement.__new__',
- 'itertools.cycle.__new__',
- 'itertools.starmap.__new__',
- 'itertools.takewhile.__new__',
- 'math.comb',
- 'math.perm',
- 'os.getresgid',
- 'os.lstat',
- 'os.pread',
- 'os.pwritev',
- 'os.sched_getaffinity',
- 'os.sched_rr_get_interval',
- 'os.timerfd_gettime',
- 'os.timerfd_gettime_ns',
- 'os.urandom',
- 'os.WIFEXITED',
- 'os.WTERMSIG',
- 'pwd.getpwall',
- 'pyexpat.xmlparser.ExternalEntityParserCreate',
- 'pyexpat.xmlparser.GetReparseDeferralEnabled',
- 'pyexpat.xmlparser.SetParamEntityParsing',
- 'pyexpat.xmlparser.UseForeignDTD',
- 'readline.redisplay',
- 'signal.set_wakeup_fd',
- 'unicodedata.UCD.combining',
- 'unicodedata.UCD.decomposition',
- 'zoneinfo.ZoneInfo.dst',
- 'zoneinfo.ZoneInfo.tzname',
- 'zoneinfo.ZoneInfo.utcoffset',
-
- # Objects/
- 'B.zfill',
- 'bytearray.count',
- 'bytearray.endswith',
- 'bytearray.extend',
- 'bytearray.find',
- 'bytearray.index',
- 'bytearray.maketrans',
- 'bytearray.rfind',
- 'bytearray.rindex',
- 'bytearray.rsplit',
- 'bytearray.split',
- 'bytearray.splitlines',
- 'bytearray.startswith',
- 'bytes.count',
- 'bytes.endswith',
- 'bytes.find',
- 'bytes.index',
- 'bytes.maketrans',
- 'bytes.rfind',
- 'bytes.rindex',
- 'bytes.startswith',
- 'code.replace',
- 'complex.conjugate',
- 'dict.pop',
- 'float.as_integer_ratio',
- 'frame.f_trace',
- 'int.bit_count',
- 'OrderedDict.fromkeys',
- 'OrderedDict.pop',
- 'set.symmetric_difference_update',
- 'str.count',
- 'str.endswith',
- 'str.find',
- 'str.index',
- 'str.isprintable',
- 'str.rfind',
- 'str.rindex',
- 'str.rsplit',
- 'str.split',
- 'str.startswith',
- 'str.strip',
- 'str.swapcase',
- 'str.zfill',
-
- # PC/
- 'msvcrt.kbhit',
-
- # Python/
- '_jit.is_active',
- '_jit.is_available',
- '_jit.is_enabled',
- 'marshal.dumps',
- 'sys._current_exceptions',
- 'sys._setprofileallthreads',
- 'sys._settraceallthreads',
-))
-
-OVERLONG_BODY = frozenset((
- # Modules/
- '_bz2.BZ2Decompressor.decompress',
- '_curses.color_content',
- '_curses.flash',
- '_curses.longname',
- '_curses.resize_term',
- '_curses.use_env',
- '_curses.window.border',
- '_curses.window.derwin',
- '_curses.window.getch',
- '_curses.window.getkey',
- '_curses.window.inch',
- '_curses.window.insch',
- '_curses.window.insnstr',
- '_curses.window.is_linetouched',
- '_curses.window.noutrefresh',
- '_curses.window.overlay',
- '_curses.window.overwrite',
- '_curses.window.refresh',
- '_curses.window.scroll',
- '_curses.window.subwin',
- '_curses.window.touchline',
- '_curses_panel.panel.hide',
- '_functools.reduce',
- '_hashlib.HMAC.hexdigest',
- '_hmac.HMAC.hexdigest',
- '_interpreters.capture_exception',
- '_io._IOBase.seek',
- '_io._TextIOBase.detach',
- '_io.FileIO.read',
- '_io.FileIO.readall',
- '_io.FileIO.seek',
- '_io.open',
- '_io.open_code',
- '_lzma.LZMADecompressor.decompress',
- '_multibytecodec.MultibyteCodec.decode',
- '_multibytecodec.MultibyteCodec.encode',
- '_posixsubprocess.fork_exec',
- '_remote_debugging.RemoteUnwinder.__init__',
- '_remote_debugging.RemoteUnwinder.get_all_awaited_by',
- '_remote_debugging.RemoteUnwinder.get_async_stack_trace',
- '_remote_debugging.RemoteUnwinder.get_stack_trace',
- '_socket.socket.send',
- '_sqlite3.Blob.read',
- '_sqlite3.Blob.seek',
- '_sqlite3.Blob.write',
- '_sqlite3.Connection.deserialize',
- '_sqlite3.Connection.serialize',
- '_sqlite3.Connection.set_progress_handler',
- '_sqlite3.Connection.setlimit',
- '_ssl._SSLContext.sni_callback',
- '_ssl._SSLSocket.context',
- '_ssl._SSLSocket.get_channel_binding',
- '_ssl._SSLSocket.sendfile',
- '_tkinter.setbusywaitinterval',
- '_zstd.ZstdCompressor.compress',
- '_zstd.ZstdCompressor.flush',
- '_zstd.ZstdCompressor.set_pledged_input_size',
- '_zstd.ZstdDecompressor.__new__',
- '_zstd.ZstdDecompressor.decompress',
- '_zstd.ZstdDecompressor.unused_data',
- '_zstd.ZstdDict.__new__',
- '_zstd.ZstdDict.as_digested_dict',
- '_zstd.ZstdDict.as_prefix',
- '_zstd.ZstdDict.as_undigested_dict',
- 'array.array.byteswap',
- 'array.array.fromunicode',
- 'array.array.tounicode',
- 'binascii.a2b_base64',
- 'cmath.isclose',
- 'datetime.date.fromtimestamp',
- 'datetime.datetime.fromtimestamp',
- 'datetime.time.strftime',
- 'fcntl.ioctl',
- 'fcntl.lockf',
- 'gc.freeze',
- 'itertools.combinations_with_replacement.__new__',
- 'math.nextafter',
- 'os.fspath',
- 'os.link',
- 'os.listdir',
- 'os.listxattr',
- 'os.lseek',
- 'os.mknod',
- 'os.preadv',
- 'os.pwritev',
- 'os.readinto',
- 'os.rename',
- 'os.replace',
- 'os.setxattr',
- 'pyexpat.xmlparser.GetInputContext',
- 'pyexpat.xmlparser.UseForeignDTD',
- 'select.devpoll',
- 'select.poll',
- 'select.select',
- 'signal.setitimer',
- 'signal.signal',
- 'termios.tcsetwinsize',
- 'zlib.Decompress.decompress',
- 'zlib.ZlibDecompressor.decompress',
-
- # Objects/
- 'bytearray.maketrans',
- 'bytearray.partition',
- 'bytearray.replace',
- 'bytearray.rpartition',
- 'bytearray.rsplit',
- 'bytearray.splitlines',
- 'bytearray.strip',
- 'bytes.maketrans',
- 'bytes.partition',
- 'bytes.replace',
- 'bytes.rpartition',
- 'bytes.rsplit',
- 'bytes.splitlines',
- 'bytes.strip',
- 'float.__getformat__',
- 'list.sort',
- 'memoryview.tobytes',
- 'str.capitalize',
- 'str.isalnum',
- 'str.isalpha',
- 'str.isdecimal',
- 'str.isdigit',
- 'str.isidentifier',
- 'str.islower',
- 'str.isnumeric',
- 'str.isspace',
- 'str.isupper',
- 'str.join',
- 'str.partition',
- 'str.removeprefix',
- 'str.replace',
- 'str.rpartition',
- 'str.splitlines',
- 'str.title',
- 'str.translate',
-
- # PC/
- '_wmi.exec_query',
-
- # Python/
- '__import__',
- '_contextvars.ContextVar.get',
- '_contextvars.ContextVar.reset',
- '_contextvars.ContextVar.set',
- '_imp.acquire_lock',
- 'marshal.dumps',
- 'sys._stats_dump',
-))
from libclinic import (
ClinicError, VersionTuple,
fail, warn, unspecified, unknown, NULL)
-from libclinic._overlong_docstrings import OVERLONG_SUMMARY, OVERLONG_BODY
from libclinic.function import (
Module, Class, Function, Parameter,
FunctionKind,
target_critical_section: list[str]
disable_fastcall: bool
from_version_re = re.compile(r'([*/]) +\[from +(.+)\]')
+ permit_long_summary = False
+ permit_long_docstring_body = False
def __init__(self, clinic: Clinic) -> None:
self.clinic = clinic
self.critical_section = False
self.target_critical_section = []
self.disable_fastcall = False
+ self.permit_long_summary = False
+ self.permit_long_docstring_body = False
def directive_module(self, name: str) -> None:
fields = name.split('.')[:-1]
fail("Called @text_signature twice!")
self.forced_text_signature = text_signature
+ def at_permit_long_summary(self) -> None:
+ if self.permit_long_summary:
+ fail("Called @permit_long_summary twice!")
+ self.permit_long_summary = True
+
+ def at_permit_long_docstring_body(self) -> None:
+ if self.permit_long_docstring_body:
+ fail("Called @permit_long_docstring_body twice!")
+ self.permit_long_docstring_body = True
+
def parse(self, block: Block) -> None:
self.reset()
self.block = block
summary_len = len(lines[0])
max_body = max(map(len, lines[1:]))
if summary_len > max_width:
- if f.full_name not in OVERLONG_SUMMARY:
+ if not self.permit_long_summary:
fail(f"Summary line for {f.full_name!r} is too long!\n"
f"The summary line must be no longer than {max_width} characters.")
else:
- if f.full_name in OVERLONG_SUMMARY:
- warn(f"Remove {f.full_name!r} from OVERLONG_SUMMARY!\n")
+ if self.permit_long_summary:
+ warn("Remove the @permit_long_summary decorator from "
+ f"{f.full_name!r}!\n")
if max_body > max_width:
- if f.full_name not in OVERLONG_BODY:
+ if not self.permit_long_docstring_body:
warn(f"Docstring lines for {f.full_name!r} are too long!\n"
f"Lines should be no longer than {max_width} characters.")
else:
- if f.full_name in OVERLONG_BODY:
- warn(f"Remove {f.full_name!r} from OVERLONG_BODY!\n")
+ if self.permit_long_docstring_body:
+ warn("Remove the @permit_long_docstring_body decorator from "
+ f"{f.full_name!r}!\n")
parameters_marker_count = len(f.docstring.split('{parameters}')) - 1
if parameters_marker_count > 1: