You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by yu...@apache.org on 2021/09/20 20:43:59 UTC
[thrift] branch master updated: Modified build tags to allow
js/wasm target
This is an automated email from the ASF dual-hosted git repository.
yuxuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new ab2f23a Modified build tags to allow js/wasm target
ab2f23a is described below
commit ab2f23a2a9cd8d170e6d45ae6ad0e693052e3599
Author: Balázs Grill <ba...@incquerylabs.com>
AuthorDate: Sun Sep 19 08:00:20 2021 +0200
Modified build tags to allow js/wasm target
---
lib/go/thrift/{socket_windows_conn.go => socket_non_unix_conn.go} | 7 ++++---
lib/go/thrift/socket_unix_conn.go | 3 ++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/go/thrift/socket_windows_conn.go b/lib/go/thrift/socket_non_unix_conn.go
similarity index 83%
rename from lib/go/thrift/socket_windows_conn.go
rename to lib/go/thrift/socket_non_unix_conn.go
index 679838c..75ed91d 100644
--- a/lib/go/thrift/socket_windows_conn.go
+++ b/lib/go/thrift/socket_non_unix_conn.go
@@ -1,4 +1,5 @@
-// +build windows
+//go:build windows || wasm
+// +build windows wasm
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -22,13 +23,13 @@
package thrift
func (sc *socketConn) read0() error {
- // On windows, we fallback to the default behavior of reading 0 bytes.
+ // On non-unix platforms, we fallback to the default behavior of reading 0 bytes.
var p []byte
_, err := sc.Conn.Read(p)
return err
}
func (sc *socketConn) checkConn() error {
- // On windows, we always return nil for this check.
+ // On non-unix platforms, we always return nil for this check.
return nil
}
diff --git a/lib/go/thrift/socket_unix_conn.go b/lib/go/thrift/socket_unix_conn.go
index f5fab3a..ac0dce9 100644
--- a/lib/go/thrift/socket_unix_conn.go
+++ b/lib/go/thrift/socket_unix_conn.go
@@ -1,4 +1,5 @@
-// +build !windows
+//go:build !windows && !wasm
+// +build !windows,!wasm
/*
* Licensed to the Apache Software Foundation (ASF) under one