Re: dofile in 5.1
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: dofile in 5.1
- From: Vat Raghavan <machinshin2002@...>
- Date: 2005年7月31日 20:08:26 -0700 (PDT)
5.1 no longer has luaL_dofile?
i believe 5.0 had that?
--vat
--- Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> > The old function lua_dofile does not seem to exist, and I'm wondering
> > if I just need to add my own function that calls luaL_loadfile, and
> > lua_pcall, or if there is a newer/better method.
>
> You should use luaL_loadfile and lua_pcall, like here:
>
> status = (luaL_loadfile(L, filename) || lua_pcall(L, 0, 0, 0));
>
> -- Roberto
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com