1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix leaky symbols. With this change, fts1 and fts2 can both be

statically linked. (CVS 3472)

FossilOrigin-Name: 5e8bbb85c1493e3ab2d807d24c68294f26838e49
This commit is contained in:
shess
2006-10-10 23:22:40 +00:00
parent 2670a173ed
commit 0d6e29b832
6 changed files with 30 additions and 28 deletions

View File

@ -50,14 +50,14 @@ typedef struct StringBuffer {
char *s; /* Content of the string */
} StringBuffer;
void initStringBuffer(StringBuffer *sb){
static void initStringBuffer(StringBuffer *sb){
sb->len = 0;
sb->alloced = 100;
sb->s = malloc(100);
sb->s[0] = '\0';
}
void nappend(StringBuffer *sb, const char *zFrom, int nFrom){
static void nappend(StringBuffer *sb, const char *zFrom, int nFrom){
if( sb->len + nFrom >= sb->alloced ){
sb->alloced = sb->len + nFrom + 100;
sb->s = realloc(sb->s, sb->alloced+1);
@ -70,7 +70,7 @@ void nappend(StringBuffer *sb, const char *zFrom, int nFrom){
sb->len += nFrom;
sb->s[sb->len] = 0;
}
void append(StringBuffer *sb, const char *zFrom){
static void append(StringBuffer *sb, const char *zFrom){
nappend(sb, zFrom, strlen(zFrom));
}
@ -1242,7 +1242,7 @@ static int content_update(fulltext_vtab *v, sqlite3_value **pValues,
return sql_single_step_statement(v, CONTENT_UPDATE_STMT, &s);
}
void freeStringArray(int nString, const char **pString){
static void freeStringArray(int nString, const char **pString){
int i;
for (i=0 ; i < nString ; ++i) {
@ -1634,7 +1634,7 @@ static char **tokenizeString(const char *z, int *pnToken){
** [pqr] becomes pqr
** `mno` becomes mno
*/
void dequoteString(char *z){
static void dequoteString(char *z){
int quote;
int i, j;
if( z==0 ) return;
@ -1676,7 +1676,7 @@ void dequoteString(char *z){
** input: delimiters ( '[' , ']' , '...' )
** output: [ ] ...
*/
void tokenListToIdList(char **azIn){
static void tokenListToIdList(char **azIn){
int i, j;
if( azIn ){
for(i=0, j=-1; azIn[i]; i++){
@ -1753,7 +1753,7 @@ typedef struct TableSpec {
/*
** Reclaim all of the memory used by a TableSpec
*/
void clearTableSpec(TableSpec *p) {
static void clearTableSpec(TableSpec *p) {
free(p->azColumn);
free(p->azContentColumn);
free(p->azTokenizer);
@ -1767,7 +1767,8 @@ void clearTableSpec(TableSpec *p) {
* We return parsed information in a TableSpec structure.
*
*/
int parseSpec(TableSpec *pSpec, int argc, const char *const*argv, char**pzErr){
static int parseSpec(TableSpec *pSpec, int argc, const char *const*argv,
char**pzErr){
int i, j, n;
char *z, *zDummy;
char **azArg;

View File

@ -563,7 +563,7 @@ static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
** part of a token. In other words, delimiters all must have
** values of 0x7f or lower.
*/
const char isIdChar[] = {
static const char isIdChar[] = {
/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 3x */
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 4x */

View File

@ -50,14 +50,14 @@ typedef struct StringBuffer {
char *s; /* Content of the string */
} StringBuffer;
void initStringBuffer(StringBuffer *sb){
static void initStringBuffer(StringBuffer *sb){
sb->len = 0;
sb->alloced = 100;
sb->s = malloc(100);
sb->s[0] = '\0';
}
void nappend(StringBuffer *sb, const char *zFrom, int nFrom){
static void nappend(StringBuffer *sb, const char *zFrom, int nFrom){
if( sb->len + nFrom >= sb->alloced ){
sb->alloced = sb->len + nFrom + 100;
sb->s = realloc(sb->s, sb->alloced+1);
@ -70,7 +70,7 @@ void nappend(StringBuffer *sb, const char *zFrom, int nFrom){
sb->len += nFrom;
sb->s[sb->len] = 0;
}
void append(StringBuffer *sb, const char *zFrom){
static void append(StringBuffer *sb, const char *zFrom){
nappend(sb, zFrom, strlen(zFrom));
}
@ -1242,7 +1242,7 @@ static int content_update(fulltext_vtab *v, sqlite3_value **pValues,
return sql_single_step_statement(v, CONTENT_UPDATE_STMT, &s);
}
void freeStringArray(int nString, const char **pString){
static void freeStringArray(int nString, const char **pString){
int i;
for (i=0 ; i < nString ; ++i) {
@ -1634,7 +1634,7 @@ static char **tokenizeString(const char *z, int *pnToken){
** [pqr] becomes pqr
** `mno` becomes mno
*/
void dequoteString(char *z){
static void dequoteString(char *z){
int quote;
int i, j;
if( z==0 ) return;
@ -1676,7 +1676,7 @@ void dequoteString(char *z){
** input: delimiters ( '[' , ']' , '...' )
** output: [ ] ...
*/
void tokenListToIdList(char **azIn){
static void tokenListToIdList(char **azIn){
int i, j;
if( azIn ){
for(i=0, j=-1; azIn[i]; i++){
@ -1753,7 +1753,7 @@ typedef struct TableSpec {
/*
** Reclaim all of the memory used by a TableSpec
*/
void clearTableSpec(TableSpec *p) {
static void clearTableSpec(TableSpec *p) {
free(p->azColumn);
free(p->azContentColumn);
free(p->azTokenizer);
@ -1767,7 +1767,8 @@ void clearTableSpec(TableSpec *p) {
* We return parsed information in a TableSpec structure.
*
*/
int parseSpec(TableSpec *pSpec, int argc, const char *const*argv, char**pzErr){
static int parseSpec(TableSpec *pSpec, int argc, const char *const*argv,
char**pzErr){
int i, j, n;
char *z, *zDummy;
char **azArg;

View File

@ -563,7 +563,7 @@ static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
** part of a token. In other words, delimiters all must have
** values of 0x7f or lower.
*/
const char isIdChar[] = {
static const char isIdChar[] = {
/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 3x */
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 4x */