[Go] Change struct definition to use void *, not uint8, so

that the type is recorded as possibly containing
pointers.  This ensures that the 1.3 garbage collector
does not collect pointers passed to C++ code.
This commit is contained in:
Ian Lance Taylor 2014-07-14 08:33:43 -07:00
commit 287e84d84c
2 changed files with 8 additions and 2 deletions

View file

@ -5,6 +5,12 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.3 (in progress)
===========================
2014-07-14: ianlancetaylor
[Go] Change struct definition to use void *, not uint8, so
that the type is recorded as possibly containing
pointers. This ensures that the 1.3 garbage collector
does not collect pointers passed to C++ code.
2014-07-01: wsfulton
Fix SF Bug #1375 - Expansion of the $parentclassname special variable incorrectly contains
brackets in the expanded name.

View file

@ -1206,7 +1206,7 @@ private:
}
if (Len(parm_size) == 0) {
Append(parm_size, "1");
Append(parm_size, "SWIG_PARM_SIZE");
}
String *fn_name;
@ -1220,7 +1220,7 @@ private:
}
// \xc2\xb7 is UTF-8 for U+00B7 which is Unicode 'Middle Dot'
Printv(f->def, "\xc2\xb7", fn_name, "(struct { uint8 x[", parm_size, "];} p)", NULL);
Printv(f->def, "\xc2\xb7", fn_name, "(struct { void *x[(", parm_size, ") / SWIG_PARM_SIZE];} p)", NULL);
Delete(fn_name);
Delete(parm_size);