title: Automatic registering delphi function to Lua
body: <p>im extending delphi app for Lua scripting. And i am wondering if is there any way to automatically register all my object functions?
  I know when i want to register some function it has to be luaCFunction.
  i got something like this:</p>
  
  <pre><code>function RegisterMyPersonFunction(l : PLua_State) : Integer; cdecl;
  var
    person : TLuaPerson;    
    Age: Integer;
  begin
  
    if (lua_gettop(l) &lt; 1) then 
      exit;
  
    person := TLuaPerson(LuaToTLuaObject(l, 1)); 
    Age:=luaL_checkinteger(l,2);
    person.SetAge(Age);
    result := 0;
  
  end;
  </code></pre>
  
  <p>What i want is that i dont want to write for every my function own function like this. Is there any way how to register all these functions from delphi object to lua?
  Im using this <a href="https://github.com/felipedaragon/pLua-XE" rel="nofollow">wrapper</a></p>
  
  <p>Thanks for all your help.</p>