mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
make the urldb content type setting API return an error
This commit is contained in:
parent
d55d7f3e1e
commit
27aa56cbf6
@ -3204,17 +3204,20 @@ nserror urldb_set_url_title(nsurl *url, const char *title)
|
||||
|
||||
|
||||
/* exported interface documented in content/urldb.h */
|
||||
void urldb_set_url_content_type(nsurl *url, content_type type)
|
||||
nserror urldb_set_url_content_type(nsurl *url, content_type type)
|
||||
{
|
||||
struct path_data *p;
|
||||
|
||||
assert(url);
|
||||
|
||||
p = urldb_find_url(url);
|
||||
if (!p)
|
||||
return;
|
||||
if (!p) {
|
||||
return NSERROR_NOT_FOUND;
|
||||
}
|
||||
|
||||
p->urld.type = type;
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,8 +69,9 @@ nserror urldb_set_url_title(struct nsurl *url, const char *title);
|
||||
*
|
||||
* \param url The URL to look for
|
||||
* \param type The type to set
|
||||
* \return NSERROR_OK on success or NSERROR_NOT_FOUND if url not in database
|
||||
*/
|
||||
void urldb_set_url_content_type(struct nsurl *url, content_type type);
|
||||
nserror urldb_set_url_content_type(struct nsurl *url, content_type type);
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user