lua-users home
lua-l archive

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


From the manual, section 2.9 ("Environments"):
   http://www.lua.org/manual/5.1/manual.html#2.9

   "Userdata and C functions are created sharing the environment of the
   creating C function."

If the environment of the function that is creating the userdata is
not the global 'package' table, please report a bug.

Doh, I looked through the refman for 20 minutes and completely missed this. I suppose the `package' environment is inherited from require() -> luaopen_apr_core() -> luaL_register(). Sorry for the noise.

 - Peter