Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124859 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 C9A2C1A00B7 for ; Sun, 11 Aug 2024 16:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723395272; bh=MIVj4CpLrFp/ynopLQfgbPshqDwcx/JYv8r+3jpmkUY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ii2ec5q5cEK2snLzViJxeec9OJMGfQgFrhsvS04D0wUtKZORCnq/VbnuqB8fY/nl6 TMjJQTVC7PiqGL+01eilizg0kNfM63uogQ9C0Y7VTlZQ7H7FinZvQnGFEjhZiPuada 0QYuzTs4iRKM0srycUY6/J81XGOBjXheejdx0vFkNkEcbG4TPBe5KeGH7yKRlcEO6X 7FL/P040ji4S+EZEhe5hRtJIU+T031Zz24hqCbzGfK5mQMKtknfW1Sk+bDAZzqrcS4 3Ob4RTPeLpDLVY1oWappN5gd9ss7gTcFGvaITzKyAABpAV2vQgSjRjvPQngvD5TrN5 xr62HgRBxlccw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 13B0B180069 for ; Sun, 11 Aug 2024 16:54:32 +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,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179]) (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 16:54:31 +0000 (UTC) Received: by mail-vk1-f179.google.com with SMTP id 71dfb90a1353d-4f6d01961a7so1183530e0c.2 for ; Sun, 11 Aug 2024 09:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723395166; x=1723999966; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2DdRoSL/IhkwwehvUQrcZ1n/tTlZjWZrCEJ6ybbO4HA=; b=EaVLaL8RADMrQd2qrBbilPDZ0WRxa1zGfOrXvdASZb91pIlvBP/f0F/+eoFEi3UKj8 7HYV9hzGnAeYGlmUndFys3HK7VWQHK/mvrSHcLQe2BsmrYK1Xo5RouRcSsUk/qDriJtR yTRrfW9sa0JgZO3nNxarMbq4E/S7OE6PTkElvK3QMUXDMC+bxFRj7CeO+bOakjJ6Wu7c xcTTNn+1lb3NBVjpFAsLze1vIGA217x6eO8tqeq+vuyYlJ+OTEHbhayYRjpk1TFVfZnl IfrWlO01tInyoHJ6IUvhyHD74wef3WwJ7rl/G0jSgymEUvdui+MG840NuIARgr7Op3h6 ZDkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723395166; x=1723999966; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2DdRoSL/IhkwwehvUQrcZ1n/tTlZjWZrCEJ6ybbO4HA=; b=TD1RUeO7ba4TD2Jdw1zs4khsC8FritKwMycbojepfCTy29tLYG1lu1DVEatQdhYqzN pBaYRqNyVq03YT+HJZ6moKJeGdNsPH6ScwFeAmUKtSal46I25pI06A2XT3ZILQBrW+xh 6/Hxz9uSLCaiUEreOtBQSZP/Xf5XcqWs0cSxaeM7zkegB3MHxTmVwFvjyz4JF2rawoFZ WX6n41qVcYlbti9QcNBqE9Y2AGT1qxjikU1jyARJJxNqsDBInSsICIZKACaqUPTR0yLL qUP23FoQ9PUBmCfPWO0TNr9yRS7YEoy2F9akM23s1HHlJpzHusmoCoR83yxNWTUzOSQp 8xjg== X-Gm-Message-State: AOJu0YwDpv22sGuSTrLg6+Ce4o2l/lb73+uQf6w12yhxua29ubEgysWd 7ErLCfBGGahfDE6Z/y3Dxg+NjTT32qYgGWapWev/dWSdfEqKgXacpAOn2llNQSw3XPtV3/kxtgM h00wPjFQDM4Y4/N65ieMXTUXaSYo= X-Google-Smtp-Source: AGHT+IH/BcV+htm6fm+zI929kov21yp+L1gUw0kdYqaITs8FDmk6N4dOTWXZN02xt94etO2r2l9icsJsrIuFa/n8m9M= X-Received: by 2002:a05:6122:3d10:b0:4f2:e9eb:951e with SMTP id 71dfb90a1353d-4f9133128f7mr8939521e0c.10.1723395166086; Sun, 11 Aug 2024 09:52:46 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 11 Aug 2024 10:52:35 -0600 Message-ID: Subject: Re: [PHP-DEV] PDO_Firebird: use C++? To: "Christoph M. Becker" Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000aeabcc061f6b3468" From: lnearwaju@gmail.com (Lanre) --000000000000aeabcc061f6b3468 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Aug 10, 2024 at 7:16=E2=80=AFAM Christoph M. Becker wrote: > Hi all, > > 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]. > > 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. > > 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). > > 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. > > 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)? > > [1] > [2] > < > https://www.firebirdnews.org/new-firebird-interface-cloop-cross-language-= object-oriented-programming/ > > > [3] > < > https://github.com/php/php-src/pull/15230/files#diff-e0657e20b6fc2c130f50= 4c18ebeeac828847f17f1f8f7c3559b8fe8b2bc19928 > > > [4] > [5] > > Cheers, > Christoph > I will always support more c++ in the engine Lanre --000000000000aeabcc061f6b3468 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Aug 10, 2024 at 7:16=E2=80=AF= AM Christoph M. Becker <cmbecker69@= gmx.de> wrote:
Hi all,

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).=C2=A0 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. =C2=A0However, they do not provide these C APIs officially, so Denis provid= ed
the minimal required C API for inclusion into the PDO_Firebird extension[3]= .

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.

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).

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. =C2=A0Maybe someone can confirm that.

So what do you think?=C2=A0 Should we use C++ to access the new APIs, or stick with C (and include the required declarations in PDO_Firebird)?

[1] <https://github.com/php/php-src/pull/15230> [2]
<https://www.firebirdnews.org/new-firebird-interface-cloop-cross-langua= ge-object-oriented-programming/>
[3]
<https://github.com/php/php-src/pull/15230/files#diff-e= 0657e20b6fc2c130f504c18ebeeac828847f17f1f8f7c3559b8fe8b2bc19928>
[4] <https://github.com/FirebirdSQL/firebird/i= ssues/8197>
[5] <https://github.com/winlibs>

Cheers,
Christoph

I will always support more c+= + in the engine

Lanre=C2=A0
--000000000000aeabcc061f6b3468--