lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, 12 Mar 2021 at 10:46, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> If you did that and exported new public lua_* macros for use by C extension
> libraries, that would be an API change in a patch release, right? It would
> make code written using it to be source-API-incompatible with previous Lua
> 5.4 releases... (please don't!)

The idea is to rename them as luai_*, so they can be used by other Lua
macros (specifically luaL_argcheck and luaL_argexpected). C libraries
would use them only indirectly, through these macros.  They would not be
part of the API and should not create source-API-incompatibilities (nor
ABI incompatibilities) with previous 5.4 releases.

Thanks for the clarification!
 
Our only concern is that C extension libraries might end up using
__builtin_expect unknowingly. Would that be a problem?

Not as far as I can tell, since that if this is already in use by the Lua core, then it shouldn't pose any more of a portability concern. (But I'm sure there's other people in this list more knowledgeable than me on those matters!)

-- Hisham