Skip to content

Commit ce8b576

Browse files
fix Cppyy::GetMethodSignature to return list of argument type
1 parent 821d088 commit ce8b576

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

clingwrapper/src/clingwrapper.cxx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,16 @@ std::string Cppyy::GetMethodArgDefault(TCppMethod_t method, TCppIndex_t iarg)
14131413
std::string Cppyy::GetMethodSignature(TCppMethod_t method, bool show_formal_args, TCppIndex_t max_args)
14141414
{
14151415
// FIXME : Doesn't work for template functions as it does in cling
1416-
return Cpp::GetFunctionSignature(method);
1416+
std::ostringstream sig;
1417+
sig << "(";
1418+
size_t args = Cpp::GetFunctionNumArgs(method);
1419+
for (size_t i = 0; i < args; i++) {
1420+
sig << Cppyy::GetMethodArgTypeAsString(method, i);
1421+
if (i != args -1)
1422+
sig << ", ";
1423+
}
1424+
sig << ")";
1425+
return sig.str();
14171426
}
14181427

14191428
std::string Cppyy::GetMethodPrototype(TCppMethod_t method, bool show_formal_args)

0 commit comments

Comments
 (0)