Browse Source

* Some minor improvements

Michaël Van Canneyt 10 months ago
parent
commit
b18e381049

+ 1 - 1
packages/wasm-utils/demo/timer/timerdemo.pp

@@ -6,7 +6,7 @@ uses
   {$IFDEF UNIX}
   cthreads,
   {$ENDIF}
-  SysUtils, Classes, wasm.timer.shared, wasm.timer.api, wasm.logger.api, wasm.timer.objects, wasm.http.api;
+  SysUtils, Classes, wasm.timer.shared, wasm.timer.api, wasm.logger.api, wasm.timer.objects;
 
 Type
 

+ 2 - 2
packages/wasm-utils/src/wasm.http.api.pas

@@ -85,7 +85,7 @@ function __wasmhttp_response_callback(aRequestID : TWasmHTTPRequestID; aUserData
 
 
 procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Msg : String);
-procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; Args : Array of const);
+procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; const Args : Array of const);
 
 var
   OnWasmHTTPResponse : TWasmHTTPResponseEvent;
@@ -108,7 +108,7 @@ begin
   __wasm_log(level,'HTTP',Msg);
 end;
 
-procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; Args : Array of const);
+procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; const Args : Array of const);
 
 begin
   if not EnableWasmHTTPLog then

+ 4 - 4
packages/wasm-utils/src/wasm.logger.api.pas

@@ -33,14 +33,14 @@ Type
   TWasmLogHook = procedure (Level : TWasmLogLevel; const Msg : string) of object;
 
 Const
-  AllLogLevels = [Low(TWasmLogLevel)..High(TWasmLogLevel)];
+  AllWasmLogLevels = [Low(TWasmLogLevel)..High(TWasmLogLevel)];
 
 var
   OnWasmLog : TWasmLogHook;
-  WasmLogLevels : TWasmLogLevels = AllLogLevels;
+  WasmLogLevels : TWasmLogLevels = AllWasmLogLevels;
 
 procedure __wasm_log(level : TWasmLogLevel; const Module, Msg : String);
-procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; Args : Array of const);
+procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; const Args : Array of const);
 
 implementation
 
@@ -54,7 +54,7 @@ begin
   OnWasmLog(level,'['+Module+'] '+Msg);
 end;
 
-procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; Args : Array of const);
+procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; const Args : Array of const);
 
 begin
   if not (level in WasmLogLevels) then

+ 2 - 2
packages/wasm-utils/src/wasm.websocket.api.pas

@@ -81,7 +81,7 @@ Function __wasm_websocket_on_close (aWebsocketID : TWasmWebSocketID; aUserData :
 
 
 procedure __wasmwebsocket_log(level : TWasmLogLevel; const Msg : String);
-procedure __wasmwebsocket_log(level : TWasmLogLevel; const Fmt : String; Args : Array of const);
+procedure __wasmwebsocket_log(level : TWasmLogLevel; const Fmt : String; const Args : Array of const);
 
 var
   WebSocketLogEnabled : Boolean;
@@ -100,7 +100,7 @@ begin
   __wasm_log(level,'websocket',msg);
 end;
 
-procedure __wasmwebsocket_log(level : TWasmWebSocketLogLevel; const Fmt : String; Args : Array of const);
+procedure __wasmwebsocket_log(level : TWasmWebSocketLogLevel; const Fmt : String; const Args : Array of const);
 
 begin
   if not WebSocketLogEnabled then