mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Some missing from merge.
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
ec939a5bce
commit
f4be15a7af
1895 changed files with 160408 additions and 53601 deletions
|
|
@ -2,8 +2,11 @@
|
|||
/**
|
||||
* @file Codeset_Registry.cpp
|
||||
*
|
||||
* $Id: Codeset_Registry.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
*
|
||||
* emulated codset regstry functions
|
||||
*
|
||||
*
|
||||
* @author Phil Mesnier <mesnier_p@ociweb.com>
|
||||
*/
|
||||
//=============================================================================
|
||||
|
|
@ -12,6 +15,8 @@
|
|||
#include "ace/OS_Memory.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
// $Id: Codeset_Registry.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Codeset_Registry.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
|
@ -35,11 +40,7 @@ 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));
|
||||
}
|
||||
|
|
@ -63,11 +64,7 @@ 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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue