Also document the possible NULL return.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
* call at least soup_uri_set_scheme() and soup_uri_set_path(), since
* those fields are required.)
*
- * Return value: a #SoupURI, or %NULL.
+ * Return value: a #SoupURI, or %NULL if the given string was found to be
+ * invalid.
**/
SoupURI *
soup_uri_new (const char *uri_string)
uri = soup_uri_new_with_base (NULL, uri_string);
if (!uri)
return NULL;
- if (!uri->scheme) {
+ if (!SOUP_URI_IS_VALID (uri)) {
soup_uri_free (uri);
return NULL;
}