lua-users home
lua-l archive

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


On Sun, Aug 7, 2016 at 4:11 PM, Robert Virding <rvirding@gmail.com> wrote:
> Thanks for the replies. I don't quite understand how deep down this is
> implemented:
>
> - It is mentioned in luaL_loadfilex but not in lua_load which seems to be
> the more basic function.
> - It is mentioned in the Lua standalone but does it also apply when used as
> an extension? Or does thsi depend on what you use to load a file?
>
> Robert

The documentation is accurate. It's done by luaL_loadfilex and not
part of the more general chunk-loading functionality -- you can't
write load("#!/foo\nprint 'hi'") in Lua code and have it work.

/s/ Adam