diff options
author | Mike Pall <mike> | 2010-12-22 23:21:38 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-12-22 23:21:38 +0100 |
commit | c0ffe7d39409b403b8e24484bd4f5ef67afa4507 (patch) | |
tree | 7b3a08212b51b031e130c8120e7635731f78a601 /src/lj_cconv.c | |
parent | 4f2f44dd97b56cd7ba07c3a9a08fcdd78913805e (diff) | |
download | luajit-c0ffe7d39409b403b8e24484bd4f5ef67afa4507.tar.gz luajit-c0ffe7d39409b403b8e24484bd4f5ef67afa4507.tar.bz2 luajit-c0ffe7d39409b403b8e24484bd4f5ef67afa4507.zip |
FFI: Record cdata allocations.
Diffstat (limited to 'src/lj_cconv.c')
-rw-r--r-- | src/lj_cconv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_cconv.c b/src/lj_cconv.c index 06e3160f..85fd57e5 100644 --- a/src/lj_cconv.c +++ b/src/lj_cconv.c | |||
@@ -693,7 +693,7 @@ static void cconv_struct_init(CTState *cts, CType *d, CTSize sz, uint8_t *dp, | |||
693 | ** This is true if an aggregate is to be initialized with a value. | 693 | ** This is true if an aggregate is to be initialized with a value. |
694 | ** Valarrays are treated as values here so ct_tv handles (V|C, I|F). | 694 | ** Valarrays are treated as values here so ct_tv handles (V|C, I|F). |
695 | */ | 695 | */ |
696 | static int cconv_multi_init(CTState *cts, CType *d, TValue *o) | 696 | int lj_cconv_multi_init(CTState *cts, CType *d, TValue *o) |
697 | { | 697 | { |
698 | if (!(ctype_isrefarray(d->info) || ctype_isstruct(d->info))) | 698 | if (!(ctype_isrefarray(d->info) || ctype_isstruct(d->info))) |
699 | return 0; /* Destination is not an aggregate. */ | 699 | return 0; /* Destination is not an aggregate. */ |
@@ -713,7 +713,7 @@ void lj_cconv_ct_init(CTState *cts, CType *d, CTSize sz, | |||
713 | { | 713 | { |
714 | if (len == 0) | 714 | if (len == 0) |
715 | memset(dp, 0, sz); | 715 | memset(dp, 0, sz); |
716 | else if (len == 1 && !cconv_multi_init(cts, d, o)) | 716 | else if (len == 1 && !lj_cconv_multi_init(cts, d, o)) |
717 | lj_cconv_ct_tv(cts, d, dp, o, 0); | 717 | lj_cconv_ct_tv(cts, d, dp, o, 0); |
718 | else if (ctype_isarray(d->info)) /* Also handles valarray init with len>1. */ | 718 | else if (ctype_isarray(d->info)) /* Also handles valarray init with len>1. */ |
719 | cconv_array_init(cts, d, sz, dp, o, len); | 719 | cconv_array_init(cts, d, sz, dp, o, len); |