summaryrefslogtreecommitdiff
path: root/TAO/tao/corbafwd.i
blob: b9e4789de9ca147a909e33824b5930e0e669bda5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// $Id$

ACE_INLINE TAO_Export CORBA::String
CORBA::string_alloc (CORBA::ULong len)
{
  // Allocate 1 + strlen to accomodate the null terminating character.
  return new CORBA::Char[size_t (len + 1)];
}

ACE_INLINE TAO_Export void
CORBA::string_free (CORBA::Char *str)
{
  delete [] str;
}

ACE_INLINE TAO_Export CORBA::String
CORBA::string_dup (const CORBA::Char *str)
{
  return CORBA::string_copy (str);
}

// ----------------------------------------------------------------------
// Wide strings
// ----------------------------------------------------------------------

ACE_INLINE TAO_Export CORBA::WString
CORBA::wstring_dup (const WChar *const str)
{
  return CORBA::wstring_copy (str);
}