xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_str_finish.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3_STR_FINISH 3
3.Os
4.Sh NAME
5.Nm sqlite3_str_finish
6.Nd finalize a dynamic string
7.Sh SYNOPSIS
8.In sqlite3.h
9.Ft char *
10.Fo sqlite3_str_finish
11.Fa "sqlite3_str*"
12.Fc
13.Sh DESCRIPTION
14The sqlite3_str_finish(X) interface destroys the
15sqlite3_str object X and returns a pointer to a memory buffer obtained
16from
17.Fn sqlite3_malloc64
18that contains the constructed string.
19The calling application should pass the returned value to
20.Fn sqlite3_free
21to avoid a memory leak.
22The sqlite3_str_finish(X) interface may return
23a NULL pointer if any errors were encountered during construction of
24the string.
25The sqlite3_str_finish(X) interface will also
26return a NULL pointer if the string in sqlite3_str object
27X is zero bytes long.
28.Sh IMPLEMENTATION NOTES
29These declarations were extracted from the
30interface documentation at line 8427.
31.Bd -literal
32SQLITE_API char *sqlite3_str_finish(sqlite3_str*);
33.Ed
34.Sh SEE ALSO
35.Xr sqlite3_malloc 3 ,
36.Xr sqlite3_str 3
37