[{"id":30057,"web_url":"https://patchwork.libcamera.org/comment/30057/","msgid":"<171926018883.625657.8833110119652306902@ping.linuxembedded.co.uk>","date":"2024-06-24T20:16:28","subject":"Re: [PATCH 02/10] ipa: ipa_interface: Declare ipaCreate() in\n\tlibcamera namespace","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-06-24 20:29:33)\n> The ipaCreate() function is the entry point to IPA modules. It is\n> declared in ipa_interface.h, and defined by each module. As the function\n> is defined with extern \"C\" linkage, the namespace in which it is\n> contained is not very relevant from a caller's point of view. For the\n> IPA module implementer, however, defining the function in the libcamera\n> namespace avoids adding an explicit libcamera:: prefix to the symbols\n> used by the function. This is why all IPA modules define their\n> ipaCreate() entry point in the libcamera namespace.\n> \n> The ipa_interface.h file, however, declares the function in the global\n> namespace. This doesn't cause any issue at runtime, but will cause a\n> missing declaration warning when we enable them. To prepare for that,\n> move the function declaration to the libcamera namespace.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/ipa/ipa_interface.h | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> index b93f1a15b2c9..53cf5377fcc6 100644\n> --- a/include/libcamera/ipa/ipa_interface.h\n> +++ b/include/libcamera/ipa/ipa_interface.h\n> @@ -33,8 +33,8 @@ public:\n>         virtual ~IPAInterface() = default;\n>  };\n>  \n> -} /* namespace libcamera */\n> -\n>  extern \"C\" {\n>  libcamera::IPAInterface *ipaCreate();\n>  }\n\nSo ... as long as it's fine to have extern \"C\" in a C++ namespace ...\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> +\n> +} /* namespace libcamera */\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 41E92BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Jun 2024 20:16:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E37BB654A9;\n\tMon, 24 Jun 2024 22:16:32 +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 C5490654A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jun 2024 22:16:31 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CFB3AFF3;\n\tMon, 24 Jun 2024 22:16:09 +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=\"D4GLRKR4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719260169;\n\tbh=LdVIf/l5nKETZ7uJVQSYljlC6YtAmcY/0d9+8JSRwW8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=D4GLRKR4JBmUJU5jdeIb8cI9CM8LgKKmfO3V9MAJDnDco9AXPnqxBPd7B9ciOmwGg\n\tHP+g7LHotVjuLcp9wJkbFV4eScm5gHwg+nMBuUt8h/ugXt1tAGfJ3BwYsRbF+g6ohU\n\tS/S7BvdbtAT1nFzGVAIws/w5QigRqcdo1yy9squ0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240624192941.22943-3-laurent.pinchart@ideasonboard.com>","References":"<20240624192941.22943-1-laurent.pinchart@ideasonboard.com>\n\t<20240624192941.22943-3-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 02/10] ipa: ipa_interface: Declare ipaCreate() in\n\tlibcamera namespace","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 24 Jun 2024 21:16:28 +0100","Message-ID":"<171926018883.625657.8833110119652306902@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]