2004-02-12 Zoltan Varga <vargaz@freemail.hu>

* glib/time_t_CustomMarshaler.cs: Update after custom marshaling
	changes.

svn path=/trunk/gtk-sharp/; revision=23018
This commit is contained in:
Zoltan Varga 2004-02-12 12:26:25 +00:00
parent f52a27bf79
commit d39ef22678
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2004-02-12 Zoltan Varga <vargaz@freemail.hu>
* glib/time_t_CustomMarshaler.cs: Update after custom marshaling
changes.
2004-02-11 Mike Kestner <mkestner@ximian.com>
* gtk/Gtk.metadata : hide the GSList API

View File

@ -53,15 +53,15 @@ namespace GLib {
public object MarshalNativeToManaged (IntPtr data)
{
int secs;
long secs;
if (GetNativeDataSize () == 4)
secs = Marshal.ReadInt32 (data);
secs = (int)data;
else if (GetNativeDataSize () == 8)
secs = (int) Marshal.ReadInt64 (data);
secs = (long)data;
else
throw new Exception ("Unexpected native size for time_t.");
TimeSpan span = new TimeSpan (secs - utc_offset);
TimeSpan span = new TimeSpan ((int)secs - utc_offset);
return local_epoch.Add (span);
}