Show a patch.

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

{
    "id": 22708,
    "url": "https://patchwork.libcamera.org/api/patches/22708/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22708/",
    "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": "<20250130195429.1229777-1-pobrn@protonmail.com>",
    "date": "2025-01-30T19:54:33",
    "name": "[RFC,v1] libcamera: base: object,thread: Disable copy/move",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "989c814fe275e8c3c34a502453fc928047f01efe",
    "submitter": {
        "id": 133,
        "url": "https://patchwork.libcamera.org/api/people/133/?format=api",
        "name": "Pőcze Barnabás",
        "email": "pobrn@protonmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22708/mbox/",
    "series": [
        {
            "id": 4981,
            "url": "https://patchwork.libcamera.org/api/series/4981/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4981",
            "date": "2025-01-30T19:54:33",
            "name": "[RFC,v1] libcamera: base: object,thread: Disable copy/move",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4981/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22708/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22708/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 05F85C3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jan 2025 19:54:43 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 19A6C68563;\n\tThu, 30 Jan 2025 20:54:42 +0100 (CET)",
            "from mail-10629.protonmail.ch (mail-10629.protonmail.ch\n\t[79.135.106.29])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 337036034C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jan 2025 20:54:40 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"hv1ysGJH\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1738266879; x=1738526079;\n\tbh=Bl/vRrVcMSlt0T/duwjb/+fiz6PP1zsu/4YpYLFImpw=;\n\th=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n\tSubject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector:\n\tList-Unsubscribe:List-Unsubscribe-Post;\n\tb=hv1ysGJHl51NHqm1ZdDRynaAMj0kqFJOOzY4xMdIY5gUi4f3w2A6LVXYGjY8zc8Ba\n\tdM6i7mYR7z3FsiljtiIIQZSmjT/DffyOCXgkrfWYnuAGY1r5SMz2bzmG/iJCjO8Wne\n\ttCGYMjHmFc29M1GAehU2ctXbSva7kLzPHYm4z6gl4mtGrt/R+/pgG62J/0z/FvhiEe\n\t7r/TMW1SA89b5GDHsRIunHr1NVo3QrrRDuE/nOxSD/1E9FdaYxwj2dWXpB4ZzAbGwP\n\ty2pQckYIpHdmWDClwWfo1c+sFdCmrctLhhkBjjeP4pUGx5mFArt+LmNh3pDvLwG4/S\n\t3xDe+ek7XYCQg==",
        "Date": "Thu, 30 Jan 2025 19:54:33 +0000",
        "To": "libcamera-devel@lists.libcamera.org",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>",
        "Subject": "[RFC PATCH v1] libcamera: base: object,thread: Disable copy/move",
        "Message-ID": "<20250130195429.1229777-1-pobrn@protonmail.com>",
        "Feedback-ID": "20568564:user:proton",
        "X-Pm-Message-ID": "ea6459bcef27cb0d024c12a7408a8184d8098f8c",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "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": "Objects of type `Object` and `Thread` have address identities, so they\nshould not be just moved/copied. And the special member functions\ngenerated by the compiler do not do the right thing. So delete them.\n\nSigned-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n---\n include/libcamera/base/object.h | 3 +++\n include/libcamera/base/thread.h | 3 +++\n 2 files changed, 6 insertions(+)",
    "diff": "diff --git a/include/libcamera/base/object.h b/include/libcamera/base/object.h\nindex 508773cd0..6cb935a04 100644\n--- a/include/libcamera/base/object.h\n+++ b/include/libcamera/base/object.h\n@@ -12,6 +12,7 @@\n #include <vector>\n \n #include <libcamera/base/bound_method.h>\n+#include <libcamera/base/class.h>\n \n namespace libcamera {\n \n@@ -52,6 +53,8 @@ protected:\n \tbool assertThreadBound(const char *message);\n \n private:\n+\tLIBCAMERA_DISABLE_COPY_AND_MOVE(Object)\n+\n \tfriend class SignalBase;\n \tfriend class Thread;\n \ndiff --git a/include/libcamera/base/thread.h b/include/libcamera/base/thread.h\nindex 3209d4f7c..3cbf6398e 100644\n--- a/include/libcamera/base/thread.h\n+++ b/include/libcamera/base/thread.h\n@@ -13,6 +13,7 @@\n \n #include <libcamera/base/private.h>\n \n+#include <libcamera/base/class.h>\n #include <libcamera/base/message.h>\n #include <libcamera/base/signal.h>\n #include <libcamera/base/span.h>\n@@ -54,6 +55,8 @@ protected:\n \tvirtual void run();\n \n private:\n+\tLIBCAMERA_DISABLE_COPY_AND_MOVE(Thread)\n+\n \tvoid startThread();\n \tvoid finishThread();\n \n",
    "prefixes": [
        "RFC",
        "v1"
    ]
}