diff options
author | drh <drh@noemail.net> | 2017-07-24 15:29:16 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-07-24 15:29:16 +0000 |
commit | 1d8536bc0f74e54f97c21724c878c6eb231a3fb8 (patch) | |
tree | 9c007fcf80ecc137fc200f8aab910b445424aae0 /src | |
parent | caf8cc1b4b2c0d13bffa04bcccd3790f803afb15 (diff) | |
download | sqlite-1d8536bc0f74e54f97c21724c878c6eb231a3fb8.tar.gz sqlite-1d8536bc0f74e54f97c21724c878c6eb231a3fb8.zip |
Additional documentation on sqlite3_bind_pointer() and sqlite3_result_pointer().
No changes to code.
FossilOrigin-Name: b1572d4e05934a0dc1b73092acba652fa50e97552eb6e9a1cedea7c71055804b
Diffstat (limited to 'src')
-rw-r--r-- | src/sqlite.h.in | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 597724191..ea002b720 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -3890,7 +3890,12 @@ typedef struct sqlite3_context sqlite3_context; ** host-language pointers into [application-defined SQL functions]. ** ^A parameter that is initialized using [sqlite3_bind_pointer()] appears ** to be an ordinary SQL NULL value to everything other than -** [sqlite3_value_pointer()]. The T parameter should be a static string. +** [sqlite3_value_pointer()]. The T parameter should be a static string, +** preferably a string literal. The procedure that invokes +** sqlite3_bind_pointer(S,I,P,T) continues to own the P and T pointers and +** must guarantee that those pointers remain valid until after the last +** access via [sqlite3_value_pointer()]. The sqlite3_bind_pointer() routine +** is part of the [pointer passing interface] added for SQLite 3.20.0. ** ** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer ** for the [prepared statement] or with a prepared statement for which @@ -5101,9 +5106,12 @@ typedef void (*sqlite3_destructor_type)(void*); ** also associates the host-language pointer P or type T with that ** NULL value such that the pointer can be retrieved within an ** [application-defined SQL function] using [sqlite3_value_pointer()]. -** The T parameter should be a static string. -** This mechanism can be used to pass non-SQL values between -** application-defined functions. +** The T parameter should be a static string and preferably a string +** literal. The procedure that invokes sqlite3_result_pointer(C,P,T) +** continues to own the P and T pointers and must guarantee that +** those pointers remain valid until after the last access via +** [sqlite3_value_pointer()]. The sqlite3_result_pointer() routine +** is part of the [pointer passing interface] added for SQLite 3.20.0. ** ** If these routines are called from within the different thread ** than the one containing the application-defined function that received |