[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: revectoring
- From: "D Burgess" <david@...>
- Date: Mon, 20 Jan 2003 11:25:53 +1000
I did not think of doing it in Lua Code.
I was stuck with doing it in C.
>> 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