Example #1
0
// 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),
	)
}
Example #2
0
// Returns the length of Data().
//
func (sd *ScriptData) Length() int {
	return int(C.V8_ScriptData_Length(sd.self))
}