diff options
Diffstat (limited to 'TAO/tao/corbafwd.i')
-rw-r--r-- | TAO/tao/corbafwd.i | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/TAO/tao/corbafwd.i b/TAO/tao/corbafwd.i index 766b0ee6a30..b9e4789de9c 100644 --- a/TAO/tao/corbafwd.i +++ b/TAO/tao/corbafwd.i @@ -16,41 +16,16 @@ CORBA::string_free (CORBA::Char *str) ACE_INLINE TAO_Export CORBA::String CORBA::string_dup (const CORBA::Char *str) { - if (!str) - return 0; - - size_t len = ACE_OS::strlen (str); - - // This allocates an extra byte for the '\0'; - CORBA::String copy = CORBA::string_alloc (len); - - ACE_OS::memcpy (copy, str, len + 1); - return copy; + return CORBA::string_copy (str); } // ---------------------------------------------------------------------- // Wide strings // ---------------------------------------------------------------------- -ACE_INLINE TAO_Export CORBA::WChar* -CORBA::wstring_alloc (CORBA::ULong len) -{ - return new CORBA::WChar [(size_t) (len + 1)]; -} - -ACE_INLINE TAO_Export void -CORBA::wstring_free (CORBA::WChar *const str) -{ - delete [] str; -} - -ACE_INLINE TAO_Export CORBA::WChar* +ACE_INLINE TAO_Export CORBA::WString CORBA::wstring_dup (const WChar *const str) { - if (!str) - return 0; - - CORBA::WChar* retval = CORBA::wstring_alloc (ACE_OS::wslen (str)); - return ACE_OS::wscpy (retval, str); + return CORBA::wstring_copy (str); } |