Re: fun project!




Nils Barth <nbarth@fas.harvard.edu> writes: 
> OK -- so this is just cleaning up the interface so it reports booleans
> correctly, not general int -> boolean code cleaning pedantry.
>

Yes. The reason is that int/bool are actually different types in many
languages, and those languages are using the header files to figure
out which type GTK expects.
 
> So I just go through gtk/*.h, and every time I see a gint as a return
> value/parameter value, I check .c to make sure it's appropriate
> (doesn't only return/test for TRUE/FALSE), and if necessary change to
> gboolean, respecting indentation.
> 

Yep. Also, if you change a function declaration in .h, change the
corresponding function definition in .c. 

> I made a very few gint -> gboolean changes to static functions and local
> variables; should I revert these back/start over, or are these changes okay?
> 

I guess they're fine, maybe Owen or Tim would object. You can always
leave them for now and see if anyone dislikes them when you send the
final patch.

> Also, I suppose that GNU indent can't produce GTK format?
> 

Nope. GTK format is special and unique. ;-) Just try not to change
anything not directly related to the gint/gboolean fixes.

Havoc



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