Re: [PATCH 2/5] util/uri: Simplify uri_string_unescape()

2024-01-23 Thread Thomas Huth
On 23/01/2024 11.25, Paolo Bonzini wrote: Il lun 22 gen 2024, 20:18 Thomas Huth > ha scritto: uri_string_unescape() basically does the same as the glib function g_uri_unescape_string(), with just an additional length parameter. You can replace it altogether

Re: [PATCH 2/5] util/uri: Simplify uri_string_unescape()

2024-01-23 Thread Paolo Bonzini
Il lun 22 gen 2024, 20:18 Thomas Huth ha scritto: > uri_string_unescape() basically does the same as the glib function > g_uri_unescape_string(), with just an additional length parameter. > You can replace it altogether with g_uri_unescape_segment. Paolo So we can simplify this function a lot

Re: [PATCH 2/5] util/uri: Simplify uri_string_unescape()

2024-01-22 Thread Thomas Huth
On 22/01/2024 22.22, Stefan Weil wrote: Am 22.01.24 um 20:17 schrieb Thomas Huth: uri_string_unescape() basically does the same as the glib function g_uri_unescape_string(), with just an additional length parameter. So we can simplify this function a lot by limiting the length with g_strndup()

Re: [PATCH 2/5] util/uri: Simplify uri_string_unescape()

2024-01-22 Thread Stefan Weil via
Am 22.01.24 um 20:17 schrieb Thomas Huth: uri_string_unescape() basically does the same as the glib function g_uri_unescape_string(), with just an additional length parameter. So we can simplify this function a lot by limiting the length with g_strndup() first and then by calling g_uri_unescape_

[PATCH 2/5] util/uri: Simplify uri_string_unescape()

2024-01-22 Thread Thomas Huth
uri_string_unescape() basically does the same as the glib function g_uri_unescape_string(), with just an additional length parameter. So we can simplify this function a lot by limiting the length with g_strndup() first and then by calling g_uri_unescape_string() instead of walking through the strin