Re: cpluspluscheck vs ICU again
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Peter Eisentraut <peter@eisentraut.org>
Date: 2025-07-07T05:52:58Z
Lists: pgsql-hackers
Attachments
- v2-0001-Hide-ICU-C-APIs-from-pg_locale.h.patch (text/x-patch) patch v2-0001
On Fri, Jul 4, 2025 at 10:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Andres Freund <andres@anarazel.de> writes: > >> +/* restore so that extensions can include the C++ APIs */ > >> +#undef U_SHOW_CPLUSPLUS_API > > > Does the #undef U_SHOW_CPLUSPLUS_API thing actually work, given that ucol.h > > presumably won't be included again due to #ifdef protection? > > Good point. If a .cpp file wants access to the C++ APIs, it'd have > to include <unicode/ucol.h> before not after including pg_locale.h. > That should work AFAICS, but this #undef doesn't help. I see that now. If extensions follow the practice of including system headers before Postgres headers, it should be fine. I've attached v2 which removes the useless #undef and drafts an explanatory commit message. -- John Naylor Amazon Web Services
Commits
-
Update ICU C++ API symbols
- 9560c1ec1c93 13.22 landed
- a4f891b96235 14.19 landed
- baacfb9e609c 15.14 landed
- aae9aad19d82 16.10 landed
- 21ae8fc5fd86 17.6 landed
- dd29262077e8 18.0 landed
- 90bfae9f93e7 19 (unreleased) landed
-
Hide ICU C++ APIs from pg_locale.h
- ed26c4e25a44 19 (unreleased) landed
-
Remove implicit cast from 'void *'
- 3e73d8735371 18.0 landed
- 9adb58a3ccb5 19 (unreleased) landed
-
Inline CRC computation for small fixed-length input on x86
- e2809e3a1015 18.0 cited