lua-users home
lua-l archive

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



Ask for more details if you need.
--lhf

Alas, I do need. Haven't done a lot of C programming and and haven't got my head around the lua C api yet...
So I'm probably barking up completely the wrong tree.
From what I gather,

static const char *getF (lua_State *L, void *ud, size_t *size)

is where the lua function dofile(fname) reads the data from the file.
and this appears to be passed as a reader to lua_load.

so to make a function available to lua that loads the translated csv file, would i need to copy the code of dofile and  replace getF with my function that does the translation?

I'll give this a shot (unless someone points out that I'm completely mistaken) and report on my success.
Thanks for your help.


Richard