diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-09-07 23:15:45 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-09-07 23:15:45 +0000 |
commit | 02be92fd74f1289881ab57ed76bf0352639f3661 (patch) | |
tree | fef18725d525fa7171a6b982d40594928e5b6e68 | |
parent | 6b3bb467cbf4caccb8ab6cc2002675adef998d04 (diff) | |
download | ATCD-02be92fd74f1289881ab57ed76bf0352639f3661.tar.gz |
ChangeLogTag:Thu Sep 7 16:09:30 2000 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 14 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/corbafwd.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/corbafwd.i | 17 |
4 files changed, 31 insertions, 6 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index adcc6348277..52c90a07693 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,17 @@ +Thu Sep 7 16:09:30 2000 Ossama Othman <ossama@uci.edu> + + * tao/ORB.cpp (string_copy): + * tao/corbafwd.cpp (string_dup): + * tao/corbafwd.i (string_alloc, string_free): + + Changed usage of "CORBA::Char *" to "char *." Both are + equivalent, but the latter is consistent with the CORBA C++ + mapping. + + (string_alloc, wstring_alloc): + + Use "ACE_NEW_RETURN" macro instead "new" operator. + Thu Sep 7 15:59:23 2000 Ossama Othman <ossama@uci.edu> * TAO_IDL/be/be_visitor_operation/interceptors_cs.cpp diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 36f62b27691..ad0d33ee4c4 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -1119,8 +1119,8 @@ CORBA_ORB::check_shutdown (CORBA_Environment &ACE_TRY_ENV) // String utility support; this needs to be integrated with the ORB's // own memory allocation subsystem. -CORBA::Char* -CORBA::string_copy (const CORBA::Char *str) +char * +CORBA::string_copy (const char *str) { return CORBA::string_dup (str); } diff --git a/TAO/tao/corbafwd.cpp b/TAO/tao/corbafwd.cpp index 4978ae3380a..2536b674829 100644 --- a/TAO/tao/corbafwd.cpp +++ b/TAO/tao/corbafwd.cpp @@ -7,7 +7,7 @@ #endif /* ! __ACE_INLINE__ */ char * -CORBA::string_dup (const CORBA::Char *str) +CORBA::string_dup (const char *str) { if (!str) return 0; diff --git a/TAO/tao/corbafwd.i b/TAO/tao/corbafwd.i index 325a5637b3c..60b8773438a 100644 --- a/TAO/tao/corbafwd.i +++ b/TAO/tao/corbafwd.i @@ -5,11 +5,17 @@ ACE_INLINE char * CORBA::string_alloc (CORBA::ULong len) { // Allocate 1 + strlen to accomodate the null terminating character. - return new CORBA::Char[size_t (len + 1)]; + + char *s = 0; + ACE_NEW_RETURN (s, + char[size_t (len + 1)], + 0); + + return s; } ACE_INLINE void -CORBA::string_free (CORBA::Char *str) +CORBA::string_free (char *str) { delete [] str; } @@ -17,7 +23,12 @@ CORBA::string_free (CORBA::Char *str) ACE_INLINE CORBA::WChar* CORBA::wstring_alloc (CORBA::ULong len) { - return new CORBA::WChar [(size_t) (len + 1)]; + CORBA::WChar *s = 0; + ACE_NEW_RETURN (s, + CORBA::WChar [(size_t) (len + 1)], + 0); + + return s; } ACE_INLINE void |