hedgewars/LuaPas.pas
changeset 5088 8be2a0e9d276
parent 3407 dcc129c4352e
child 5089 90266b67fff8
equal deleted inserted replaced
5087:d3af455a868e 5088:8be2a0e9d276
    44 ** change lua_number2int & lua_number2integer.
    44 ** change lua_number2int & lua_number2integer.
    45 ** ===================================================================
    45 ** ===================================================================
    46 *)
    46 *)
    47 type
    47 type
    48   LUA_NUMBER_  = type Double;            // ending underscore is needed in Pascal
    48   LUA_NUMBER_  = type Double;            // ending underscore is needed in Pascal
    49   LUA_INTEGER_ = type LongInt;
    49   LUA_INTEGER_ = type PtrInt;
    50 
    50 
    51 (*
    51 (*
    52 @@ LUA_IDSIZE gives the maximum size for the description of the source
    52 @@ LUA_IDSIZE gives the maximum size for the description of the source
    53 @* of a function in debug information.
    53 @* of a function in debug information.
    54 ** CHANGE it if you want a different size.
    54 ** CHANGE it if you want a different size.
   239 function lua_lessthan(L : Plua_State; idx1, idx2 : LongInt) : LongBool;
   239 function lua_lessthan(L : Plua_State; idx1, idx2 : LongInt) : LongBool;
   240   cdecl; external LuaLibName;
   240   cdecl; external LuaLibName;
   241 
   241 
   242 function lua_tonumber(L : Plua_State; idx : LongInt) : lua_Number;
   242 function lua_tonumber(L : Plua_State; idx : LongInt) : lua_Number;
   243   cdecl; external LuaLibName;
   243   cdecl; external LuaLibName;
   244 function lua_tointeger(L : Plua_State; idx : LongInt) : lua_Integer;
   244 function lua_tointeger(L : Plua_State; idx : PtrInt) : lua_Integer;
   245   cdecl; external LuaLibName;
   245   cdecl; external LuaLibName;
   246 function lua_toboolean(L : Plua_State; idx : LongInt) : LongBool;
   246 function lua_toboolean(L : Plua_State; idx : LongInt) : LongBool;
   247   cdecl; external LuaLibName;
   247   cdecl; external LuaLibName;
   248 function lua_tolstring(L : Plua_State; idx : LongInt;
   248 function lua_tolstring(L : Plua_State; idx : LongInt;
   249                        len : Psize_t) : PChar;
   249                        len : Psize_t) : PChar;
   616   cdecl; external LuaLibName;
   616   cdecl; external LuaLibName;
   617 function luaL_optnumber(L : Plua_State; nArg : LongInt;
   617 function luaL_optnumber(L : Plua_State; nArg : LongInt;
   618                         def : lua_Number) : lua_Number;
   618                         def : lua_Number) : lua_Number;
   619   cdecl; external LuaLibName;
   619   cdecl; external LuaLibName;
   620 
   620 
   621 function luaL_checkinteger(L : Plua_State; numArg : LongInt) : lua_Integer;
   621 function luaL_checkinteger(L : Plua_State; numArg : PtrInt) : lua_Integer;
   622   cdecl; external LuaLibName;
   622   cdecl; external LuaLibName;
   623 function luaL_optinteger(L : Plua_State; nArg : LongInt;
   623 function luaL_optinteger(L : Plua_State; nArg : PtrInt;
   624                         def : lua_Integer) : lua_Integer;
   624                         def : lua_Integer) : lua_Integer;
   625   cdecl; external LuaLibName;
   625   cdecl; external LuaLibName;
   626 
   626 
   627 procedure luaL_checkstack(L : Plua_State; sz : LongInt; const msg : PChar);
   627 procedure luaL_checkstack(L : Plua_State; sz : LongInt; const msg : PChar);
   628   cdecl; external LuaLibName;
   628   cdecl; external LuaLibName;
   933 function luaL_optstring(L : Plua_State; n : LongInt; d : PChar) : PChar;
   933 function luaL_optstring(L : Plua_State; n : LongInt; d : PChar) : PChar;
   934 begin
   934 begin
   935   luaL_optstring := luaL_optlstring(L, n, d, nil);
   935   luaL_optstring := luaL_optlstring(L, n, d, nil);
   936 end;
   936 end;
   937 
   937 
   938 function luaL_checkint(L : Plua_State; n : LongInt) : LongInt;
   938 function luaL_checkint(L : Plua_State; n : PtrInt) : PtrInt;
   939 begin
   939 begin
   940   luaL_checkint := luaL_checkinteger(L, n);
   940   luaL_checkint := luaL_checkinteger(L, n);
   941 end;
   941 end;
   942 
   942 
   943 function luaL_optint(L : Plua_State; n, d : LongInt): LongInt;
   943 function luaL_optint(L : Plua_State; n, d : PtrInt): PtrInt;
   944 begin
   944 begin
   945   luaL_optint := luaL_optinteger(L, n, d);
   945   luaL_optint := luaL_optinteger(L, n, d);
   946 end;
   946 end;
   947 
   947 
   948 function luaL_checklong(L : Plua_State; n : LongInt) : LongInt;
   948 function luaL_checklong(L : Plua_State; n : PtrInt) : PtrInt;
   949 begin
   949 begin
   950   luaL_checklong := luaL_checkinteger(L, n);
   950   luaL_checklong := luaL_checkinteger(L, n);
   951 end;
   951 end;
   952 
   952 
   953 function luaL_optlong(L : Plua_State; n : LongInt; d : LongInt) : LongInt;
   953 function luaL_optlong(L : Plua_State; n : PtrInt; d : PtrInt) : PtrInt;
   954 begin
   954 begin
   955   luaL_optlong := luaL_optinteger(L, n, d);
   955   luaL_optlong := luaL_optinteger(L, n, d);
   956 end;
   956 end;
   957 
   957 
   958 function luaL_typename(L : Plua_State; idx : LongInt) : PChar;
   958 function luaL_typename(L : Plua_State; idx : LongInt) : PChar;