aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-03-18 17:18:18 +0000
committerdrh <drh@noemail.net>2013-03-18 17:18:18 +0000
commitce3ca25cbcd117d0a238bc028a83c453673dd0fe (patch)
treedd6a8710409697e08d93686dd683797264db59a6 /src
parent5b4b2551513197e36e432ae5b2432042578bdd59 (diff)
downloadsqlite-ce3ca25cbcd117d0a238bc028a83c453673dd0fe.tar.gz
sqlite-ce3ca25cbcd117d0a238bc028a83c453673dd0fe.zip
Clarifications to the documentation for the sqlite3_aggregate_context() API.
Also, shorten an over-length source line in sqlite.h.in. FossilOrigin-Name: 4fe2db1d866c80fe51f7fddbf9ce6753fb55b5f6
Diffstat (limited to 'src')
-rw-r--r--src/sqlite.h.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 0373353d7..a6f9b0b37 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -3993,7 +3993,8 @@ SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
SQLITE_DEPRECATED int sqlite3_global_recover(void);
SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
-SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
+SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
+ void*,sqlite3_int64);
#endif
/*
@@ -4073,14 +4074,17 @@ int sqlite3_value_numeric_type(sqlite3_value*);
** In those cases, sqlite3_aggregate_context() might be called for the
** first time from within xFinal().)^
**
-** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is
-** less than or equal to zero or if a memory allocate error occurs.
+** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer
+** when first called if N is less than or equal to zero or if a memory
+** allocate error occurs.
**
** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
** determined by the N parameter on first successful call. Changing the
** value of N in subsequent call to sqlite3_aggregate_context() within
** the same aggregate function instance will not resize the memory
-** allocation.)^
+** allocation.)^ Within the xFinal callback, it is customary to set
+** N=0 in calls to sqlite3_aggregate_context(C,N) so that no
+** pointless memory allocations occur.
**
** ^SQLite automatically frees the memory allocated by
** sqlite3_aggregate_context() when the aggregate query concludes.