lua里 table的长度#table 的计算方法
摘要:
int luaH_getn (Table *t) { unsigned int j = t->sizearray; if (j > 0 && ttisnil(&t->array[j - 1])) { /* there is a boundary in the array part: (binary) search for it */ unsigned int i = 0; while (j - i > 1) { unsigned int m = (i+j)/2; if (ttisnil(&t->array[m - 1])) j = 阅读全文
posted @ 2013-03-14 16:36 快乐的大猪 阅读(460) 评论(0) 推荐(0) 编辑