summaryrefslogtreecommitdiff
path: root/ace/Parse_Node.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-23 18:28:55 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-23 18:28:55 +0000
commit06ce59d348e30ce3da6106943c2d5660abc4c219 (patch)
tree193a5f6f9b2e16cb3c722e5ef066dd266832a6bd /ace/Parse_Node.cpp
parent74205f4d54deada413395d34b3dfa99d51c6f7cb (diff)
downloadATCD-IR-base.tar.gz
This commit was manufactured by cvs2svn to create tag 'IR-base'.IR-base
Diffstat (limited to 'ace/Parse_Node.cpp')
-rw-r--r--ace/Parse_Node.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp
index cda7c90ee05..da2bd33804d 100644
--- a/ace/Parse_Node.cpp
+++ b/ace/Parse_Node.cpp
@@ -519,26 +519,11 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
// Locate the factory function <function_name> in the shared
// object.
- char *function_name = ACE_const_cast (char *,
- this->function_name_);
-
- // According to the new ANSI C++ specification, casting a void*
- // pointer to a function pointer is not allowed. However,
- // casting a void* pointer to an integer type that is large
- // enough to hold the pointer value is legal. I (Nanbor) chose
- // to cast the return value to long since it should be large
- // enough to hold the void* pointer's value on most platforms.
- // I am not sure if casting a long value to a function pointer
- // is legal or not (can't find a good explanation in spec) but
- // SunC++, egcs, and KAI compilers, all of which are pretty
- // close to (or, at least claim to conform with) the standard
- // did not complain about this as an illegal pointer conversion.
- long temp_ptr =
- ACE_reinterpret_cast(long,
- ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (),
- ASYS_WIDE_STRING (function_name)));
- func = ACE_reinterpret_cast(void *(*)(ACE_Service_Object_Exterminator *),
- temp_ptr);
+ char *function_name = ACE_const_cast (char *, this->function_name_);
+
+ func = (void *(*)(ACE_Service_Object_Exterminator *))
+ ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (),
+ ASYS_WIDE_STRING (function_name));
if (func == 0)
{