I have a wierd situation, val_array_size() is returning one less that
it should.
call
lstStore.append(["hello",2]);
public function append(data:Array<Dynamic>) {
if (_object == null) {
col_types= createColumnTypes(data);
_object = _create(untyped col_types.__a) ;
}
neko.Lib.println("n of cols is :"+data.length); /// it's 2
var convert = new Array<Dynamic>();
for (e in data) {
if (Std.is(e,String))
convert.push(e.__s);
else
convert.push(e);
}
neko.Lib.println("(2) n of cols is :"+convert.length); // it's 2
_append(_object,untyped convert.__a,untyped
col_types.__a); }
and in the C
value listStoreAppend(value store,value d,value t) {
val_check_kind(store,k_listStore);
val_check(d,array);
val_check(t,array);
int ncols = val_int(val_array_size(d))+1;
value *data = (value *)val_array_ptr(d);
value *type = (value *)val_array_ptr(t);
printf("ncols is %d",ncols); // it's 1 without me adding the
extra ????????? int i ;
I'm adding 1 to ncols as you can see to make it work??
Any ideas.
thx
bd
--
"It is no measure of health to be well adjusted to a profoundly
sick
society." --Jiddu Krishnamurti
--
Neko : One VM to run them all
(http://nekovm.org)