File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -362,13 +362,17 @@ std::string Cppyy::ToString(TCppType_t klass, TCppObject_t obj)
362362}
363363
364364// // name to opaque C++ scope representation -----------------------------------
365- std::string Cppyy::ResolveName (const std::string& cppitem_name )
365+ std::string Cppyy::ResolveName (const std::string& name )
366366{
367- #ifdef PRINT_DEBUG
368- printf (" Resolve name input = %s\n " , cppitem_name.c_str ());
369- #endif
370- return cppitem_name;
371-
367+ if (!name.empty ()) {
368+ Cppyy::TCppType_t type = Cppyy::GetType (name, true );
369+ if (type) {
370+ return Cppyy::GetTypeAsString (Cppyy::ResolveType (type));
371+ }
372+ return name;
373+ }
374+ return " " ;
375+ }
372376// // Fully resolve the given name to the final type name.
373377//
374378// // try memoized type cache, in case seen before
@@ -443,7 +447,7 @@ std::string Cppyy::ResolveName(const std::string& cppitem_name)
443447// if (tclean.compare(0, 6, "const ") != 0)
444448// return TClassEdit::ShortType(tclean.c_str(), 2);
445449// return "const " + TClassEdit::ShortType(tclean.c_str(), 2);
446- }
450+ // }
447451
448452
449453Cppyy::TCppType_t Cppyy::ResolveType (TCppType_t type) {
You can’t perform that action at this time.
0 commit comments