lua-users home
lua-l archive

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


It was thus said that the Great Emmanuel Oga once stated:
> 
> Since I'm pretty sure the path names are never gonna be bigger than
> 1024 chars, I used a fixed size buffer instead of lua_pushfstring. It
> is a small micro optimization but a very easy one, and I relieve the
> G.C. of having to create and collect a lot of small strings.

  Just a note:  The C Standard defines FILENAME_MAX:

	"which exands to an integral constant expression that is the size
	needed for an array of char large enough to hold the longest file
	name string that the implementation guarantees can be opened"

  -spc