Author: mkestner
Date: 2005-07-03 11:14:09 -0400 (Sun, 03 Jul 2005)
New Revision: 46890

Modified:
   trunk/gtk-sharp/ChangeLog
   trunk/gtk-sharp/generator/StructField.cs
Log:

2005-07-02  Mike Kestner  <[EMAIL PROTECTED]>

        * generator/StructField.cs : fix name exception throw conditional.


Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog   2005-07-03 12:57:28 UTC (rev 46889)
+++ trunk/gtk-sharp/ChangeLog   2005-07-03 15:14:09 UTC (rev 46890)
@@ -1,5 +1,9 @@
 2005-07-02  Mike Kestner  <[EMAIL PROTECTED]>
 
+       * generator/StructField.cs : fix name exception throw conditional.
+
+2005-07-02  Mike Kestner  <[EMAIL PROTECTED]>
+
        * generator/CallbackGen.cs : implement new IAccessor iface so that
        callback fields on structs can now be accessed.
        * generator/ClassBase.cs : remove/abstract some methods incorrectly

Modified: trunk/gtk-sharp/generator/StructField.cs
===================================================================
--- trunk/gtk-sharp/generator/StructField.cs    2005-07-03 12:57:28 UTC (rev 
46889)
+++ trunk/gtk-sharp/generator/StructField.cs    2005-07-03 15:14:09 UTC (rev 
46890)
@@ -41,7 +41,7 @@
                        }
                }
 
-               public int ArrayLength {
+               int ArrayLength {
                        get {
                                if (!IsArray)
                                        return 0;
@@ -96,19 +96,9 @@
                string StudlyName {
                        get {
                                string studly = base.Name;
-                               if (studly != "")
-                                       return studly;
+                               if (studly == "")
+                                       throw new Exception ("API file must be 
regenerated with a current version of the GAPI parser. It is incompatible with 
this version of the GAPI code generator.");
 
-                               // FIXME: this is backward compatibility for 
API files
-                               // output by older versions of the parser. It 
can go
-                               // away at some point.
-                               string name = CName;
-                               string[] segs = name.Split('_');
-                               foreach (string s in segs) {
-                                       if (s.Trim () == "")
-                                               continue;
-                                       studly += (s.Substring(0,1).ToUpper() + 
s.Substring(1));
-                               }
                                return studly;
                        }
                }
@@ -130,7 +120,7 @@
                                sw.WriteLine (indent + "{0} {1} {2};", Access, 
CSType, StudlyName);
                        } else if (IsBitfield) {
                                base.Generate (gen_info, indent);
-                       } else if (table [CType] is IAccessor) {
+                       } else if (gen is IAccessor) {
                                sw.WriteLine (indent + "private {0} {1};", 
gen.MarshalType, Name);
 
                                if (Access != "private") {

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

Reply via email to