Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 131) sorted by relevance

123456

/redis-3.2.3/deps/lua/src/
H A Dstrbuf.c62 if (!s->buf) in strbuf_init()
70 strbuf_t *s; in strbuf_new() local
73 if (!s) in strbuf_new()
81 return s; in strbuf_new()
98 (long)s, s->reallocs, s->length, s->size); in debug_stats()
155 newsize = ((newsize + s->increment - 1) / s->increment) * s->increment; in calculate_new_size()
172 (long)s, s->size, newsize); in strbuf_resize()
176 s->buf = realloc(s->buf, s->size); in strbuf_resize()
190 strbuf_resize(s, s->length + 1); in strbuf_append_string()
194 s->buf[s->length] = str[i]; in strbuf_append_string()
[all …]
H A Dstrbuf.h80 s->length = 0; in strbuf_reset()
92 return s->size - s->length - 1; in strbuf_empty_length()
98 strbuf_resize(s, s->length + len); in strbuf_ensure_empty_length()
103 return s->buf + s->length; in strbuf_empty_ptr()
108 s->length += len; in strbuf_extend_length()
119 s->buf[s->length++] = c; in strbuf_append_char()
124 s->buf[s->length++] = c; in strbuf_append_char_unsafe()
130 memcpy(s->buf + s->length, c, len); in strbuf_append_mem()
136 memcpy(s->buf + s->length, c, len); in strbuf_append_mem_unsafe()
142 s->buf[s->length] = 0; in strbuf_ensure_null()
[all …]
H A Dlstrlib.c304 while ((s+i)<ms->src_end && singlematch(uchar(*(s+i)), p, ep)) in max_expand()
322 else if (s<ms->src_end && singlematch(uchar(*s), p, ep)) in min_expand()
360 return s+len; in match_capture()
380 s = matchbalance(ms, s, p+2); in match()
391 previous = (s == ms->src_init) ? '\0' : *(s-1); in match()
398 s = match_capture(ms, s, uchar(*(p+1))); in match()
416 int m = s<ms->src_end && singlematch(uchar(*s), p, ep); in match()
470 lua_pushlstring(ms->L, s, e - s); /* add whole match */ in push_onecapture()
602 luaL_addlstring(b, s, e - s); in add_s()
636 lua_pushlstring(L, s, e - s); /* keep original text */ in add_value()
[all …]
H A Dlstring.h16 #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) argument
20 #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) argument
21 #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ argument
22 (sizeof(s)/sizeof(char))-1))
24 #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) argument
27 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
H A Dlcode.c311 e->u.s.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.s.info, 0); in luaK_dischargevars()
316 e->u.s.info = luaK_codeABx(fs, OP_GETGLOBAL, 0, e->u.s.info); in luaK_dischargevars()
323 e->u.s.info = luaK_codeABC(fs, OP_GETTABLE, 0, e->u.s.info, e->u.s.aux); in luaK_dischargevars()
377 e->u.s.info = reg; in discharge2reg()
409 e->u.s.info = reg; in exp2reg()
432 return e->u.s.info; in luaK_exp2anyreg()
491 luaK_codeABC(fs, OP_SETTABLE, var->u.s.info, var->u.s.aux, e); in luaK_storevar()
511 e->u.s.info = func; in luaK_self()
549 pc = e->u.s.info; in luaK_goiftrue()
605 e->u.s.info = luaK_codeABC(fs, OP_NOT, 0, e->u.s.info, 0); in codenot()
[all …]
H A Dlua.c141 int status = luaL_loadbuffer(L, s, strlen(s), name) || docall(L, 0, 1); in dostring()
342 char **argv = s->argv; in pmain()
350 s->status = handle_luainit(L); in pmain()
351 if (s->status != 0) return 0; in pmain()
355 s->status = 1; in pmain()
359 s->status = runargs(L, argv, (script > 0) ? script : s->argc); in pmain()
360 if (s->status != 0) return 0; in pmain()
363 if (s->status != 0) return 0; in pmain()
379 struct Smain s; in main() local
385 s.argc = argc; in main()
[all …]
/redis-3.2.3/deps/hiredis/
H A Dsds.h82 #define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (void*)((s)-(sizeof(struct sdshdr##T))); argument
83 #define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T)))) argument
110 SDS_HDR_VAR(8,s); in sdsavail()
220 sds sdsdup(const sds s);
221 void sdsfree(sds s);
240 void sdsupdatelen(sds s);
241 void sdsclear(sds s);
245 void sdstolower(sds s);
246 void sdstoupper(sds s);
258 size_t sdsAllocSize(sds s);
[all …]
H A Dsds.c151 return sdsnewlen(s, sdslen(s)); in sdsdup()
157 s_free((char*)s-sdsHdrSize(s[-1])); in sdsfree()
286 return (void*) (s-sdsHdrSize(s[-1])); in sdsAllocPtr()
362 s = sdsMakeRoomFor(s,len-curlen); in sdsgrowzero()
379 s = sdsMakeRoomFor(s,len); in sdscatlen()
407 s = sdsMakeRoomFor(s,len-sdslen(s)); in sdscpylen()
596 s = sdsMakeRoomFor(s,1); in sdscatfmt()
688 ep = end = s+sdslen(s)-1; in sdstrim()
692 if (s != sp) memmove(s, sp, len); in sdstrim()
859 s = sdscatlen(s,"\"",1); in sdscatrepr()
[all …]
/redis-3.2.3/src/
H A Dsds.h82 #define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (void*)((s)-(sizeof(struct sdshdr##T))); argument
83 #define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T)))) argument
110 SDS_HDR_VAR(8,s); in sdsavail()
220 sds sdsdup(const sds s);
221 void sdsfree(sds s);
240 void sdsupdatelen(sds s);
241 void sdsclear(sds s);
245 void sdstolower(sds s);
246 void sdstoupper(sds s);
258 size_t sdsAllocSize(sds s);
[all …]
H A Dsds.c151 return sdsnewlen(s, sdslen(s)); in sdsdup()
157 s_free((char*)s-sdsHdrSize(s[-1])); in sdsfree()
286 return (void*) (s-sdsHdrSize(s[-1])); in sdsAllocPtr()
362 s = sdsMakeRoomFor(s,len-curlen); in sdsgrowzero()
379 s = sdsMakeRoomFor(s,len); in sdscatlen()
407 s = sdsMakeRoomFor(s,len-sdslen(s)); in sdscpylen()
596 s = sdsMakeRoomFor(s,1); in sdscatfmt()
688 ep = end = s+sdslen(s)-1; in sdstrim()
692 if (s != sp) memmove(s, sp, len); in sdstrim()
859 s = sdscatlen(s,"\"",1); in sdscatrepr()
[all …]
H A Danet.c250 int s; in anetCreateSocket() local
259 close(s); in anetCreateSocket()
262 return s; in anetCreateSocket()
332 close(s); in anetTcpGenericConnect()
344 return s; in anetTcpGenericConnect()
374 int s; in anetUnixGenericConnect() local
395 return s; in anetUnixGenericConnect()
465 int s, rv; in _anetTcpServer() local
497 return s; in _anetTcpServer()
512 int s; in anetUnixServer() local
[all …]
H A Dutil.h36 int stringmatchlen(const char *p, int plen, const char *s, int slen, int nocase);
37 int stringmatch(const char *p, const char *s, int nocase);
41 int ll2string(char *s, size_t len, long long value);
42 int string2ll(const char *s, size_t slen, long long *value);
43 int string2l(const char *s, size_t slen, long *value);
/redis-3.2.3/deps/jemalloc/src/
H A Dutil.c55 UNUSED int result = write(STDERR_FILENO, s, strlen(s)); in wrtmessage()
264 s = u2s(x, 10, false, s, slen_p); in d2s()
274 s--; in d2s()
276 *s = sign; in d2s()
280 return (s); in d2s()
287 s = u2s(x, 8, false, s, slen_p); in o2s()
289 s--; in o2s()
291 *s = '0'; in o2s()
293 return (s); in o2s()
300 s = u2s(x, 16, uppercase, s, slen_p); in x2s()
[all …]
/redis-3.2.3/deps/jemalloc/include/jemalloc/
H A Djemalloc_macros.h.in40 # define JEMALLOC_ATTR(s) __attribute__((s)) argument
41 # define JEMALLOC_ALIGNED(s) JEMALLOC_ATTR(aligned(s)) argument
43 # define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s)) argument
53 # define JEMALLOC_FORMAT_PRINTF(s, i) JEMALLOC_ATTR(format(gnu_printf, s, i)) argument
55 # define JEMALLOC_FORMAT_PRINTF(s, i) JEMALLOC_ATTR(format(printf, s, i)) argument
61 # define JEMALLOC_SECTION(s) JEMALLOC_ATTR(section(s)) argument
65 # define JEMALLOC_ATTR(s) argument
66 # define JEMALLOC_ALIGNED(s) __declspec(align(s)) argument
83 # define JEMALLOC_SECTION(s) __declspec(allocate(s)) argument
91 # define JEMALLOC_ATTR(s) argument
[all …]
/redis-3.2.3/deps/jemalloc/test/unit/
H A Djunk.c72 char *s; in test_junk() local
105 s[i] = 'a'; in test_junk()
109 watch_junking(s); in test_junk()
110 s = (char *)rallocx(s, sz+1, 0); in test_junk()
119 watch_junking(s); in test_junk()
120 dallocx(s, 0); in test_junk()
212 char *s; in TEST_BEGIN() local
225 s[-1] = 0xbb; in TEST_BEGIN()
226 dallocx(s, 0); in TEST_BEGIN()
234 s[sallocx(s, 0)] = 0xbb; in TEST_BEGIN()
[all …]
H A Dzero.c11 char *s; in test_zero() local
15 s = (char *)mallocx(sz_min, 0); in test_zero()
18 for (sz = sallocx(s, 0); sz <= sz_max; in test_zero()
21 assert_c_eq(s[0], 'a', in test_zero()
24 assert_c_eq(s[sz_prev-1], 'a', in test_zero()
30 assert_c_eq(s[i], 0x0, in test_zero()
33 s[i] = 'a'; in test_zero()
36 if (xallocx(s, sz+1, 0, 0) == sz) { in test_zero()
37 s = (char *)rallocx(s, sz+1, 0); in test_zero()
38 assert_ptr_not_null((void *)s, in test_zero()
[all …]
H A Dquarantine.c71 char *s; in TEST_BEGIN() local
81 s = (char *)mallocx(1, 0); in TEST_BEGIN()
82 assert_ptr_not_null((void *)s, "Unexpected mallocx() failure"); in TEST_BEGIN()
83 s[-1] = 0xbb; in TEST_BEGIN()
84 dallocx(s, 0); in TEST_BEGIN()
90 s = (char *)mallocx(1, 0); in TEST_BEGIN()
91 assert_ptr_not_null((void *)s, "Unexpected mallocx() failure"); in TEST_BEGIN()
92 s[sallocx(s, 0)] = 0xbb; in TEST_BEGIN()
93 dallocx(s, 0); in TEST_BEGIN()
/redis-3.2.3/deps/jemalloc/test/include/test/
H A DSFMT-alti.h105 r = vec_recursion(ctx->sfmt[i].s, ctx->sfmt[i + POS1].s, r1, r2); in gen_rand_all()
132 r = vec_recursion(ctx->sfmt[i].s, ctx->sfmt[i + POS1].s, r1, r2); in gen_rand_array()
133 array[i].s = r; in gen_rand_array()
138 r = vec_recursion(ctx->sfmt[i].s, array[i + POS1 - N].s, r1, r2); in gen_rand_array()
139 array[i].s = r; in gen_rand_array()
145 r = vec_recursion(array[i - N].s, array[i + POS1 - N].s, r1, r2); in gen_rand_array()
146 array[i].s = r; in gen_rand_array()
151 ctx->sfmt[j].s = array[j + size - N].s; in gen_rand_array()
154 r = vec_recursion(array[i - N].s, array[i + POS1 - N].s, r1, r2); in gen_rand_array()
155 array[i].s = r; in gen_rand_array()
[all …]
/redis-3.2.3/deps/jemalloc/
H A Dconfig.sub739 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
743 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
747 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1340 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1352 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1398 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1405 os=`echo $os | sed -e 's|mac|macos|'`
1414 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1417 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1420 os=`echo $os | sed -e 's|sunos6|solaris3|'`
[all …]
/redis-3.2.3/deps/geohash-int/
H A Dgeohash_helper.h38 #define GZERO(s) s.bits = s.step = 0; argument
39 #define GISZERO(s) (!s.bits && !s.step) argument
40 #define GISNOTZERO(s) (s.bits || s.step) argument
/redis-3.2.3/deps/jemalloc/include/jemalloc/internal/
H A Datomic.h54 bool atomic_cas_p(void **p, void *c, void *s);
58 bool atomic_cas_z(size_t *p, size_t c, size_t s);
110 : "m" (*p), "a" (c), "r" (s) /* Inputs. */ in atomic_cas_uint64()
248 o = InterlockedCompareExchange64(p, s, c); in atomic_cas_uint64()
278 return (!__sync_bool_compare_and_swap(p, c, s)); in atomic_cas_uint64()
334 : "m" (*p), "a" (c), "r" (s) /* Inputs. */ in atomic_cas_uint32()
399 return (!atomic_cmpset_32(p, c, s)); in atomic_cas_uint32()
460 o = InterlockedCompareExchange(p, s, c); in atomic_cas_uint32()
490 return (!__sync_bool_compare_and_swap(p, c, s)); in atomic_cas_uint32()
530 atomic_cas_p(void **p, void *c, void *s) in atomic_cas_p() argument
[all …]
/redis-3.2.3/deps/lua/test/
H A Dxd.lua6 local s=io.read(16)
7 if s==nil then return end
9 string.gsub(s,"(.)",
11 io.write(string.rep(" ",3*(16-string.len(s))))
12 io.write(" ",string.gsub(s,"%c","."),"\n")
/redis-3.2.3/tests/unit/
H A Dprotocol.tcl75 set s [socket [srv 0 host] [srv 0 port]]
76 puts -nonewline $s $seq
82 puts -nonewline $s payload
83 flush $s
86 set retval [gets $s]
87 close $s
92 close $s
H A Dmaxmemory.tcl35 set used [s used_memory]
44 if {[s used_memory]+4096 > $limit} {
54 assert {[s used_memory] < ($limit+4096)}
67 set used [s used_memory]
76 if {[s used_memory]+4096 > $limit} {
93 assert {[s used_memory] < ($limit+4096)}
109 set used [s used_memory]
123 if {[s used_memory]+4096 > $limit} {
137 assert {[s used_memory] < ($limit+4096)}
/redis-3.2.3/tests/
H A Dtest_helper.tcl160 proc s {args} { procedure
466 puts -nonewline $s "SYNC\r\n"
467 flush $s
471 set count [gets $s]
482 set buf [read $s $count]
485 return $s
489 fconfigure $s -blocking 0
491 while {[gets $s count] == -1} {
495 fconfigure $s -blocking 1
501 read $s 1
[all …]

123456