Thanks!
I think I had "magicness of types" confused with "automatically
satisfying an interface." After looking at this and more examples, I
think I am getting things straightened out. I also understand why a
non-"magic" type system is desirable.
Assuming I am understanding things correctly, could I modify the type
signature of the functions which take *_Ctypedef_gchar to take a
*GCharer type, defined as
type GCharer interface {
gchars() *C.gchar
}
and then define gchars() methods on C.gchar and C.char structs? I'm
curious to know whether there is a way to avoid having to sprinkle
(*C.gchar) and (*C.char) around my functions. I suppose it is more
efficient to perform a simple type conversion than call a function
each
time you are dealing with shuffling strings back and forth, but I
mainly
want to make sure I'm understanding the type and interface system
correctly.
Thanks again,
Daniel Hackney