add fast, direct (low-level) JS function calls for QML

This commit is contained in:
polos 2021-03-08 21:04:21 +01:00
parent bfdc227b21
commit 8d3bc5234f
11 changed files with 120 additions and 17 deletions

View file

@ -978,11 +978,11 @@ static QVariantList lispToQVariantList(cl_object l_list) {
l << QVariant(toQString(l_el)); }
else if(l_el == ECL_T) { // true
l << QVariant(true); }
else if(l_el == ECL_NIL) { // null
l << QVariant(); }
else if(l_el == ECL_NIL) { // false
l << QVariant(false); }
else if(LISTP(l_el)) { // list
l << QVariant::fromValue(lispToQVariantList(l_el)); }
else { // null
else { // default: undefined
l << QVariant(); }
l_do_list = cl_cdr(l_do_list); }}
return l; }
@ -3066,11 +3066,11 @@ cl_object qjs_call(cl_object l_item, cl_object l_name, cl_object l_args) {
arg[i] = QVariant(toQString(l_arg)); }
else if(l_arg == ECL_T) { // true
arg[i] = QVariant(true); }
else if(l_arg == ECL_NIL) { // null
arg[i] = QVariant(); }
else if(l_arg == ECL_NIL) { // false
arg[i] = QVariant(false); }
else if(LISTP(l_arg)) { // list
arg[i] = QVariant::fromValue(lispToQVariantList(l_arg)); }
else { // default: null
else { // default: undefined
arg[i] = QVariant(); }
genA[i] = QGenericArgument(v, &arg[i]);
l_do_args = cl_cdr(l_do_args); }