]> git.tuebingen.mpg.de Git - osl.git/blobdiff - osl_core.h
Version 3 tables.
[osl.git] / osl_core.h
index 9879b1e316d1e358fe110d1b6fb31a1f95ef96ad..9c86e0893c7e14d8c6af39b5136340b89b83f20b 100644 (file)
@@ -201,7 +201,7 @@ _static_inline_ size_t index_column_description_size(const char *name)
  * The version used by this instance of the library. Written to the index of
  * newly created tables.
  */
-#define CURRENT_TABLE_VERSION 1
+#define CURRENT_TABLE_VERSION 3
 
 /*
  * The lowest table version this library understands. On open, if
@@ -456,12 +456,14 @@ _static_inline_ struct osl_row *get_row_pointer(const struct rb_node *node,
 /**
  * Compute a cryptographic hash of an osl object.
  *
+ * \param t Determines the hash function to use.
  * \param obj the Object to compute the hash value from.
  * \param hash Result is returned here.
  */
-_static_inline_ void hash_object(const struct osl_object *obj, HASH_TYPE *hash)
+_static_inline_ void hash_object(const struct osl_table *t,
+               const struct osl_object *obj, HASH_TYPE *hash)
 {
-       hash_function(obj->data, obj->size, hash);
+       hash_function(t->version, obj->data, obj->size, hash);
 }
 
 /**