[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Writing to a file from C
- From: "Mark Edgar" <medgar123+lua-l@...>
- Date: Sat, 8 Sep 2007 12:10:20 -0700
On 9/8/07, David Given <dg@cowlark.com> wrote:
> Is there a (standard) way I can get the FILE* corresponding to an io object,
> from C?
>From liolib.c:
#define topfile(L) ((FILE **)luaL_checkudata(L, 1, LUA_FILEHANDLE))
FILE *fp = *topfile(L);
This assumes the file object is the first argument to your function.
-Mark