lua-users home
lua-l archive

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


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