I have a C++ function which looks like this:
string magicdiff(const string &a, const string &b);
Since from a linking viewpoint, those strings will behave like ordinary C
structs (right?) and I am not using any other feature of C++ I am thinking
about calling this from Go via the C interface without using SWIG. (Simpler
tool chain, less maintenance, ...)
Has anyone done this before and can share their experience, example code,
or useful helper functions?
side note: in order to get something running quickly, I wrapped the
function in a pure C function which uses a small struct called "mystring"
containing a char* and a length. (I need the length, because the strings
are binary data and can contain \0.) But before using this approach more
widely, I want to check if there are already best practices established.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.