summaryrefslogtreecommitdiff
path: root/ACE/ace/Codeset_Registry.cpp
diff options
context:
space:
mode:
authorAdam Mitz <mitza@ociweb.com>2015-11-06 17:07:11 -0600
committerAdam Mitz <mitza@ociweb.com>2015-11-06 17:07:11 -0600
commitac5e1702c9f9bee9f1f7bfce8c1a6f3847ea6b4b (patch)
tree0e70d1f51c39e688a05a6cdc2af58408222e4a0d /ACE/ace/Codeset_Registry.cpp
parent5272b5b81f92c298cb998b5bb0b0dbca3e7f29fe (diff)
downloadATCD-ac5e1702c9f9bee9f1f7bfce8c1a6f3847ea6b4b.tar.gz
Merged branch ace-face-safety (FACE Safety Profile import from OCITAO).
Diffstat (limited to 'ACE/ace/Codeset_Registry.cpp')
-rw-r--r--ACE/ace/Codeset_Registry.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ACE/ace/Codeset_Registry.cpp b/ACE/ace/Codeset_Registry.cpp
index 3a0610741fa..7ae55118d9e 100644
--- a/ACE/ace/Codeset_Registry.cpp
+++ b/ACE/ace/Codeset_Registry.cpp
@@ -35,7 +35,11 @@ ACE_Codeset_Registry::locale_to_registry_i (const ACE_CString &locale,
*num_sets = element->num_sets_;
if (char_sets != 0)
{
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_ALLOCATOR_RETURN (*char_sets,static_cast<ACE_CDR::UShort*> (ACE_Allocator::instance()->malloc(sizeof (ACE_CDR::UShort) * (element->num_sets_))),0);
+#else
ACE_NEW_RETURN (*char_sets,ACE_CDR::UShort[element->num_sets_],0);
+#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_OS::memcpy (*char_sets, element->char_sets_,
element->num_sets_ * sizeof (ACE_CDR::UShort));
}
@@ -59,7 +63,11 @@ ACE_Codeset_Registry::registry_to_locale_i (ACE_CDR::ULong codeset_id,
*num_sets = element->num_sets_;
if (char_sets != 0)
{
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_ALLOCATOR_RETURN (*char_sets,static_cast<ACE_CDR::UShort*> (ACE_Allocator::instance()->malloc(sizeof (ACE_CDR::UShort) * (element->num_sets_))),0);
+#else
ACE_NEW_RETURN (*char_sets,ACE_CDR::UShort[element->num_sets_],0);
+#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_OS::memcpy (*char_sets, element->char_sets_,
element->num_sets_ * sizeof (ACE_CDR::UShort));
}