String buffer refactoring, part 2.

Switch to pointers for start/pos/end of buffer.
Abstract out some buffer writers.
This commit is contained in:
Mike Pall
2013-02-27 21:17:27 +01:00
parent 28cfcf7744
commit 116cdd7e9a
18 changed files with 334 additions and 336 deletions

View File

@@ -121,9 +121,9 @@ typedef void (*ASMFunction)(void);
/* Resizable string buffer. Need this here, details in lj_buf.h. */
typedef struct SBuf {
char *buf; /* String buffer base. */
MSize n; /* String buffer length. */
MSize sz; /* String buffer size. */
MRef p; /* String buffer pointer. */
MRef e; /* String buffer end pointer. */
MRef b; /* String buffer base. */
} SBuf;
/* -- Tags and values ----------------------------------------------------- */