rep-gtk r406 - trunk



Author: chrisb
Date: Sun Feb  1 21:57:53 2009
New Revision: 406
URL: http://svn.gnome.org/viewvc/rep-gtk?rev=406&view=rev

Log:
revert some ugliness


Modified:
   trunk/rep-gtk.c
   trunk/rep-types.c

Modified: trunk/rep-gtk.c
==============================================================================
--- trunk/rep-gtk.c	(original)
+++ trunk/rep-gtk.c	Sun Feb  1 21:57:53 2009
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.  If not, write to
  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -226,8 +226,8 @@
     }
 
   return 1;
-}      
-     
+}
+
 sgtk_type_info*
 sgtk_maybe_find_type_info (GType type)
 {
@@ -410,7 +410,7 @@
     prevp = &(GOBJ_PROXY(protector)->protects);
   else
     prevp = &global_protects;
-  
+
   if ((prot->next = *prevp) != 0)
 	prot->next->prevp = &prot->next;
   *prevp = prot;
@@ -650,7 +650,7 @@
     }
   else
     g_object_ref (obj);			/* XXX ref may leak? */
-	  
+
 #ifdef DEBUG_PRINT
   fprintf (stderr, "New proxy %p for %p %s\n", proxy, obj,
 	   g_type_name (G_OBJECT_TYPE (obj)));
@@ -785,13 +785,13 @@
       int i, valid;
       repv sym;
       char *sym_name;
-      
+
       if (!rep_CONSP (obj))
 	return 0;
       sym = rep_CAR (obj);
       if (!rep_SYMBOLP (sym))
 	return 0;
-      
+
       sym_name = rep_STR(rep_SYM(sym)->name);
       for (i = 0, valid = 0; i < info->n_literals; i++)
 	if (!strcmp (info->literals[i].name, sym_name))
@@ -804,7 +804,7 @@
 
       obj = rep_CDR (obj);
     }
-  
+
   return 1;
 }
 
@@ -843,7 +843,7 @@
       obj = rep_CDR (obj);
       rep_TEST_INT;
     }
-  
+
   return ans;
 }
 
@@ -1208,7 +1208,7 @@
       fprintf (stderr, "callback ignored during GC!\n");
       return;
     }
-  
+
   info.proc = prot->object;
   info.n_params = n_param_values;
   info.params = param_values;
@@ -1488,7 +1488,7 @@
     case GTK_TYPE_POINTER:
       return sgtk_pointer_to_rep (GTK_VALUE_POINTER(*a));
     default:
-      fprintf (stderr, "illegal type %s in arg\n", 
+      fprintf (stderr, "illegal type %s in arg\n",
 	       gtk_type_name (a->type));
       return Qnil;
     }
@@ -1709,7 +1709,7 @@
       fprintf (stderr, "callback ignored during GC!\n");
       return;
     }
-  
+
   info.obj = obj;
   info.proc = ((sgtk_protshell *)data)->object;
   info.n_args = n_args;
@@ -1744,7 +1744,7 @@
   info = (sgtk_object_info *)sgtk_get_type_info (type);
   if (info)
     return info;
-  
+
   return sgtk_find_object_info (g_type_name (type));
 }
 
@@ -1798,13 +1798,13 @@
 
  query_args:
   g_type_class_peek (info->header.type);
-  
+
   parent = g_type_parent (info->header.type);
   if (parent != G_TYPE_INVALID)
     info->parent = sgtk_find_object_info_from_type (parent);
   else
     info->parent = NULL;
-  
+
   return info;
 }
 
@@ -1866,13 +1866,13 @@
 
       if (!sgtk_valid_gvalue (&args[i].value, val))
 	{
-	  repv throw_args = 
+	  repv throw_args =
 	    rep_LIST_3 (rep_string_dup ("wrong type for"),
 			rep_string_dup (g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec))), val);
 	  sgtk_free_args (args, i);
 	  Fsignal (Qerror, throw_args);
 	}
-	  
+
       sgtk_rep_to_gvalue (&args[i].value, val);
     }
 
@@ -1960,7 +1960,7 @@
 
   name = rep_STR(rep_SYM(argsym)->name);
   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (obj), name);
-  
+
   if (pspec)
     {
       g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
@@ -1987,8 +1987,8 @@
 
   obj = GOBJ_PROXY(scm_obj)->obj;
 
-  props = g_object_class_list_properties (G_OBJECT_GET_CLASS (obj), (gpointer) &nprops);
-  
+  props = g_object_class_list_properties (G_OBJECT_GET_CLASS (obj), &nprops);
+
   if (props != 0)
     {
       int i;
@@ -2024,6 +2024,7 @@
   info.class_size = parent_info.class_size;
   info.class_init_func = NULL;
   info.object_init_func = NULL;
+  info.base_class_init_func = NULL;
 
   return gtk_type_unique (parent_type, &info);
 }
@@ -2379,7 +2380,7 @@
     add_relation (set2, target2_type, atk_target1);
 }
 
-DEFUN ("gtk-widget-relate-label", Fgtk_widget_relate_label, 
+DEFUN ("gtk-widget-relate-label", Fgtk_widget_relate_label,
 	Sgtk_widget_relate_label, (repv target1, repv target2), rep_Subr2)
 
 {
@@ -2391,7 +2392,7 @@
     Target1 = (GtkWidget *) sgtk_get_gobj (target1);
     Target2 = (GtkWidget *) sgtk_get_gobj (target2);
 
-    gtk_widget_relate_label (Target1, ATK_RELATION_LABELLED_BY, Target2, 
+    gtk_widget_relate_label (Target1, ATK_RELATION_LABELLED_BY, Target2,
 			     ATK_RELATION_LABEL_FOR);
 
     return Qt;
@@ -2421,7 +2422,7 @@
   global_protects = NULL;
   sgtk_protshell_chunk = g_mem_chunk_create (sgtk_protshell, 128,
 					     G_ALLOC_AND_FREE);
-  
+
   callback_trampoline = Fcons (Qnil, Qnil);
   rep_mark_static (&callback_trampoline);
 
@@ -2531,7 +2532,7 @@
       v[i] = xstrdup (rep_STR (rep_CAR (list)));
     }
   v[c] = NULL;
-  
+
   *argv = v;
   *argc = c;
 }

Modified: trunk/rep-types.c
==============================================================================
--- trunk/rep-types.c	(original)
+++ trunk/rep-types.c	Sun Feb  1 21:57:53 2009
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.  If not, write to
  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -128,7 +128,7 @@
 char *
 sgtk_rep_to_string (repv obj)
 {
-    return rep_STRINGP (obj) ? rep_STR (obj) : (char *)"";
+    return rep_STRINGP (obj) ? rep_STR (obj) : (unsigned char *)"";
 }
 
 repv
@@ -430,7 +430,7 @@
 sgtk_rep_to_list (repv obj, void (*fromscm)(repv, void*))
 {
   GList *res = NULL, *tail;
-  
+
   if (obj == Qnil || (rep_CONSP(obj)))
     {
       while (rep_CONSP(obj))
@@ -438,7 +438,7 @@
         GList *n = g_list_alloc ();
 	if (res == NULL)
 	  res = tail = n;
-	else 
+	else
 	  {
 	    g_list_concat (tail, n);
 	    tail = n;
@@ -459,7 +459,7 @@
 	  GList *n = g_list_alloc ();
 	  if (res == NULL)
 	    res = tail = n;
-	  else 
+	  else
 	    {
 	      g_list_concat (tail, n);
 	      tail = n;
@@ -498,7 +498,7 @@
 	    }
 	}
     }
-  
+
   g_list_free (list);
 }
 



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