I am wondering if there was a reason that jsvUnLock() does not return the JsVar that it is unlocking?
jsvUnLock()
If it did, it would seem to offer me a new way of coding. For example, today I have the option of coding:
JsVar *x = jsvNewFromInteger(10); jsvUnLock(x);
while if jsvUnLock() returned its passed in JsVar, then I would appear to have the option:
JsVar *x = jsvUnLock(jsvNewFromInteger(10));
@Kolban started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I am wondering if there was a reason that
jsvUnLock()
does not return the JsVar that it is unlocking?If it did, it would seem to offer me a new way of coding. For example, today I have the option of coding:
while if jsvUnLock() returned its passed in JsVar, then I would appear to have the option: