[rhythmbox] source: cur_text and search parameters to rb_source_search can be NULL



commit 4dc9c239c761cb033c3d8f1503d6256a63384f84
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Mar 27 14:01:27 2010 +1000

    source: cur_text and search parameters to rb_source_search can be NULL
    
    This just clarifies the API documentation and adds an assertion check to
    ensure that new_text is not NULL, as it must always be provided.

 sources/rb-source.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/sources/rb-source.c b/sources/rb-source.c
index a3f8187..0e174e1 100644
--- a/sources/rb-source.c
+++ b/sources/rb-source.c
@@ -944,8 +944,8 @@ rb_source_can_rename (RBSource *source)
 /**
  * rb_source_search:
  * @source: a #RBSource
- * @search: the active #RBSourceSearch instance
- * @cur_text: the current search text
+ * @search: the active #RBSourceSearch instance (may be NULL)
+ * @cur_text: the current search text (may be NULL)
  * @new_text: the new search text
  *
  * Updates the source with new search text.  The source
@@ -959,6 +959,7 @@ rb_source_search (RBSource *source,
 		  const char *new_text)
 {
 	RBSourceClass *klass = RB_SOURCE_GET_CLASS (source);
+	g_assert (new_text != NULL);
 
 	/* several sources don't have a search ability */
 	if (klass->impl_search != NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]