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 @@ -362,13 +362,15 @@ 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)
366- {
367- #ifdef PRINT_DEBUG
368- printf (" Resolve name input = %s\n " , cppitem_name.c_str ());
369- #endif
370- return cppitem_name;
371-
365+ std::string Cppyy::ResolveName (const std::string& name) {
366+ if (!name.empty ()) {
367+ if (Cppyy::TCppType_t type =
368+ Cppyy::GetType (name, /* enable_slow_lookup=*/ true ))
369+ return Cppyy::GetTypeAsString (Cppyy::ResolveType (type));
370+ return name;
371+ }
372+ return " " ;
373+ }
372374// // Fully resolve the given name to the final type name.
373375//
374376// // try memoized type cache, in case seen before
@@ -443,7 +445,7 @@ std::string Cppyy::ResolveName(const std::string& cppitem_name)
443445// if (tclean.compare(0, 6, "const ") != 0)
444446// return TClassEdit::ShortType(tclean.c_str(), 2);
445447// return "const " + TClassEdit::ShortType(tclean.c_str(), 2);
446- }
448+ // }
447449
448450
449451Cppyy::TCppType_t Cppyy::ResolveType (TCppType_t type) {
You can’t perform that action at this time.
0 commit comments