[Gtk-sharp-list] Added const-guchar to SymbolTable.cs

Martin Willemoes Hansen mwh@sysrq.dk
Thu, 25 Sep 2003 16:34:11 +0200


--=-0fDgyeoXe+wesvRLwL/A
Content-Type: multipart/alternative; boundary="=-Ekwl38RUMwRo7uhkU+n7"


--=-Ekwl38RUMwRo7uhkU+n7
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi!

I added support for const guchar * to the generator.

Okay to commit?
-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh@sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               


--=-Ekwl38RUMwRo7uhkU+n7
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
Hi!<BR>
<BR>
I added support for const guchar * to the generator.<BR>
<BR>
Okay to commit?<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh@sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               
</PRE>
</TD>
</TR>
</TABLE>

</BODY>
</HTML>

--=-Ekwl38RUMwRo7uhkU+n7--

--=-0fDgyeoXe+wesvRLwL/A
Content-Disposition: attachment; filename=SymbolTable.cs.diff
Content-Type: text/x-patch; name=SymbolTable.cs.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

? SymbolTable.cs.diff
Index: SymbolTable.cs
===================================================================
RCS file: /cvs/public/gtk-sharp/generator/SymbolTable.cs,v
retrieving revision 1.47
diff -u -r1.47 SymbolTable.cs
--- SymbolTable.cs	28 Aug 2003 16:49:29 -0000	1.47
+++ SymbolTable.cs	25 Sep 2003 14:45:38 -0000
@@ -42,6 +42,7 @@
 			// Const returned strings must be generated 
 			// differently from memory-managed strings
 			AddType (new ConstStringGen ("const-gchar"));
+			AddType (new ConstStringGen ("const-guchar"));
 			AddType (new ConstStringGen ("const-char"));
 			AddType (new StringGen ("gchar"));
 			AddType (new SimpleGen ("gfloat", "float"));
@@ -133,7 +134,11 @@
 			string trim_type = type.TrimEnd('*');
 
 			// HACK: Similar to above, but for const strings
-			if (trim_type == "const-gchar" || trim_type == "const-char") return trim_type;
+			switch (trim_type) {
+			case "const-gchar": return trim_type;
+			case "const-guchar": return trim_type;
+			case "const-char": return trim_type;
+			}
 			
 			if (trim_type.StartsWith("const-")) return trim_type.Substring(6);
 			return trim_type;

--=-0fDgyeoXe+wesvRLwL/A--