Option '-l' discards version sufix from file name

Like 'require', the command-line option '-l' discards an optional
version suffix (everything after an hyphen) from a file name when
creating the module name.
This commit is contained in:
Roberto Ierusalimschy
2023-05-15 13:46:38 -03:00
parent c197885cb0
commit 09f3c2372f
4 changed files with 26 additions and 11 deletions

View File

@@ -257,6 +257,15 @@
#endif
/*
** LUA_IGMARK is a mark to ignore all after it when building the
** module name (e.g., used to build the luaopen_ function name).
** Typically, the sufix after the mark is the module version,
** as in "mod-v1.2.so".
*/
#define LUA_IGMARK "-"
/* }================================================================== */