Permalink
Browse files

[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.
  • Loading branch information...
1 parent 83749b3 commit 287e84d84c38950c71706533a6aac0a769a107f9 Ian Lance Taylor committed Jul 14, 2014
Showing with 8 additions and 2 deletions.
  1. +6 −0 CHANGES.current
  2. +2 −2 Source/Modules/go.cxx
View
@@ -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
@@ -1206,7 +1206,7 @@ class GO:public Language {
}
if (Len(parm_size) == 0) {
- Append(parm_size, "1");
+ Append(parm_size, "SWIG_PARM_SIZE");
}
String *fn_name;
@@ -1220,7 +1220,7 @@ class GO:public Language {
}
// \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);

0 comments on commit 287e84d

Please sign in to comment.