Update for Go 1.2 release. Add support for linking SWIG code directly

into executable, rather than using a shared library.
This commit is contained in:
Ian Lance Taylor 2013-12-16 19:50:17 -08:00
commit 1dca0af024
32 changed files with 385 additions and 371 deletions

View file

@ -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;
%}
/* -----------------------------------------------------------------------------