[PATCH] lua: work around 32-bit integers limitation in vlc.var
linkfanel at yahoo.fr
Mon Nov 28 05:22:56 CET 2016
> See next comment regarding preprocessor evaluation rather than runtime
> The above, and what follows, makes more sense as a preprocessor
> condition, given that `sizeof` will not change during runtime (and I
> fear unwanted compiler diagnostics related to "always true" vs "always
It is not quite a runtime check: it is optimized away at compile time. I
would still prefer to do it in preprocessor, yes; but I don't know how
to. I don't know how to access sizeof(val.i_int) from the preprocessor,
and I don't know how to test sizeof(lua_Integer). I suppose it would be
possible to add autoconf macros testing lua types, but that seems very
heavy to me. Better ideas are welcome.
> `roundf` is in `<math.h>` starting with `C99`.
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
More information about the vlc-devel