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

struct field name clashes with ocaml macro #725

Closed
joprice opened this issue Jan 30, 2023 · 1 comment
Closed

struct field name clashes with ocaml macro #725

joprice opened this issue Jan 30, 2023 · 1 comment

Comments

@joprice
Copy link

joprice commented Jan 30, 2023

I am binding to a struct that defines a field called "callback". This ends up being passed to offsetof, where the pre-processor kicks in and expands it to caml_callback, resulting in the below error.

 has no member named ‘caml_callback’; did you mean ‘callback’?
   71 | #define callback caml_callback
      |                  ^~~~~~~~~~~~~

Is there any way to work around this?

@joprice
Copy link
Author

joprice commented Jan 30, 2023

Looks like this is a dupe of #712

@joprice joprice closed this as completed Jan 30, 2023
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

1 participant