diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9991f0aa37a..55ca9e044a4 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2000-11-08 Mark Mitchell + + * include/bits/codecvt.h (codecvt::do_out): Make it const-correct. + (codecvt::do_in): Likewise. + 2000-11-08 David Edelsohn * src/locale-inst.cc: Add explicit instantiations of diff --git a/libstdc++-v3/include/bits/codecvt.h b/libstdc++-v3/include/bits/codecvt.h index f39009a9ea5..1c0d4137436 100644 --- a/libstdc++-v3/include/bits/codecvt.h +++ b/libstdc++-v3/include/bits/codecvt.h @@ -393,7 +393,7 @@ namespace std // Argument list for iconv specifies a byte sequence. Thus, // all to/from arrays must be brutally casted to char*. char* __cto = reinterpret_cast(__to); - char* __cfrom; + const char* __cfrom; size_t __conv; // Some encodings need a byte order marker as the first item @@ -408,13 +408,13 @@ namespace std intern_type __cfixed[__size + 1]; __cfixed[0] = static_cast(__int_bom); char_traits::copy(__cfixed + 1, __from, __size); - __cfrom = reinterpret_cast(__cfixed); + __cfrom = reinterpret_cast(__cfixed); __conv = iconv(*__desc, &__cfrom, &__flen, &__cto, &__tlen); } else { intern_type* __cfixed = const_cast(__from); - __cfrom = reinterpret_cast(__cfixed); + __cfrom = reinterpret_cast(__cfixed); __conv = iconv(*__desc, &__cfrom, &__flen, &__cto, &__tlen); } @@ -495,7 +495,7 @@ namespace std // Argument list for iconv specifies a byte sequence. Thus, // all to/from arrays must be brutally casted to char*. char* __cto = reinterpret_cast(__to); - char* __cfrom; + const char* __cfrom; size_t __conv; // Some encodings need a byte order marker as the first item @@ -510,13 +510,13 @@ namespace std extern_type __cfixed[__size + 1]; __cfixed[0] = static_cast(__ext_bom); char_traits::copy(__cfixed + 1, __from, __size); - __cfrom = reinterpret_cast(__cfixed); + __cfrom = reinterpret_cast(__cfixed); __conv = iconv(*__desc, &__cfrom, &__flen, &__cto, &__tlen); } else { extern_type* __cfixed = const_cast(__from); - __cfrom = reinterpret_cast(__cfixed); + __cfrom = reinterpret_cast(__cfixed); __conv = iconv(*__desc, &__cfrom, &__flen, &__cto, &__tlen); }