/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 libssts/DynamicArray.c

  • Committer: Gustav Hartvigsson
  • Date: 2015-10-25 19:56:39 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20151025195639-rd3fg4fg5a02v3bb
* Passing arguments can not be initialised from within a function...
* Started re-write of the SError tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
  self->to_json = to_json;
57
57
  self->from_json = from_json;
58
58
 
59
 
  self->array = calloc (len ,sizeof (* self->array));
 
59
  self->array = calloc (len ,sizeof (spointer));
60
60
 
61
61
  return self;
62
62
}
64
64
SDynamicArray *
65
65
s_dynamic_array_new (size_t len,
66
66
                     FreeFunc free_func) {
 
67
 
67
68
  SDynamicArray * self = _s_dynamic_array_new_full (len, free_func, NULL, NULL);
 
69
 
68
70
  return self;
69
71
}
70
72
 
167
169
void
168
170
_private_for_each_item_free (SDynamicArray * self, spointer item,
169
171
                             spointer data) {
 
172
  s_dbg_print ("Removing item from array");
170
173
  FreeFunc func = self->free_func;
171
174
  func (item);
172
175
}