aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/locale/gnu/time_members.h
diff options
context:
space:
mode:
author(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-22 21:39:00 +0000
committer(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-22 21:39:00 +0000
commit2e9c0dc38e2692b04281844366dbb367ae1294e1 (patch)
treee56f44693864144d87710daeab9743d4e76b6037 /libstdc++-v3/config/locale/gnu/time_members.h
parent780b7d9b87ddf306aa31c750d5eb9d96a9cb69ea (diff)
This commit was manufactured by cvs2svn to create tagobjc-improvements-candidate-20030922
'objc-improvements-candidate-20030922'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/objc-improvements-candidate-20030922@71666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config/locale/gnu/time_members.h')
-rw-r--r--libstdc++-v3/config/locale/gnu/time_members.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/libstdc++-v3/config/locale/gnu/time_members.h b/libstdc++-v3/config/locale/gnu/time_members.h
index 8ef7a07107c..6badaacbfa0 100644
--- a/libstdc++-v3/config/locale/gnu/time_members.h
+++ b/libstdc++-v3/config/locale/gnu/time_members.h
@@ -36,7 +36,17 @@
template<typename _CharT>
__timepunct<_CharT>::__timepunct(size_t __refs)
- : locale::facet(__refs)
+ : facet(__refs), _M_data(NULL)
+ {
+#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
+ _M_name_timepunct = _S_c_name;
+#endif
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache)
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
_M_name_timepunct = _S_c_name;
@@ -48,7 +58,7 @@
__timepunct<_CharT>::__timepunct(__c_locale __cloc,
const char* __s __attribute__ ((__unused__)),
size_t __refs)
- : locale::facet(__refs)
+ : facet(__refs), _M_data(NULL)
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
_M_name_timepunct = new char[strlen(__s) + 1];
@@ -64,5 +74,6 @@
if (_S_c_name != _M_name_timepunct)
delete [] _M_name_timepunct;
#endif
+ delete _M_data;
_S_destroy_c_locale(_M_c_locale_timepunct);
}