aboutsummaryrefslogtreecommitdiff
path: root/src/tclsqlite.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-07-29 01:49:36 +0000
committerdrh <drh@noemail.net>2016-07-29 01:49:36 +0000
commite363d50db86a8f07829502e22e66a8c0b7716fb1 (patch)
tree7f6a865dbfea16ecc3d2398e2e8ed0ac26b418d5 /src/tclsqlite.c
parent99bbcc8287832d65fc954f29c5c340e1226292d5 (diff)
parentc08556844e97b3b1c3ee19eca99e6cc98ff537ac (diff)
downloadsqlite-e363d50db86a8f07829502e22e66a8c0b7716fb1.tar.gz
sqlite-e363d50db86a8f07829502e22e66a8c0b7716fb1.zip
Further refinement to the calling convention macros.
FossilOrigin-Name: 45588de385d2a721b3e9f04beb6c7b789dd27d42
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r--src/tclsqlite.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index bc94a5ff7..3db4a32c4 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -3806,7 +3806,12 @@ static void MD5DigestToBase10x8(unsigned char digest[16], char zDigest[50]){
** A TCL command for md5. The argument is the text to be hashed. The
** Result is the hash in base64.
*/
-static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
+static int SQLITE_TCLAPI md5_cmd(
+ void*cd,
+ Tcl_Interp *interp,
+ int argc,
+ const char **argv
+){
MD5Context ctx;
unsigned char digest[16];
char zBuf[50];
@@ -3830,7 +3835,12 @@ static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
** A TCL command to take the md5 hash of a file. The argument is the
** name of the file.
*/
-static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){
+static int SQLITE_TCLAPI md5file_cmd(
+ void*cd,
+ Tcl_Interp *interp,
+ int argc,
+ const char **argv
+){
FILE *in;
MD5Context ctx;
void (*converter)(unsigned char*, char*);
@@ -3910,7 +3920,11 @@ static void md5finalize(sqlite3_context *context){
MD5DigestToBase16(digest, zBuf);
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
}
-int Md5_Register(sqlite3 *db){
+int Md5_Register(
+ sqlite3 *db,
+ char **pzErrMsg,
+ const sqlite3_api_routines *pThunk
+){
int rc = sqlite3_create_function(db, "md5sum", -1, SQLITE_UTF8, 0, 0,
md5step, md5finalize);
sqlite3_overload_function(db, "md5sum", -1); /* To exercise this API */