diff options
| author | 2024-03-09 08:44:48 +0100 | |
|---|---|---|
| committer | 2024-03-09 08:44:48 +0100 | |
| commit | 91bb0615d982d1adcc5680c346f9510905464584 (patch) | |
| tree | 5433a2dcdc2cc34115b76570bdc63b49429093bc /html.c | |
| parent | Backport from xs. (diff) | |
| download | penes-snac2-91bb0615d982d1adcc5680c346f9510905464584.tar.gz penes-snac2-91bb0615d982d1adcc5680c346f9510905464584.tar.xz penes-snac2-91bb0615d982d1adcc5680c346f9510905464584.zip | |
Replaced most xs_dict_iter() with xs_dict_next().
Diffstat (limited to '')
| -rw-r--r-- | html.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -779,7 +779,8 @@ static xs_html *html_user_body(snac *user, int read_only) | |||
| 779 | xs_html *snac_metadata = xs_html_tag("div", | 779 | xs_html *snac_metadata = xs_html_tag("div", |
| 780 | xs_html_attr("class", "snac-metadata")); | 780 | xs_html_attr("class", "snac-metadata")); |
| 781 | 781 | ||
| 782 | while (xs_dict_iter(&metadata, &k, &v)) { | 782 | int c = 0; |
| 783 | while (xs_dict_next(metadata, &k, &v, &c)) { | ||
| 783 | xs_html *value; | 784 | xs_html *value; |
| 784 | 785 | ||
| 785 | if (xs_startswith(v, "https:/" "/")) { | 786 | if (xs_startswith(v, "https:/" "/")) { |
| @@ -944,7 +945,8 @@ xs_html *html_top_controls(snac *snac) | |||
| 944 | xs_str *k; | 945 | xs_str *k; |
| 945 | xs_str *v; | 946 | xs_str *v; |
| 946 | 947 | ||
| 947 | while (xs_dict_iter(&md, &k, &v)) { | 948 | int c = 0; |
| 949 | while (xs_dict_next(md, &k, &v, &c)) { | ||
| 948 | xs *kp = xs_fmt("%s=%s", k, v); | 950 | xs *kp = xs_fmt("%s=%s", k, v); |
| 949 | 951 | ||
| 950 | if (*metadata) | 952 | if (*metadata) |