System.Data.SQLite

Check-in [e64388aacd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix compilation errors for the .NET Compact Framework build.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | virtualTables
Files: files | file ages | folders
SHA1: e64388aacdf75f7867fb9c155c67b4607fc56b83
User & Date: mistachkin 2013-06-18 06:12:21.149
Context
2013-06-18
20:39
Fix xCreate and xConnect delegate signatures. Finish marshalling of the sqlite3_index_info structure. check-in: 7461bf423f user: mistachkin tags: virtualTables
06:12
Fix compilation errors for the .NET Compact Framework build. check-in: e64388aacd user: mistachkin tags: virtualTables
06:07
More work on input/output marshalling for the sqlite3_index_info structure. Also, refactoring to allow better portability to the .NET Compact Framework. check-in: ea5335378e user: mistachkin tags: virtualTables
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/SQLiteModuleBase.cs.
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
        }

        private static int ThirtyBits = 0x3fffffff;

        ///////////////////////////////////////////////////////////////////////

#if PLATFORM_COMPACTFRAMEWORK
        protected virtual IntPtr IntPtrForOffset(
            IntPtr pointer,
            int offset
            )
        {
            return new IntPtr(pointer.ToInt64() + offset);
        }
#endif







|







558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
        }

        private static int ThirtyBits = 0x3fffffff;

        ///////////////////////////////////////////////////////////////////////

#if PLATFORM_COMPACTFRAMEWORK
        private static IntPtr IntPtrForOffset(
            IntPtr pointer,
            int offset
            )
        {
            return new IntPtr(pointer.ToInt64() + offset);
        }
#endif
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
            )
        {
#if !PLATFORM_COMPACTFRAMEWORK
            return BitConverter.Int64BitsToDouble(Marshal.ReadInt64(
                pointer, offset));
#else
            return BitConverter.ToDouble(BitConverter.GetBytes(
                Marshal.ReadInt64(IntPtrForOffset(pointer, offset)), 0);
#endif
        }

        ///////////////////////////////////////////////////////////////////////

        private static IntPtr MarshalReadIntPtr(
            IntPtr pointer,







|







593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
            )
        {
#if !PLATFORM_COMPACTFRAMEWORK
            return BitConverter.Int64BitsToDouble(Marshal.ReadInt64(
                pointer, offset));
#else
            return BitConverter.ToDouble(BitConverter.GetBytes(
                Marshal.ReadInt64(IntPtrForOffset(pointer, offset))), 0);
#endif
        }

        ///////////////////////////////////////////////////////////////////////

        private static IntPtr MarshalReadIntPtr(
            IntPtr pointer,
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
            )
        {
#if !PLATFORM_COMPACTFRAMEWORK
            Marshal.WriteInt64(pointer, offset,
                BitConverter.DoubleToInt64Bits(value));
#else
            Marshal.WriteInt64(IntPtrForOffset(pointer, offset),
                BitConverter.ToInt64(BitConverter.GetBytes(value)));
#endif
        }

        ///////////////////////////////////////////////////////////////////////

        private static void MarshalWriteIntPtr(
            IntPtr pointer,







|







639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
            )
        {
#if !PLATFORM_COMPACTFRAMEWORK
            Marshal.WriteInt64(pointer, offset,
                BitConverter.DoubleToInt64Bits(value));
#else
            Marshal.WriteInt64(IntPtrForOffset(pointer, offset),
                BitConverter.ToInt64(BitConverter.GetBytes(value), 0));
#endif
        }

        ///////////////////////////////////////////////////////////////////////

        private static void MarshalWriteIntPtr(
            IntPtr pointer,