On 2020-01-28 17:11, Dimitry Sibiryakov wrote:
28.01.2020 14:55, Alex Peshkoff via Firebird-devel wrote:
in plain C - "const declarations do not produce constant expressions,
i.e. in C you can't use a const int object in a case label",
That's why declarations used to be separated for C and C++.
And that is (separate declarations) what I want to avoid very match.
To be precise - existing headers with separate declarations are
generated one. If we can generate separate declarations (having _single_
place where they are defined) I see no problems with them.
Still the main problem is that macros cannot be scoped in any way. In
practice it prevent following code from working:
#include <sql.h>
#include <firebird/Interface.h>
printf("SQL_TYPE_DATE = %d\n", SQL_TYPE_DATE);
I'm afraid nobody has plain-C solution for it.
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel