diff --git a/blcksock.pas b/blcksock.pas index 9e2ccbf..69b2a46 100644 --- a/blcksock.pas +++ b/blcksock.pas @@ -2443,7 +2443,7 @@ function TBlockSocket.RecvPacket(Timeout: Integer): TSynaBytes; begin {$IFDEF MSWINDOWS} //not drain CPU on large downloads... - Sleep(10{0}); + //Sleep(10{0}); {$ENDIF} x := WaitingData; if x > 0 then diff --git a/synabyte.pas b/synabyte.pas index 43d03b5..72a9dce 100644 --- a/synabyte.pas +++ b/synabyte.pas @@ -234,23 +234,30 @@ function TSynaBytes.AGetLength: NativeInt; class operator TSynaBytes.Implicit(const V1: TSynaBytes): String; var - //I: Integer; - //C: PWord; + {$IFDEF MSWINDOWS} S: RawByteString; + {$ELSE} + I: Integer; + C: PWord; + {$ENDIF} begin SetLength(Result, V1.Length); if V1.Length > 0 then begin //переписал, 4873 + {$IFDEF MSWINDOWS} SetLength(s, V1.Length); Move(V1.FBytes[0], s[1], V1.Length); Result := string(s); - {C := PWord(PWideChar(Result)); + //еще переписал, 7592 + {$ELSE} + C := PWord(PWideChar(Result)); for I := 0 to V1.Length-1 do begin C^ := V1.FBytes[I]; Inc(C); - end;} + end; + {$ENDIF} end; end;