You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a guide on how to add IO through dlls in Bend and noticed some problems with run.c and hvm.h.
hvm.h doesn't expose the inject_ functions. This is useful for returning lists and strings like we do in run.c.
The definition of struct Str is outdated in hvm.h. It has a fixed size of 256 instead of the new dynamically sized array.
inject_cons and inject_nil should be called inject_list_cons and inject_list_nil to avoid confusion with String/Cons and String/Nil.
And I also make 2 suggested additions.
inject_list that takes an array of elements and function pointer of how to encode them to HVM. It then calls inject_cons and inject_nil to properly build the list. inject_string to convert Str to bend strings.
System Settings
HVM: v2.0.21
Additional context
No response
The text was updated successfully, but these errors were encountered:
Reproducing the behavior
I'm writing a guide on how to add IO through dlls in Bend and noticed some problems with run.c and hvm.h.
hvm.h
doesn't expose theinject_
functions. This is useful for returning lists and strings like we do inrun.c
.struct Str
is outdated inhvm.h
. It has a fixed size of 256 instead of the new dynamically sized array.inject_cons
andinject_nil
should be calledinject_list_cons
andinject_list_nil
to avoid confusion with String/Cons and String/Nil.And I also make 2 suggested additions.
inject_list
that takes an array of elements and function pointer of how to encode them to HVM. It then callsinject_cons
andinject_nil
to properly build the list.inject_string
to convertStr
to bend strings.System Settings
HVM: v2.0.21
Additional context
No response
The text was updated successfully, but these errors were encountered: