Skip to content

Conversation

@guitargeek
Copy link
Contributor

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:
root-project/root#11413

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

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

```c++
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.
@wlav wlav merged commit d2df253 into wlav:master Mar 8, 2024
@guitargeek guitargeek deleted the cppmethod-simplify-getprototype branch March 9, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants