Closed mwette closed 3 years ago
Thanks for the patch, I applied a modified version of it.
I decided to deprecate implicit dereferencing of pointers, so if you used to make use of that, you will now have to make sure that you always dereference pointers explicitly.
The reason is twofold:
With the macro API, we can't know whether a provided argument will be an integer during runtime, unless it's an integer literal, but limiting the integer indexing feature to literals would be bad.
Implementing this feature breaks backwards compatibility anyway, since an integer index was already accepted but caused an implicit dereference instead of this new behavior.
I think I've tested the change thoroughly enough so I'm closing this; please reopen if you face any issues.
got it -- I will be working on this next weekend
Consider extending the bs:pointer descriptor to allow integer indexes.
In C pointers are deferenced using array syntax as if they were arrays:
candidate patch to guile/pointer.scm: