Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124846 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 8EB0F1AE198 for ; Sun, 11 Aug 2024 11:37:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723376381; bh=IUFUN5Y/ibJ6j20EZ09DJzeGdm8ySxkiVPxfLoO55yg=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=lD4bs/N0y8s63JlFImNmZCUMz50+7NWRRfky4xpvHQTGT3wFOR1ptejznaGHowm91 1f5pY+ZtDde81IXTG6DMDEwbsEBymicL9g+z/Qx7YoU/h9UP+y+/x6QfVp75hXU2Si FDxc0vnWM52CtrFevHamNGWpC/IdzBKpvR9zUBOX1X2WVB9stnNbHXsuvs5hpVgmGQ YkaPmkqBnKHO8iRrbqF9A7Bc98fZEqfKFxKJDiiojWbKW6450XPlqdx11J4sBcgYaI ItW2AnwR7zayHmeJRJMHB5Q9EZvv1qKGHmpbx+l7d8NQytn0YW7RvfbtqLaJlrltXG wuvvPvAvbb6fA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 27E101801ED for ; Sun, 11 Aug 2024 11:39:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-4018.proton.ch (mail-4018.proton.ch [185.70.40.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 11 Aug 2024 11:39:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail2; t=1723376267; x=1723635467; bh=IUFUN5Y/ibJ6j20EZ09DJzeGdm8ySxkiVPxfLoO55yg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=OIzDixAxPRac5fNHWkVNfBfZdJgbu+ho6qmmMJlbhDsur/XOjJUNQ1CnsvK8LQKJ9 9OgsW79GymSWNVGwt6JAHE/9KVFQtF/SuZmVaB29JP4tkDeGtcYKl6wIUOqXEzSfOW 1+FhRMfARuybO3V2SKu8Pq+aDxzLQVtmjGKMHeZSUv2s2zNlWXUryrzkikbp7xIN5M xQWdNjwNbBjVb8UIoiOQ+Z/gc8bkXL3foY99mc+0YKjQsYhQNLVszYAmM0VPbBGRfl eXW65WXzvOabFTFquiiJNUyRmAr2Kb3PzxlIeRhvyx+oQAtLsq0jFV3xNBtUG4Q+N9 Cts0lM3hYO26w== Date: Sun, 11 Aug 2024 11:37:43 +0000 To: "Christoph M. Becker" Cc: PHP internals Subject: Re: [PHP-DEV] PDO_Firebird: use C++? Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 36471f2a25f26c5e6d870ff80b5b51015e05500f Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Saturday, 10 August 2024 at 15:13, Christoph M. Becker wrote: > Hi all, >=20 > a week ago Denis Simonov submitted a PR[1] regarding formatting of the > new time zone types of Firebird 4.0 (which appears sensible per se). > This requires to access new Firebird APIs which are written in C++ (the > old Interbase APIs are still provided as C code). Now the Firebird > developers have written a tool for cross language support called > CLOOP[2] which allows to access the APIs written in C++ directly from C. > However, they do not provide these C APIs officially, so Denis provided > the minimal required C API for inclusion into the PDO_Firebird extension[= 3]. >=20 > In my opinion, this a somewhat fragile approach (especially since > CLOOP's C generator apparently hasn't been tested for a rather long > time[4]) and would personally rather use C++ to access the new APIs. > This would obviously require a C++ compiler to build PDO_Firebird (so > far a C compiler is sufficient), unless the C++ code (and the respective > functionality) would be optional. >=20 > Another drawback would affect the Windows builds; so far these just > could use the Firebird kits provided by the Firebird developers (which > contain headers and pre-built libraries), but these don't contain any > C++ libraries, so the libraries would need to be built and hosted by > winlibs[5] (at least for the time being). >=20 > I assume, however, that (Linux) distros already provide pre-built C++ > libraries since the new Firebird OO API is available as of Firebird 3.0. > Maybe someone can confirm that. >=20 > So what do you think? Should we use C++ to access the new APIs, or > stick with C (and include the required declarations in PDO_Firebird)? >=20 > [1] https://github.com/php/php-src/pull/15230 >=20 > [2] > https://www.firebirdnews.org/new-firebird-interface-cloop-cross-language-= object-oriented-programming/ >=20 > [3] > https://github.com/php/php-src/pull/15230/files#diff-e0657e20b6fc2c130f50= 4c18ebeeac828847f17f1f8f7c3559b8fe8b2bc19928 >=20 > [4] https://github.com/FirebirdSQL/firebird/issues/8197 >=20 > [5] https://github.com/winlibs >=20 >=20 > Cheers, > Christoph I think moving the PDO driver to use C++ is a more sensible choice. Best regards, Gina P. Banyard