Lines Matching refs:j
93 int j; in sha1hex() local
99 for (j = 0; j < 20; j++) { in sha1hex()
100 digest[j*2] = cset[((hash[j]&0xF0)>>4)]; in sha1hex()
101 digest[j*2+1] = cset[(hash[j]&0xF)]; in sha1hex()
186 int j = 0; in redisProtocolToLuaType_MultiBulk() local
195 for (j = 0; j < mbulklen; j++) { in redisProtocolToLuaType_MultiBulk()
196 lua_pushnumber(lua,j+1); in redisProtocolToLuaType_MultiBulk()
319 int j = 1, mbulklen = 0; in luaReplyToRedisReply() local
323 lua_pushnumber(lua,j++); in luaReplyToRedisReply()
349 int j, argc = lua_gettop(lua); in luaRedisGenericCommand() local
389 for (j = 0; j < argc; j++) { in luaRedisGenericCommand()
394 if (lua_type(lua,j+1) == LUA_TNUMBER) { in luaRedisGenericCommand()
397 lua_Number num = lua_tonumber(lua,j+1); in luaRedisGenericCommand()
402 obj_s = (char*)lua_tolstring(lua,j+1,&obj_len); in luaRedisGenericCommand()
407 if (j < LUA_CMD_OBJCACHE_SIZE && cached_objects[j] && in luaRedisGenericCommand()
408 cached_objects_len[j] >= obj_len) in luaRedisGenericCommand()
410 sds s = cached_objects[j]->ptr; in luaRedisGenericCommand()
411 argv[j] = cached_objects[j]; in luaRedisGenericCommand()
412 cached_objects[j] = NULL; in luaRedisGenericCommand()
416 argv[j] = createStringObject(obj_s, obj_len); in luaRedisGenericCommand()
423 if (j != argc) { in luaRedisGenericCommand()
424 j--; in luaRedisGenericCommand()
425 while (j >= 0) { in luaRedisGenericCommand()
426 decrRefCount(argv[j]); in luaRedisGenericCommand()
427 j--; in luaRedisGenericCommand()
442 for (j = 0; j < c->argc; j++) { in luaRedisGenericCommand()
443 if (j == 10) { in luaRedisGenericCommand()
445 c->argc-j-1); in luaRedisGenericCommand()
448 cmdlog = sdscatsds(cmdlog,c->argv[j]->ptr); in luaRedisGenericCommand()
595 for (j = 0; j < c->argc; j++) { in luaRedisGenericCommand()
596 robj *o = c->argv[j]; in luaRedisGenericCommand()
601 if (j < LUA_CMD_OBJCACHE_SIZE && in luaRedisGenericCommand()
608 if (cached_objects[j]) decrRefCount(cached_objects[j]); in luaRedisGenericCommand()
609 cached_objects[j] = o; in luaRedisGenericCommand()
610 cached_objects_len[j] = sdsalloc(s); in luaRedisGenericCommand()
771 int j, argc = lua_gettop(lua); in luaLogCommand() local
790 for (j = 1; j < argc; j++) { in luaLogCommand()
794 s = (char*)lua_tolstring(lua,(-argc)+j,&len); in luaLogCommand()
796 if (j != 1) log = sdscatlen(log," ",1); in luaLogCommand()
854 int j = 0; in scriptingEnableGlobalsProtection() local
858 s[j++]="local dbg=debug\n"; in scriptingEnableGlobalsProtection()
859 s[j++]="local mt = {}\n"; in scriptingEnableGlobalsProtection()
860 s[j++]="setmetatable(_G, mt)\n"; in scriptingEnableGlobalsProtection()
861 s[j++]="mt.__newindex = function (t, n, v)\n"; in scriptingEnableGlobalsProtection()
862 s[j++]=" if dbg.getinfo(2) then\n"; in scriptingEnableGlobalsProtection()
863 s[j++]=" local w = dbg.getinfo(2, \"S\").what\n"; in scriptingEnableGlobalsProtection()
864 s[j++]=" if w ~= \"main\" and w ~= \"C\" then\n"; in scriptingEnableGlobalsProtection()
865 s[j++]=" error(\"Script attempted to create global variable '\"..tostring(n)..\"'\", 2)\n"; in scriptingEnableGlobalsProtection()
866 s[j++]=" end\n"; in scriptingEnableGlobalsProtection()
867 s[j++]=" end\n"; in scriptingEnableGlobalsProtection()
868 s[j++]=" rawset(t, n, v)\n"; in scriptingEnableGlobalsProtection()
869 s[j++]="end\n"; in scriptingEnableGlobalsProtection()
870 s[j++]="mt.__index = function (t, n)\n"; in scriptingEnableGlobalsProtection()
871 s[j++]=" if dbg.getinfo(2) and dbg.getinfo(2, \"S\").what ~= \"C\" then\n"; in scriptingEnableGlobalsProtection()
872 …s[j++]=" error(\"Script attempted to access unexisting global variable '\"..tostring(n)..\"'\",… in scriptingEnableGlobalsProtection()
873 s[j++]=" end\n"; in scriptingEnableGlobalsProtection()
874 s[j++]=" return rawget(t, n)\n"; in scriptingEnableGlobalsProtection()
875 s[j++]="end\n"; in scriptingEnableGlobalsProtection()
876 s[j++]="debug = nil\n"; in scriptingEnableGlobalsProtection()
877 s[j++]=NULL; in scriptingEnableGlobalsProtection()
879 for (j = 0; s[j] != NULL; j++) code = sdscatlen(code,s[j],strlen(s[j])); in scriptingEnableGlobalsProtection()
1079 int j; in luaSetGlobalArray() local
1082 for (j = 0; j < elec; j++) { in luaSetGlobalArray()
1083 lua_pushlstring(lua,(char*)elev[j]->ptr,sdslen(elev[j]->ptr)); in luaSetGlobalArray()
1084 lua_rawseti(lua,-2,j+1); in luaSetGlobalArray()
1250 int j; in evalGenericCommand() local
1256 for (j = 0; j < 40; j++) in evalGenericCommand()
1257 funcname[j+2] = (sha[j] >= 'A' && sha[j] <= 'Z') ? in evalGenericCommand()
1258 sha[j]+('a'-'A') : sha[j]; in evalGenericCommand()
1431 int j; in scriptCommand() local
1434 for (j = 2; j < c->argc; j++) { in scriptCommand()
1435 if (dictFind(server.lua_scripts,c->argv[j]->ptr)) in scriptCommand()
1730 int j; in ldbIsBreakpoint() local
1732 for (j = 0; j < ldb.bpcount; j++) in ldbIsBreakpoint()
1733 if (ldb.bp[j] == line) return 1; in ldbIsBreakpoint()
1752 int j; in ldbDelBreakpoint() local
1754 for (j = 0; j < ldb.bpcount; j++) { in ldbDelBreakpoint()
1755 if (ldb.bp[j] == line) { in ldbDelBreakpoint()
1757 memmove(ldb.bp+j,ldb.bp+j+1,ldb.bpcount-j); in ldbDelBreakpoint()
1838 int j; in ldbList() local
1840 for (j = 1; j <= ldb.lines; j++) { in ldbList()
1841 if (around != 0 && abs(around-j) > context) continue; in ldbList()
1842 ldbLogSourceLine(j); in ldbList()
2007 int j = 0; in ldbRedisProtocolToHuman_MultiBulk() local
2016 for (j = 0; j < mbulklen; j++) { in ldbRedisProtocolToHuman_MultiBulk()
2018 if (j != mbulklen-1) *o = sdscatlen(*o,",",1); in ldbRedisProtocolToHuman_MultiBulk()
2100 int j; in ldbBreak() local
2101 for (j = 0; j < ldb.bpcount; j++) in ldbBreak()
2102 ldbLogSourceLine(ldb.bp[j]); in ldbBreak()
2105 int j; in ldbBreak() local
2106 for (j = 1; j < argc; j++) { in ldbBreak()
2107 char *arg = argv[j]; in ldbBreak()
2171 int j, saved_rc = server.lua_replicate_commands; in ldbRedis() local
2176 for (j = 1; j < argc; j++) in ldbRedis()
2177 lua_pushlstring(lua,argv[j],sdslen(argv[j])); in ldbRedis()