summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_lzmamodule.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/_lzmamodule.c.h')
-rw-r--r--Modules/clinic/_lzmamodule.c.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h
index 46d2988..aeb98a6 100644
--- a/Modules/clinic/_lzmamodule.c.h
+++ b/Modules/clinic/_lzmamodule.c.h
@@ -29,7 +29,7 @@ _lzma_LZMACompressor_compress(Compressor *self, PyObject *arg)
goto exit;
}
if (!PyBuffer_IsContiguous(&data, 'C')) {
- _PyArg_BadArgument("compress", "contiguous buffer", arg);
+ _PyArg_BadArgument("compress", 0, "contiguous buffer", arg);
goto exit;
}
return_value = _lzma_LZMACompressor_compress_impl(self, &data);
@@ -252,8 +252,17 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *const *args, Py_ssiz
lzma_vli filter_id;
Py_buffer encoded_props = {NULL, NULL};
- if (!_PyArg_ParseStack(args, nargs, "O&y*:_decode_filter_properties",
- lzma_vli_converter, &filter_id, &encoded_props)) {
+ if (!_PyArg_CheckPositional("_decode_filter_properties", nargs, 2, 2)) {
+ goto exit;
+ }
+ if (!lzma_vli_converter(args[0], &filter_id)) {
+ goto exit;
+ }
+ if (PyObject_GetBuffer(args[1], &encoded_props, PyBUF_SIMPLE) != 0) {
+ goto exit;
+ }
+ if (!PyBuffer_IsContiguous(&encoded_props, 'C')) {
+ _PyArg_BadArgument("_decode_filter_properties", 2, "contiguous buffer", args[1]);
goto exit;
}
return_value = _lzma__decode_filter_properties_impl(module, filter_id, &encoded_props);
@@ -266,4 +275,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=df061bfc2067a90a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=47e4732df79509ad input=a9049054013a1b77]*/