fix ENOENT from os to syscall, ditto.

This commit is contained in:
Eric Liang 2012-03-31 00:36:47 +08:00
parent 36fef91a67
commit df2ee5de49

View File

@ -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.