diff --git a/.travis.yml b/.travis.yml index f979567e..53d4ce76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,9 @@ env: # via the "travis encrypt" command using the project repo's public key - secure: "P3wQLswiGYWrZwO4bxFmsA4XG5s/pS+renL0RMeotMTQwQQXmy1ZCvwMnAgaYWQmF82fN8WjuhO3OX0gpDbydxRktqI5ZqblsryV6poB0g+OkCqThbDUp3TL6TjPqySTI1CZ8qoOBYFMubAZYVJAEfxl0UxoQE+uTsRarRqr8rI=" +cache: + apt: true + addons: apt: packages: diff --git a/src/views_vtab.cc b/src/views_vtab.cc index 82c2c210..e4e98ff1 100644 --- a/src/views_vtab.cc +++ b/src/views_vtab.cc @@ -124,20 +124,20 @@ CREATE TABLE lnav_views ( return SQLITE_OK; } - int delete_row(sqlite3_vtab *tab, int64_t rowid) { + int delete_row(sqlite3_vtab *tab, sqlite3_int64 rowid) { tab->zErrMsg = sqlite3_mprintf( "Rows cannot be deleted from the lnav_views table"); return SQLITE_ERROR; } - int insert_row(sqlite3_vtab *tab, int64_t &rowid_out) { + int insert_row(sqlite3_vtab *tab, sqlite3_int64 &rowid_out) { tab->zErrMsg = sqlite3_mprintf( "Rows cannot be inserted into the lnav_views table"); return SQLITE_ERROR; }; int update_row(sqlite3_vtab *tab, - int64_t &index, + sqlite3_int64 &index, const char *name, int64_t top_row, int64_t left, @@ -212,7 +212,7 @@ CREATE TABLE lnav_view_stack ( return SQLITE_OK; }; - int delete_row(sqlite3_vtab *tab, int64_t rowid) { + int delete_row(sqlite3_vtab *tab, sqlite3_int64 rowid) { if (rowid != lnav_data.ld_view_stack.size() - 1) { tab->zErrMsg = sqlite3_mprintf( "Only the top view in the stack can be deleted"); @@ -232,7 +232,7 @@ CREATE TABLE lnav_view_stack ( }; int insert_row(sqlite3_vtab *tab, - int64_t &rowid_out, + sqlite3_int64 &rowid_out, const char *name) { if (name == nullptr) { tab->zErrMsg = sqlite3_mprintf("'name' cannot be null"); @@ -261,7 +261,7 @@ CREATE TABLE lnav_view_stack ( return SQLITE_OK; }; - int update_row(sqlite3_vtab *tab, int64_t &index) { + int update_row(sqlite3_vtab *tab, sqlite3_int64 &index) { tab->zErrMsg = sqlite3_mprintf( "The lnav_view_stack table cannot be updated"); return SQLITE_ERROR; diff --git a/src/vtab_module.hh b/src/vtab_module.hh index 6396ca39..ea13a051 100644 --- a/src/vtab_module.hh +++ b/src/vtab_module.hh @@ -78,16 +78,16 @@ struct vtab_module { }; template - static int apply_impl(T &obj, int (T::*func)(sqlite3_vtab *, int64_t &, Args...), sqlite3_vtab *tab, int64_t &rowid, sqlite3_value **argv, std::index_sequence) + static int apply_impl(T &obj, int (T::*func)(sqlite3_vtab *, sqlite3_int64 &, Args...), sqlite3_vtab *tab, sqlite3_int64 &rowid, sqlite3_value **argv, std::index_sequence) { return (obj.*func)(tab, rowid, from_sqlite(argv[Idx])...); } template static int apply(T &obj, - int (T::*func)(sqlite3_vtab *, int64_t &, Args...), + int (T::*func)(sqlite3_vtab *, sqlite3_int64 &, Args...), sqlite3_vtab *tab, - int64_t &rowid, + sqlite3_int64 &rowid, int argc, sqlite3_value **argv) { @@ -175,17 +175,17 @@ struct vtab_module { T handler; if (argc <= 1) { - int64_t rowid = sqlite3_value_int64(argv[0]); + sqlite3_int64 rowid = sqlite3_value_int64(argv[0]); return handler.delete_row(tab, rowid); } if (sqlite3_value_type(argv[0]) == SQLITE_NULL) { - int64_t *rowid2 = rowid; + sqlite3_int64 *rowid2 = rowid; return vtab_module::apply(handler, &T::insert_row, tab, *rowid2, argc - 2, argv + 2); } - int64_t index = sqlite3_value_int64(argv[0]); + sqlite3_int64 index = sqlite3_value_int64(argv[0]); if (index != sqlite3_value_int64(argv[1])) { tab->zErrMsg = sqlite3_mprintf( @@ -264,19 +264,19 @@ struct tvt_iterator_cursor { template struct tvt_no_update : public T { - int delete_row(sqlite3_vtab *vt, int64_t rowid) { + int delete_row(sqlite3_vtab *vt, sqlite3_int64 rowid) { vt->zErrMsg = sqlite3_mprintf( "Rows cannot be deleted from this table"); return SQLITE_ERROR; }; - int insert_row(sqlite3_vtab *tab, int64_t &rowid_out) { + int insert_row(sqlite3_vtab *tab, sqlite3_int64 &rowid_out) { tab->zErrMsg = sqlite3_mprintf( "Rows cannot be inserted into this table"); return SQLITE_ERROR; }; - int update_row(sqlite3_vtab *tab, int64_t &rowid_out) { + int update_row(sqlite3_vtab *tab, sqlite3_int64 &rowid_out) { tab->zErrMsg = sqlite3_mprintf( "Rows cannot be update in this table"); return SQLITE_ERROR;