gtk_tree_model_get end of Line marker



Dear all,

because of my lazy programming style I sometimes forget or overwirte the comma before the -1  end of line 
marker for the
gtk_tree_model_get or gtk_tree_store_set function.
This error can usually not be detected by the c-compilers, so that I had to spend some really unnecessary 
time to
fix this typo.

Now I defined a makro for this, and in the case I forget the comma again at least I get a compiler error:

#define TREE_MODEL_EOL (int)-1

gtk_tree_model_get(model,iter,STUFF,&stuff,TREE_MODEL_EOL);

I think something like this would be integrated officially and also the all the examples would be updated,
at lot of headache of many people could be avoided.

--
 Arne




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]