示例#1
0
func (object_ *Object) GetProperty(key string) *Value {
	//keyPtr := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&key)).Data)
	keyPtr := StringToPointer(key)
	return NewValue(object_.engine, C.V8_Object_GetProperty(
		object_.self, (*C.char)(keyPtr), C.int(len(key)),
	))
}
示例#2
0
文件: v8_object.go 项目: yangou/go-v8
func (o *Object) GetProperty(key string) *Value {
	keyPtr := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&key)).Data)
	return newValue(C.V8_Object_GetProperty(
		o.self, (*C.char)(keyPtr), C.int(len(key)),
	))
}