From: Bert Vermeulen Date: Sat, 30 Aug 2014 18:17:34 +0000 (+0200) Subject: Support uint64 input/output module options. X-Git-Tag: sigrok-cli-0.6.0~70 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=902e368ed1dd50b87dd8a93dcae8ca2983f69cc3;p=sigrok-cli.git Support uint64 input/output module options. --- diff --git a/parsers.c b/parsers.c index c2a7c26..526be78 100644 --- a/parsers.c +++ b/parsers.c @@ -308,6 +308,10 @@ GHashTable *generic_arg_to_opt(const struct sr_option **opts, GHashTable *genarg gvar = g_variant_new_int32(strtoul(s, NULL, 10)); g_hash_table_insert(hash, g_strdup(opts[i]->id), g_variant_ref_sink(gvar)); + } else if (g_variant_is_of_type(opts[i]->def, G_VARIANT_TYPE_UINT64)) { + gvar = g_variant_new_uint64(strtoul(s, NULL, 10)); + g_hash_table_insert(hash, g_strdup(opts[i]->id), + g_variant_ref_sink(gvar)); } else if (g_variant_is_of_type(opts[i]->def, G_VARIANT_TYPE_DOUBLE)) { gvar = g_variant_new_double(strtod(s, NULL)); g_hash_table_insert(hash, g_strdup(opts[i]->id),