On 2020-01-28 13:36, Adriano dos Santos Fernandes wrote:
On 28/01/2020 07:20, Dimitry Sibiryakov wrote:
28.01.2020 09:52, Alex Peshkoff via Firebird-devel wrote:
Currently that will not work. We have
#define isc_spb_rpr_commit_trans 15
notation in consts_pub.h which is unaffected by namespace. And we
need it cause .h file may be used in plain C code.
That's why modern headers used to contain two sections separated by
"ifdef __cplusplus": one with traditional defines and second with
constants.
Modern code does not use defines for constants.
Certainly, but the problem is with old one, particular consts_pub.h.
Nor them define constants everywhere in a single place.
Scopes, good names. That's how modern code is written.
FirebirdInterface.idl already shows how to do it.
I hope we don't switch from a legacy approach to a new and bad approach
because it's easy.
Do you suggest to move all consts to FirebirdInterface.idl? That's
possible way to go. Sooner of all we will need legacy headers generator
in cloop.
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel