summaryrefslogtreecommitdiff
path: root/TAO/tao/corbafwd.i
blob: 3a074b087595d99f978f2d635f922b95183e0832 (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
32
33
// -*- C++ -*-
// $Id$

ACE_INLINE 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 void
CORBA::string_free (CORBA::Char *str)
{
  delete [] str;
}

ACE_INLINE CORBA::WChar*
CORBA::wstring_alloc (CORBA::ULong len)
{
  return new CORBA::WChar [(size_t) (len + 1)];
}

ACE_INLINE void
CORBA::wstring_free (CORBA::WChar *const str)
{
  delete [] str;
}

ACE_INLINE CORBA_Environment&
CORBA::default_environment ()
{
  return TAO_default_environment ();
}