[hydra-commits] kpfleming: branch techdemo/kpfleming/slicing r573 - /techdemo/team/kpfleming/...

SVN commits to the Hydra project hydra-commits at lists.digium.com
Fri Apr 9 16:12:58 CDT 2010


Author: kpfleming
Date: Fri Apr  9 16:12:57 2010
New Revision: 573

URL: https://origsvn.digium.com/svn-view/hydra?view=rev&rev=573
Log:
ugly workaround for oddness in the factoryTable interface

Modified:
    techdemo/team/kpfleming/slicing/exceptions/TestI.cpp

Modified: techdemo/team/kpfleming/slicing/exceptions/TestI.cpp
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/exceptions/TestI.cpp?view=diff&rev=573&r1=572&r2=573
==============================================================================
--- techdemo/team/kpfleming/slicing/exceptions/TestI.cpp (original)
+++ techdemo/team/kpfleming/slicing/exceptions/TestI.cpp Fri Apr  9 16:12:57 2010
@@ -45,6 +45,13 @@
 
 TestI::TestI(const Ice::CommunicatorPtr& communicator)
 {
+	// the factoryTable interface is... interesting. if you add an exception factory
+	// with the same name as one already in the table, it just increments the reference
+	// count  on the existing factory, without even comparing the factory object
+	// handles to see if it is in fact the same factory being added. so for now we
+	// need to explicitly remove the factory that the slice2cpp translator generated
+	// before adding our own
+	IceInternal::factoryTable->removeExceptionFactory("::Test::BaseUnsliceable");
 	IceInternal::factoryTable->addExceptionFactory("::Test::BaseUnsliceable", new PreserverFactory<BaseUnsliceable>);
 }
 





More information about the asterisk-scf-commits mailing list