diff options
author | Momtchil Momtchev <momtchil@momtchev.com> | 2023-04-26 18:26:31 +0200 |
---|---|---|
committer | Momtchil Momtchev <momtchil@momtchev.com> | 2023-04-26 18:26:31 +0200 |
commit | df2ef48ed770305dfeac5bf59df2802930b45d17 (patch) | |
tree | f08ae75f02f8337eb5dd0a170cc63dd3aa653dbd | |
parent | edd55210bb2d4212aeae0876372dd99c867f0071 (diff) | |
download | swig-df2ef48ed770305dfeac5bf59df2802930b45d17.tar.gz |
try to ninja fix jsc
I don't have access to jsc atm
-rw-r--r-- | Source/Modules/javascript.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx index a837f6275..fbc7ab455 100644 --- a/Source/Modules/javascript.cxx +++ b/Source/Modules/javascript.cxx @@ -1524,7 +1524,7 @@ void JSCEmitter::marshalInputArgs(Node *n, ParmList *parms, Wrapper *wrapper, Ma // process arguments int i = 0; - for (p = parms; p; i++) { + for (p = parms; p;) { String *arg = NewString(""); String *type = Getattr(p, "type"); @@ -1537,19 +1537,24 @@ void JSCEmitter::marshalInputArgs(Node *n, ParmList *parms, Wrapper *wrapper, Ma case Function: if (is_member && !is_static && i == 0) { Printv(arg, "thisObject", 0); + i++; } else { Printf(arg, "argv[%d]", i - startIdx); + i += GetInt(p, "tmap:in:numinputs"); } break; case Setter: if (is_member && !is_static && i == 0) { Printv(arg, "thisObject", 0); + i++; } else { Printv(arg, "value", 0); + i++; } break; case Ctor: Printf(arg, "argv[%d]", i); + i += GetInt(p, "tmap:in:numinputs"); break; default: Printf(stderr, "Illegal MarshallingMode."); |