Re: [sqlite] sqlite3_column_text question

2006-07-14 Thread drh
"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

Re: [sqlite] sqlite3_column_text question

2006-07-14 Thread Alexei Alexandrov
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

Re: [sqlite] sqlite3_column_text question

2006-06-30 Thread Alexei Alexandrov
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

2006-06-30 Thread Will Leshner
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

2006-06-30 Thread Alexei Alexandrov
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