views:

19

answers:

1

The GValue system in GLib includes standard type transformations using GType descriptors (in fact the GValue reference page includes some sample code that transforms a value from int to string).

However, as one can also see from the gvaluetransform source code, transformations from string to numeric values are not included by default. I suppose that parsing strings to integers is a quite commonly used feature. Is there a specific reason we need to manually supply transformation functions for string parsing (portability perhaps)?

+2  A: 

This was left out because there's no way to report or handle errors in GValue transformations.

Havoc P
Makes sense. Thanks :)
Lck