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

Missing Val_string and String_val macros #29

Open
jserot opened this issue Jul 4, 2020 · 1 comment
Open

Missing Val_string and String_val macros #29

jserot opened this issue Jul 4, 2020 · 1 comment

Comments

@jserot
Copy link

jserot commented Jul 4, 2020

These macros are not listed in src/bytecode/vm/values-xxx.h.
Is this deliberate ?

@Vertmo
Copy link
Collaborator

Vertmo commented Sep 30, 2020

I think that's because in OMicroB, static strings are stored in the flash memory (as much as possible in any case) in order to save RAM.
If I understand correctly, that means access to the string must be done on a character basis (otherwise you would have to basically copy the string in the RAM, which a simple macro like String_val probably shouldn't do).
I hope that's helpful. Maybe @bvaugon can explain better ?

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