Patch Detail
Show a patch.
GET /api/1.1/patches/23579/?format=api
{ "id": 23579, "url": "https://patchwork.libcamera.org/api/1.1/patches/23579/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23579/", "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": "<20250616220607.31416-1-laurent.pinchart@ideasonboard.com>", "date": "2025-06-16T22:06:07", "name": "gstreamer: Use std::exchange() instead of g_steal_pointer()", "commit_ref": "c19047dfdfb451deac404841b79e1b5a6b89ff5f", "pull_url": null, "state": "accepted", "archived": false, "hash": "f30e94e1ae271196120beadc51d41c83cb99698b", "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/23579/mbox/", "series": [ { "id": 5223, "url": "https://patchwork.libcamera.org/api/1.1/series/5223/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5223", "date": "2025-06-16T22:06:07", "name": "gstreamer: Use std::exchange() instead of g_steal_pointer()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5223/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23579/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23579/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 C7817BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Jun 2025 22:06:27 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B900768DCB;\n\tTue, 17 Jun 2025 00:06:26 +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 F281461548\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Jun 2025 00:06:23 +0200 (CEST)", "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B94D8493;\n\tTue, 17 Jun 2025 00:06:11 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hhXybc0l\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750111571;\n\tbh=UZgtLqmvp8D2hu5wajxw+h85VFTGZ7gc+FTpKt+g+gM=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=hhXybc0lIfYUYPGojiNaIIqYMVzMClRNoaLZWPgf1k2jDODst9kMQApEKkIE8gFOt\n\tlo+WC0j+wmUnMwBgqz7cViQK11fHffSx8YRX5HczWldBstJkIxEAzXl46xlIVZafH9\n\thGcrZ6vsO+ARSSKFDIrmbY+ryi7Osm/32p6TNpVA=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Nicolas Dufresne <nicolas.dufresne@collabora.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?= <barnabas.pocze@ideasonboard.com>", "Subject": "[PATCH] gstreamer: Use std::exchange() instead of g_steal_pointer()", "Date": "Tue, 17 Jun 2025 01:06:07 +0300", "Message-ID": "<20250616220607.31416-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.49.0", "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": "g_steal_pointer) only preserves the type since glib 2.68, requiring\ncasts. Use std::exchange() instead.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/gstreamer/gstlibcamerasrc.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n\nbase-commit: b3ff75d7589a263412ad63008b3c8518d40e6316", "diff": "diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\nindex ebea34e47b4d..e56cee282c59 100644\n--- a/src/gstreamer/gstlibcamerasrc.cpp\n+++ b/src/gstreamer/gstlibcamerasrc.cpp\n@@ -1085,7 +1085,7 @@ gst_libcamera_src_request_new_pad(GstElement *element, GstPadTemplate *templ,\n \n \tgst_child_proxy_child_added(GST_CHILD_PROXY(self), G_OBJECT(pad), GST_OBJECT_NAME(pad));\n \n-\treturn reinterpret_cast<GstPad *>(g_steal_pointer(&pad));\n+\treturn std::exchange(pad, nullptr);\n }\n \n static void\n", "prefixes": [] }