mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
fix ENOENT from os to syscall, ditto.
This commit is contained in:
parent
36fef91a67
commit
df2ee5de49
10
go/pack.go
10
go/pack.go
@ -2,9 +2,9 @@ package msgpack
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Packs a given value and writes it into the specified writer.
|
// Packs a given value and writes it into the specified writer.
|
||||||
@ -59,7 +59,7 @@ func PackUint(writer io.Writer, value uint) (n int, err error) {
|
|||||||
case 8:
|
case 8:
|
||||||
return PackUint64(writer, *(*uint64)(unsafe.Pointer(&value)))
|
return PackUint64(writer, *(*uint64)(unsafe.Pointer(&value)))
|
||||||
}
|
}
|
||||||
return 0, os.ENOENT // never get here
|
return 0, syscall.ENOENT // never get here
|
||||||
}
|
}
|
||||||
|
|
||||||
// Packs a given value and writes it into the specified writer.
|
// Packs a given value and writes it into the specified writer.
|
||||||
@ -116,7 +116,7 @@ func PackInt(writer io.Writer, value int) (n int, err error) {
|
|||||||
case 8:
|
case 8:
|
||||||
return PackInt64(writer, *(*int64)(unsafe.Pointer(&value)))
|
return PackInt64(writer, *(*int64)(unsafe.Pointer(&value)))
|
||||||
}
|
}
|
||||||
return 0, os.ENOENT // never get here
|
return 0, syscall.ENOENT // never get here
|
||||||
}
|
}
|
||||||
|
|
||||||
// Packs a given value and writes it into the specified writer.
|
// Packs a given value and writes it into the specified writer.
|
||||||
@ -304,7 +304,7 @@ func PackUintArray(writer io.Writer, value []uint) (n int, err error) {
|
|||||||
case 8:
|
case 8:
|
||||||
return PackUint64Array(writer, *(*[]uint64)(unsafe.Pointer(&value)))
|
return PackUint64Array(writer, *(*[]uint64)(unsafe.Pointer(&value)))
|
||||||
}
|
}
|
||||||
return 0, os.ENOENT // never get here
|
return 0, syscall.ENOENT // never get here
|
||||||
}
|
}
|
||||||
|
|
||||||
// Packs a given value and writes it into the specified writer.
|
// Packs a given value and writes it into the specified writer.
|
||||||
@ -483,7 +483,7 @@ func PackIntArray(writer io.Writer, value []int) (n int, err error) {
|
|||||||
case 8:
|
case 8:
|
||||||
return PackInt64Array(writer, *(*[]int64)(unsafe.Pointer(&value)))
|
return PackInt64Array(writer, *(*[]int64)(unsafe.Pointer(&value)))
|
||||||
}
|
}
|
||||||
return 0, os.ENOENT // never get here
|
return 0, syscall.ENOENT // never get here
|
||||||
}
|
}
|
||||||
|
|
||||||
// Packs a given value and writes it into the specified writer.
|
// Packs a given value and writes it into the specified writer.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user