Browse Source

--- Merging r23638 into '.':
U rtl/objpas/classes/stringl.inc
--- Merging r23772 into '.':
U packages/opengl/src/glext.pp
--- Merging r23890 into '.':
U packages/paszlib/src/trees.pas
--- Merging r23899 into '.':
G rtl/objpas/classes/stringl.inc
--- Merging r24028 into '.':
U rtl/objpas/strutils.pp

# revisions: 23638,23772,23890,23899,24028
r23638 | florian | 2013-02-20 22:36:02 +0100 (Wed, 20 Feb 2013) | 1 line
Changed paths:
M /trunk/rtl/objpas/classes/stringl.inc

* patch by Bart Broersma, simplify TStringList.InsertItem, resolves #23860
r23772 | jonas | 2013-03-10 11:29:08 +0100 (Sun, 10 Mar 2013) | 1 line
Changed paths:
M /trunk/packages/opengl/src/glext.pp

* fixed definition of GLHandleARB for Darwin (patch by lks, mantis #23975)
r23890 | florian | 2013-03-17 15:25:28 +0100 (Sun, 17 Mar 2013) | 1 line
Changed paths:
M /trunk/packages/paszlib/src/trees.pas

* avoid range check error when compiled with -Cr
r23899 | michael | 2013-03-17 18:00:39 +0100 (Sun, 17 Mar 2013) | 1 line
Changed paths:
M /trunk/rtl/objpas/classes/stringl.inc

* Fixed 23805
r24028 | svenbarth | 2013-03-28 11:08:42 +0100 (Thu, 28 Mar 2013) | 4 lines
Changed paths:
M /trunk/rtl/objpas/strutils.pp

Applied patch from Reinier Olislagers. Fix for Mantis #24159.

rtl/objpas/strutils.pp, ReplaceStr & ReplaceText:
Correctly assign the result value

git-svn-id: branches/fixes_2_6@25020 -

marco 12 years ago
parent
commit
bb0980d7d0

+ 4 - 0
packages/opengl/src/glext.pp

@@ -54,7 +54,11 @@ type
   PGLcharARB = ^GLcharARB;
   PPGLchar = ^PGLchar;
 
+  {$ifdef DARWIN}
+  GLHandleARB = Pointer;              // defined as void * in OpenGL.framework/glext.h
+  {$else}
   GLhandleARB = Cardinal;
+  {$endif}
   TGLhandleARB = GLhandleARB;
   PGLhandleARB = ^GLhandleARB;
 

+ 2 - 0
packages/paszlib/src/trees.pas

@@ -1476,7 +1476,9 @@ begin
   for n := 0 to max_code do
   begin
     curlen := nextlen;
+{$push}{$R-}
     nextlen := tree[n+1].dl.Len;
+{$pop}
     inc(count);
     if (count < max_count) and (curlen = nextlen) then
       continue

+ 2 - 11
rtl/objpas/classes/stringl.inc

@@ -781,7 +781,7 @@ begin
     begin
     S:=Strings[Result];
     len:=pos(FNameValueSeparator,S)-1;
-    if (len>0) and (DoCompareText(Name,Copy(S,1,Len))=0) then
+    if (len>=0) and (DoCompareText(Name,Copy(S,1,Len))=0) then
       exit;
     inc(result);
     end;
@@ -1017,16 +1017,7 @@ end;
 
 Procedure TStringList.InsertItem(Index: Integer; const S: string);
 begin
-  Changing;
-  If FCount=Fcapacity then Grow;
-  If Index<FCount then
-    System.Move (FList^[Index],FList^[Index+1],
-                 (FCount-Index)*SizeOf(TStringItem));
-  Pointer(Flist^[Index].Fstring):=Nil;  // Needed to initialize...
-  Flist^[Index].FString:=S;
-  Flist^[Index].Fobject:=Nil;
-  Inc(FCount);
-  Changed;
+  InsertItem(Index, S, nil);
 end;
 
 

+ 2 - 2
rtl/objpas/strutils.pp

@@ -757,12 +757,12 @@ end;
 
 Function ReplaceStr(const AText, AFromText, AToText: string): string;inline;
 begin
-  AnsiReplaceStr(AText, AFromText, AToText);
+  result:=AnsiReplaceStr(AText, AFromText, AToText);
 end;
 
 Function ReplaceText(const AText, AFromText, AToText: string): string;inline;
 begin
-  AnsiReplaceText(AText, AFromText, AToText);
+  result:=AnsiReplaceText(AText, AFromText, AToText);
 end;
 
 { ---------------------------------------------------------------------