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.

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.


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to