summaryrefslogtreecommitdiff
path: root/rest/rest-params.c
Commit message (Collapse)AuthorAgeFilesLines
* params: Fix annotations with rest_params_iter_nextCorentin Noël2022-08-091-7/+19
| | | | | | The parameters are not optional as they are always accessed. They can be NULL when the iter is finished, actually always set it so that we are sure to always have an initialized variable
* params: reworked to boxed and listGünther Wagner2022-01-121-64/+132
| | | | | | | RestParams was implemented as HashTable. Limitations are that it did not preserved the order of individual parameters aswell as duplicates aren't allowed. Reworked it to a GList and introduced reference counting and a boxed type.
* Add several missing annotationstintou/annotations-fixesCorentin Noël2020-10-151-4/+5
| | | | Most of them are taken from the Vala overrides: https://gitlab.gnome.org/GNOME/vala/-/blob/master/vapi/metadata/Rest-0.7.metadata
* Use g_hash_table_replace() in rest_params_add()Christophe Fergeau2014-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | rest_params_add() is currently using g_hash_table_insert() to add the passed in parameter in the parameter hash table. The key which is used is owned by the associated value. When using rest_params_add to replace an already existing parameter, the existing value will be freed with rest_param_unref(). However, g_hash_table_insert() does not replace the key when it already exists in the hash table: "If the key already exists in the GHashTable its current value is replaced with the new value... If you supplied a key_destroy_func when creating the GHashTable, the passed key is freed using that function." This means that after replacing an already existing parameter, the corresponding key will still be the old one, which is now pointing at freed memory as the old value was freed. g_hash_table_replace() ensures that the key will still be valid, even when replacing existing parameters: "Inserts a new key and value into a GHashTable similar to g_hash_table_insert(). The difference is that if the key already exists in the GHashTable, it gets replaced by the new key." https://bugzilla.gnome.org/show_bug.cgi?id=665716
* assorted introspection fixesEvan Nemerson2012-05-031-1/+1
| | | | Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=675213
* Skip non-string params in rest_params_as_string_hash_tableRoss Burton2010-08-061-2/+2
|
* Minor documentation fixesRoss Burton2010-08-041-1/+1
|
* rest: add RestParam and RestParams typesRoss Burton2010-07-081-0/+242