Lines Matching refs:kL
87 klua_State *kL;
98 klua_lock(sc.kL);
99 lua_getglobal(sc.kL->L, "is_happy");
101 if (!lua_isfunction(sc.kL->L, -1)) {
102 lua_pop(sc.kL->L, 1);
103 klua_unlock(sc.kL);
107 lua_pushnumber(sc.kL->L, n);
108 if (lua_pcall(sc.kL->L, 1 /* args */, 1 /* res */, 0) != 0) {
109 lua_pop(sc.kL->L, 2);
110 klua_unlock(sc.kL);
114 if (!lua_isnumber(sc.kL->L, -1)) {
115 lua_pop(sc.kL->L, 1);
116 klua_unlock(sc.kL);
120 rv = lua_tointeger(sc.kL->L, -1);
122 lua_pop(sc.kL->L, 1);
123 klua_unlock(sc.kL);
199 if ((sc.kL = kluaL_newstate("happy",
210 klua_close(sc.kL);