Patch Detail
Show a patch.
GET /api/1.1/patches/21/?format=api
{ "id": 21, "url": "https://patchwork.libcamera.org/api/1.1/patches/21/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21/", "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": "<20181130110737.18947-1-kieran.bingham@ideasonboard.com>", "date": "2018-11-30T11:07:37", "name": "[libcamera-devel] lib: Fix class and namespace usage", "commit_ref": "b99da21657d4f6bad415a87b82ac0d9c738018e7", "pull_url": null, "state": "accepted", "archived": false, "hash": "cc5a2990c82c28bb692503af8378956d4c7383d7", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21/mbox/", "series": [ { "id": 12, "url": "https://patchwork.libcamera.org/api/1.1/series/12/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=12", "date": "2018-11-30T11:07:37", "name": "[libcamera-devel] lib: Fix class and namespace usage", "version": 1, "mbox": "https://patchwork.libcamera.org/series/12/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@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 1650E60B0B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Nov 2018 12:07:41 +0100 (CET)", "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 76816562;\n\tFri, 30 Nov 2018 12:07:40 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1543576060;\n\tbh=bly5moYCkW25Uj5HpasYJChECUX527JdNjzNFV/o8/w=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=bvsvZmdhX3BrSgNlMf+mJa+NoM/UxcQ3CKiT1N0ykuXVhW1wYCbFvivnsxghY7+F7\n\t9KEW0854vLCKDFR6ddOfruhbPyAZQVZOqpLvO+3GMB0u3DCjQDYKXYD0WC+Q+2su9V\n\tH7vvTY7HaAmheKfXAlMgH0GKeSyB4uI4IpgXr7tM=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>", "Date": "Fri, 30 Nov 2018 11:07:37 +0000", "Message-Id": "<20181130110737.18947-1-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[libcamera-devel] [PATCH] lib: Fix class and namespace usage", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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": "Fri, 30 Nov 2018 11:07:41 -0000" }, "content": "The (dummy) init_lib function was linking correctly only due to a\nnamespace 'collision' adding the init_lib to libcamera namespace, which\nis 'shared' by class libcamera.\n\nThe init function was designed to be a class member function of the\nlibcamera object - and is used as such in the existing test function.\n\nInstead of relying on the namespace collision - update the lib/main.cpp\nexample file to correctly utilise the class header - and specify the\nfunction declaration, so that further implementations do not fall into\nthe same bad habits.\n\nReported-by: Jacopo Mondi <jacopo@mondi.org>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n lib/main.cpp | 7 ++-----\n 1 file changed, 2 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/main.cpp b/lib/main.cpp\nindex 7b3da269f695..37f1ccce43cc 100644\n--- a/lib/main.cpp\n+++ b/lib/main.cpp\n@@ -1,13 +1,10 @@\n #include <iostream>\n-\n-namespace libcamera {\n+#include <libcamera/libcamera.h>\n \n using std::cout;\n using std::endl;\n \n-void init_lib(void)\n+void libcamera::init_lib(void)\n {\n \tcout << \"Lib Camera Init\" << endl;\n }\n-\n-};\n", "prefixes": [ "libcamera-devel" ] }