Patch Set 1:

(5 comments)

https://gerrit.osmocom.org/#/c/4772/1/src/host/layer23/src/mobile/script_lua.c
File src/host/layer23/src/mobile/script_lua.c:

Line 99:        struct timer_userdata *timer = (void *)(intptr_t) 
prim->timer_id;
Don't we have a macro for ptr/int conversion?


Line 114:               lua_error(L);
I think this is using a "longjmp" same for luaL_argcheck...


Line 127:       lua_setmetatable(L, -2);
In LUA one manipulates the stack and 1 <= abs(index) <= top-of-stack is a valid 
range. One can use negative or positive numbers.

stack pos #1.. the first push to the stack (e.g. bottom)
stack pos #-1 the top of stack (last push)


Line 143:       printf("GC...\n");
Need to cancel the timer here. There is no PRIM_OP_CANCEL. Should there be? 
Otherwise I do PRIM_MOB_TIMER_CANCEL primitive and no indication..


Line 147: static const struct luaL_Reg timer_funcs[] = {
these are the instance methods of the timer object. SO far only GC.. but we can 
add cancel later..


-- 
To view, visit https://gerrit.osmocom.org/4772
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-HasComments: Yes

Reply via email to