Skip to content

Instantly share code, notes, and snippets.

@yyamasak
Last active December 18, 2018 08:10
Show Gist options
  • Save yyamasak/9e1a81adbc1f29333ce318fe3f023c60 to your computer and use it in GitHub Desktop.
Save yyamasak/9e1a81adbc1f29333ce318fe3f023c60 to your computer and use it in GitHub Desktop.
A patch file to add extended_errorcode API to tclsqlite3
diff -r C:\src\sqlite-extension\tclsqlite3-org.c C:\src\sqlite-extension\tclsqlite3-mod.c
1871a1872
> "extended_errorcode",
1887c1888,1889
< DB_UPDATE_HOOK, DB_VERSION, DB_WAL_HOOK
---
> DB_UPDATE_HOOK, DB_VERSION, DB_WAL_HOOK,
> DB_EXTENDED_ERRORCODE
2508a2511,2521
> ** $db extended_errorcode
> **
> ** Return the numeric extended error code that was returned by the most recent
> ** call to sqlite3_exec().
> */
> case DB_EXTENDED_ERRORCODE: {
> Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_extended_errcode(pDb->db)));
> break;
> }
>
> /*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment