lua-users home
lua-l archive

Re: Help needed calling Lua from my C function

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


> However, I'm using:
> lua_dobuffer( L, B, 1069, "'..id..'" );
> 
> Instead of loadfile. How does dobuffer() work with pcall()?
lua_dobuffer is also gone. Use luaL_loadbuffer, as in
 
 if (luaL_loadbuffer(L,s,n,name) || lua_pcall(L,0,0,0))
 fprintf(stderr,"%s\n",lua_tostring(L,-1));
--lhf

AltStyle によって変換されたページ (->オリジナル) /