diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2017-10-10 15:04:14 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2017-10-10 15:04:14 +0200 |
commit | f8ffac53c514145dc35ebe11f54471bd3b67dccf (patch) | |
tree | 6d85d62022cc7a7b2905dcfeac17aabe1b0806ea /src/uca-camera.c | |
parent | 57a3ff22960ce09548ec6b10f80578c41ea9787c (diff) | |
download | uca-f8ffac53c514145dc35ebe11f54471bd3b67dccf.tar.gz uca-f8ffac53c514145dc35ebe11f54471bd3b67dccf.tar.bz2 uca-f8ffac53c514145dc35ebe11f54471bd3b67dccf.tar.xz uca-f8ffac53c514145dc35ebe11f54471bd3b67dccf.zip |
Parse enum props as uints
Diffstat (limited to 'src/uca-camera.c')
-rw-r--r-- | src/uca-camera.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c index 7987632..31e5de5 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -155,6 +155,7 @@ DEFINE_CAST (uint64, atoi) DEFINE_CAST (ulong, atol) DEFINE_CAST (float, atof) DEFINE_CAST (double, atof) +DEFINE_CAST (enum, atoi) DEFINE_CAST (boolean, str_to_boolean) @@ -650,6 +651,7 @@ uca_camera_parse_arg_props (UcaCamera *camera, gchar **argv, guint argc, GError g_value_register_transform_func (G_TYPE_STRING, G_TYPE_FLOAT, value_transform_float); g_value_register_transform_func (G_TYPE_STRING, G_TYPE_DOUBLE, value_transform_double); g_value_register_transform_func (G_TYPE_STRING, G_TYPE_BOOLEAN, value_transform_boolean); + g_value_register_transform_func (G_TYPE_STRING, G_TYPE_ENUM, value_transform_enum); for (guint i = 0; i < argc; i++) { GMatchInfo *match; |