Просмотр исходного кода

* fix for 11176 val ansistring to enum

git-svn-id: trunk@10853 -
marco 17 лет назад
Родитель
Сommit
2fd39019bf
2 измененных файлов с 8 добавлено и 0 удалено
  1. 7 0
      rtl/inc/astrings.inc
  2. 1 0
      rtl/inc/compproc.inc

+ 7 - 0
rtl/inc/astrings.inc

@@ -938,6 +938,13 @@ begin
   s:=ss;
   s:=ss;
 end;
 end;
 
 
+function fpc_val_enum_ansistr(str2ordindex:pointer;const s:ansistring;out code:valsint):longint; [public, alias:'FPC_VAL_ENUM_ANSISTR']; compilerproc;
+
+begin
+  fpc_val_enum_ansistr:=fpc_val_enum_shortstr(str2ordindex,s,code);
+end;
+
+
 {$ifdef FPC_HAS_STR_CURRENCY}
 {$ifdef FPC_HAS_STR_CURRENCY}
 procedure fpc_AnsiStr_Currency(c : currency;len,fr : SizeInt;out s : ansistring);[public,alias:'FPC_ANSISTR_CURRENCY']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
 procedure fpc_AnsiStr_Currency(c : currency;len,fr : SizeInt;out s : ansistring);[public,alias:'FPC_ANSISTR_CURRENCY']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
 var
 var

+ 1 - 0
rtl/inc/compproc.inc

@@ -172,6 +172,7 @@ Function fpc_Val_Real_AnsiStr(Const S : AnsiString; out Code : ValSInt): ValReal
 Function fpc_Val_UInt_AnsiStr (Const S : AnsiString; out Code : ValSInt): ValUInt; compilerproc;
 Function fpc_Val_UInt_AnsiStr (Const S : AnsiString; out Code : ValSInt): ValUInt; compilerproc;
 Function fpc_Val_SInt_AnsiStr (DestSize: SizeInt; Const S : AnsiString; out Code : ValSInt): ValSInt; compilerproc;
 Function fpc_Val_SInt_AnsiStr (DestSize: SizeInt; Const S : AnsiString; out Code : ValSInt): ValSInt; compilerproc;
 Function fpc_Val_Currency_AnsiStr(Const S : AnsiString; out Code : ValSInt): Currency; compilerproc;
 Function fpc_Val_Currency_AnsiStr(Const S : AnsiString; out Code : ValSInt): Currency; compilerproc;
+function fpc_Val_enum_ansistr(str2ordindex:pointer;const s:ansistring;out code:valsint):longint; compilerproc;
 {$endif FPC_HAS_FEATURE_ANSISTRINGS}
 {$endif FPC_HAS_FEATURE_ANSISTRINGS}
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
 {$ifndef FPUNONE}
 {$ifndef FPUNONE}