lua-users home
lua-l archive

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


> > Doesn't this work?
> >
> > LUA_API int luaL_verror (lua_State *L, const char *fmt, va_list argp) {
> >   return luaL_error(L, "%s", lua_pushvfstring(L, fmt, va_list));
> > }
> 
> I don't know if it matters much. But va_end will not be called.

Thinking more about it: Can such a function ever be implemented "right" (without additional parameters)?
It might depend on the caller if va_end must be called or should not be called.

But I think common practice for functions with va_list parameters is not to call va_end.

   Jörg