1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Omit calls to test_destructor16() if SQLITE_OMIT_UTF16 defined. (CVS 5508)

FossilOrigin-Name: 2d5cec53c2f31875d198d81ac4fd54e7066ea0ff
This commit is contained in:
shane
2008-07-31 01:47:11 +00:00
parent 9200309ef6
commit 2a5fc4d6f5
4 changed files with 20 additions and 14 deletions

View File

@@ -12,7 +12,7 @@
** Code for testing all sorts of SQLite interfaces. This code
** implements new SQL functions used by the test scripts.
**
** $Id: test_func.c,v 1.8 2008/07/11 21:02:54 drh Exp $
** $Id: test_func.c,v 1.9 2008/07/31 01:47:11 shane Exp $
*/
#include "sqlite3.h"
#include "tcl.h"
@@ -114,6 +114,7 @@ static void test_destructor(
memcpy(zVal, sqlite3_value_text(argv[0]), len);
sqlite3_result_text(pCtx, zVal, -1, destructor);
}
#ifndef SQLITE_OMIT_UTF16
static void test_destructor16(
sqlite3_context *pCtx,
int nArg,
@@ -136,6 +137,7 @@ static void test_destructor16(
memcpy(zVal, sqlite3_value_text16(argv[0]), len);
sqlite3_result_text16(pCtx, zVal, -1, destructor);
}
#endif
static void test_destructor_count(
sqlite3_context *pCtx,
int nArg,
@@ -272,7 +274,9 @@ static int registerTestFunctions(sqlite3 *db){
} aFuncs[] = {
{ "randstr", 2, SQLITE_UTF8, randStr },
{ "test_destructor", 1, SQLITE_UTF8, test_destructor},
#ifndef SQLITE_OMIT_UTF16
{ "test_destructor16", 1, SQLITE_UTF8, test_destructor16},
#endif
{ "test_destructor_count", 0, SQLITE_UTF8, test_destructor_count},
{ "test_auxdata", -1, SQLITE_UTF8, test_auxdata},
{ "test_error", 1, SQLITE_UTF8, test_error},