MCPcopy Create free account
hub / github.com/google/nftables / PutInt32

Function PutInt32

binaryutil/binaryutil.go:109–113  ·  view source on GitHub ↗

For dealing with types not supported by the encoding/binary interface

(v int32)

Source from the content-addressed store, hash-verified

107// For dealing with types not supported by the encoding/binary interface
108
109func PutInt32(v int32) []byte {
110 buf := make([]byte, 4)
111 *(*int32)(unsafe.Pointer(&buf[0])) = v
112 return buf
113}
114
115func Int32(b []byte) int32 {
116 return *(*int32)(unsafe.Pointer(&b[0]))

Callers 2

PutInt32Method · 0.92
TestOtherTypesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestOtherTypesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…