diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-05 02:17:50 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-05 02:18:12 +0200 |
commit | dea60e13c0f32d5e1f2b6f36e5657ff7350894ce (patch) | |
tree | 886380b6b3141e77e379afd9e09a17a633f5fda3 /app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/api-android.go | |
parent | 40a30d997d256cf9ea86163f2eb16c69fc1f9cfd (diff) |
libwg-go: more efficient and safer string passing
It was unclear when the Go string was actually freed.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/api-android.go')
-rw-r--r-- | app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/api-android.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/api-android.go b/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/api-android.go index 19063eec..8ef5f21b 100644 --- a/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/api-android.go +++ b/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/api-android.go @@ -161,8 +161,8 @@ func wgGetSocketV6(tunnelHandle int32) int32 { } //export wgVersion -func wgVersion() string { - return WireGuardGoVersion +func wgVersion() *C.char { + return C.CString(WireGuardGoVersion) } func main() {} |