System.Data.SQLite

Check-in [c2bccd5229]
Login

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

Overview
Comment:Revise a minor merge issue from the previous check-in.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | interopParams2
Files: files | file ages | folders
SHA1: c2bccd5229694e7e06bd748203d4fc70baefcdaa
User & Date: mistachkin 2014-11-14 01:28:04.294
Context
2014-11-14
01:31
Reset build tags. check-in: e452a35bb3 user: mistachkin tags: interopParams2
01:28
Revise a minor merge issue from the previous check-in. check-in: c2bccd5229 user: mistachkin tags: interopParams2
01:18
The interop assembly methods should use 'ref' parameters, not 'out' parameters, since the native interop methods are not actually guaranteed to set output parameters to well-defined values. Also, add more parameter validation to the interop assembly, paying special attention to output parameters, especially optional ones. Pursuant to [3b43ffdbd7]. check-in: 5b359db222 user: mistachkin tags: interopParams2
Changes
Unified Diff Ignore Whitespace Patch
Changes to SQLite.Interop/src/win/interop.c.
754
755
756
757
758
759
760
761
762
763
764
765


766
767
768
769
770
771
772
  sqlite3_result_int64(pctx, *val);
}

SQLITE_API int WINAPI sqlite3_context_collcompare_interop(sqlite3_context *ctx, const void *p1, int p1len, const void *p2, int p2len)
{
#if SQLITE_VERSION_NUMBER >= 3008007
  CollSeq *pColl = ctx ? sqlite3GetFuncCollSeq(ctx) : 0;
  if (!ctx || !ctx->pFunc || !pColl || !pColl->xCmp) return 3; /* ERROR */
#else
  CollSeq *pColl = ctx->pColl;
  if (!ctx || !ctx->pFunc || !ctx->pColl || !ctx->pColl->xCmp) return 3; /* ERROR */
#endif


#if SQLITE_VERSION_NUMBER >= 3008001
  if ((ctx->pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL) == 0) return 2; /* ERROR */
#else
  if ((ctx->pFunc->flags & SQLITE_FUNC_NEEDCOLL) == 0) return 2; /* ERROR */
#endif
  return pColl->xCmp(pColl->pUser, p1len, p1, p2len, p2);
}







<

|
<

>
>







754
755
756
757
758
759
760

761
762

763
764
765
766
767
768
769
770
771
772
  sqlite3_result_int64(pctx, *val);
}

SQLITE_API int WINAPI sqlite3_context_collcompare_interop(sqlite3_context *ctx, const void *p1, int p1len, const void *p2, int p2len)
{
#if SQLITE_VERSION_NUMBER >= 3008007
  CollSeq *pColl = ctx ? sqlite3GetFuncCollSeq(ctx) : 0;

#else
  CollSeq *pColl = ctx ? ctx->pColl : 0;

#endif
  if (!ctx || !ctx->pFunc) return 4; /* ERROR */
  if (!pColl || !pColl->xCmp) return 3; /* ERROR */
#if SQLITE_VERSION_NUMBER >= 3008001
  if ((ctx->pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL) == 0) return 2; /* ERROR */
#else
  if ((ctx->pFunc->flags & SQLITE_FUNC_NEEDCOLL) == 0) return 2; /* ERROR */
#endif
  return pColl->xCmp(pColl->pUser, p1len, p1, p2len, p2);
}