[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to change the function behavior at run-time in luav5.1.4
- From: 刘小凡 <zhqqmao@...>
- Date: Wed, 27 Jan 2010 17:53:59 +0800
Hello, everyone, sometimes I would like to change the run-time behavior of a function, usually I use dofile to achieve, but doing so will not change the previous reference, so I think maybe directly to change the function prototype can be achieved:
I am currently in luaV_settable function to add the following code:
/ * When oldc and valc are the type of closure lua * /
oldc-> l.p = valc-> l.p;
However, sometimes the program crashes, I would like to know where I ignored, Thank you.