Low-cost abstractions for C library wrappers

There’s nothing really more specific about this. There’s just nothing you can change about @ccall. Everything it can possibly do are doable in your own code.

What’s invalid about them? What are they pointing to? You said cconvert a struct with pointer, so this struct is the input, there’s nothing to be done if you’ve already got a pointer.

Yes, as I said, you can always cache the result. Just store the String as a field of the struct returned from cconvert and keep it there. There’s no need to construct any new object during cconvert if you already have it.

1 Like