[Go] Fixes for Go 1.6: avoid returning Go pointers from

directors that return string values; add a trailing 0 byte
when treating Go string as C char*.
This commit is contained in:
Ian Lance Taylor 2016-04-17 17:52:09 -07:00
commit 223c2a4835
7 changed files with 81 additions and 7 deletions

View file

@ -68,6 +68,10 @@ TAscii *DigitsGlobalC;
// Director test
%feature("director");
#if defined(SWIGGO)
%typemap(godirectorout) CharPtr, CCharPtr ""
#endif
%inline %{
struct DirectorTest {
virtual UCharPtr UCharFunction(UCharPtr str) { return str; }