github.com/primecitizens/pcz/std@v0.2.1/builtin/print/print_other.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  //go:build !(android || js || wasip1)
     5  
     6  package stdprint
     7  
     8  import (
     9  	"unsafe"
    10  
    11  	"github.com/primecitizens/pcz/std/plat/libc"
    12  )
    13  
    14  func gwrite(b []byte) {
    15  	if len(b) == 0 {
    16  		return
    17  	}
    18  
    19  	libc.Write(2, uintptr(unsafe.Pointer(&b[0])), int32(len(b)))
    20  }