1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Add API functions sqlite3_open_varargs(), sqlite3_open16_varargs() and

sqlite3_complete16(). (CVS 1479)

FossilOrigin-Name: 203af2b2e3a25f4fe0e128e350c21834cad0bd7f
This commit is contained in:
danielk1977
2004-05-27 23:56:16 +00:00
parent d3194f5a4a
commit 61de0d1b99
7 changed files with 138 additions and 21 deletions

View File

@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.73 2004/05/27 17:22:56 drh Exp $
** $Id: tokenize.c,v 1.74 2004/05/27 23:56:16 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -694,3 +694,18 @@ int sqlite3_complete(const char *zSql){
}
return state==0;
}
/*
** This routine is the same as the sqlite3_complete() routine described
** above, except that the parameter is required to be UTF-16 encoded, not
** UTF-8.
*/
int sqlite3_complete16(const void *zSql){
int rc;
char *zSql8 = sqlite3utf16to8(zSql, -1, SQLITE3_BIGENDIAN);
if( !zSql8 ) return 0;
rc = sqlite3_complete(zSql8);
sqliteFree(zSql8);
return rc;
}