Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill the sbrk-based morecore: we'll never use less than two heaps when using mmalloc
[simgrid.git] / src / xbt / automaton.c
index 46d06fa..8f189a8 100644 (file)
@@ -341,8 +341,18 @@ int automaton_label_transition_compare(xbt_exp_label_t l1, xbt_exp_label_t l2){
 }
 
 
-int propositional_symbols_compare_value(const void *s1, const void *s2){
+int propositional_symbols_compare_value(xbt_dynar_t s1, xbt_dynar_t s2){
 
-  return (!((int)s1 == (int)s2));
+  int *iptr1, *iptr2;
+  unsigned int cursor;
+  unsigned int nb_elem = xbt_dynar_length(s1);
+
+  for(cursor=0;cursor<nb_elem;cursor++){
+    iptr1 = xbt_dynar_get_ptr(s1, cursor);
+    iptr2 = xbt_dynar_get_ptr(s2, cursor);
+    if(*iptr1 != *iptr2)
+      return 1;
+  } 
 
+  return 0;
 }