* Prefix and add const

This commit is contained in:
Michaël Van Canneyt 2024-09-08 10:31:39 +02:00
parent 44a0bdb82e
commit 9a0555cacd
2 changed files with 6 additions and 6 deletions

View File

@ -257,7 +257,7 @@ var
begin
lRegExp:=env.GetUTF8StringFromMem(aExpr,aExprLen);
lFlags:=FlagsToString(aFlags);
lFlags:=RegexpFlagsToString(aFlags);
{$IFNDEF NOLOGAPICALLS}
If LogAPICalls then
LogCall('RegExp.Allocate("%s","%s",[%x])',[lRegExp,lFlags,aID]);
@ -363,7 +363,7 @@ begin
lRegExp:=FindRegExp(aExprID);
if lRegExp=Nil then
Exit(WASMRE_RESULT_INVALIDID);
lFlags:=StringToFlags(lRegexp.RegExp.Flags);
lFlags:=StringToRegexpFlags(lRegexp.RegExp.Flags);
Env.SetMemInfoInt32(aFlags,lFLags);
Result:=WASMRE_RESULT_SUCCESS;
end;

View File

@ -59,8 +59,8 @@ Const
regexpFN_GetIndexes = 'get_indexes';
regexpFN_GetNamedGroupIndexes = 'get_named_group_indexes';
Function StringToFlags(S : String; IgnoreUnknown : Boolean = True) : Longint;
Function FlagsToString(S : Longint) : String;
Function StringToRegexpFlags(const S : String; IgnoreUnknown : Boolean = True) : Longint;
Function RegexpFlagsToString(S : Longint) : String;
implementation
@ -72,7 +72,7 @@ uses
{$ENDIF}
Function StringToFlags(S : String; IgnoreUnknown : Boolean = True) : Longint;
Function StringToRegexpFlags(const S : String; IgnoreUnknown : Boolean = True) : Longint;
var
C : Char;
@ -100,7 +100,7 @@ begin
end;
end;
Function FlagsToString(S : Longint) : String;
Function RegexpFlagsToString(S : Longint) : String;
var
C,I : Longint;