On 7/21/17, Gwendal Roué <gwendal.r...@gmail.com> wrote:
>
> First, this strcmp() give a lot of work to languages that wrap SQLite and
> lack support for "static strings".

But sqlite3_result_pointer() and sqlite3_bind_pointer() are not
invoked from those languages.  The _pointer() routines are invoked
from C, and C does easily support string literals that are static
strings.

A C-language wrapper around sqlite3_result_pointer() and
sqlite3_bind_pointer() that interfaces to the non-static-string
language can simply insert the required static string.

We do not want the static string to be a parameter to a generic
higher-level interface.  That defeats the purpose of the static
string.  Remember, the string is a "pointer type".  We do not want to
support interfaces that provide access to pointers of any type the
user wants.  We are not trying to recreate C++ templates or other
interfaces that work with arbitrary types.  Each use of _pointer() is
intended to be used for a single narrowly defined purpose.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to