Просмотр исходного кода

Use reflection-driven field accesses under GopherJS.

Like App Engine, GopherJS does not support unsafe.
This change adds a 'js' build tag (set by GopherJS)
alongside the existing 'appengine' tags.

Fixes #154.
Andrew Gerrand 10 лет назад
Родитель
Сommit
dda510ac0f
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      proto/pointer_reflect.go
  2. 1 1
      proto/pointer_unsafe.go

+ 1 - 1
proto/pointer_reflect.go

@@ -29,7 +29,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// +build appengine
+// +build appengine js
 
 // This file contains an implementation of proto field accesses using package reflect.
 // It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can

+ 1 - 1
proto/pointer_unsafe.go

@@ -29,7 +29,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// +build !appengine
+// +build !appengine,!js
 
 // This file contains the implementation of the proto field accesses using package unsafe.