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

Way to request function not be wrapped #53

Open
epa opened this issue May 3, 2016 · 2 comments
Open

Way to request function not be wrapped #53

epa opened this issue May 3, 2016 · 2 comments

Comments

@epa
Copy link

epa commented May 3, 2016

Sometimes when writing C code inline you want to make a 'private' function which will be called only from C code and not from Perl. You can stop Inline::C from seeing it by changing to K&R declaration style or other manoeuvres that stop the parser recognizing it. But it would be cleaner to have an explicit way:

/* no Inline */ void foo(int x) { ... }

@sisyphus
Copy link
Collaborator

Having never used K&R style declarations until today, I didn't realize they had that effect - it's handy to know:
/* unbound */ void foo(x) int x; { ... }

That seems good enough for short argument lists - a bit tedious for lengthy argument lists, I guess.

@epa
Copy link
Author

epa commented May 11, 2016

Unfortunately using the K&R syntax also disables most type checking for the function arguments. So it's not great as a workaround.

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