14 Star 51 Fork 12

Hprose / hprose-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.go 1.69 KB
一键复制 编辑 原始数据 按行查看 历史
Hprose 提交于 2016-10-31 21:45 . Update to hprose 2.0
/**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| http://www.hprose.org/ |
| |
\**********************************************************/
/**********************************************************\
* *
* io/types.go *
* *
* reflect types for Go. *
* *
* LastModified: Oct 19, 2016 *
* Author: Ma Bingyao <andot@hprose.com> *
* *
\**********************************************************/
package io
import (
"container/list"
"math/big"
"reflect"
"time"
"unsafe"
)
type emptyInterface struct {
typ uintptr
ptr uintptr
}
type reflectValue struct {
typ uintptr
ptr unsafe.Pointer
flag uintptr
}
func getType(v interface{}) uintptr {
return *(*uintptr)(unsafe.Pointer(&v))
}
var bytesType = getType(([]byte)(nil))
var bigIntType = getType(big.Int{})
var bigRatType = getType(big.Rat{})
var bigFloatType = getType(big.Float{})
var timeType = getType(time.Time{})
var listType = getType(list.List{})
var reflectValueType = getType(reflect.Value{})
var interfaceType = reflect.TypeOf((*interface{})(nil)).Elem()
Go
1
https://gitee.com/andot/hprose-go.git
git@gitee.com:andot/hprose-go.git
andot
hprose-go
hprose-go
v2.0.4

搜索帮助