[libvtemm] Build fixes.



commit 7e48d662671213a59c142d3a9a42b8f582d0da50
Author: Krzesimir Nowak <krnowak svn gnome org>
Date:   Tue May 12 16:03:51 2009 +0200

    Build fixes.
    
    * src/libvtemm/g/terminal.ccg: Strip constness of gobj() in const
    methods.
    * src/libvtemm/g/terminal.hg: Change commit prototype from
    'const char*, int' to 'char*, unsigned int'.
---
 src/libvtemm/g/terminal.ccg |    8 ++++----
 src/libvtemm/g/terminal.hg  |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/libvtemm/g/terminal.ccg b/src/libvtemm/g/terminal.ccg
index bcf3ee7..01b7660 100644
--- a/src/libvtemm/g/terminal.ccg
+++ b/src/libvtemm/g/terminal.ccg
@@ -57,7 +57,7 @@ TextAndCharAttrs
 Terminal::get_text(const Gnome::Vte::Terminal::SlotSelectedCallback& slot) const
 {
   GArray* array = g_array_new(FALSE, FALSE, sizeof(VteCharAttributes));
-  char* c_text = vte_terminal_get_text(gobj(), &Private::SignalProxy_selected_gtk_callback, const_cast<Gnome::Vte::Terminal::SlotSelectedCallback*>(&slot), array);
+  char* c_text = vte_terminal_get_text(const_cast<VteTerminal*>(gobj()), &Private::SignalProxy_selected_gtk_callback, const_cast<Gnome::Vte::Terminal::SlotSelectedCallback*>(&slot), array);
   Glib::ustring text(c_text);
   g_free(c_text);
   ArrayHandle_CharAttributes attributes(reinterpret_cast<VteCharAttributes*>(array->data), array->len, Glib::OWNERSHIP_DEEP);
@@ -69,7 +69,7 @@ TextAndCharAttrs
 Terminal::get_text_include_trailing_spaces(const Gnome::Vte::Terminal::SlotSelectedCallback& slot) const
 {
   GArray* array = g_array_new(FALSE, FALSE, sizeof(struct _VteCharAttributes));
-  char* c_text = vte_terminal_get_text_include_trailing_spaces(gobj(), &Private::SignalProxy_selected_gtk_callback, const_cast<Gnome::Vte::Terminal::SlotSelectedCallback*>(&slot), array);
+  char* c_text = vte_terminal_get_text_include_trailing_spaces(const_cast<VteTerminal*>(gobj()), &Private::SignalProxy_selected_gtk_callback, const_cast<Gnome::Vte::Terminal::SlotSelectedCallback*>(&slot), array);
   Glib::ustring text(c_text);
   g_free(c_text);
   ArrayHandle_CharAttributes attributes(reinterpret_cast<VteCharAttributes*>(array->data), static_cast<size_t>(array->len), Glib::OWNERSHIP_DEEP);
@@ -81,7 +81,7 @@ TextAndCharAttrs
 Terminal::get_text_range(long start_row, long start_col, long end_row, long end_col, const Gnome::Vte::Terminal::SlotSelectedCallback& slot) const
 {
   GArray* array = g_array_new(FALSE, FALSE, sizeof(struct _VteCharAttributes));
-  char* c_text = vte_terminal_get_text_range(gobj(), start_row, start_col, end_row, end_col, &Private::SignalProxy_selected_gtk_callback, const_cast<Gnome::Vte::Terminal::SlotSelectedCallback*>(&slot), array);
+  char* c_text = vte_terminal_get_text_range(const_cast<VteTerminal*>(gobj()), start_row, start_col, end_row, end_col, &Private::SignalProxy_selected_gtk_callback, const_cast<Gnome::Vte::Terminal::SlotSelectedCallback*>(&slot), array);
   Glib::ustring text(c_text);
   g_free(c_text);
   ArrayHandle_CharAttributes attributes(reinterpret_cast<VteCharAttributes*>(array->data), static_cast<size_t>(array->len), Glib::OWNERSHIP_DEEP);
@@ -93,7 +93,7 @@ CursorPosition
 Terminal::get_cursor_position() const
 {
   long column(0), row(0);
-  vte_terminal_get_cursor_position(gobj(), &column, &row);
+  vte_terminal_get_cursor_position(const_cast<VteTerminal*>(gobj()), &column, &row);
   return CursorPosition(column, row);
 }
 
diff --git a/src/libvtemm/g/terminal.hg b/src/libvtemm/g/terminal.hg
index 44118fe..386b3b9 100644
--- a/src/libvtemm/g/terminal.hg
+++ b/src/libvtemm/g/terminal.hg
@@ -205,10 +205,10 @@ public:
 #m4begin
 dnl // WRAP_SIGNAL "commit"
 dnl // C++ prototype: void commit(const Glib::ustring& text)
-dnl // C prototype: void commit(const gchar* text, gint size)
+dnl // C prototype: void commit(gchar* text, guint size)
 
   _SIGNAL_PROXY(
-      commit, void, `const gchar* text, gint size',
+      commit, void, `gchar* text, guint size',
       commit, void, `const Glib::ustring&',dnl // C++ prototype
       `Glib::ustring(text, text + size)',`dnl // C -> C++ conversion
       /**
@@ -217,16 +217,16 @@ dnl // C prototype: void commit(const gchar* text, gint size)
        */')
 
   _SIGNAL_H(commit, void, `const Glib::ustring& text')
-  _SIGNAL_PH(commit, void, `VteTerminal* self, const gchar* text, gint size')
+  _SIGNAL_PH(commit, void, `VteTerminal* self, gchar* text, guint size')
 
   _SIGNAL_CC(
       commit, commit, void, void,
       `const Glib::ustring& text',dnl // C++ arguments
-      `text.data(), text.bytes()')dnl // C++ -> C conversion
+      `const_cast<gchar*>(text.data()), text.bytes()')dnl // C++ -> C conversion
 
   _SIGNAL_PCC(
       commit, commit, void, void,
-      `VteTerminal* self, const gchar* text, gint size',dnl // C arguments
+      `VteTerminal* self, gchar* text, guint size',dnl // C arguments
       `self, text, size',dnl // C argument names
       `Glib::ustring(text, text + size)',dnl // C -> C++ conversion
       self)



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