Skip to content
Snippets Groups Projects
Commit 1d3b46cc authored by Wim Lavrijsen's avatar Wim Lavrijsen
Browse files

Cling workaround for ROOT-5204 _Bool -> bool

parent 8f9b744a
No related branches found
No related tags found
No related merge requests found
...@@ -105,14 +105,20 @@ std::string PyROOT::TMemberAdapter::Name( unsigned int mod ) const ...@@ -105,14 +105,20 @@ std::string PyROOT::TMemberAdapter::Name( unsigned int mod ) const
} else if ( mod & Rflx::FINAL ) } else if ( mod & Rflx::FINAL )
return Utility::ResolveTypedef( fMember->GetName() ); return Utility::ResolveTypedef( fMember->GetName() );
// new with cling, TMethod names are fully scoped ... // CLING WORKAROUND -- TMethod names are fully scoped ...
TMethod* m = (TMethod*)*this; TMethod* m = (TMethod*)*this;
if (m && m->GetClass()) { if (m && m->GetClass()) {
std::string scoped_name = m->GetName(); std::string scoped_name = m->GetName();
std::string class_name = m->GetClass()->GetName(); std::string class_name = m->GetClass()->GetName();
std::string::size_type pos = scoped_name.find(class_name + "::"); std::string::size_type pos = scoped_name.find(class_name + "::");
if (pos == 0) // only accept found at start if (pos == 0) // only accept found at start
return scoped_name.substr(class_name.size() + 2 /* for :: */, std::string::npos); scoped_name = scoped_name.substr(class_name.size() + 2 /* for :: */, std::string::npos);
// CLING WORKAROUND (ROOT-5204) -- operator _Bool -> operator bool
if ( scoped_name == "operator _Bool" )
scoped_name = "operator bool";
// -- CLING WORKAROUND
return scoped_name;
} }
// CLING WORKAROUND -- should not be null, but can be due #100389 // CLING WORKAROUND -- should not be null, but can be due #100389
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment