[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: revectoring
- From: "Peter Prade" <Peter.Prade@...>
- Date: Sun, 19 Jan 2003 23:30:44 +0100
> I wish to dynamically revector the Lua functions write,
> writeto, read and readfrom so that the original function
> is called when not using stdin/stdout but calls my function
> when using stdin/stdout.
> Can anyone help?
perhaps something along these lines? (out of my head, untested code)
if type(arg) == "userdata" then -- filehandles are userdata
call(%mywrite,arg) -- or just do whatever you want here