Show a patch.

GET /api/patches/22743/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 22743,
    "url": "https://patchwork.libcamera.org/api/patches/22743/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22743/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20250206141018.236272-3-stefan.klug@ideasonboard.com>",
    "date": "2025-02-06T14:10:09",
    "name": "[2/4] libcamera: Adapt Vector class to new location",
    "commit_ref": "cfd94e5f854431a1575f52cee779eb8299267485",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "248f1f57ca35332a6afbcddb8c7c93be288553ae",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22743/mbox/",
    "series": [
        {
            "id": 4992,
            "url": "https://patchwork.libcamera.org/api/series/4992/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4992",
            "date": "2025-02-06T14:10:07",
            "name": "Move Vector class from libipa to libcamera",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4992/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22743/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22743/checks/",
    "tags": {},
    "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 827D6C32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 Feb 2025 14:10:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 301DD685EA;\n\tThu,  6 Feb 2025 15:10:31 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 21AA2685E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Feb 2025 15:10:28 +0100 (CET)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:6b7d:6f52:efbb:46c8])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8CEBF1193;\n\tThu,  6 Feb 2025 15:09:14 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"noLBplBo\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1738850954;\n\tbh=+FW104UwTZQHeTfkauhTqhUeQSQHwC3w8z/tDG1PYYk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=noLBplBoEIU4GTigrYZPLo6a4SVCdLqEuaRt7XQzRNWY+6lL0B/u5Mtf8i4157nlP\n\tCbBxxUesRXjg9ljOuet9G0nsGn84G0dHhrHneGHlbQ4WWPYCeYUzZZkJOD/EL+Pq8C\n\tD5Ye4oFOqijIXW/rU4Z8Y6uWnJwsl3fMtHS4kXXk=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "Subject": "[PATCH 2/4] libcamera: Adapt Vector class to new location",
        "Date": "Thu,  6 Feb 2025 15:10:09 +0100",
        "Message-ID": "<20250206141018.236272-3-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250206141018.236272-1-stefan.klug@ideasonboard.com>",
        "References": "<20250206141018.236272-1-stefan.klug@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Change the namespace of the Vector class from libipa to libcamera and\nadd it to the build.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n include/libcamera/internal/meson.build |  1 +\n include/libcamera/internal/vector.h    | 14 +++++---------\n src/libcamera/meson.build              |  1 +\n src/libcamera/vector.cpp               |  6 +-----\n test/meson.build                       |  1 +\n test/vector.cpp                        |  4 ++--\n 6 files changed, 11 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\nindex 7d6aa8b72bd7..45408b313848 100644\n--- a/include/libcamera/internal/meson.build\n+++ b/include/libcamera/internal/meson.build\n@@ -43,6 +43,7 @@ libcamera_internal_headers = files([\n     'v4l2_pixelformat.h',\n     'v4l2_subdevice.h',\n     'v4l2_videodevice.h',\n+    'vector.h',\n     'yaml_parser.h',\n ])\n \ndiff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h\nindex fe33c9d6fbd1..a67a09474204 100644\n--- a/include/libcamera/internal/vector.h\n+++ b/include/libcamera/internal/vector.h\n@@ -24,8 +24,6 @@ namespace libcamera {\n \n LOG_DECLARE_CATEGORY(Vector)\n \n-namespace ipa {\n-\n #ifndef __DOXYGEN__\n template<typename T, unsigned int Rows,\n \t std::enable_if_t<std::is_arithmetic_v<T>> * = nullptr>\n@@ -329,11 +327,9 @@ bool operator!=(const Vector<T, Rows> &lhs, const Vector<T, Rows> &rhs)\n bool vectorValidateYaml(const YamlObject &obj, unsigned int size);\n #endif /* __DOXYGEN__ */\n \n-} /* namespace ipa */\n-\n #ifndef __DOXYGEN__\n template<typename T, unsigned int Rows>\n-std::ostream &operator<<(std::ostream &out, const ipa::Vector<T, Rows> &v)\n+std::ostream &operator<<(std::ostream &out, const Vector<T, Rows> &v)\n {\n \tout << \"Vector { \";\n \tfor (unsigned int i = 0; i < Rows; i++) {\n@@ -346,13 +342,13 @@ std::ostream &operator<<(std::ostream &out, const ipa::Vector<T, Rows> &v)\n }\n \n template<typename T, unsigned int Rows>\n-struct YamlObject::Getter<ipa::Vector<T, Rows>> {\n-\tstd::optional<ipa::Vector<T, Rows>> get(const YamlObject &obj) const\n+struct YamlObject::Getter<Vector<T, Rows>> {\n+\tstd::optional<Vector<T, Rows>> get(const YamlObject &obj) const\n \t{\n-\t\tif (!ipa::vectorValidateYaml(obj, Rows))\n+\t\tif (!vectorValidateYaml(obj, Rows))\n \t\t\treturn std::nullopt;\n \n-\t\tipa::Vector<T, Rows> vector;\n+\t\tVector<T, Rows> vector;\n \n \t\tunsigned int i = 0;\n \t\tfor (const YamlObject &entry : obj.asList()) {\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 57fde8a8fab0..de22b8e60dde 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -53,6 +53,7 @@ libcamera_internal_sources = files([\n     'v4l2_pixelformat.cpp',\n     'v4l2_subdevice.cpp',\n     'v4l2_videodevice.cpp',\n+    'vector.cpp',\n     'yaml_parser.cpp',\n ])\n \ndiff --git a/src/libcamera/vector.cpp b/src/libcamera/vector.cpp\nindex 8019f8cfdc85..85ca2208245a 100644\n--- a/src/libcamera/vector.cpp\n+++ b/src/libcamera/vector.cpp\n@@ -5,7 +5,7 @@\n  * Vector and related operations\n  */\n \n-#include \"vector.h\"\n+#include \"libcamera/internal/vector.h\"\n \n #include <libcamera/base/log.h>\n \n@@ -18,8 +18,6 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(Vector)\n \n-namespace ipa {\n-\n /**\n  * \\class Vector\n  * \\brief Vector class\n@@ -346,6 +344,4 @@ bool vectorValidateYaml(const YamlObject &obj, unsigned int size)\n }\n #endif /* __DOXYGEN__ */\n \n-} /* namespace ipa */\n-\n } /* namespace libcamera */\ndiff --git a/test/meson.build b/test/meson.build\nindex 5ed052ed62c8..4095664994fd 100644\n--- a/test/meson.build\n+++ b/test/meson.build\n@@ -73,6 +73,7 @@ internal_tests = [\n     {'name': 'timer-thread', 'sources': ['timer-thread.cpp']},\n     {'name': 'unique-fd', 'sources': ['unique-fd.cpp']},\n     {'name': 'utils', 'sources': ['utils.cpp']},\n+    {'name': 'vector', 'sources': ['vector.cpp']},\n     {'name': 'yaml-parser', 'sources': ['yaml-parser.cpp']},\n ]\n \ndiff --git a/test/vector.cpp b/test/vector.cpp\nindex 8e4ec77d7820..4fae960defc1 100644\n--- a/test/vector.cpp\n+++ b/test/vector.cpp\n@@ -5,14 +5,14 @@\n  * Vector tests\n  */\n \n-#include \"../src/ipa/libipa/vector.h\"\n+#include \"libcamera/internal/vector.h\"\n \n #include <cmath>\n #include <iostream>\n \n #include \"test.h\"\n \n-using namespace libcamera::ipa;\n+using namespace libcamera;\n \n #define ASSERT_EQ(a, b)\t\t\t\t\t\t\t\\\n if ((a) != (b)) {\t\t\t\t\t\t\t\\\n",
    "prefixes": [
        "2/4"
    ]
}