wlav / CPyCppyy

Other
23 stars 20 forks source link

Improve output of `CPPMethod::GetPrototype` #16

Closed guitargeek closed 8 months ago

guitargeek commented 8 months ago

Given the following function declared to cppyy and accessed via a Python proxy:

int foo(int x);

Currently accessing its func_doc, which in turn calls CPPMethod::GetPrototype, gives:

'int ::foo(int x)'

The extra set of '::' can be avoided by checking that the function is not declared inside a namespace.

See also the corresponding ROOT PR: https://github.com/root-project/root/pull/11413

Cudos goes to @vepadulano, the original author of this commit.