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

Function pointer signatures #44

Open
porky11 opened this issue Jan 22, 2017 · 2 comments
Open

Function pointer signatures #44

porky11 opened this issue Jan 22, 2017 · 2 comments

Comments

@porky11
Copy link

porky11 commented Jan 22, 2017

Function pointer signatures don't get displayed in the output. This may be a bug, it doesn*t seem difficult to implement.

@rpav
Copy link
Owner

rpav commented Jan 23, 2017

I'll take a look.

@porky11
Copy link
Author

porky11 commented Jan 23, 2017

maybe I should add an example:

//file test.h
void n(float(*test)(int));

I call c2ffi test.h => output:

[
{ "tag": "function", "name": "n", "ns": 0, "location": "test.h:1:6", "variadic": false, "inline": false, "storage-class": "none", "parameters": [{ "tag": "parameter", "name": "test", "type": { "tag": ":function-pointer" } }], "return-type": { "tag": ":void" } }
]

I would expect instead of { "tag": ":function-pointer" } :

{ "tag": "function-pointer", "variadic": false, "parameters": [{ "tag": "parameter", "type": { "tag": ":int" } }], "return-type": { "tag": ":float" } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants