[{"id":23090,"web_url":"https://patchwork.libcamera.org/comment/23090/","msgid":"<YoYhc7AAfgohgBq1@pendragon.ideasonboard.com>","date":"2022-05-19T10:52:35","subject":"Re: [libcamera-devel] [PATCH 5/5] py: Fix None value in ControlType\n\tenum","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Tomi,\n\nThank you for the patch.\n\nOn Thu, May 19, 2022 at 01:33:47PM +0300, Tomi Valkeinen wrote:\n> \"None\" is not a valid name for an enum value, so change it to \"Null\".\n\nIf only all programming languages had the same reserved keywords :-)\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n> ---\n>  src/py/libcamera/py_enums.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/py/libcamera/py_enums.cpp b/src/py/libcamera/py_enums.cpp\n> index e55318f1..96d4beef 100644\n> --- a/src/py/libcamera/py_enums.cpp\n> +++ b/src/py/libcamera/py_enums.cpp\n> @@ -22,7 +22,7 @@ void init_py_enums(py::module &m)\n>  \t\t.value(\"Viewfinder\", StreamRole::Viewfinder);\n>  \n>  \tpy::enum_<ControlType>(m, \"ControlType\")\n> -\t\t.value(\"None\", ControlType::ControlTypeNone)\n> +\t\t.value(\"Null\", ControlType::ControlTypeNone)\n>  \t\t.value(\"Bool\", ControlType::ControlTypeBool)\n>  \t\t.value(\"Byte\", ControlType::ControlTypeByte)\n>  \t\t.value(\"Integer32\", ControlType::ControlTypeInteger32)","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BA569C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 May 2022 10:52:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7BA8665665;\n\tThu, 19 May 2022 12:52:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A3A8060420\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 May 2022 12:52:41 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [45.131.31.124])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3D76CA16;\n\tThu, 19 May 2022 12:52:41 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652957563;\n\tbh=/v6X0VkF0vaMxNsmLzPIYLkY1FHvVT1xnRp0tX8sKm4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=nYR+4yTQnQM1zDWi03n6L2a9HdAS3dNzxagRbzYO/ekwaQK1J4gdunGOJfM4Vw+Mm\n\ti8uzabdtEBOWnhEQ3+cOwj2qotPFkvrsVw4alIib6u+F3Wib/tv+Zvk3YRi4oSvW91\n\tkmL8uM876elNCIiqh9ZC0L5YPswN8cUSA1rJHF/CjO/k5nB2XCpmI9wDexwvGWdchP\n\tYE/uHXU+M/dOWz4sJIiVDG+muZn3qYecDNTrrr8PRNhF0qS4CRm8Ggo9L1uUBM6NDy\n\t6/w9c0ohTYenTiaC4VpRcIQPQMvG9x6i2cBSMXczcPyaRnP5e9AxjDU51DO6dKCB2U\n\tiPlSv9xov3VHw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652957561;\n\tbh=/v6X0VkF0vaMxNsmLzPIYLkY1FHvVT1xnRp0tX8sKm4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=hvelB+0XtgaGSey4w3qhyrL0l94AKIBQNO6vPYmp4+hrzOjwEzypRc8KtLYBPS+Ac\n\trAeUSg/b1fX8i+oBOK12/c9wqk8qEpTFXgtqyjxRWvSCU1xg7pdXNsvD4Gq9hI/N0X\n\tbBwyDetFnI1PMBxSGZ+dAD+cuRgzDonu9bA8QiQ0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"hvelB+0X\"; dkim-atps=neutral","Date":"Thu, 19 May 2022 13:52:35 +0300","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Message-ID":"<YoYhc7AAfgohgBq1@pendragon.ideasonboard.com>","References":"<20220519103347.33295-1-tomi.valkeinen@ideasonboard.com>\n\t<20220519103347.33295-6-tomi.valkeinen@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220519103347.33295-6-tomi.valkeinen@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 5/5] py: Fix None value in ControlType\n\tenum","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]