diff options
author | Bert Vermeulen <bert@biot.com> | 2014-06-26 19:56:02 +0200 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2014-06-26 20:02:44 +0200 |
commit | 5f22c187f99ea13e0a1a5c8c995e73a75f93a9b1 (patch) | |
tree | e1c06db2c21cadefaa6381a34c69080e8ad5aee5 /tests | |
parent | 604eece9928adbf4fb6b85470ceadeca1b73fabb (diff) | |
download | libsigrokdecode-5f22c187f99ea13e0a1a5c8c995e73a75f93a9b1.tar.gz libsigrokdecode-5f22c187f99ea13e0a1a5c8c995e73a75f93a9b1.zip |
runtc: PD option value is a GVariant, not string.
This is still broken: it needs to properly check the expected type of
the option, not just blindly assume G_VARIANT_TYPE_STRING.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runtc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/runtc.c b/tests/runtc.c index e376070..ab55139 100644 --- a/tests/runtc.c +++ b/tests/runtc.c @@ -48,7 +48,7 @@ struct channel { struct option { char *key; - char *value; + GVariant *value; }; struct pd { @@ -736,7 +736,8 @@ int main(int argc, char **argv) } else { option = malloc(sizeof(struct option)); option->key = g_strdup(kv[0]); - option->value = g_strdup(kv[1]); + option->value = g_variant_new_string(kv[1]); + g_variant_ref_sink(option->value); /* Apply to last PD. */ pd->options = g_slist_append(pd->options, option); } |