Esempio n. 1
0
func NewContext() *Context {
	ctx := new(Context)

	c_nil := C.JSClassRef(unsafe.Pointer(uintptr(0)))
	ctx.ref = C.JSContextRef(C.JSGlobalContextCreate(c_nil))
	return ctx
}
Esempio n. 2
0
func NewContext() *Context {
	const c_nil = unsafe.Pointer(uintptr(0))

	ctx := new(Context)

	ctx.ref = C.JSContextRef(C.JSGlobalContextCreate((*[0]uint8)(c_nil)))
	return ctx
}
Esempio n. 3
0
func NewGlobalContextFrom(raw RawGlobalContext) *GlobalContext {
	ctx := new(GlobalContext)
	ctx.ref = C.JSContextRef(raw)
	return ctx
}
Esempio n. 4
0
func NewContextFrom(raw RawContext) *Context {
	ctx := new(Context)
	ctx.ref = C.JSContextRef(raw)
	return ctx
}