String buffers, part 2d: basic string buffer methods.

Sponsored by fmad.io.
This commit is contained in:
Mike Pall
2021-06-01 05:16:32 +02:00
parent edd5cbadc5
commit a119497bec
18 changed files with 816 additions and 85 deletions

View File

@@ -8,6 +8,7 @@
#if LJ_HASFFI
#include "lj_err.h"
#include "lj_buf.h"
#include "lj_tab.h"
#include "lj_ctype.h"
#include "lj_cdata.h"
@@ -621,6 +622,8 @@ void lj_cconv_ct_tv(CTState *cts, CType *d,
tmpptr = uddata(ud);
if (ud->udtype == UDTYPE_IO_FILE)
tmpptr = *(void **)tmpptr;
else if (ud->udtype == UDTYPE_BUFFER)
tmpptr = ((SBufExt *)tmpptr)->r;
} else if (tvislightud(o)) {
tmpptr = lightudV(cts->g, o);
} else if (tvisfunc(o)) {