diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-05-18 16:13:26 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-18 17:52:31 +0300 |
commit | b2ada6f3ec64dc97e7facdc32d99fbe7b76e0982 (patch) | |
tree | 7b037b37c7244de4a3e5c19041a30ef8dd2fa1f4 | |
parent | 2bb6c9fbd2e2dac0b266b6762401db142fe47475 (diff) |
py: Rename pyxyz to py_xyz
Having the underscore makes the names more readable, especially when
there are multiple words in the name.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | src/py/libcamera/meson.build | 10 | ||||
-rw-r--r-- | src/py/libcamera/py_enums.cpp (renamed from src/py/libcamera/pyenums.cpp) | 2 | ||||
-rw-r--r-- | src/py/libcamera/py_enums_generated.cpp.in (renamed from src/py/libcamera/pyenums_generated.cpp.in) | 2 | ||||
-rw-r--r-- | src/py/libcamera/py_geometry.cpp (renamed from src/py/libcamera/pygeometry.cpp) | 2 | ||||
-rw-r--r-- | src/py/libcamera/py_main.cpp (renamed from src/py/libcamera/pymain.cpp) | 12 |
5 files changed, 14 insertions, 14 deletions
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 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_<StreamRole>(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 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 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_<Point>(m, "Point"); auto pySize = py::class_<Size>(m, "Size"); diff --git a/src/py/libcamera/pymain.cpp b/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 */ |