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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user