test/test_lualib_arraylist.c
// fill an arraylist of ints with some random integers
fill an arraylist of ints with some random integers
fill an arraylist of ints with some random integers
static void fill_random_ints(arraylist *l, int num_ints)
{
	for (int i = 0; i < num_ints; i++)
	{
		int *x = (int *)calloc(1, sizeof(int));
		if (x != NULL)
		{
			*x = rand() % 1000;
			arraylist_add(l, x);
		}
	}
}
static void fill_random_ints ( arraylist * l , int num_ints ) { for ( int i = 0 ; i < num_ints ; i ++ ) { int * x = ( int * ) calloc ( 1 , sizeof ( int ) ) ; if ( x != NULL ) { * x = rand ( ) % 1000 ; arraylist_add ( l , x ) ; } } }
fill an arraylist of ints with some random integers
fill an arraylist of ints with some random integers