From 6a44ff7dc1154b6bc5cf9ef250b536c5fc11519e Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sun, 19 Apr 2009 15:43:56 +0000 Subject: fixed lua module loading Usdx table will be created and has one function (Time()) for now git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1687 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Lua/src/lua/ULuaLog.pas | 51 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 18 deletions(-) (limited to 'Lua/src/lua/ULuaLog.pas') diff --git a/Lua/src/lua/ULuaLog.pas b/Lua/src/lua/ULuaLog.pas index 51b9797d..95efaa19 100644 --- a/Lua/src/lua/ULuaLog.pas +++ b/Lua/src/lua/ULuaLog.pas @@ -40,6 +40,39 @@ uses function luaopen_Log (L: Plua_State): Integer; cdecl; +function ULuaLog_LogError(L: Plua_State): Integer; cdecl; +function ULuaLog_LogMsg(L: Plua_State): Integer; cdecl; +function ULuaLog_BenchmarkStart(L: Plua_State): Integer; cdecl; +function ULuaLog_BenchmarkEnd(L: Plua_State): Integer; cdecl; +function ULuaLog_LogBenchmark(L: Plua_State): Integer; cdecl; +function ULuaLog_LogDebug(L: Plua_State): Integer; cdecl; +function ULuaLog_LogInfo(L: Plua_State): Integer; cdecl; +function ULuaLog_LogStatus(L: Plua_State): Integer; cdecl; +function ULuaLog_LogWarn(L: Plua_State): Integer; cdecl; +function ULuaLog_LogCritical(L: Plua_State): Integer; cdecl; +function ULuaLog_CriticalError(L: Plua_State): Integer; cdecl; +function ULuaLog_GetLogLevel(L: Plua_State): Integer; cdecl; +function ULuaLog_SetLogLevel(L: Plua_State): Integer; cdecl; + + +const + ULuaLog_Lib_f: array [0..13] of lual_reg = ( + (name:'LogError';func:ULuaLog_LogError), + (name:'LogMsg';func:ULuaLog_LogMsg), + (name:'BenchmarkStart';func:ULuaLog_BenchmarkStart), + (name:'BenchmarkEnd';func:ULuaLog_BenchmarkEnd), + (name:'LogBenchmark';func:ULuaLog_LogBenchmark), + (name:'LogDebug';func:ULuaLog_LogDebug), + (name:'LogInfo';func:ULuaLog_LogInfo), + (name:'LogStatus';func:ULuaLog_LogStatus), + (name:'LogWarn';func:ULuaLog_LogWarn), + (name:'LogCritical';func:ULuaLog_LogCritical), + (name:'CriticalError';func:ULuaLog_CriticalError), + (name:'SetLogLevel';func:ULuaLog_GetLogLevel), + (name:'GetLogLevel';func:ULuaLog_SetLogLevel), + (name:nil;func:nil) + ); + implementation function ULuaLog_LogError(L: Plua_State): Integer; cdecl; @@ -126,24 +159,6 @@ begin result:=0; // number of results end; -const - ULuaLog_Lib_f: array [0..13] of lual_reg = ( - (name:'LogError';func:ULuaLog_LogError), - (name:'LogMsg';func:ULuaLog_LogMsg), - (name:'BenchmarkStart';func:ULuaLog_BenchmarkStart), - (name:'BenchmarkEnd';func:ULuaLog_BenchmarkEnd), - (name:'LogBenchmark';func:ULuaLog_LogBenchmark), - (name:'LogDebug';func:ULuaLog_LogDebug), - (name:'LogInfo';func:ULuaLog_LogInfo), - (name:'LogStatus';func:ULuaLog_LogStatus), - (name:'LogWarn';func:ULuaLog_LogWarn), - (name:'LogCritical';func:ULuaLog_LogCritical), - (name:'CriticalError';func:ULuaLog_CriticalError), - (name:'SetLogLevel';func:ULuaLog_GetLogLevel), - (name:'GetLogLevel';func:ULuaLog_SetLogLevel), - (name:nil;func:nil) - ); - function luaopen_Log (L: Plua_State): Integer; cdecl; begin luaL_register(L,'Log',@ULuaLog_Lib_f[0]); -- cgit v1.2.3