Show a patch.

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

{
    "id": 17187,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17187/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17187/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20220823174314.14881-2-laurent.pinchart@ideasonboard.com>",
    "date": "2022-08-23T17:43:09",
    "name": "[libcamera-devel,1/6] utils: Satisfy LegacyInputIterator with StringSplitter::iterator",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d7746da6d511d088886606f54088c5084cb588f0",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17187/mbox/",
    "series": [
        {
            "id": 3432,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3432/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3432",
            "date": "2022-08-23T17:43:08",
            "name": "libcamera: Add support for color spaces to rkisp1 pipeline handler",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3432/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17187/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17187/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 066FEC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Aug 2022 17:43:25 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9D06761FC6;\n\tTue, 23 Aug 2022 19:43:24 +0200 (CEST)",
            "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 85EE661FA1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Aug 2022 19:43:21 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 147212B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Aug 2022 19:43:21 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1661276604;\n\tbh=AIqh8KnQAwpofCVdLbbi6JYWl9cUMSB1QZZKu/dFNTo=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=xQbw+9xpwrxZ9OmWgjcA7CSZGpdyEYEBwHyxbwpazOuWrI/n7LWrUhbb1JI+sV+vc\n\tAJ5Q6O3o/nppdLwOZ1iVdETlAN8rWf7wbEAQ3H7b5wGiFVnhG42GiM+qFmX2NwTZ3u\n\tACJjg+jvQIha2P3O375V+iHSODJ3zEvNfi1uhINVSVlNMTCIBWuOOtE6uPjI1mZiR2\n\tcvepVbhtlxi0Hc7tDnAZk9NjW0SVT7gg0A5Mrl+fgQc5xkodPh516frYsykbqx4Zj9\n\twcCe3wxljJvqL2hUsQXlciaTdnYSouSo9IMDHLuWX6B3dEGPZpHppHxx1IWA7iLX+S\n\ta/5CRjmjvV6pg==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1661276601;\n\tbh=AIqh8KnQAwpofCVdLbbi6JYWl9cUMSB1QZZKu/dFNTo=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=mHbjLnFdS22MG60nAjudtxylxa8rd4JZmeDqAskWgozbAXu59ESYflUY3gc8x0Pht\n\tFz8YZGk1jQp5C/k+3hwhNNuETgHNOCuUVB3Ddtkm41lw+XeIl4mYvqBxuAFXFXnUeA\n\t73YAQUutbMGk50hble6ycbHWC7egHSvGIHiNzFHs="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"mHbjLnFd\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 23 Aug 2022 20:43:09 +0300",
        "Message-Id": "<20220823174314.14881-2-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220823174314.14881-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220823174314.14881-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/6] utils: Satisfy LegacyInputIterator\n\twith StringSplitter::iterator",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The StringSplitter::iterator is used with the utils::split() function to\niterate over components of a split string. Add the necessary member\ntypes expected by std::iterator_trait in order to satisfy the\nLegacyInputIterator requirement and make the iterator usable in\nconstructors for various containers.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/base/utils.h | 6 ++++++\n test/utils.cpp                 | 8 ++++++++\n 2 files changed, 14 insertions(+)",
    "diff": "diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h\nindex 889bb4a2270e..ed88b7163770 100644\n--- a/include/libcamera/base/utils.h\n+++ b/include/libcamera/base/utils.h\n@@ -170,6 +170,12 @@ public:\n \tclass iterator\n \t{\n \tpublic:\n+\t\tusing difference_type = std::size_t;\n+\t\tusing value_type = std::string;\n+\t\tusing pointer = value_type *;\n+\t\tusing reference = value_type &;\n+\t\tusing iterator_category = std::input_iterator_tag;\n+\n \t\titerator(const StringSplitter *ss, std::string::size_type pos);\n \n \t\titerator &operator++();\ndiff --git a/test/utils.cpp b/test/utils.cpp\nindex 129807a63ec6..58b5a59dd17d 100644\n--- a/test/utils.cpp\n+++ b/test/utils.cpp\n@@ -276,6 +276,14 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n+\t\tconst auto &split = utils::split(path, \":\");\n+\t\tdirs = std::vector<std::string>{ split.begin(), split.end() };\n+\n+\t\tif (dirs != elements) {\n+\t\t\tcerr << \"utils::split() LegacyInputIterator test failed\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n \t\t/* utils::join() with conversion function test. */\n \t\tstd::vector<Size> sizes = { { 0, 0 }, { 100, 100 } };\n \t\ts = utils::join(sizes, \"/\", [](const Size &size) {\n",
    "prefixes": [
        "libcamera-devel",
        "1/6"
    ]
}