Author: sebor
Date: Fri Jul 13 17:08:59 2007
New Revision: 556190

URL: http://svn.apache.org/viewvc?view=rev&rev=556190
Log:
2007-07-13  Martin Sebor  <[EMAIL PROTECTED]>

        STDCXX-485
        * locale_body.cpp (_C_manage): Reset the capacity of the locale
        buffer to the capacity of the statically allocated buffer after
        its size shrinks below that level.

Modified:
    incubator/stdcxx/trunk/src/locale_body.cpp

Modified: incubator/stdcxx/trunk/src/locale_body.cpp
URL: 
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/locale_body.cpp?view=diff&rev=556190&r1=556189&r2=556190
==============================================================================
--- incubator/stdcxx/trunk/src/locale_body.cpp (original)
+++ incubator/stdcxx/trunk/src/locale_body.cpp Fri Jul 13 17:08:59 2007
@@ -918,7 +918,11 @@
                             (n_locales - inx) * sizeof (*locales));
 
                     delete[] locales;
-                    locales = locale_buf;
+
+                    // point at the statically allocated buffer and reset
+                    // the current capacity to the original capacity
+                    locales        = locale_buf;
+                    locale_bufsize = bufsize;
                 }
                 else {
                     // move facet pointers back


Reply via email to