From 661c4ba036b1889f7bef94d4e7582e28109bc342 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 17 Apr 2015 09:44:40 -0700 Subject: [Go] Add comments telling users that _swig_goallocate and _swig_makegostring will no longer work in the Go 1.5 release. Keep the existing code so that existing users with current versions of Go will not break suddenly. --- Lib/go/goruntime.swg | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/go') diff --git a/Lib/go/goruntime.swg b/Lib/go/goruntime.swg index d776e414a..8f6eb742e 100644 --- a/Lib/go/goruntime.swg +++ b/Lib/go/goruntime.swg @@ -113,6 +113,8 @@ static char *_swig_topofstack() { } } +/* This is here for backward compatibility, but it will not work + with Go 1.5 or later. Do not use it in new code. */ static void *_swig_goallocate(size_t len) { struct { size_t len; @@ -246,6 +248,8 @@ void SwigCgocallBackDone() { %insert(runtime) %{ +/* This is here for backward compatibility, but it will not work + with Go 1.5 or later. Do not use it in new code. */ static _gostring_ _swig_makegostring(const char *p, size_t l) { _gostring_ ret; ret.p = (char*)_swig_goallocate(l + 1); -- cgit v1.2.1