예제 #1
0
func (f *Function) NewInstance(args ...*Value) *Value {
	argv := make([]unsafe.Pointer, len(args))
	for i, arg := range args {
		argv[i] = arg.self
	}
	return newValue(f.engine, C.V8_Function_NewInstance(
		f.self, C.int(len(args)),
		unsafe.Pointer((*reflect.SliceHeader)(unsafe.Pointer(&argv)).Data),
	))
}
예제 #2
0
파일: v8_function.go 프로젝트: rocwon/v8.go
func (f *Function) NewInstance() *Value {
	return newValue(f.engine, C.V8_Function_NewInstance(f.self))
}