diff options
Diffstat (limited to 'ace/Parse_Node.cpp')
-rw-r--r-- | ace/Parse_Node.cpp | 68 |
1 files changed, 2 insertions, 66 deletions
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp index dbd32d86357..7a599303ae0 100644 --- a/ace/Parse_Node.cpp +++ b/ace/Parse_Node.cpp @@ -15,13 +15,12 @@ ACE_RCSID (ace, "$Id$") -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - ACE_ALLOC_HOOK_DEFINE (ACE_Stream_Node) // Provide the class hierarchy that defines the parse tree of Service // Nodes. + void ACE_Stream_Node::dump (void) const { @@ -358,7 +357,6 @@ ACE_Location_Node::dump (void) const ACE_Location_Node::ACE_Location_Node (void) : pathname_ (0), - dll_ (), symbol_ (0) { ACE_TRACE ("ACE_Location_Node::ACE_Location_Node"); @@ -495,73 +493,13 @@ ACE_Function_Node::dump (void) const ACE_Function_Node::ACE_Function_Node (const ACE_TCHAR *path, const ACE_TCHAR *func_name) - : function_name_ (make_func_name (func_name)) + : function_name_ (ACE::strnew (func_name)) { ACE_TRACE ("ACE_Function_Node::ACE_Function_Node"); this->pathname (ACE::strnew (path)); this->must_delete_ = 1; } -ACE_TCHAR * -ACE_Function_Node::make_func_name (ACE_TCHAR const * func_name) -{ - // Preprocessor symbols will not be expanded if they are - // stringified. Force the preprocessor to expand them during the - // argument prescan by calling a macro that itself calls another - // that performs the actual stringification. -#if defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1 -# define ACE_MAKE_VERSIONED_NAMESPACE_NAME_STRING_IMPL(NAME) #NAME -# define ACE_MAKE_VERSIONED_NAMESPACE_NAME_STRING(NAME) ACE_MAKE_VERSIONED_NAMESPACE_NAME_STRING_IMPL(NAME) -# define ACE_VERSIONED_NAMESPACE_NAME_STRING ACE_MAKE_VERSIONED_NAMESPACE_NAME_STRING(ACE_VERSIONED_NAMESPACE_NAME) - - // Check if function is using the ACE naming convention. If so, - // it is likely that the ACE factory function macros - // (e.g. ACE_FACTORY_DECLARE) were used to declare and define it, so - // mangle the function name to include the ACE versioned namespace - // name as is done in the ACE macros. Otherwise, leave the function - // name as is. - - static ACE_TCHAR const make_prefix[] = ACE_LIB_TEXT ("_make_"); - static size_t const make_prefix_len = - sizeof (make_prefix) / sizeof (make_prefix[0]) - 1; - - if (ACE_OS::strncmp (make_prefix, func_name, make_prefix_len) == 0) - { - static ACE_TCHAR const versioned_namespace_name[] = - ACE_LIB_TEXT (ACE_VERSIONED_NAMESPACE_NAME_STRING) ACE_LIB_TEXT("_") ; - - // Null terminator included in versioned_namespace_name_len since - // it is static constant. - static size_t const versioned_namespace_name_len = - sizeof (versioned_namespace_name) - / sizeof (versioned_namespace_name[0]); // - 1; - - size_t const len = - ACE_OS::strlen (func_name) - + versioned_namespace_name_len; - // + 1; // Null terminator. - - ACE_TCHAR * mangled_func_name; - ACE_NEW_RETURN (mangled_func_name, - ACE_TCHAR[len], - 0); - - ACE_Auto_Basic_Array_Ptr<ACE_TCHAR> safe (mangled_func_name); - - ACE_OS::snprintf (mangled_func_name, - len, - ACE_LIB_TEXT ("%s%s%s"), - make_prefix, - versioned_namespace_name, - func_name + make_prefix_len); - - return safe.release (); - } -#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ - - return ACE::strnew (func_name); -} - void * ACE_Function_Node::symbol (int & yyerrno, ACE_Service_Object_Exterminator *gobbler) @@ -746,6 +684,4 @@ ACE_Static_Function_Node::~ACE_Static_Function_Node (void) delete[] const_cast<ACE_TCHAR *> (this->function_name_); } -ACE_END_VERSIONED_NAMESPACE_DECL - #endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ |