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

C parser doesn’t handle file pointers correctly #358

Closed
now opened this issue Jun 22, 2011 · 1 comment
Closed

C parser doesn’t handle file pointers correctly #358

now opened this issue Jun 22, 2011 · 1 comment
Assignees
Labels
Milestone

Comments

@now
Copy link

now commented Jun 22, 2011

When using the C parser you need to write

rb_define_method(rb_cUString, "hash", rb_u_string_hash, 0); /* in ext/u/rb_u_string_hash.c */

for the parser to look in the correct file for the method definition (and its documentation). This seems to be due to a deficiency in the handling of multiple C files in that it seems per-file based and that the parser doesn’t wait for the definition to be made in a subsequent scan of, in this case, ext/u/rb_u_string_hash.c.

Until that deficiency is solved, you need to use

/* in FILE */

The regexp that tries to match FILE is, however, broken. It only allows file names matching \w+. This works fine for MRI, where all files are in the root directory, but for my project the C files are under ext/ and thus it won’t do.

The regexp should be updated to at least match [\w/\\]+.

@ghost ghost assigned lsegal Jun 22, 2011
@lsegal lsegal closed this as completed in 7f9f81f Jun 22, 2011
@now
Copy link
Author

now commented Jun 22, 2011

Thank you!

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

No branches or pull requests

2 participants