mirror of
				https://github.com/sqlite/sqlite.git
				synced 2025-10-24 09:53:10 +03:00 
			
		
		
		
	The SQLITE_OMIT_UTF16 macro now removes lots of code and all tests still pass. (CVS 2100)
FossilOrigin-Name: 98c7a55478f7c465b219edc1a33eee222586fd65
This commit is contained in:
		| @@ -16,7 +16,7 @@ | ||||
| ** sqliteRegisterBuildinFunctions() found at the bottom of the file. | ||||
| ** All other code has file scope. | ||||
| ** | ||||
| ** $Id: func.c,v 1.86 2004/11/12 13:42:31 danielk1977 Exp $ | ||||
| ** $Id: func.c,v 1.87 2004/11/14 21:56:30 drh Exp $ | ||||
| */ | ||||
| #include <ctype.h> | ||||
| #include <math.h> | ||||
| @@ -747,10 +747,12 @@ static void test_destructor( | ||||
|   memcpy(zVal, sqlite3ValueText(argv[0], db->enc), len); | ||||
|   if( db->enc==SQLITE_UTF8 ){ | ||||
|     sqlite3_result_text(pCtx, zVal, -1, destructor); | ||||
| #ifndef SQLITE_OMIT_UTF16 | ||||
|   }else if( db->enc==SQLITE_UTF16LE ){ | ||||
|     sqlite3_result_text16le(pCtx, zVal, -1, destructor); | ||||
|   }else{ | ||||
|     sqlite3_result_text16be(pCtx, zVal, -1, destructor); | ||||
| #endif /* SQLITE_OMIT_UTF16 */ | ||||
|   } | ||||
| } | ||||
| static void test_destructor_count( | ||||
| @@ -976,7 +978,9 @@ void sqlite3RegisterBuiltinFunctions(sqlite3 *db){ | ||||
|     { "typeof",             1, 0, SQLITE_UTF8,    0, typeofFunc }, | ||||
|     { "length",             1, 0, SQLITE_UTF8,    0, lengthFunc }, | ||||
|     { "substr",             3, 0, SQLITE_UTF8,    0, substrFunc }, | ||||
| #ifndef SQLITE_OMIT_UTF16 | ||||
|     { "substr",             3, 0, SQLITE_UTF16LE, 0, sqlite3utf16Substr }, | ||||
| #endif | ||||
|     { "abs",                1, 0, SQLITE_UTF8,    0, absFunc    }, | ||||
|     { "round",              1, 0, SQLITE_UTF8,    0, roundFunc  }, | ||||
|     { "round",              2, 0, SQLITE_UTF8,    0, roundFunc  }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user