-
Notifications
You must be signed in to change notification settings - Fork 182
[ffi] add HL_ prefix and move outside of hl.h, allow disable legacy definition #859
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
base: master
Are you sure you want to change the base?
Conversation
|
This looks good! hl_ffi.h also needs to be included in all packaging/install scripts for this to work. |
|
I wonder if it might make sense to do something like this: hl.h contains legacy ffi definitions only, instead of them being in hl_ffi.h and hl.h including hl_ffi.h. hl_ffi.h only would contain the new definitions, so it is clean. Also hl_ffi.h can define We should also add |
|
Seems better indead, will do |
|
Hum finally I'm not sure: with your idea, when including accidentally |
|
Hm, you're right that's a good point, it's annoying when header order changes behaviour like that. I think it would still make sense to keep the legacy definitions out of hl_ffi.h. Also, I think you shouldn't get the new definitions unless you include If we reorder a few of the definitions we can make hl_ffi.h independent of hl.h. For example, I think |
|
I'm not sure how to deal with the case |
For HL_PRIM I think a similar solution using #ifndef could be used to avoid redefinition issues. |
|
Sorry I was not clear: I would like to avoid my use of many My current implementation, i.e. use many |
|
Do you have other suggestions on this? |
I was hoping it might be possible to just repeat the logic in both Ideally |
See
HL_#807As suggested added
HL_prefix andHL_DISABLE_LEGACY_FFI