--- Liam Healy <[EMAIL PROTECTED]> wrote: > I was the one who packaged up extension-functions.tgz and posted on > contrib. I didn't author the original code but I'd like to fix this up. > I'm not clear on what needs to be changed. I gather that sqlite3utf8CharLen > and sqlite3CreateFunc shouldn't be used. I'm not sure how to convert to use > the external API. Anyone have a pointer?
See: http://www.sqlite.org/capi3ref.html#sqlite3_create_function http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions And include this statically in your code, if you require it: #define SQLITE_SKIP_UTF8(zIn) { \ if( (*(zIn++))>=0xc0 ){ \ while( (*zIn & 0xc0)==0x80 ){ zIn++; } \ } \ } int sqlite3Utf8CharLen(const char *zIn, int nByte){ int r = 0; const u8 *z = (const u8*)zIn; const u8 *zTerm; if( nByte>=0 ){ zTerm = &z[nByte]; }else{ zTerm = (const u8*)(-1); } assert( z<=zTerm ); while( *z!=0 && z<zTerm ){ SQLITE_SKIP_UTF8(z); r++; } return r; } ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------