diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-07 19:54:27 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-07 19:54:27 +0000 |
commit | e8494c8bed7970087c16a0a296898bcf93f74e2e (patch) | |
tree | b5d8f0676d01765da54f3f314d7179dc8e8b9cf0 | |
parent | 9337c4787880081dda9850605abc33a30458d120 (diff) | |
download | ATCD-e8494c8bed7970087c16a0a296898bcf93f74e2e.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-99c | 16 | ||||
-rw-r--r-- | TAO/examples/POA/DSI/Database_i.cpp | 12 | ||||
-rw-r--r-- | TAO/examples/POA/Loader/Servant_Activator.cpp | 15 | ||||
-rw-r--r-- | TAO/examples/POA/Loader/Servant_Locator.cpp | 19 | ||||
-rw-r--r-- | TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp | 30 |
5 files changed, 53 insertions, 39 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 87d0a4fc1cf..19feb1d2d06 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,19 @@ +Wed Apr 07 14:34:31 1999 Irfan Pyarali <irfan@cs.wustl.edu> + + * examples/POA/DSI/Database_i.cpp (_is_a): Removed unused + variable. + + * examples/POA/Loader/Servant_Activator.cpp (ServantActivator_i): + * examples/POA/Loader/Servant_Locator.cpp (ServantLocator_i): + * examples/POA/On_Demand_Loading/Servant_Manager.cpp (obtain_servant): + + Should use a simple cast for casting functions and not + reinterpret_cast. + + * examples/POA/On_Demand_Loading/Servant_Manager.cpp + (parse_string): Fixed comparison between signed and unsigned; + <index> should be signed. + Wed Apr 7 14:05:09 1999 Marina Spivak <marina@cs.wustl.edu> * orbsvcs/orbsvcs/Naming/Hash_Naming_Context.{h,cpp} diff --git a/TAO/examples/POA/DSI/Database_i.cpp b/TAO/examples/POA/DSI/Database_i.cpp index 6d087f7dd52..7a334176ef7 100644 --- a/TAO/examples/POA/DSI/Database_i.cpp +++ b/TAO/examples/POA/DSI/Database_i.cpp @@ -72,14 +72,14 @@ DatabaseImpl::Entry::_is_a (CORBA::ServerRequest_ptr request, CORBA::NVList_ptr list; this->orb_->create_list (0, list); - CORBA::Any any_1 (CORBA::_tc_string); - ACE_TRY { - CORBA::NamedValue_ptr named_value_1 = list->add_value ("value", - any_1, - CORBA::ARG_IN, - ACE_TRY_ENV); + CORBA::Any any_1 (CORBA::_tc_string); + + list->add_value ("value", + any_1, + CORBA::ARG_IN, + ACE_TRY_ENV); ACE_TRY_CHECK; ACE_UNUSED_ARG (named_value_1); diff --git a/TAO/examples/POA/Loader/Servant_Activator.cpp b/TAO/examples/POA/Loader/Servant_Activator.cpp index 4f85df3d836..2e5107f8dca 100644 --- a/TAO/examples/POA/Loader/Servant_Activator.cpp +++ b/TAO/examples/POA/Loader/Servant_Activator.cpp @@ -24,7 +24,7 @@ ACE_RCSID(Loader, Servant_Activator, "$Id$") // Initialization.The dllname is used by the Loactor to load it into // memory. The factory function is the point of entry into the dll and // is used for obtaining the servant. The garbage_collection_function -// is used to kill the servant. +// is used to kill the servant. ServantActivator_i::ServantActivator_i (CORBA::ORB_ptr orb, const char *dllname, @@ -37,17 +37,17 @@ ServantActivator_i::ServantActivator_i (CORBA::ORB_ptr orb, ACE_ERROR ((LM_ERROR, "%p\n", this->dll_.error ())); - + // Obtain the symbol for the function that will // get the servant object. - servant_supplier_ = ACE_reinterpret_cast - (SERVANT_FACTORY, this->dll_.symbol (factory_function)); + servant_supplier_ = + (SERVANT_FACTORY) this->dll_.symbol (factory_function); // Obtain tne symbol for the function which - // will destroy the servant. - servant_garbage_collector_ = ACE_reinterpret_cast - (SERVANT_GARBAGE_COLLECTOR, this->dll_.symbol (garbage_collection_function)); + // will destroy the servant. + servant_garbage_collector_ = + (SERVANT_GARBAGE_COLLECTOR) this->dll_.symbol (garbage_collection_function); } @@ -91,4 +91,3 @@ ServantActivator_i::etherealize (const PortableServer::ObjectId &oid, servant); } - diff --git a/TAO/examples/POA/Loader/Servant_Locator.cpp b/TAO/examples/POA/Loader/Servant_Locator.cpp index c7efd9be85d..dbef4f24377 100644 --- a/TAO/examples/POA/Loader/Servant_Locator.cpp +++ b/TAO/examples/POA/Loader/Servant_Locator.cpp @@ -24,7 +24,7 @@ ACE_RCSID(Loader, Servant_Locator, "$Id$") // Initialization.The dllname is used by the Loactor to load it into // memory. The factory function is the point of entry into the dll and // is used for obtaining the servant. The garbage_collection_function -// is used to kill the servant. +// is used to kill the servant. ServantLocator_i::ServantLocator_i (CORBA::ORB_ptr orb, const char *dllname, @@ -37,16 +37,16 @@ ServantLocator_i::ServantLocator_i (CORBA::ORB_ptr orb, ACE_ERROR ((LM_ERROR, "%p", this->dll_.error ())); - + // Obtain the symbol for the function that will // get the servant object. - servant_supplier_ = ACE_reinterpret_cast - (SERVANT_FACTORY, this->dll_.symbol (factory_function)); + servant_supplier_ = + (SERVANT_FACTORY) this->dll_.symbol (factory_function); // Obtain tne symbol for the function which - // will destroy the servant. - servant_garbage_collector_ = ACE_reinterpret_cast - (SERVANT_GARBAGE_COLLECTOR, this->dll_.symbol (garbage_collection_function)); + // will destroy the servant. + servant_garbage_collector_ = + (SERVANT_GARBAGE_COLLECTOR) this->dll_.symbol (garbage_collection_function); } @@ -67,7 +67,7 @@ ServantLocator_i::preinvoke (const PortableServer::ObjectId &oid, { // Return the servant as the cookie , used as a check when // postinvoke is called on this ServantLocator_i. - + cookie = servant; return servant; } @@ -92,7 +92,7 @@ ServantLocator_i::postinvoke (const PortableServer::ObjectId &oid, PortableServer::Servant my_servant = ACE_reinterpret_cast (PortableServer::Servant, cookie); - + ACE_ASSERT (servant == my_servant); // Invoke the garbage_collection_function. @@ -103,4 +103,3 @@ ServantLocator_i::postinvoke (const PortableServer::ObjectId &oid, // To avoid warning about unused variable with ACE_NDEBUG. ACE_UNUSED_ARG (my_servant); } - diff --git a/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp b/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp index 2c6069f5d02..3ffa8a7881e 100644 --- a/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp @@ -43,11 +43,11 @@ ServantManager_i::obtain_servant (const char *str, { // The string format is <dllname:factory_function> that must be // parsed. - this->parse_string (str); + this->parse_string (str); // Create the DLL object. ACE_DLL *dll; - + ACE_NEW_RETURN (dll, ACE_DLL, 0); @@ -61,10 +61,10 @@ ServantManager_i::obtain_servant (const char *str, "before bind\n")); // Make an HASH_MAP entry by binding the object_id and the DLL // object associated with it together. - if (this->servant_map_.bind (oid.in (), + if (this->servant_map_.bind (oid.in (), dll) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", "Bind failed"), 0); // Now that the dll name is available we open the dll. @@ -76,8 +76,8 @@ ServantManager_i::obtain_servant (const char *str, // The next step is to obtain the symbol for the function that will // create the servant object and return it. - SERVANT_FACTORY servant_creator = ACE_reinterpret_cast - (SERVANT_FACTORY, dll->symbol (create_symbol_.c_str ())); + SERVANT_FACTORY servant_creator = + (SERVANT_FACTORY) dll->symbol (create_symbol_.c_str ()); // Checking whether it is possible to create the servant. if (servant_creator == 0) @@ -95,7 +95,7 @@ ServantManager_i::obtain_servant (const char *str, // The objectID is in a format of dllname:factory_function which has // to be parsed and separated into tokens to be used. -void +void ServantManager_i::parse_string (const char *s) { // The format of the objectid is <dll:factory_function>. This @@ -104,16 +104,16 @@ ServantManager_i::parse_string (const char *s) ACE_CString str (s); - size_t index = str.find (':'); + int index = str.find (':'); // On error, npos is returned. if (index == ACE_CString::npos) ACE_ERROR ((LM_ERROR, "Required character absent!\n")); - + // The index gives us the location which is equivalent to the size // of the dllname_ string. this->dllname_ = str.substr (0, index); - + // Obtain the substring from the offset which is one greater than // the location of ':'. this->create_symbol_ = str.substr (index + 1); @@ -146,19 +146,19 @@ ServantManager_i::create_dll_object_id (const char *libname, } // This method destroys the servant and its caretaking DLL object. - + void ServantManager_i::destroy_servant (PortableServer::Servant servant, const PortableServer::ObjectId &oid) { // The servant is destroyed. delete servant; - + // Since the servant is no more the DLL object associated with it // has to be destroyed too. ACE_DLL *dll = 0; - + // Since the servant is no more the DLL object associated with it // has to be destroyed too. @@ -167,7 +167,7 @@ ServantManager_i::destroy_servant (PortableServer::Servant servant, ACE_ERROR ((LM_ERROR, "%p\n", "Unbind failed!\n")); - delete dll; + delete dll; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) |