Oh, I see. I though it was meant to be used interchangeably. I can't use string->blob, though, because that will copy the data and I need to modify it from C. What foreign type should I use for this sort of thing?
- (c-pointer char) with (location "string") works, but is a lot of typing
- scheme-pointer seems to work, but:
requires type cast in C:
(print ((foreign-lambda* c-string ((scheme-pointer x)) "((char*)x) = 65; return(x);") "xBC"))
allows all types, I just want blob/string:
(print ((foreign-lambda* c-string ((scheme-pointer x)) "((char*)x) = 65; return(x);") 45.0))
is there a "string" foreign type that works like "blob", that provides a (char*) argument and checks that argument is a string? Or is there a string->blob/shared procedure anywhere?
(should this be moved to chicken-users, perhaps?)