github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/runtime/ppapi/bool_nacl.go (about)

     1  // Copyright 2014 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package ppapi
     6  
     7  const (
     8  	ppFalse pp_Bool = 0
     9  	ppTrue  pp_Bool = 1
    10  )
    11  
    12  func fromPPBool(b pp_Bool) bool {
    13  	return b != ppFalse
    14  }
    15  
    16  func toPPBool(b bool) pp_Bool {
    17  	if b {
    18  		return ppTrue
    19  	}
    20  	return ppFalse
    21  }