commit 0f7407520e88fb4a5ea71e0e11441af345ca2ed4 Author: Alan McGovern <alan.mcgov...@gmail.com> Date: Sun Aug 29 23:10:30 2010 +0100
[mono] make the managed struct size match the native struct size Ensure that the managed Itdb_Playlist struct exactly mirrors the native struct so that we can directly access the native pointer to get/set values. bindings/mono/libgpod-sharp/Playlist.cs | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- diff --git a/bindings/mono/libgpod-sharp/Playlist.cs b/bindings/mono/libgpod-sharp/Playlist.cs index 42bc23f..7a5e252 100644 --- a/bindings/mono/libgpod-sharp/Playlist.cs +++ b/bindings/mono/libgpod-sharp/Playlist.cs @@ -33,7 +33,7 @@ namespace GPod { public byte flag3; public int num; public IntPtr members; - public bool is_spl; + public int is_spl; public IntPtr timestamp; public ulong id; public PlaylistSortOrder sortorder; @@ -110,8 +110,8 @@ namespace GPod { set { var x = (Itdb_Playlist *) Native; ReplaceStringUTF8 (ref x->name, value); } } - public bool IsSmartPlaylist { get { return ((Itdb_Playlist *) Native)->is_spl; } - set { ((Itdb_Playlist *) Native)->is_spl = value; } } + public bool IsSmartPlaylist { get { return ((Itdb_Playlist *) Native)->is_spl != 0; } + set { ((Itdb_Playlist *) Native)->is_spl = value ? 1 : 0; } } public DateTime TimeCreated { get { return Artwork.time_tToDateTime(((Itdb_Playlist *) Native)->timestamp); } set { ((Itdb_Playlist *) Native)->timestamp = Artwork.DateTimeTotime_t(value); } } public ulong ID { get { return ((Itdb_Playlist *) Native)->id; } ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2