Show a patch.

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

{
    "id": 2503,
    "url": "https://patchwork.libcamera.org/api/patches/2503/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2503/",
    "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": "<20200104050947.7673-8-laurent.pinchart@ideasonboard.com>",
    "date": "2020-01-04T05:09:40",
    "name": "[libcamera-devel,07/14] libcamera: bound_method: Store method arguments in a class",
    "commit_ref": "257bea076c5261059fc318cad101f2315634607b",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9158c02dae0fb428f09acc574d43ae979a50bb3e",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2503/mbox/",
    "series": [
        {
            "id": 600,
            "url": "https://patchwork.libcamera.org/api/series/600/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=600",
            "date": "2020-01-04T05:09:33",
            "name": "object: Propagate return value of invoked method",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/600/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2503/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2503/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54ED060611\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jan 2020 06:10:05 +0100 (CET)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DD165A49\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jan 2020 06:10:04 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578114605;\n\tbh=GvbqXLdTNKKtZYcODnXfBEUFpkLPY3uJAlu3ak0e4NU=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=SXfSVyY7I6VtCu20luHhuCrvoIkNDgUelmWMac2W2hvaZ78gsCp1++OG9XqsLaNSD\n\tHEgxjQaEUJDgDb3CvHl+5T38zVOp08XDLWXUo7UAebL+4zUQYjpAcpxdYKm+39txV8\n\tmYSDuPtRTYrSnuBIzls2sl9R2vcJ6YLchcOUmfXw=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  4 Jan 2020 07:09:40 +0200",
        "Message-Id": "<20200104050947.7673-8-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 07/14] libcamera: bound_method: Store\n\tmethod arguments in a class",
        "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>",
        "X-List-Received-Date": "Sat, 04 Jan 2020 05:10:06 -0000"
    },
    "content": "Create a new BoundMethodPack class to replace the PackType type alias.\nThis will allow adding additional fields to the arguments pack, when\nadding support for propagation of bound method return values.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n Documentation/Doxyfile.in        |  1 +\n include/libcamera/bound_method.h | 21 +++++++++++++++++----\n 2 files changed, 18 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\nindex 840c1b4c76c5..9e5efae33919 100644\n--- a/Documentation/Doxyfile.in\n+++ b/Documentation/Doxyfile.in\n@@ -873,6 +873,7 @@ EXCLUDE_PATTERNS       =\n EXCLUDE_SYMBOLS        = libcamera::BoundMemberMethod \\\n                          libcamera::BoundMethodArgs \\\n                          libcamera::BoundMethodBase \\\n+                         libcamera::BoundMethodPack \\\n                          libcamera::BoundStaticMethod \\\n                          libcamera::SignalBase \\\n                          std::*\ndiff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h\nindex 9fd58c69a0e9..d194cd4133bb 100644\n--- a/include/libcamera/bound_method.h\n+++ b/include/libcamera/bound_method.h\n@@ -67,17 +67,30 @@ private:\n \tConnectionType connectionType_;\n };\n \n+template<typename... Args>\n+class BoundMethodPack\n+{\n+public:\n+\tBoundMethodPack(const Args &... args)\n+\t\t: args_(args...)\n+\t{\n+\t}\n+\n+\tstd::tuple<typename std::remove_reference<Args>::type...> args_;\n+};\n+\n template<typename... Args>\n class BoundMethodArgs : public BoundMethodBase\n {\n-private:\n-\tusing PackType = std::tuple<typename std::remove_reference<Args>::type...>;\n+public:\n+\tusing PackType = BoundMethodPack<Args...>;\n \n+private:\n \ttemplate<int... S>\n \tvoid invokePack(void *pack, BoundMethodBase::sequence<S...>)\n \t{\n \t\tPackType *args = static_cast<PackType *>(pack);\n-\t\tinvoke(std::get<S>(*args)...);\n+\t\tinvoke(std::get<S>(args->args_)...);\n \t\tdelete args;\n \t}\n \n@@ -98,7 +111,7 @@ template<typename T, typename... Args>\n class BoundMemberMethod : public BoundMethodArgs<Args...>\n {\n public:\n-\tusing PackType = std::tuple<typename std::remove_reference<Args>::type...>;\n+\tusing PackType = typename BoundMethodArgs<Args...>::PackType;\n \n \tBoundMemberMethod(T *obj, Object *object, void (T::*func)(Args...),\n \t\t\t  ConnectionType type = ConnectionTypeAuto)\n",
    "prefixes": [
        "libcamera-devel",
        "07/14"
    ]
}