From 6611f81452039a1bb5332aa7807b892fdb41aaab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Ma=C5=82kowski?= Date: Tue, 16 Apr 2024 10:32:38 +0200 Subject: [PATCH] Fix compatibility with python>3.9 --- v4l2capture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v4l2capture.c b/v4l2capture.c index 0b266aa..63d66b9 100644 --- a/v4l2capture.c +++ b/v4l2capture.c @@ -9,6 +9,7 @@ // purpose, without any conditions, unless such conditions are // required by law. +#define PY_SSIZE_T_CLEAN #define USE_LIBV4L #include @@ -223,7 +224,7 @@ static PyObject *Video_device_set_format(Video_device *self, PyObject *args, PyO int yuv420 = 0; int fourcc; const char *fourcc_str; - int fourcc_len = 0; + Py_ssize_t fourcc_len = 0; static char *kwlist [] = { "size_x", "size_y",