This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patches


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have some patches for libstdc++-v3/src/string-inst.cc and
libstdc++-v3/bits/locale_facets.tcc, in functions that use
strchr(const char*,char), to capture the return value in a const char
* rather than just a char *

Anthony

Index: string-inst.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/string-inst.cc,v
retrieving revision 1.3
diff -u -p -r1.3 string-inst.cc
- --- string-inst.cc      2000/05/15 06:38:55     1.3
+++ string-inst.cc      2000/05/18 09:56:40
@@ -287,7 +287,7 @@ namespace std 
     const char* 
     string::_S_find(const char* __beg, const char* __end, char __c)
     { 
- -      char* __retval = strchr(__beg, __c); 
+      const char* __retval = strchr(__beg, __c); 
       return (__retval ? __retval : __end);
     }
 #else

Index: locale_facets.tcc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/bits/locale_facets.tcc,v
retrieving revision 1.1
diff -u -p -r1.1 locale_facets.tcc
- --- locale_facets.tcc   2000/04/21 20:33:28     1.1
+++ locale_facets.tcc   2000/05/18 09:55:08
@@ -319,7 +319,7 @@ namespace std
         {
           __valid = false;
           char __c = *__beg;
- -         char* __p = strchr(__fmt->_S_literals, __c);
+         const char* __p = strchr(__fmt->_S_literals, __c);
          
          // NB: strchr returns true for __c == 0x0
          if (__p && __c)


PGP Fingerprint: 
0E2D D32A 8732 DC31 804C  D435 9BF0 F8FE 1C1B 9AD5
PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>
Comment: PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

iQA/AwUBOSO+H5vw+P4cG5rVEQLuEACgud9m/1qada4R8dzJ9UCTRqzvAoUAoN18
LAflb4ZaL3dcbMzEsM2Iw20o
=Ju1z
-----END PGP SIGNATURE-----



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]