From patchwork Wed May 18 13:13:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15965 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 693E1C3274 for ; Wed, 18 May 2022 13:14:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F1A206567D; Wed, 18 May 2022 15:14:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652879649; bh=ADJ4CtCHm4hVdF+HGnyBnjk6Sdw3ATPP2dpWo/YuFjU=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=GkwwlIVv6FRAn+FlUrBfZ9zKH9c+rmDp5Yhkctrt4mEkmw6l9wY1ow/qzXa9Ph84U YK/00R0tBiLAuiUZDu2fBOYf/7D/RnCUqKTHRrexHRxEXvdqi2QeZ/yDNJrd1UezCO 2SV2zlJgs7VtYH4nhj3fWNHDyQUmKrSAhyzJAZ5z+pOi/6y8kILc0hUP9HWqWjip8X 4cQyKTiXk0+RGnJwykD1cGjDOhSg376kMcGq7AbBzZCqNsv90sWQo04pV5Bg17bVYa yXz/kNCcbj8hJiVk8BBImmYvsUAmkkTo9gjWrjgoUhXNyMY/XkGpUMl9j7a2J+iJLk BuAX+tFNvOz1Q== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1F6A065675 for ; Wed, 18 May 2022 15:13:54 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eVB6BNt4"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D4D82FE3; Wed, 18 May 2022 15:13:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652879633; bh=ADJ4CtCHm4hVdF+HGnyBnjk6Sdw3ATPP2dpWo/YuFjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eVB6BNt4ODx5ZitRdKyVgQAB1vyMZnJ6+mmeAcebsVu4gihDCRw75dGiZOEiKsvJm Grgyik+KQC37PhZVl3GXI0ae62U9Y/peNBPDd0kLlugJY6BFN0BeNzRI+ZqpzaCKck KDKccOHEUbuFl1B32mz7+TWaujELHTDF9yPjrmYI= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Wed, 18 May 2022 16:13:26 +0300 Message-Id: <20220518131329.66994-16-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220518131329.66994-1-tomi.valkeinen@ideasonboard.com> References: <20220518131329.66994-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 15/18] py: rename pyxyz to py_xyz X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Having the underscore makes the names more readable, especially when there are multiple words in the name. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/py/libcamera/meson.build | 10 +++++----- src/py/libcamera/{pyenums.cpp => py_enums.cpp} | 2 +- ...ms_generated.cpp.in => py_enums_generated.cpp.in} | 2 +- src/py/libcamera/{pygeometry.cpp => py_geometry.cpp} | 2 +- src/py/libcamera/{pymain.cpp => py_main.cpp} | 12 ++++++------ 5 files changed, 14 insertions(+), 14 deletions(-) rename src/py/libcamera/{pyenums.cpp => py_enums.cpp} (96%) rename src/py/libcamera/{pyenums_generated.cpp.in => py_enums_generated.cpp.in} (89%) rename src/py/libcamera/{pygeometry.cpp => py_geometry.cpp} (99%) rename src/py/libcamera/{pymain.cpp => py_main.cpp} (99%) diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build index de66bb48..55957252 100644 --- a/src/py/libcamera/meson.build +++ b/src/py/libcamera/meson.build @@ -13,21 +13,21 @@ pybind11_proj = subproject('pybind11') pybind11_dep = pybind11_proj.get_variable('pybind11_dep') pycamera_sources = files([ - 'pyenums.cpp', - 'pygeometry.cpp', - 'pymain.cpp', + 'py_enums.cpp', + 'py_geometry.cpp', + 'py_main.cpp', ]) gen_input_files = files([ '../../libcamera/control_ids.yaml', - 'pyenums_generated.cpp.in', + 'py_enums_generated.cpp.in', ]) gen_py_control_enums = files('gen-py-control-enums.py') generated_sources = custom_target('py_gen_controls', input : gen_input_files, - output : ['pyenums_generated.cpp'], + output : ['py_enums_generated.cpp'], command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@']) pycamera_sources += generated_sources diff --git a/src/py/libcamera/pyenums.cpp b/src/py/libcamera/py_enums.cpp similarity index 96% rename from src/py/libcamera/pyenums.cpp rename to src/py/libcamera/py_enums.cpp index b655e622..e55318f1 100644 --- a/src/py/libcamera/pyenums.cpp +++ b/src/py/libcamera/py_enums.cpp @@ -13,7 +13,7 @@ namespace py = pybind11; using namespace libcamera; -void init_pyenums(py::module &m) +void init_py_enums(py::module &m) { py::enum_(m, "StreamRole") .value("StillCapture", StreamRole::StillCapture) diff --git a/src/py/libcamera/pyenums_generated.cpp.in b/src/py/libcamera/py_enums_generated.cpp.in similarity index 89% rename from src/py/libcamera/pyenums_generated.cpp.in rename to src/py/libcamera/py_enums_generated.cpp.in index 6aaf4795..20e07528 100644 --- a/src/py/libcamera/pyenums_generated.cpp.in +++ b/src/py/libcamera/py_enums_generated.cpp.in @@ -15,7 +15,7 @@ namespace py = pybind11; using namespace libcamera; -void init_pyenums_generated(py::module& m) +void init_py_enums_generated(py::module& m) { ${enums} } diff --git a/src/py/libcamera/pygeometry.cpp b/src/py/libcamera/py_geometry.cpp similarity index 99% rename from src/py/libcamera/pygeometry.cpp rename to src/py/libcamera/py_geometry.cpp index d77de144..84b0cb08 100644 --- a/src/py/libcamera/pygeometry.cpp +++ b/src/py/libcamera/py_geometry.cpp @@ -18,7 +18,7 @@ namespace py = pybind11; using namespace libcamera; -void init_pygeometry(py::module &m) +void init_py_geometry(py::module &m) { auto pyPoint = py::class_(m, "Point"); auto pySize = py::class_(m, "Size"); diff --git a/src/py/libcamera/pymain.cpp b/src/py/libcamera/py_main.cpp similarity index 99% rename from src/py/libcamera/pymain.cpp rename to src/py/libcamera/py_main.cpp index ef3f157a..b05bbb22 100644 --- a/src/py/libcamera/pymain.cpp +++ b/src/py/libcamera/py_main.cpp @@ -130,15 +130,15 @@ static void handleRequestCompleted(Request *req) LOG(Fatal) << "Unable to write to eventfd"; } -void init_pyenums(py::module &m); -void init_pyenums_generated(py::module &m); -void init_pygeometry(py::module &m); +void init_py_enums(py::module &m); +void init_py_enums_generated(py::module &m); +void init_py_geometry(py::module &m); PYBIND11_MODULE(_libcamera, m) { - init_pyenums(m); - init_pyenums_generated(m); - init_pygeometry(m); + init_py_enums(m); + init_py_enums_generated(m); + init_py_geometry(m); /* Forward declarations */