示例#1
0
文件: v8_script.go 项目: yangou/go-v8
// Returns a serialized representation of this ScriptData that can later be
// passed to New(). NOTE: Serialized data is platform-dependent.
//
func (sd *ScriptData) Data() []byte {
	return C.GoBytes(
		unsafe.Pointer(C.V8_ScriptData_Data(sd.self)),
		C.V8_ScriptData_Length(sd.self),
	)
}
示例#2
0
文件: v8_script.go 项目: yangou/go-v8
// Returns the length of Data().
//
func (sd *ScriptData) Length() int {
	return int(C.V8_ScriptData_Length(sd.self))
}