mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 09:35:04 +00:00
Replaced all xs_dict_iter() with xs_dict_next().
This commit is contained in:
parent
91bb0615d9
commit
951e6b2315
2 changed files with 5 additions and 1 deletions
3
http.c
3
http.c
|
@ -77,7 +77,8 @@ xs_dict *http_signed_request_raw(const char *keyid, const char *seckey,
|
|||
|
||||
/* transfer the original headers */
|
||||
hdrs = xs_dict_new();
|
||||
while (xs_dict_iter(&headers, &k, &v))
|
||||
int c = 0;
|
||||
while (xs_dict_next(headers, &k, &v, &c))
|
||||
hdrs = xs_dict_append(hdrs, k, v);
|
||||
|
||||
/* add the new headers */
|
||||
|
|
3
xs.h
3
xs.h
|
@ -1028,6 +1028,9 @@ int xs_dict_iter(xs_dict **dict, xs_str **key, xs_val **value)
|
|||
int xs_dict_next(const xs_dict *dict, xs_str **key, xs_val **value, int *ctxt)
|
||||
/* iterates a dict, with context */
|
||||
{
|
||||
if (xs_type(dict) != XSTYPE_DICT)
|
||||
return 0;
|
||||
|
||||
int goon = 1;
|
||||
|
||||
char *p = (char *)dict;
|
||||
|
|
Loading…
Reference in a new issue