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:
parent
f52a27bf79
commit
d39ef22678
2 changed files with 9 additions and 4 deletions
|
@ -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>
|
2004-02-11 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
* gtk/Gtk.metadata : hide the GSList API
|
* gtk/Gtk.metadata : hide the GSList API
|
||||||
|
|
|
@ -53,15 +53,15 @@ namespace GLib {
|
||||||
|
|
||||||
public object MarshalNativeToManaged (IntPtr data)
|
public object MarshalNativeToManaged (IntPtr data)
|
||||||
{
|
{
|
||||||
int secs;
|
long secs;
|
||||||
if (GetNativeDataSize () == 4)
|
if (GetNativeDataSize () == 4)
|
||||||
secs = Marshal.ReadInt32 (data);
|
secs = (int)data;
|
||||||
else if (GetNativeDataSize () == 8)
|
else if (GetNativeDataSize () == 8)
|
||||||
secs = (int) Marshal.ReadInt64 (data);
|
secs = (long)data;
|
||||||
else
|
else
|
||||||
throw new Exception ("Unexpected native size for time_t.");
|
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);
|
return local_epoch.Add (span);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue