[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Creating a lua extension from a recursive C function
- From: Sean Conner <sean@...>
- Date: Sun, 8 May 2011 03:04:32 -0400
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