System.Data.SQLite

Check-in [cfbbd7b1fe]
Login

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

Overview
Comment:Avoid a superfluous call to Marshal.Copy.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sessions
Files: files | file ages | folders
SHA1: cfbbd7b1fefc1d8aa39e0a78fe13f84343751aea
User & Date: mistachkin 2017-10-07 03:17:44.349
Context
2017-10-08
22:00
Merge updates from trunk. check-in: 4919dd2ea9 user: mistachkin tags: sessions
2017-10-07
03:17
Avoid a superfluous call to Marshal.Copy. check-in: cfbbd7b1fe user: mistachkin tags: sessions
2017-10-06
23:09
Make the IEnumerable<ISQLiteChangeSetMetadataItem> interface part of ISQLiteChangeSet. Add a couple missing null argument checks. check-in: ff0061c1df user: mistachkin tags: sessions
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/SQLiteSession.cs.
784
785
786
787
788
789
790


791
792
793
794
795
796
797
798
                    return SQLiteErrorCode.Misuse;

                if (nData > 0)
                {
                    byte[] bytes = new byte[nData];

                    nData = stream.Read(bytes, 0, nData);


                    Marshal.Copy(bytes, 0, pData, nData);
                }

                return SQLiteErrorCode.Ok;
            }
            catch (Exception e)
            {
                try







>
>
|







784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
                    return SQLiteErrorCode.Misuse;

                if (nData > 0)
                {
                    byte[] bytes = new byte[nData];

                    nData = stream.Read(bytes, 0, nData);

                    if (nData > 0)
                        Marshal.Copy(bytes, 0, pData, nData);
                }

                return SQLiteErrorCode.Ok;
            }
            catch (Exception e)
            {
                try