- str = allocAndCopy(getNameAttribute(in));
- token = getValueStrAttribute(in);
- if(token){
- str1 = appendString(str,"=");
- free(str);
- str = appendString(str1,token);
- free(str1);
- sequence_push(&(t->labels),str);
- }
- else
- sequence_push(&(t->labels),str);
+ int *label_value = malloc(sizeof(int));
+ int has_value = 0;
+ long long loc_value;
+
+ str = allocAndCopy(getNameAttribute(in));
+ has_value = getValueAttribute(in, &loc_value);
+
+ sequence_push(&(t->labels),str);
+
+ if(has_value) value = loc_value;
+ else value++;
+
+ *label_value = value;
+ sequence_push(&(t->labels_values), label_value);