API: Implement window_is_valid

This commit is contained in:
Thiago de Arruda 2014-05-11 10:43:12 -03:00
parent 3ed2ddf726
commit bfe3b6712e
2 changed files with 5 additions and 3 deletions

View File

@ -312,7 +312,7 @@ void buffer_set_name(Buffer buffer, String name, Error *err)
bool buffer_is_valid(Buffer buffer)
{
Error stub;
Error stub = {.set = false};
return find_buffer(buffer, &stub) != NULL;
}

View File

@ -172,11 +172,13 @@ Position window_get_position(Window window, Error *err)
Tabpage window_get_tabpage(Window window, Error *err)
{
abort();
set_api_error("Not implemented", err);
return 0;
}
bool window_is_valid(Window window)
{
abort();
Error stub = {.set = false};
return find_window(window, &stub) != NULL;
}