summaryrefslogtreecommitdiff
path: root/src/lj_cconv.c
diff options
context:
space:
mode:
authorMike Pall <mike>2021-06-01 05:16:32 +0200
committerMike Pall <mike>2021-06-01 05:16:32 +0200
commita119497becdf2894fb7fa737f106464309dd7947 (patch)
tree95c7f88198ba3f12eff52fd5646207ffb31da2d5 /src/lj_cconv.c
parentedd5cbadc5cdc7b5b66d5340ee97c5abe5a3892a (diff)
downloadluajit-a119497becdf2894fb7fa737f106464309dd7947.tar.gz
luajit-a119497becdf2894fb7fa737f106464309dd7947.tar.bz2
luajit-a119497becdf2894fb7fa737f106464309dd7947.zip
String buffers, part 2d: basic string buffer methods.
Sponsored by fmad.io.
Diffstat (limited to 'src/lj_cconv.c')
-rw-r--r--src/lj_cconv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lj_cconv.c b/src/lj_cconv.c
index f948002c..613f66e2 100644
--- a/src/lj_cconv.c
+++ b/src/lj_cconv.c
@@ -8,6 +8,7 @@
8#if LJ_HASFFI 8#if LJ_HASFFI
9 9
10#include "lj_err.h" 10#include "lj_err.h"
11#include "lj_buf.h"
11#include "lj_tab.h" 12#include "lj_tab.h"
12#include "lj_ctype.h" 13#include "lj_ctype.h"
13#include "lj_cdata.h" 14#include "lj_cdata.h"
@@ -621,6 +622,8 @@ void lj_cconv_ct_tv(CTState *cts, CType *d,
621 tmpptr = uddata(ud); 622 tmpptr = uddata(ud);
622 if (ud->udtype == UDTYPE_IO_FILE) 623 if (ud->udtype == UDTYPE_IO_FILE)
623 tmpptr = *(void **)tmpptr; 624 tmpptr = *(void **)tmpptr;
625 else if (ud->udtype == UDTYPE_BUFFER)
626 tmpptr = ((SBufExt *)tmpptr)->r;
624 } else if (tvislightud(o)) { 627 } else if (tvislightud(o)) {
625 tmpptr = lightudV(cts->g, o); 628 tmpptr = lightudV(cts->g, o);
626 } else if (tvisfunc(o)) { 629 } else if (tvisfunc(o)) {