lua-users home
lua-l archive

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

> >Can't you add definitions in luaconf.h for that? Like this:
> >#define exit myexit
> Libraries that interface with Lua frequently require luaconf.h to be 
> included so that the same types are used across all Lua interfaces. This 
> would mean that the #defined functions would also be propagated to these 
> libraries, which is not necessarily desirable, and could verge on the 
> dangerous.

You can protect those definitions with LUA_CORE:

  #if defined(LUA_CORE)
  #define exit myexit

It may be a good idea to have proper names for standard functions
used by the core, not for the easiness of redefinition, but for
documentation of the core dependencies.  But it also may create too much

-- Roberto