14.11.11 11:02, Alexander Shishkin пишет:
Currently assigning UnicodeString to variant converts string to
WideString and makes variant of type varOleStr.
I think it should be varUString and w|o any conversion (also this is
delphi compatible). But the question is which type should be if
WideString
The docs should be adapted.
Normally the function returns -1 on failure, so the code is OK.
Michael.
On Mon, 14 Nov 2011, Graeme Geldenhuys wrote:
Hi,
This is the implementation of FileAge() under FPC 2.6.0 (the upcoming release)
---
Function FileAge (Con
> -Message d'origine-
> De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
> boun...@lists.freepascal.org] De la part de Helmut Hartl
> Envoyé : mercredi 9 novembre 2011 20:58
> À : fpc-devel@lists.freepascal.org
> Objet : Re: [fpc-devel] threads crash on FreeBSD 9 RC1, FPC 2.
Hi,
This is the implementation of FileAge() under FPC 2.6.0 (the upcoming release)
---
Function FileAge (Const FileName : String): Longint;
Var Info : Stat;
begin
If (fpstat (pointer(FileName),Info)<0) or fpS_ISDIR(info.st_mode) then
exit(-1)
else
Currently assigning UnicodeString to variant converts string to
WideString and makes variant of type varOleStr.
I think it should be varUString and w|o any conversion (also this is
delphi compatible). But the question is which type should be if
WideString=UnicodeString?