[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stack module
From: |
Marc Nieper-Wißkirchen |
Subject: |
Re: stack module |
Date: |
Thu, 23 Jul 2020 12:56:52 +0200 |
Hi Bruno,
> This is perfectly acceptable for Gnulib. It has debuggability and type safety.
Perfect. Then I will come up with a module in this form.
> You have precedent e.g. in lib/diffseq.h and lib/aligned-malloc.h.
Good to know; I hadn't taken a look at these sources yet.
> You can even omit the 'GL_' prefix from the macro names. The user can #undef
> the macros after including the file; therefore there is nearly no risk of
> collision with macros defined by other code.
Or the included file #undefs the macros as in lib/diffseq.h.
Speaking of prefixes: As macro names (and other names) starting with
"_GL_" are not officially allowed by ISO C, I think it makes sense to
think of a new convention for new sources (while old sources could
later be updated incrementally).
For example, one could use the prefix "GL__" (double underscore) for
(future) private identifiers.
Marc