[gtksourceviewmm] Get rid of NULLs.



commit 1d45530e6408ac9ca5c06b94e449755076baf83b
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Sun Jan 17 22:09:35 2010 +0100

    Get rid of NULLs.
    
    * gtksourceview/src/sourcebuffer.ccg:
    * gtksourceview/src/sourcecompletionitem.ccg:
    * gtksourceview/src/sourcelanguagemanager.ccg:
    * gtksourceview/src/sourcemark.ccg:
    * gtksourceview/src/sourcestyleschememanager.ccg:
    * gtksourceview/src/sourceview.ccg: Renamed NULLs to 0s, with
    exception for one being a var args sentinel - this was renamed
    into 0 casted to pointer type.

 gtksourceview/src/sourcebuffer.ccg             |    6 +++---
 gtksourceview/src/sourcecompletionitem.ccg     |    6 +++---
 gtksourceview/src/sourcelanguagemanager.ccg    |    2 +-
 gtksourceview/src/sourcemark.ccg               |    8 ++++----
 gtksourceview/src/sourcestyleschememanager.ccg |    2 +-
 gtksourceview/src/sourceview.ccg               |    6 +++---
 6 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/gtksourceview/src/sourcebuffer.ccg b/gtksourceview/src/sourcebuffer.ccg
index 34ebf99..335c98c 100644
--- a/gtksourceview/src/sourcebuffer.ccg
+++ b/gtksourceview/src/sourcebuffer.ccg
@@ -26,7 +26,7 @@ namespace gtksourceview
 {
 
 SourceBuffer::SourceBuffer () :
-  _CONSTRUCT("tag-table", NULL)
+  _CONSTRUCT("tag-table", 0)
 {}
 
 SourceBuffer::SourceBuffer (const Glib::RefPtr<Gtk::TextTagTable>& tag_table) :
@@ -35,8 +35,8 @@ SourceBuffer::SourceBuffer (const Glib::RefPtr<Gtk::TextTagTable>& tag_table) :
 
 // TODO: check later how bug 606732 goes.
 SourceBuffer::SourceBuffer (const Glib::RefPtr<SourceLanguage> &language) :
-//    _CONSTRUCT("tag-table, NULL")
-    _CONSTRUCT("tag-table", NULL, "language", Glib::unwrap(language))
+//    _CONSTRUCT("tag-table, 0")
+    _CONSTRUCT("tag-table", 0, "language", Glib::unwrap(language))
 {
     /*
     if (language)
diff --git a/gtksourceview/src/sourcecompletionitem.ccg b/gtksourceview/src/sourcecompletionitem.ccg
index d719382..adc7893 100644
--- a/gtksourceview/src/sourcecompletionitem.ccg
+++ b/gtksourceview/src/sourcecompletionitem.ccg
@@ -46,7 +46,7 @@ SourceCompletionItem::SourceCompletionItem(const Glib::ustring& label, const Gli
                                      stock.get_c_str(),
                                      width,
                                      GTK_ICON_LOOKUP_USE_BUILTIN,
-                                     NULL);
+                                     0);
 
     GtkStockItem stock_item;
     if (temp_label.empty() && gtk_stock_lookup (stock.get_c_str(), &stock_item))
@@ -56,10 +56,10 @@ SourceCompletionItem::SourceCompletionItem(const Glib::ustring& label, const Gli
   }
   else
   {
-    icon = NULL;
+    icon = 0;
   }
 
-  g_object_set(gobj(), "label", temp_label.c_str(), "icon", icon, NULL);
+  g_object_set(gobj(), "label", temp_label.c_str(), "icon", icon, static_cast<char*>(0));
 
   if (icon)
   {
diff --git a/gtksourceview/src/sourcelanguagemanager.ccg b/gtksourceview/src/sourcelanguagemanager.ccg
index d57e9a4..042ee66 100644
--- a/gtksourceview/src/sourcelanguagemanager.ccg
+++ b/gtksourceview/src/sourcelanguagemanager.ccg
@@ -28,7 +28,7 @@ namespace gtksourceview
 void
 SourceLanguageManager::reset_search_path()
 {
-  gtk_source_language_manager_set_search_path(gobj(), NULL);
+  gtk_source_language_manager_set_search_path(gobj(), 0);
 }
 
 }//end namespace gtksourceview
diff --git a/gtksourceview/src/sourcemark.ccg b/gtksourceview/src/sourcemark.ccg
index fd170f6..b313adc 100644
--- a/gtksourceview/src/sourcemark.ccg
+++ b/gtksourceview/src/sourcemark.ccg
@@ -31,7 +31,7 @@ SourceMark::SourceMark(const Glib::ustring& category, const Glib::ustring& name)
 
 Glib::RefPtr<SourceMark> SourceMark::next()
 {
-  Glib::RefPtr<SourceMark> result = Glib::wrap (gtk_source_mark_next(const_cast<GtkSourceMark*>(gobj()), NULL));
+  Glib::RefPtr<SourceMark> result = Glib::wrap (gtk_source_mark_next(const_cast<GtkSourceMark*>(gobj()), 0));
   if (result)
   {
     result->reference();
@@ -41,7 +41,7 @@ Glib::RefPtr<SourceMark> SourceMark::next()
 
 Glib::RefPtr<const SourceMark> SourceMark::next() const
 {
-  Glib::RefPtr<const SourceMark> result = Glib::wrap (gtk_source_mark_next(const_cast<GtkSourceMark*>(gobj()), NULL));
+  Glib::RefPtr<const SourceMark> result = Glib::wrap (gtk_source_mark_next(const_cast<GtkSourceMark*>(gobj()), 0));
   if (result)
   {
     result->reference();
@@ -51,7 +51,7 @@ Glib::RefPtr<const SourceMark> SourceMark::next() const
 
 Glib::RefPtr<SourceMark> SourceMark::prev()
 {
-  Glib::RefPtr<SourceMark> result =  Glib::wrap (gtk_source_mark_prev(const_cast<GtkSourceMark*>(gobj()), NULL));
+  Glib::RefPtr<SourceMark> result =  Glib::wrap (gtk_source_mark_prev(const_cast<GtkSourceMark*>(gobj()), 0));
   if (result)
   {
     result->reference();
@@ -61,7 +61,7 @@ Glib::RefPtr<SourceMark> SourceMark::prev()
 
 Glib::RefPtr<const SourceMark> SourceMark::prev() const
 {
-  Glib::RefPtr<const SourceMark> result =  Glib::wrap (gtk_source_mark_prev(const_cast<GtkSourceMark*>(gobj()), NULL));
+  Glib::RefPtr<const SourceMark> result =  Glib::wrap (gtk_source_mark_prev(const_cast<GtkSourceMark*>(gobj()), 0));
   if (result)
   {
     result->reference();
diff --git a/gtksourceview/src/sourcestyleschememanager.ccg b/gtksourceview/src/sourcestyleschememanager.ccg
index 3dbd967..e8bcfbe 100644
--- a/gtksourceview/src/sourcestyleschememanager.ccg
+++ b/gtksourceview/src/sourcestyleschememanager.ccg
@@ -26,7 +26,7 @@ namespace gtksourceview
 
 void SourceStyleSchemeManager::reset_search_path()
 {
-  gtk_source_style_scheme_manager_set_search_path(gobj(), NULL);
+  gtk_source_style_scheme_manager_set_search_path(gobj(), 0);
 }
 
 }
diff --git a/gtksourceview/src/sourceview.ccg b/gtksourceview/src/sourceview.ccg
index c765340..8228847 100644
--- a/gtksourceview/src/sourceview.ccg
+++ b/gtksourceview/src/sourceview.ccg
@@ -39,7 +39,7 @@ static gchar* SignalProxy_MarkTooltip_gtk_callback(GtkSourceMark* mark, gpointer
     Glib::exception_handlers_invoke();
   }
 
-  return NULL; //An arbitary default, just to avoid the compiler warning.
+  return 0; //An arbitary default, just to avoid the compiler warning.
   #endif //GLIBMM_EXCEPTIONS_ENABLED
 }
 
@@ -54,7 +54,7 @@ namespace gtksourceview
 SourceView::SourceView() :
     _CONSTRUCT
 {
-    GtkSourceBuffer *buffer = gtk_source_buffer_new (NULL) ;
+    GtkSourceBuffer *buffer = gtk_source_buffer_new (0) ;
     gtk_text_view_set_buffer (GTK_TEXT_VIEW (gobject_), GTK_TEXT_BUFFER (buffer));
     g_object_unref(buffer);
 }
@@ -65,7 +65,7 @@ SourceView::SourceView(const Glib::RefPtr<SourceBuffer> &a_buffer) :
     if (a_buffer) {
         set_buffer (a_buffer) ;
     } else {
-        GtkSourceBuffer *buffer = gtk_source_buffer_new (NULL) ;
+        GtkSourceBuffer *buffer = gtk_source_buffer_new (0) ;
         gtk_text_view_set_buffer (GTK_TEXT_VIEW (gobject_), GTK_TEXT_BUFFER (buffer)) ;
         g_object_unref(buffer);
     }



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