/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/Matrix.c

  • Committer: Gustav Hartvigsson
  • Date: 2015-09-12 17:55:59 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150912175559-o0k3rb3ojdhx7qwy
* Added our own types for stability and shit and giggles.
* Implemented s_box_get_[pointer, sobject, int, long, short, char, ....]
* Fixed s_box_free
* Marked s_box_get_[wchar, wstring] as depricated.
* Made a macro for the __attribute__((unused)) so it will work on MSVC... (Still need something like that for __attribute__((depricated))
* removed the strdump def, now a macro to s_string_new.
* Changed SMap buckets into SLinkedList instad of SDynamicArray.
* Added a generic to add two vectors together. (Automagikcs!)

* Needs a write a test suite for:
  * SMap
  * SBox

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
}
26
26
 
27
27
void
28
 
s_matrix_free (SMatrix * self, bool free_data) {
 
28
s_matrix_free (SMatrix * self, sboolean free_data) {
29
29
  if (free_data) {
30
30
    for (int i = 0; i<= self->height * self->width; i++) {
31
31
      free (self->matrix[i]);
82
82
  if (x > self->last_tuple) {
83
83
    self->last_tuple = x;
84
84
  }
85
 
  self->matrix[(self->width * x) + y];
 
85
  self->matrix[(self->width * x) + y] = data;
86
86
}
87
87
 
88
88
spointer *
100
100
}
101
101
 
102
102
void
103
 
s_matrix_append (SMatrix * self, spointer tuple) {
 
103
s_matrix_append (SMatrix * self, spointer * tuple) {
104
104
  if (!tuple){
105
105
    s_err_print ("Tuple is NULL, this is not allowed. Returning.\n");
106
106
    print_backtrace ();