System.Data.SQLite
Check-in [2e6de1738c]
Not logged in

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

Overview
Comment:Add comments with the offsets of various native structure members.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2e6de1738cf3a80afdd0dbdec7d47647c9417f14
User & Date: mistachkin 2018-01-15 17:53:29
Context
2018-01-15
18:18
Correct and enhance the alignment diagnostics added by check-in [0621d7037c]. check-in: 7ca42fb6c0 user: mistachkin tags: trunk
17:53
Add comments with the offsets of various native structure members. check-in: 2e6de1738c user: mistachkin tags: trunk
17:20
Fix compilation of the design-time components project using the latest Visual Studio 2017 update. check-in: ad7af0b258 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/UnsafeNativeMethods.cs.

  4480   4480       ///////////////////////////////////////////////////////////////////////////
  4481   4481   
  4482   4482       #region Native Structures
  4483   4483   #if INTEROP_VIRTUAL_TABLE
  4484   4484       [StructLayout(LayoutKind.Sequential)]
  4485   4485       internal struct sqlite3_module
  4486   4486       {
  4487         -        public int iVersion;
  4488         -        public xCreate xCreate;
  4489         -        public xConnect xConnect;
  4490         -        public xBestIndex xBestIndex;
  4491         -        public xDisconnect xDisconnect;
  4492         -        public xDestroy xDestroy;
  4493         -        public xOpen xOpen;
  4494         -        public xClose xClose;
  4495         -        public xFilter xFilter;
  4496         -        public xNext xNext;
  4497         -        public xEof xEof;
  4498         -        public xColumn xColumn;
  4499         -        public xRowId xRowId;
  4500         -        public xUpdate xUpdate;
  4501         -        public xBegin xBegin;
  4502         -        public xSync xSync;
  4503         -        public xCommit xCommit;
  4504         -        public xRollback xRollback;
  4505         -        public xFindFunction xFindFunction;
  4506         -        public xRename xRename;
         4487  +        /*   0 */ public int iVersion;
         4488  +        /*   8 */ public xCreate xCreate;
         4489  +        /*  16 */ public xConnect xConnect;
         4490  +        /*  24 */ public xBestIndex xBestIndex;
         4491  +        /*  32 */ public xDisconnect xDisconnect;
         4492  +        /*  40 */ public xDestroy xDestroy;
         4493  +        /*  48 */ public xOpen xOpen;
         4494  +        /*  56 */ public xClose xClose;
         4495  +        /*  64 */ public xFilter xFilter;
         4496  +        /*  72 */ public xNext xNext;
         4497  +        /*  80 */ public xEof xEof;
         4498  +        /*  88 */ public xColumn xColumn;
         4499  +        /*  96 */ public xRowId xRowId;
         4500  +        /* 104 */ public xUpdate xUpdate;
         4501  +        /* 112 */ public xBegin xBegin;
         4502  +        /* 120 */ public xSync xSync;
         4503  +        /* 128 */ public xCommit xCommit;
         4504  +        /* 136 */ public xRollback xRollback;
         4505  +        /* 144 */ public xFindFunction xFindFunction;
         4506  +        /* 152 */ public xRename xRename;
  4507   4507           /* The methods above are in version 1 of the sqlite3_module
  4508   4508            * object.  Those below are for version 2 and greater. */
  4509         -        public xSavepoint xSavepoint;
  4510         -        public xRelease xRelease;
  4511         -        public xRollbackTo xRollbackTo;
         4509  +        /* 160 */ public xSavepoint xSavepoint;
         4510  +        /* 168 */ public xRelease xRelease;
         4511  +        /* 176 */ public xRollbackTo xRollbackTo;
  4512   4512       }
  4513   4513   
  4514   4514       ///////////////////////////////////////////////////////////////////////////
  4515   4515   
  4516   4516       [StructLayout(LayoutKind.Sequential)]
  4517   4517       internal struct sqlite3_vtab
  4518   4518       {
  4519         -        public IntPtr pModule;
  4520         -        public int nRef; /* NO LONGER USED */
  4521         -        public IntPtr zErrMsg;
         4519  +        /*  0 */ public IntPtr pModule;
         4520  +        /*  8 */ public int nRef; /* NO LONGER USED */
         4521  +        /* 16 */ public IntPtr zErrMsg;
  4522   4522       }
  4523   4523   
  4524   4524       ///////////////////////////////////////////////////////////////////////////
  4525   4525   
  4526   4526       [StructLayout(LayoutKind.Sequential)]
  4527   4527       internal struct sqlite3_vtab_cursor
  4528   4528       {
  4529         -        public IntPtr pVTab;
         4529  +        /* 0 */ public IntPtr pVTab;
  4530   4530       }
  4531   4531   
  4532   4532       ///////////////////////////////////////////////////////////////////////////
  4533   4533   
  4534   4534       [StructLayout(LayoutKind.Sequential)]
  4535   4535       internal struct sqlite3_index_constraint
  4536   4536       {
................................................................................
  4546   4546                   usable = constraint.usable;
  4547   4547                   iTermOffset = constraint.iTermOffset;
  4548   4548               }
  4549   4549           }
  4550   4550   
  4551   4551           ///////////////////////////////////////////////////////////////////////
  4552   4552   
  4553         -        public int iColumn;
  4554         -        public SQLiteIndexConstraintOp op;
  4555         -        public byte usable;
  4556         -        public int iTermOffset;
         4553  +        /* 0 */ public int iColumn;
         4554  +        /* 4 */ public SQLiteIndexConstraintOp op;
         4555  +        /* 5 */ public byte usable;
         4556  +        /* 8 */ public int iTermOffset;
  4557   4557       }
  4558   4558   
  4559   4559       ///////////////////////////////////////////////////////////////////////////
  4560   4560   
  4561   4561       [StructLayout(LayoutKind.Sequential)]
  4562   4562       internal struct sqlite3_index_orderby
  4563   4563       {
................................................................................
  4571   4571                   iColumn = orderBy.iColumn;
  4572   4572                   desc = orderBy.desc;
  4573   4573               }
  4574   4574           }
  4575   4575   
  4576   4576           ///////////////////////////////////////////////////////////////////////
  4577   4577   
  4578         -        public int iColumn; /* Column number */
  4579         -        public byte desc;   /* True for DESC.  False for ASC. */
         4578  +        /* 0 */ public int iColumn; /* Column number */
         4579  +        /* 4 */ public byte desc;   /* True for DESC.  False for ASC. */
  4580   4580       }
  4581   4581   
  4582   4582       ///////////////////////////////////////////////////////////////////////////
  4583   4583   
  4584   4584       [StructLayout(LayoutKind.Sequential)]
  4585   4585       internal struct sqlite3_index_constraint_usage
  4586   4586       {
................................................................................
  4604   4604   
  4605   4605       ///////////////////////////////////////////////////////////////////////////
  4606   4606   
  4607   4607       [StructLayout(LayoutKind.Sequential)]
  4608   4608       internal struct sqlite3_index_info
  4609   4609       {
  4610   4610           /* Inputs */
  4611         -        public int nConstraint; /* Number of entries in aConstraint */
  4612         -        public IntPtr aConstraint;
  4613         -        public int nOrderBy;    /* Number of entries in aOrderBy */
  4614         -        public IntPtr aOrderBy;
         4611  +        /*  0 */ public int nConstraint; /* Number of entries in aConstraint */
         4612  +        /*  8 */ public IntPtr aConstraint;
         4613  +        /* 16 */ public int nOrderBy;    /* Number of entries in aOrderBy */
         4614  +        /* 24 */ public IntPtr aOrderBy;
  4615   4615           /* Outputs */
  4616         -        public IntPtr aConstraintUsage;
  4617         -        public int idxNum;           /* Number used to identify the index */
  4618         -        public string idxStr;        /* String, possibly obtained from sqlite3_malloc */
  4619         -        public int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
  4620         -        public int orderByConsumed;  /* True if output is already ordered */
  4621         -        public double estimatedCost; /* Estimated cost of using this index */
  4622         -        public long estimatedRows;   /* Estimated number of rows returned */
  4623         -        public SQLiteIndexFlags idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
  4624         -        public long colUsed;         /* Input: Mask of columns used by statement */
         4616  +        /* 32 */ public IntPtr aConstraintUsage;
         4617  +        /* 40 */ public int idxNum;           /* Number used to identify the index */
         4618  +        /* 48 */ public string idxStr;        /* String, possibly obtained from sqlite3_malloc */
         4619  +        /* 56 */ public int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
         4620  +        /* 60 */ public int orderByConsumed;  /* True if output is already ordered */
         4621  +        /* 64 */ public double estimatedCost; /* Estimated cost of using this index */
         4622  +        /* 72 */ public long estimatedRows;   /* Estimated number of rows returned */
         4623  +        /* 80 */ public SQLiteIndexFlags idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
         4624  +        /* 88 */ public long colUsed;         /* Input: Mask of columns used by statement */
  4625   4625       }
  4626   4626   #endif
  4627   4627       #endregion
  4628   4628     }
  4629   4629     #endregion
  4630   4630   
  4631   4631     /////////////////////////////////////////////////////////////////////////////