Re: [sqlite] sqlite3_column_text question
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote: > Still I can't understand why sqlite3_column_text returns (unsigned > char *), but sqlite3_bind_text takes (const char *). What am I > missing? > Why does signed vs. unsigned char matter to you? Perhaps the interface could be more consistent. But the policy with SQLite is to never change the interface in order to provide backwards compatibility. So you will just have to live with the interface as it stands. Or else fork the code and make your own incompatible version... -- D. Richard Hipp <[EMAIL PROTECTED]>
Re: [sqlite] sqlite3_column_text question
Still I can't understand why sqlite3_column_text returns (unsigned char *), but sqlite3_bind_text takes (const char *). What am I missing? On 6/30/06, Alexei Alexandrov <[EMAIL PROTECTED]> wrote: > > Perhaps because it is returning UTF8 and that needs to be unsigned, not signed? > Hmm, why sqlite3_bind_text takes const char * then? -- Alexei Alexandrov -- Alexei Alexandrov
Re: [sqlite] sqlite3_column_text question
Perhaps because it is returning UTF8 and that needs to be unsigned, not signed? Hmm, why sqlite3_bind_text takes const char * then? -- Alexei Alexandrov
Re: [sqlite] sqlite3_column_text question
On 6/30/06, Alexei Alexandrov <[EMAIL PROTECTED]> wrote: Why does it return *unsigned* char *? Just const char * would seem more natural Perhaps because it is returning UTF8 and that needs to be unsigned, not signed?
[sqlite] sqlite3_column_text question
Why does it return *unsigned* char *? Just const char * would seem more natural - now I need to cast it on Windows. Also from the docs it's not clear who owns the memory returned. I assume that SQLite owns it until sqlite3_step is called. -- Alexei Alexandrov