From ce55d821aa57cec08e836010cfb77bcf1d50f083 Mon Sep 17 00:00:00 2001 From: Owen Fraser-Green Date: Thu, 29 Apr 2004 21:21:57 +0000 Subject: [PATCH] Minor fixed to get gstreamer working. svn path=/trunk/gtk-sharp/; revision=26341 --- ChangeLog | 7 +++++++ generator/ClassBase.cs | 6 +++++- glib/Marshaller.cs | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa4e9e3b4..968f525c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-04-29 Owen Fraser-Green + + * generator/ClassBase.cs: added base case to Parent to avoid + infinite recursion. + * glib/Marshaller.cs: changed SizeOf(typeof's to int and long + instead of string. + 2004-04-29 Duncan Mak * vte/vte-sharp.dll.config.in: Removed extra diff --git a/generator/ClassBase.cs b/generator/ClassBase.cs index e1871fa12..965fe3a33 100644 --- a/generator/ClassBase.cs +++ b/generator/ClassBase.cs @@ -39,7 +39,11 @@ namespace GtkSharp.Generation { public ClassBase Parent { get { string parent = Elem.GetAttribute("parent"); - return SymbolTable.Table.GetClassGen(parent); + + if (parent == "") + return null; + else + return SymbolTable.Table.GetClassGen(parent); } } diff --git a/glib/Marshaller.cs b/glib/Marshaller.cs index 9fe9ffc1b..706d84269 100644 --- a/glib/Marshaller.cs +++ b/glib/Marshaller.cs @@ -84,7 +84,7 @@ namespace GLibSharp { for (int i = 0; i < args.Length; i++) ptrs[i] = (int) Marshal.StringToHGlobalAuto (args[i]); - IntPtr buf = g_malloc ((ulong) Marshal.SizeOf(typeof(string)) * + IntPtr buf = g_malloc ((ulong) Marshal.SizeOf(typeof(int)) * (ulong) args.Length); Marshal.Copy (ptrs, 0, buf, ptrs.Length); return buf; @@ -97,7 +97,7 @@ namespace GLibSharp { for (int i = 0; i < args.Length; i++) ptrs[i] = (long) Marshal.StringToHGlobalAuto (args[i]); - IntPtr buf = g_malloc ((ulong) Marshal.SizeOf(typeof(string)) * + IntPtr buf = g_malloc ((ulong) Marshal.SizeOf(typeof(long)) * (ulong) args.Length); Marshal.Copy (ptrs, 0, buf, ptrs.Length); return buf;