DmBel 5 months ago
parent
commit
608d88a1d7
2 changed files with 12 additions and 5 deletions
  1. 1 1
      blcksock.pas
  2. 11 4
      synabyte.pas

+ 1 - 1
blcksock.pas

@@ -2443,7 +2443,7 @@ begin
   begin
     {$IFDEF MSWINDOWS}
     //not drain CPU on large downloads...
-    Sleep(10{0});
+    //Sleep(10{0});
     {$ENDIF}
     x := WaitingData;
     if x > 0 then

+ 11 - 4
synabyte.pas

@@ -234,23 +234,30 @@ end;
 
 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;