> Le 3 août 2017 à 14:27, Peter Da Silva <peter.dasi...@flightaware.com> a > écrit : > > On 8/3/17, 4:22 AM, "sqlite-users on behalf of Ulrich Telle" > <sqlite-users-boun...@mailinglists.sqlite.org on behalf of > ulrich.te...@gmx.de> wrote: >> IMHO it would be better if the function sqlite3_bind_pointer would make a >> copy of the type string and would thus be independent of the life span of >> the type parameter. > > I believe that this was a deliberate choice to deter using temporary strings > for type names.
The reference (https://www.sqlite.org/bindptr.html) says: > Because pointer types must be static strings, and because string values in > SQLite are dynamic strings, that means that SQL values cannot be used as a > pointer type. This prevents misguided developers from creating a new SQL > function that can manufacture pointer values directly from SQL. Such a > function, if possible to write, would undermine the security of the > pointer-passing APIs. Thus, the requirement that pointer types be static > strings helps to prevent misuse of the pointer-passing interfaces. Gwendal Roué _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users