-
• #2
Yes, sometimes this is done in the code, although maybe it's a little confusing... The idea is
jswrap_banglejs_pwrBacklight
is a function used by stuff injswrap_banglejs.c
, even if it's not actually a JS function.At least if you see the symbol it in a listing of compiled code you know kind of where it's defined - if all you saw was
pwrBacklight
it wouldn't give you much hint of where it was defined.Sometimes I use underscores for functions that are used like this, for example
_jswrap_banglejs_setLocked
is used byjswrap_banglejs_setLocked
, but also a bunch of other functions, so maybe we could just do that in this case?
So i found a few instances where there are jswrap functions without having any javascript definitions above it. Example
Just checking to see if this is a bug or on purpose.
This is kind of a nit pick, but if i do end up pushing a commit to move some code out of jswrap_bangle.c i could change this when i see it.