/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to tests/dynamic_array.c

  • Committer: Gustav Hartvigsson
  • Date: 2016-01-25 21:52:28 UTC
  • mto: This revision was merged to the branch mainline in revision 111.
  • Revision ID: gustav.hartvigsson@gmail.com-20160125215228-m9k1we2mplfla6y4
* Getting closer to fixing the callbacks...

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#include <stdint.h>
5
5
#include <time.h>
6
6
 
7
 
void for_each_print (SDynamicArray * self, sint item, sint * itt) {
 
7
void
 
8
for_each_print_arr (SDynamicArray * self, sint item, sint * itt) {
8
9
  s_print ("The number is: %d on iteration: %d\n", item, (*itt));
9
10
  (*itt)++;
10
11
}
50
51
 
51
52
  sint itt = 0;
52
53
  s_print ("Printing array using a for-each function.\n");
53
 
  s_dynamic_array_for_each (array, (ForEachFunc)for_each_print, &itt);
 
54
  s_dynamic_array_for_each (array, FOREACHFUNC (for_each_print_arr), &itt);
54
55
 
55
56
  s_dynamic_array_free (array, FALSE);
56
57