diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-02-01 19:20:07 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-02-01 19:20:07 +0300 |
commit | 6e67bee0f4f96ad0a7d1a231dfdae8431714c66a (patch) | |
tree | c422698ab3b7828f7346ca18e1f5a1b8305ed769 /src/nxt_thread_time.c | |
parent | 8942550b13515e54aff9d682bec3da45ade26e18 (diff) | |
download | unit-6e67bee0f4f96ad0a7d1a231dfdae8431714c66a.tar.gz unit-6e67bee0f4f96ad0a7d1a231dfdae8431714c66a.tar.bz2 |
nxt_str_t changes.
Diffstat (limited to 'src/nxt_thread_time.c')
-rw-r--r-- | src/nxt_thread_time.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nxt_thread_time.c b/src/nxt_thread_time.c index f359a95e..916aa564 100644 --- a/src/nxt_thread_time.c +++ b/src/nxt_thread_time.c @@ -102,7 +102,7 @@ nxt_thread_time_free(nxt_thread_t *thr) thr->time.no_cache = 1; for (i = 0; i < thr->time.nstrings; i++) { - nxt_free(tsc[i].string.data); + nxt_free(tsc[i].string.start); } nxt_free(tsc); @@ -353,7 +353,7 @@ nxt_thread_time_string(nxt_thread_t *thr, nxt_time_string_t *ts, u_char *buf) } - p = tsc->string.data; + p = tsc->string.start; if (nxt_slow_path(p == NULL)) { @@ -365,21 +365,21 @@ nxt_thread_time_string(nxt_thread_t *thr, nxt_time_string_t *ts, u_char *buf) return buf; } - tsc->string.data = p; + tsc->string.start = p; } p = ts->handler(p, &thr->time.now.realtime, tm, ts->size, ts->format); - tsc->string.len = p - tsc->string.data; + tsc->string.length = p - tsc->string.start; - if (nxt_slow_path(tsc->string.len == 0)) { + if (nxt_slow_path(tsc->string.length == 0)) { return buf; } tsc->last = s; } - return nxt_cpymem(buf, tsc->string.data, tsc->string.len); + return nxt_cpymem(buf, tsc->string.start, tsc->string.length); } @@ -441,7 +441,7 @@ nxt_thread_time_string_cache(nxt_thread_t *thr, nxt_atomic_uint_t slot) if (nxt_fast_path(slot < thr->time.nstrings)) { tsc = &thr->time.strings[slot]; - nxt_prefetch(tsc->string.data); + nxt_prefetch(tsc->string.start); return tsc; } @@ -458,7 +458,7 @@ nxt_thread_time_string_cache(nxt_thread_t *thr, nxt_atomic_uint_t slot) for (i = thr->time.nstrings; i < nstrings; i++) { tsc[i].last = -1; - tsc[i].string.data = NULL; + tsc[i].string.start = NULL; } thr->time.strings = tsc; |