Author: alp
Date: 2005-12-21 19:21:08 -0500 (Wed, 21 Dec 2005)
New Revision: 54712

Modified:
   trunk/mcs/tools/cilc/ChangeLog
   trunk/mcs/tools/cilc/Test.cs
   trunk/mcs/tools/cilc/cilc.cs
   trunk/mcs/tools/cilc/demo.c
Log:
2005-12-22  Alp Toker  <[EMAIL PROTECTED]>

  * cilc.cs: Add support for char, sbyte, byte and double
  * Test.cs, demo.c: Update tests


Modified: trunk/mcs/tools/cilc/ChangeLog
===================================================================
--- trunk/mcs/tools/cilc/ChangeLog      2005-12-21 23:51:58 UTC (rev 54711)
+++ trunk/mcs/tools/cilc/ChangeLog      2005-12-22 00:21:08 UTC (rev 54712)
@@ -1,3 +1,8 @@
+2005-12-22  Alp Toker  <[EMAIL PROTECTED]>
+
+       * cilc.cs: Add support for char, sbyte, byte and double
+       * Test.cs, demo.c: Update tests
+
 2005-05-08  Alp Toker  <[EMAIL PROTECTED]>
 
        * cilc.cs: Add null check to NsToC and fix warnings.

Modified: trunk/mcs/tools/cilc/Test.cs
===================================================================
--- trunk/mcs/tools/cilc/Test.cs        2005-12-21 23:51:58 UTC (rev 54711)
+++ trunk/mcs/tools/cilc/Test.cs        2005-12-22 00:21:08 UTC (rev 54712)
@@ -49,6 +49,11 @@
                        Console.WriteLine ("Instance method with an argument 
invoked: " + num + " added to value, making it " + counter);
                }
 
+               public double GetDoubleValue ()
+               {
+                       return (double)counter;
+               }
+
                public int GetValue ()
                {
                        return counter;

Modified: trunk/mcs/tools/cilc/cilc.cs
===================================================================
--- trunk/mcs/tools/cilc/cilc.cs        2005-12-21 23:51:58 UTC (rev 54711)
+++ trunk/mcs/tools/cilc/cilc.cs        2005-12-22 00:21:08 UTC (rev 54712)
@@ -34,6 +34,10 @@
                RegisterByVal (typeof (int));
                RegisterByVal (typeof (IntPtr));
                RegisterByVal (typeof (bool));
+               RegisterByVal (typeof (char));
+               RegisterByVal (typeof (sbyte));
+               RegisterByVal (typeof (byte));
+               RegisterByVal (typeof (double));
 
                if (args.Length == 1) {
                        SmartBind (args[0]);
@@ -866,7 +870,19 @@
 
                        case "System.IntPtr":
                                return "gpointer ";
+                       
+                       case "System.Char":
+                               return "guint16 ";
 
+                       case "System.SByte":
+                               return "gint8 ";
+
+                       case "System.Byte":
+                               return "guint8 ";
+
+                       case "System.Double":
+                               return "gdouble ";
+
                        //questionable
                        case "System.EventHandler":
                                case "System.MulticastDelegate":

Modified: trunk/mcs/tools/cilc/demo.c
===================================================================
--- trunk/mcs/tools/cilc/demo.c 2005-12-21 23:51:58 UTC (rev 54711)
+++ trunk/mcs/tools/cilc/demo.c 2005-12-22 00:21:08 UTC (rev 54712)
@@ -6,6 +6,7 @@
   DemoTest *my_test;
        //gchar *tmp;
        int num;
+       gdouble num_dbl;
        DemoDrink drink;
        //GEnumClass *enum_class;
   
@@ -33,6 +34,9 @@
   num = demo_test_get_value (my_test);
        g_printf ("The counter's value is %d\n", num);
   
+  num_dbl = demo_test_get_double_value (my_test);
+       g_printf ("The counter's double value is %.16f\n", num_dbl);
+  
        drink = demo_test_pick_drink ();
        //enum_class = g_type_class_peek (demo_drink_get_type ());
        //g_enum_get_value (enum_class, drink);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to