From: Eduardo DAVILA Date: Thu, 9 Sep 2021 10:50:57 +0000 (+0200) Subject: #3403 vtk8itk5wx3-macos X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5b035b52518e01b204f3512cfac405de68e13953;p=bbtk.git #3403 vtk8itk5wx3-macos --- diff --git a/kernel/src/bbtkConnection.cxx b/kernel/src/bbtkConnection.cxx index e6ee238..9624cea 100644 --- a/kernel/src/bbtkConnection.cxx +++ b/kernel/src/bbtkConnection.cxx @@ -119,12 +119,14 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output, bbtkError("The input \""<bbGetName() <<"\" is already connected"); } - + + + //EED2021-09-06 dlopen flags for == != -> bbtkDynamicLibraryHandling.h + // std::string t1 ( from->bbGetOutputType(output).name() ); // std::string t2 ( to->bbGetInputType(input).name() ); - // if //( t1 != t2 ) - if ( from->bbGetOutputType(output) != - to->bbGetInputType(input) ) + // if //( t1 != t2 ) + if ( from->bbGetOutputType(output) != to->bbGetInputType(input) ) { if ( from->bbGetOutputType(output) == typeid(Data) ) { @@ -136,16 +138,12 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output, <<"' will be resolved at run time" ); mFromAny = true; - } - else if ( to->bbGetInputType(input) == typeid(Data) ) - { + } else if ( to->bbGetInputType(input) == typeid(Data) ) { bbtkDebugMessage("kernel",8," -> '"<()<<" : can receive any data" <bbGetName() + "." + output + "-" @@ -511,7 +509,6 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output, // LG : Connection Update does not set mTo as modified mTo->bbSetInput(mInput, mFrom->bbGetOutput(mOutput),false); } - } //================================================================== diff --git a/kernel/src/bbtkDynamicLibraryHandling.h b/kernel/src/bbtkDynamicLibraryHandling.h index 9118e9b..bfb05a9 100644 --- a/kernel/src/bbtkDynamicLibraryHandling.h +++ b/kernel/src/bbtkDynamicLibraryHandling.h @@ -64,11 +64,15 @@ // http://gcc.gnu.org/ml/gcc/2003-04/msg00256.html // http://gcc.gnu.org/ml/gcc-bugs/2003-10/msg02771.html -#define BBTK_RTLD_LOCAL +//EED2021-09-04 +#ifdef __APPLE__ +#else + #define BBTK_RTLD_LOCAL +#endif #ifndef BBTK_RTLD_LOCAL # define BBTK_RTLD_SCOPE RTLD_GLOBAL -#else +#else # define BBTK_RTLD_SCOPE RTLD_LOCAL #endif diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index a55fce1..79380c4 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -426,7 +426,7 @@ namespace bbtk const std::string &input, const std::string &value) { - BlackBox::Pointer b = GetCurrentDescriptor()->GetPrototype()->bbGetBlackBox(box); + BlackBox::Pointer b = GetCurrentDescriptor()->GetPrototype()->bbGetBlackBox(box); // Looks for the adaptor if ( ( b->bbGetInputType(input) != typeid(bbtk::any) )&& @@ -447,9 +447,7 @@ namespace bbtk a->bbExecute(); b->bbSetInput(input,a->bbGetOutput("Out")); // a->Delete(); - } - else - { + } else { std::string v(value); b->bbSetInput(input,v); } @@ -487,9 +485,7 @@ namespace bbtk //b->bbSetInput(input,a->bbGetOutput("Out")); // a->bbDelete(); return r; - } - else - { + } else { b->bbExecute(); return b->bbGetOutput(output).unsafe_get(); // std::string v = *((std::string*)b->bbGetOutput(output)) ; diff --git a/kernel/src/bbtkFactory.cxx b/kernel/src/bbtkFactory.cxx index 9e4ee36..368275a 100644 --- a/kernel/src/bbtkFactory.cxx +++ b/kernel/src/bbtkFactory.cxx @@ -657,7 +657,7 @@ namespace bbtk } bbtkDebugDecTab("kernel",7); - return b; + return b; } //=================================================================== diff --git a/kernel/src/bbtkPackage.cxx b/kernel/src/bbtkPackage.cxx index f33d84e..bcb8308 100644 --- a/kernel/src/bbtkPackage.cxx +++ b/kernel/src/bbtkPackage.cxx @@ -371,7 +371,6 @@ printf("EED Package::OpenDynamicLibrary %s %s \n", libname.c_str(), package_n void *handler; handler = dlopen(libname.c_str(), BBTK_RTLD_TIME | BBTK_RTLD_SCOPE ); // handler = dlopen(libname.c_str(), RTLD_LAZY | RTLD_LOCAL ); - if (!handler) { bbtkMessage("package",0, @@ -723,7 +722,7 @@ printf("EED Package::OpenDynamicLibrary %s %s \n", libname.c_str(), package_n const DataInfo& typeout, const std::string& name) const { - bbtkDebugMessageInc("kernel",8,"Package<"<::NewAdaptor(" <second.lock()->NewBlackBox(name); bbtkDebugDecTab("kernel",8); - return bb; - + return bb; } //==========================================================================