Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: third_party/sqlite/src/src/test_intarray.c

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/src/test_intarray.h ('k') | third_party/sqlite/src/src/test_journal.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/src/test_intarray.c
diff --git a/third_party/sqlite/src/src/test_intarray.c b/third_party/sqlite/src/src/test_intarray.c
index 8651d01cfacb012cc49d50a23adf5dbf8b3250bf..7235fbceda9cda77f8ead43888d2424b3abc9e2a 100644
--- a/third_party/sqlite/src/src/test_intarray.c
+++ b/third_party/sqlite/src/src/test_intarray.c
@@ -37,13 +37,13 @@ struct sqlite3_intarray {
typedef struct intarray_vtab intarray_vtab;
typedef struct intarray_cursor intarray_cursor;
-/* A intarray table object */
+/* An intarray table object */
struct intarray_vtab {
sqlite3_vtab base; /* Base class */
sqlite3_intarray *pContent; /* Content of the integer array */
};
-/* A intarray cursor object */
+/* An intarray cursor object */
struct intarray_cursor {
sqlite3_vtab_cursor base; /* Base class */
int i; /* Current cursor position */
@@ -216,7 +216,7 @@ static sqlite3_module intarrayModule = {
** explicitly by the application, the virtual table will be dropped implicitly
** by the system when the database connection is closed.
*/
-int sqlite3_intarray_create(
+SQLITE_API int sqlite3_intarray_create(
sqlite3 *db,
const char *zName,
sqlite3_intarray **ppReturn
@@ -250,7 +250,7 @@ int sqlite3_intarray_create(
** any query against the corresponding virtual table. If the integer
** array does change or is deallocated undefined behavior will result.
*/
-int sqlite3_intarray_bind(
+SQLITE_API int sqlite3_intarray_bind(
sqlite3_intarray *pIntArray, /* The intarray object to bind to */
int nElements, /* Number of elements in the intarray */
sqlite3_int64 *aElements, /* Content of the intarray */
@@ -278,7 +278,7 @@ int sqlite3_intarray_bind(
extern int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite3 **ppDb);
extern void *sqlite3TestTextToPtr(const char*);
extern int sqlite3TestMakePointerStr(Tcl_Interp*, char *zPtr, void*);
-extern const char *sqlite3TestErrorName(int);
+extern const char *sqlite3ErrName(int);
/*
** sqlite3_intarray_create DB NAME
@@ -309,7 +309,7 @@ static int test_intarray_create(
#endif
if( rc!=SQLITE_OK ){
assert( pArray==0 );
- Tcl_AppendResult(interp, sqlite3TestErrorName(rc), (char*)0);
+ Tcl_AppendResult(interp, sqlite3ErrName(rc), (char*)0);
return TCL_ERROR;
}
sqlite3TestMakePointerStr(interp, zPtr, pArray);
@@ -346,12 +346,13 @@ static int test_intarray_bind(
return TCL_ERROR;
}
for(i=0; i<n; i++){
- a[i] = 0;
- Tcl_GetWideIntFromObj(0, objv[i+2], &a[i]);
+ Tcl_WideInt x = 0;
+ Tcl_GetWideIntFromObj(0, objv[i+2], &x);
+ a[i] = x;
}
rc = sqlite3_intarray_bind(pArray, n, a, sqlite3_free);
if( rc!=SQLITE_OK ){
- Tcl_AppendResult(interp, sqlite3TestErrorName(rc), (char*)0);
+ Tcl_AppendResult(interp, sqlite3ErrName(rc), (char*)0);
return TCL_ERROR;
}
#endif
« no previous file with comments | « third_party/sqlite/src/src/test_intarray.h ('k') | third_party/sqlite/src/src/test_journal.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698