File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -364,13 +364,15 @@ std::string Cppyy::ToString(TCppType_t klass, TCppObject_t obj)
364364}
365365
366366// // name to opaque C++ scope representation -----------------------------------
367- std::string Cppyy::ResolveName (const std::string& cppitem_name)
368- {
369- #ifdef PRINT_DEBUG
370- printf (" Resolve name input = %s\n " , cppitem_name.c_str ());
371- #endif
372- return cppitem_name;
373-
367+ std::string Cppyy::ResolveName (const std::string& name) {
368+ if (!name.empty ()) {
369+ if (Cppyy::TCppType_t type =
370+ Cppyy::GetType (name, /* enable_slow_lookup=*/ true ))
371+ return Cppyy::GetTypeAsString (Cppyy::ResolveType (type));
372+ return name;
373+ }
374+ return " " ;
375+ }
374376// // Fully resolve the given name to the final type name.
375377//
376378// // try memoized type cache, in case seen before
@@ -445,7 +447,7 @@ std::string Cppyy::ResolveName(const std::string& cppitem_name)
445447// if (tclean.compare(0, 6, "const ") != 0)
446448// return TClassEdit::ShortType(tclean.c_str(), 2);
447449// return "const " + TClassEdit::ShortType(tclean.c_str(), 2);
448- }
450+ // }
449451
450452
451453Cppyy::TCppType_t Cppyy::ResolveType (TCppType_t type) {
You can’t perform that action at this time.
0 commit comments