Update Lua Support
This commit is contained in:
@@ -86,17 +86,17 @@ Src.Text:='function main(n)'+sLineBreak+' return n'+sLineBreak+'end';
|
||||
//Src.RegisterFunction('','varmain');
|
||||
//Src.Register('','Pmain',TypeInfo(integer));
|
||||
Module:=Src.Compilate;
|
||||
//Func1:=Module.Funtion['main'];
|
||||
Func1:=Module.Funtion['main'];
|
||||
//Func2:=Module.Funtion['varmain'];
|
||||
//if 1<>Func1.Call(TypeInfo(integer),[454],CRTBCallTypeStdCall).AsInteger then
|
||||
// raise Exception.Create('Error in LuaTest');
|
||||
if 1<>Func1.Call(TypeInfo(integer),[454],CRTBCallTypeStdCall).AsInteger then
|
||||
raise Exception.Create('Error in LuaTest');
|
||||
//Var1:=Module.&Var['Pmain'];
|
||||
//Var1.Val:=424;
|
||||
//if Var1.Val.AsInteger<>Func2.Call(TypeInfo(integer),[],CRTBCallTypeStdCall).AsInteger then
|
||||
// raise Exception.Create('Error in LuaTest');
|
||||
//FreeAndNil(Var1);
|
||||
//FreeAndNil(Func2);
|
||||
//FreeAndNil(Func1);
|
||||
FreeAndNil(Func1);
|
||||
FreeAndNil(module);
|
||||
FreeAndNil(Src);
|
||||
FreeAndNil(Lua);
|
||||
|
||||
Reference in New Issue
Block a user