|
|
||
|
Hi Robert,
Lua Registry = {
...
Account = {
__metatable = <the method table>
__index = <the method table>
__gc = <the C function LuaAccount::gc_account>
}
...
}<the method table> = {
deposit = <the C function LuaAccount::deposit>
withdraw = <the C function LuaAccount::withdraw>
balance = <the C function LuaAccount::balance>
}- Peter
Hi, I have a few questions about the sample-code Simple Cpp Binding. I don't understand the register-function. First I create a new table in the stack, then I turn it into a metatable, right? But why I assign to __metatable the value of methodtable? And why I drop after this the metatable? First I create it and then I delete it? Hm, that's all, I hope, anyone can answer the questions. thank you
robert kuecken