aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-09-02 15:44:08 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-09-02 15:44:08 +0000
commita4de4532dd2885dee6adefe92602b8216b9c1411 (patch)
treec0dcd63942a8095fb1689611a69b7f00d8b42e3c /src
parent502b4e00c6642ffd0c49000a967fc736b1eeeec9 (diff)
downloadsqlite-a4de4532dd2885dee6adefe92602b8216b9c1411.tar.gz
sqlite-a4de4532dd2885dee6adefe92602b8216b9c1411.zip
Add an extra 'const' qualifier to two arrays (in func.c and pragma.c) to ensure that they do not consume space in the data segment of the compiled object files. (CVS 5663)
FossilOrigin-Name: 43f757c9f01ccc6e6c7a404fbeb74f825f7a29ca
Diffstat (limited to 'src')
-rw-r--r--src/func.c6
-rw-r--r--src/pragma.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/func.c b/src/func.c
index 6910c497d..425020cd4 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.201 2008/09/01 19:14:02 danielk1977 Exp $
+** $Id: func.c,v 1.202 2008/09/02 15:44:09 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -881,7 +881,7 @@ static void trimFunc(
assert( zIn==sqlite3_value_text(argv[0]) );
if( argc==1 ){
static const unsigned char lenOne[] = { 1 };
- static const unsigned char *azOne[] = { (u8*)" " };
+ static unsigned char * const azOne[] = { (u8*)" " };
nChar = 1;
aLen = (u8*)lenOne;
azChar = (unsigned char **)azOne;
@@ -938,6 +938,7 @@ static void trimFunc(
sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT);
}
+
#ifdef SQLITE_SOUNDEX
/*
** Compute the soundex encoding of a word.
@@ -1296,7 +1297,6 @@ int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){
return 1;
}
-
/*
** All all of the FuncDef structures in the aBuiltinFunc[] array above
** to the global function hash table. This occurs at start-time (as
diff --git a/src/pragma.c b/src/pragma.c
index a0efd600a..30252da0c 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
-** $Id: pragma.c,v 1.185 2008/09/02 00:52:52 drh Exp $
+** $Id: pragma.c,v 1.186 2008/09/02 15:44:09 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -449,7 +449,7 @@ void sqlite3Pragma(
*/
if( sqlite3StrICmp(zLeft,"journal_mode")==0 ){
int eMode;
- static const char *azModeName[] = {"delete", "persist", "off"};
+ static char * const azModeName[] = {"delete", "persist", "off"};
if( zRight==0 ){
eMode = PAGER_JOURNALMODE_QUERY;
@@ -1192,7 +1192,6 @@ void sqlite3Pragma(
|| sqlite3StrICmp(zLeft, "user_version")==0
|| sqlite3StrICmp(zLeft, "freelist_count")==0
){
-
int iCookie; /* Cookie index. 0 for schema-cookie, 6 for user-cookie. */
sqlite3VdbeUsesBtree(v, iDb);
switch( zLeft[0] ){
@@ -1267,6 +1266,7 @@ void sqlite3Pragma(
sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, zState, P4_STATIC);
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
}
+
}else
#endif