> I think I may have found a tiny bug in core. So instead of going on IRC and > crying to Peter, I though I'd try it myself this time. I have a file like > this: > > (print ((foreign-lambda* c-string ((blob x)) "x[0] = 65; return(x);") > "xBC")) > > When I run this, everything works: > $ ./type-test > ABC > > However, I see a warning during compilation which I do not expect: > > $ csc type-test.scm > > Warning: at toplevel: > (type-test.scm:2) in procedure call to `g01', expected argument #1 of > type `(or boolean blob)', but was given an argument of type `string' >
You specify "blob" as foreign type but pass a string as the argument. That the generated code works is just a coincedence - blobs and strings have the same internal representation. You can use "string->blob" to convert the argument to a blob object. felix _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers