/* Return the list of field types as a table on top of the stack.  */
static int cur_getcoltypes(lua_State *L)
/* Return the list of field types as a table on top of the stack.  */
static int cur_getcoltypes(lua_State *L)
{
		int i;
		lua_newtable (L);
		for (i = 1; i <= cur->numcols; i++) {
			column_data *col = &(cur->cols[i-1]);
			lua_pushnumber (L, i);
			lua_pushstring (L, getcolumntype (col));
			lua_rawset (L, -3);
		}
		lua_pushvalue (L, -1);
		cur->coltypes = luaL_ref (L, LUA_REGISTRYINDEX);
	}
	return 1;
}