public static JSValue JS_NewCFunction2(JSContext ctx, JSCFunction func, string name, int length, JSCFunctionEnum cproto, int magic) { var fn = Marshal.GetFunctionPointerForDelegate(func); return(JS_NewCFunction2(ctx, fn, name, length, cproto, magic)); }
public static JSValue JSB_NewCFunctionMagic(JSContext ctx, JSCFunctionMagic func, JSAtom atom, int length, JSCFunctionEnum cproto, int magic) { var fn = Marshal.GetFunctionPointerForDelegate(func); return(JSB_NewCFunctionMagic(ctx, fn, atom, length, cproto, magic)); }
public static JSValue JS_NewCFunctionMagic(JSContext ctx, JSCFunctionMagic func, [MarshalAs(UnmanagedType.LPStr)] string name, int length, JSCFunctionEnum cproto, int magic) { var fn = Marshal.GetFunctionPointerForDelegate(func); return(JS_NewCFunction2(ctx, fn, name, length, cproto, magic)); }
public static JSValue JS_NewCFunction2(JSContext ctx, JSCFunction func, string name, int length, JSCFunctionEnum cproto, int magic) { #if JSB_UNITYLESS GCHandle.Alloc(func); #endif var fn = Marshal.GetFunctionPointerForDelegate(func); return(JS_NewCFunction2(ctx, fn, name, length, cproto, magic)); }
public static JSValue JSB_NewCFunctionMagic(JSContext ctx, JSCFunctionMagic func, JSAtom atom, int length, JSCFunctionEnum cproto, int magic) { #if JSB_UNITYLESS GCHandle.Alloc(func); #endif var fn = Marshal.GetFunctionPointerForDelegate(func); return(JSB_NewCFunctionMagic(ctx, fn, atom, length, cproto, magic)); }
private static extern JSValue JS_NewCFunction2(JSContext ctx, IntPtr func, [MarshalAs(UnmanagedType.LPStr)] string name, int length, JSCFunctionEnum cproto, int magic);
private static extern JSValue JSB_NewCFunctionMagic(JSContext ctx, IntPtr func, JSAtom atom, int length, JSCFunctionEnum cproto, int magic);