if (!PyBuffer_IsContiguous(&dest, 'C') || dest.ndim > 1) {
PyErr_SetString(PyExc_ValueError,
"destination buffer should be contiguous and have at most one dimension");
goto finally;
}
In PyArg_ParseTuple*() functions, the first condition has been checked.
w*:
https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L1251
y*:
https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L857
https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L1306
The second condition is rare, even in Python's Argument Clinic, it is not checked for bytes-like object:
https://github.com/python/cpython/blob/3.9/Modules/clinic/_lzmamodule.c.h#L28-L34
In
PyArg_ParseTuple*()functions, the first condition has been checked.w*:https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L1251
y*:https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L857
https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L1306
The second condition is rare, even in Python's Argument Clinic, it is not checked for bytes-like object:
https://github.com/python/cpython/blob/3.9/Modules/clinic/_lzmamodule.c.h#L28-L34