/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 src/Map.c

  • Committer: Gustav Hartvigsson
  • Date: 2015-06-18 16:48:26 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150618164826-ezsdsil8ixyeb3cr
* Reorderd CMakeLists.txt list of files
* added a lil' comment

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "baseobject.h"
25
25
#include <stdlib.h>
26
26
 
27
 
 
28
27
struct _SMapPrivate {
29
28
  size_t len; // Length
30
 
  SMapItem * items[]; // Use calloc to deal with memory.
 
29
  SDynamicArray * array; /* This is what holds the buckets. These buckets are
 
30
                          * in turn also SDynamicArrays; or in template speak:
 
31
                          * SDynamicArray<SDynamicArray<SMapItem*>*>*
 
32
                          */
31
33
};
32
34
 
33
35
SMapItem * s_map_item_new (void * key, void * value) {
34
36
  SMapItem * self = malloc (sizeof (SMapItem));
35
37
  self->key = key;
36
38
  self->value = value;
 
39
  
37
40
  return self;
38
41
}
39
42