convertCArgsToGoValues converts C arguments to Go Value slice (unified helper). Reused by all proxy functions for consistent parameter conversion.
(argc C.int, argv *C.JSValueConst, ctx *Context)
| 11 | // convertCArgsToGoValues converts C arguments to Go Value slice (unified helper). |
| 12 | // Reused by all proxy functions for consistent parameter conversion. |
| 13 | func convertCArgsToGoValues(argc C.int, argv *C.JSValueConst, ctx *Context) []*Value { |
| 14 | if argc == 0 { |
| 15 | return nil |
| 16 | } |
| 17 | |
| 18 | cArgs := unsafe.Slice(argv, int(argc)) |
| 19 | goArgs := make([]*Value, int(argc)) |
| 20 | for i, cArg := range cArgs { |
| 21 | goArgs[i] = &Value{ctx: ctx, ref: C.JSValue(cArg)} |
| 22 | } |
| 23 | return goArgs |
| 24 | } |
| 25 | |
| 26 | // getContextAndObject retrieves context and callback target from HandleStore. |
| 27 | func getContextAndObject(ctx *C.JSContext, magic C.int, notFoundErr proxyError) (*Context, interface{}, *proxyError) { |
no outgoing calls
no test coverage detected