lua-users home
lua-l archive

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


I may be re-spawning an ancient topic but I was not able to retrieve clear explanation/reasons on the history.

I am wondering why static int luaB_print (lua_State *L) function does not have a fflush(stdout) after fputs("\n", stdout);
1) For the specific use case of print (mainly debug) I would not consider armful in term of performances.
2) It would also be more user friendly (who did not try to redirect stdout and miss a couple of lines because of the buffering)
3) Finally it would also 'comply' or at least mimic the C ISO/Posix printf API that recommends to flush the buffer when '\n' is printed.

Is there a rationale that I am missing here ?

-Cuero