Skip to content

Commit

Permalink
Add canonical type interface for method args
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronj0 authored and vgvassilev committed Jun 10, 2024
1 parent 62117ff commit ad880c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clingwrapper/src/clingwrapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,14 @@ std::string Cppyy::GetMethodArgTypeAsString(TCppMethod_t method, TCppIndex_t iar
Cpp::GetFunctionArgType(method, iarg));
}

std::string Cppyy::GetMethodArgCanonTypeAsString(TCppMethod_t method, TCppIndex_t iarg)
{
return
Cpp::GetTypeAsString(
Cpp::GetCanonicalType(
Cpp::GetFunctionArgType(method, iarg)));
}

std::string Cppyy::GetMethodArgDefault(TCppMethod_t method, TCppIndex_t iarg)
{
if (!method)
Expand Down
2 changes: 2 additions & 0 deletions clingwrapper/src/cpp_cppyy.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ namespace Cppyy {
RPY_EXPORTED
std::string GetMethodArgTypeAsString(TCppMethod_t method, TCppIndex_t iarg);
RPY_EXPORTED
std::string GetMethodArgCanonTypeAsString(TCppMethod_t method, TCppIndex_t iarg);
RPY_EXPORTED
std::string GetMethodArgDefault(TCppMethod_t, TCppIndex_t iarg);
RPY_EXPORTED
std::string GetMethodSignature(TCppMethod_t, bool show_formal_args, TCppIndex_t max_args = (TCppIndex_t)-1);
Expand Down

0 comments on commit ad880c4

Please sign in to comment.