[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Skipping leading "shebangs" in a file
- From: Coda Highland <chighland@...>
- Date: Sun, 7 Aug 2016 20:28:11 -0700
On Sun, Aug 7, 2016 at 4:11 PM, Robert Virding <email@example.com> wrote:
> Thanks for the replies. I don't quite understand how deep down this is
> - 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?
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.