Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
How do I define a fun that has a parameter of type const char **? [String] doesn't do it, with* String neither.
fun
const char **
[String]
with* String
(I just got into cffi yesterday, and the docs are very sparse and cryptic, so I'm struggling)
the C api doc says "null terminated list of strings", so I had kinda expected [String] to just work
so Ptr String compiles, but it seems to involve a lot of ceremony at callsites, is there anything to alleviate that?
Ptr String
alright, I have
s1 <- newCString "foo" withArray [s1] apiFunc
guess that should be fine.
thanks for listening!
How do I define a
fun
that has a parameter of typeconst char **
?[String]
doesn't do it,with* String
neither.(I just got into cffi yesterday, and the docs are very sparse and cryptic, so I'm struggling)
the C api doc says "null terminated list of strings", so I had kinda expected
[String]
to just workso
Ptr String
compiles, but it seems to involve a lot of ceremony at callsites, is there anything to alleviate that?alright, I have
guess that should be fine.
thanks for listening!