diff options
author | Ian Lance Taylor <iant@google.com> | 2013-12-16 19:50:17 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2013-12-16 19:50:17 -0800 |
commit | 1dca0af0241475c11a842e4dd4c16ff7b367a962 (patch) | |
tree | c16b5ff43d5e2918d52e8557325ea53b79807086 /Lib/go | |
parent | 39bf2efdc980f800219cb488c24eef3ef6be5c5c (diff) | |
download | swig-1dca0af0241475c11a842e4dd4c16ff7b367a962.tar.gz |
Update for Go 1.2 release. Add support for linking SWIG code directly
into executable, rather than using a shared library.
Diffstat (limited to 'Lib/go')
-rw-r--r-- | Lib/go/cdata.i | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/go/cdata.i b/Lib/go/cdata.i index 0dac6420c..9e6dc2161 100644 --- a/Lib/go/cdata.i +++ b/Lib/go/cdata.i @@ -7,7 +7,8 @@ %{ typedef struct SWIGCDATA { char *data; - int len; + intgo len; + intgo cap; } SWIGCDATA; %} @@ -15,7 +16,8 @@ typedef struct SWIGCDATA { %typemap(out) SWIGCDATA %{ $result.data = (char*)_swig_goallocate($1.len); memcpy($result.data, $1.data, $1.len); - $result.len = (int)$1.len; + $result.len = (intgo)$1.len; + $result.cap = $result.len; %} /* ----------------------------------------------------------------------------- |