Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions in a namespace have the wrong id #43

Closed
rhdunn opened this issue Jul 6, 2014 · 1 comment
Closed

Functions in a namespace have the wrong id #43

rhdunn opened this issue Jul 6, 2014 · 1 comment

Comments

@rhdunn
Copy link
Contributor

rhdunn commented Jul 6, 2014

Given:

namespace foo { void bar(); }

The function has the entry:

<function id="bar" name="bar">...</function>

This is wrong, as the id is not fully qualified. It should be:

<function id="foo::bar" name="bar">...</function>

Removing the qid property from cldoc/nodes/function.py fixes this issue, but I don't know why this override was created in the first place (note: method.py overrides qid to use the Node version and not the incorrect Function version).

@jessevdk
Copy link
Owner

jessevdk commented Jul 8, 2014

This has been fixed in master (including tests). Actually, the proposed fix in pull request #49 is incorrect. The reason that the qid of the function is overridden is because cldoc will move free functions that look like they belong to a struct (C API) as a child of the struct. The id however should not include the struct as a parent. This is of course wrong then in the case of a namespace, which is now fixed.

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

No branches or pull requests

2 participants