hedgewars/LuaPas.pas
changeset 5551 0897b947e7a0
parent 5549 ccfb9b8ab9d1
child 6453 11c578d30bd3
equal deleted inserted replaced
5549:ccfb9b8ab9d1 5551:0897b947e7a0
   414 procedure lua_pushliteral(L : Plua_State; s : PChar);
   414 procedure lua_pushliteral(L : Plua_State; s : PChar);
   415 
   415 
   416 procedure lua_setglobal(L : Plua_State; s : PChar);
   416 procedure lua_setglobal(L : Plua_State; s : PChar);
   417 procedure lua_getglobal(L : Plua_State; s : PChar);
   417 procedure lua_getglobal(L : Plua_State; s : PChar);
   418 
   418 
   419 function lua_tostring(L : Plua_State; idx : LongInt) : shortstring;
   419 function lua_tostring(L : Plua_State; idx : LongInt) : AnsiString;
   420 
   420 
   421 
   421 
   422 (*
   422 (*
   423 ** compatibility macros and functions
   423 ** compatibility macros and functions
   424 *)
   424 *)
   755 (******************************************************************************)
   755 (******************************************************************************)
   756 
   756 
   757 implementation
   757 implementation
   758 
   758 
   759 uses
   759 uses
   760   SysUtils, Strings;
   760   SysUtils;
   761 
   761 
   762 (*****************************************************************************)
   762 (*****************************************************************************)
   763 (*                            luaconfig.h                                    *)
   763 (*                            luaconfig.h                                    *)
   764 (*****************************************************************************)
   764 (*****************************************************************************)
   765 
   765 
   870 procedure lua_getglobal(L: Plua_State; s: PChar);
   870 procedure lua_getglobal(L: Plua_State; s: PChar);
   871 begin
   871 begin
   872   lua_getfield(L, LUA_GLOBALSINDEX, s);
   872   lua_getfield(L, LUA_GLOBALSINDEX, s);
   873 end;
   873 end;
   874 
   874 
   875 function lua_tostring(L : Plua_State; idx : LongInt) : shortstring;
   875 function lua_tostring(L : Plua_State; idx : LongInt) : AnsiString;
   876 begin
   876 begin
   877   lua_tostring := Strings.StrPas(lua_tolstring(L, idx, nil));
   877   lua_tostring := SysUtils.StrPas(lua_tolstring(L, idx, nil));
   878 end;
   878 end;
   879 
   879 
   880 function lua_open : Plua_State;
   880 function lua_open : Plua_State;
   881 begin
   881 begin
   882   lua_open := luaL_newstate;
   882   lua_open := luaL_newstate;