コード例 #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))
}