From bfff38581c19a082e1cfd0562922b82f9c0feb0a Mon Sep 17 00:00:00 2001 From: Stephen Lombardo Date: Mon, 9 Jul 2012 16:59:10 -0400 Subject: [PATCH] restructure to allow non-amalgamated builds again --- src/crypto.c | 4 ++++ src/pragma.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/crypto.c b/src/crypto.c index 3423b0a5..dd0ba0f9 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -38,6 +38,10 @@ #include "btreeInt.h" #include "crypto.h" +const char* codec_get_cipher_version() { + return CIPHER_VERSION; +} + /* Generate code to return a string value */ void codec_vdbe_return_static_string(Parse *pParse, const char *zLabel, const char *value){ Vdbe *v = sqlite3GetVdbe(pParse); diff --git a/src/pragma.c b/src/pragma.c index 09282a73..5c991ab1 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1537,7 +1537,8 @@ void sqlite3Pragma( /** BEGIN CRYPTO **/ if( sqlite3StrICmp(zLeft, "cipher_version")==0 && !zRight ){ extern void codec_vdbe_return_static_string(Parse *pParse, const char *zLabel, const char *value); - codec_vdbe_return_static_string(pParse, "cipher_version", CIPHER_VERSION); + extern const char* codec_get_cipher_version(); + codec_vdbe_return_static_string(pParse, "cipher_version", codec_get_cipher_version()); }else if( sqlite3StrICmp(zLeft, "cipher")==0 && zRight ){ extern int codec_set_cipher_name(sqlite3*, int, const char *, int);