aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-05-09 13:46:26 +0000
committerdrh <drh@noemail.net>2018-05-09 13:46:26 +0000
commit0cdbe1aee0739f0f120c578bc5cd9065f23beb71 (patch)
tree54a03a9fd9e2c2eb2e97baf8a8fb11a8a09f72b1 /src/func.c
parent721e8539c38b9221543183305c6e7f2bb2b76833 (diff)
downloadsqlite-0cdbe1aee0739f0f120c578bc5cd9065f23beb71.tar.gz
sqlite-0cdbe1aee0739f0f120c578bc5cd9065f23beb71.zip
Make the internal dynamic string interface available to extensions using
the new sqlite3_str object and its associated methods. This is mostly just a renaming of internal objects and methods to use external names, through there are a few small wrapper functions. FossilOrigin-Name: 87f261f0cb800b06ad786f6df16f2c4dddd0d93dfdcc77b4a4eaa22920b56bf1
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/func.c b/src/func.c
index deb7e7492..17a267e22 100644
--- a/src/func.c
+++ b/src/func.c
@@ -251,7 +251,7 @@ static void printfFunc(
x.apArg = argv+1;
sqlite3StrAccumInit(&str, db, 0, 0, db->aLimit[SQLITE_LIMIT_LENGTH]);
str.printfFlags = SQLITE_PRINTF_SQLFUNC;
- sqlite3XPrintf(&str, zFormat, &x);
+ sqlite3_str_appendf(&str, zFormat, &x);
n = str.nChar;
sqlite3_result_text(context, sqlite3StrAccumFinish(&str), n,
SQLITE_DYNAMIC);
@@ -1654,20 +1654,20 @@ static void groupConcatStep(
zSep = ",";
nSep = 1;
}
- if( zSep ) sqlite3StrAccumAppend(pAccum, zSep, nSep);
+ if( zSep ) sqlite3_str_append(pAccum, zSep, nSep);
}
zVal = (char*)sqlite3_value_text(argv[0]);
nVal = sqlite3_value_bytes(argv[0]);
- if( zVal ) sqlite3StrAccumAppend(pAccum, zVal, nVal);
+ if( zVal ) sqlite3_str_append(pAccum, zVal, nVal);
}
}
static void groupConcatFinalize(sqlite3_context *context){
StrAccum *pAccum;
pAccum = sqlite3_aggregate_context(context, 0);
if( pAccum ){
- if( pAccum->accError==STRACCUM_TOOBIG ){
+ if( pAccum->accError==SQLITE_TOOBIG ){
sqlite3_result_error_toobig(context);
- }else if( pAccum->accError==STRACCUM_NOMEM ){
+ }else if( pAccum->accError==SQLITE_NOMEM ){
sqlite3_result_error_nomem(context);
}else{
sqlite3_result_text(context, sqlite3StrAccumFinish(pAccum), -1,