String buffers, part 2a: internal SBuf reorg. Use full pointers.

Sponsored by fmad.io.
This commit is contained in:
Mike Pall
2021-06-01 00:45:06 +02:00
parent b5dafe5891
commit 394fb6267a
24 changed files with 153 additions and 160 deletions

View File

@@ -346,8 +346,7 @@ LUA_API void luaJIT_profile_stop(lua_State *L)
lj_trace_flushall(L);
#endif
lj_buf_free(g, &ps->sb);
setmref(ps->sb.b, NULL);
setmref(ps->sb.e, NULL);
ps->sb.w = ps->sb.e = NULL;
ps->g = NULL;
}
}
@@ -362,7 +361,7 @@ LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt,
lj_buf_reset(sb);
lj_debug_dumpstack(L, sb, fmt, depth);
*len = (size_t)sbuflen(sb);
return sbufB(sb);
return sb->b;
}
#endif