diff --git a/SQLite.xs b/SQLite.xs index 166640d..c75b3a5 100644 --- a/SQLite.xs +++ b/SQLite.xs @@ -83,7 +83,7 @@ create_collation(dbh, name, func) sqlite3_db_create_collation(aTHX_ dbh, name, func ); } -void +static int progress_handler(dbh, n_opcodes, handler) SV *dbh int n_opcodes @@ -92,8 +92,10 @@ progress_handler(dbh, n_opcodes, handler) DBD::SQLite::db::sqlite_progress_handler = 1 CODE: { - sqlite3_db_progress_handler(aTHX_ dbh, n_opcodes, handler ); + RETVAL = sqlite3_db_progress_handler(aTHX_ dbh, n_opcodes, handler ); } + OUTPUT: + RETVAL int busy_timeout(dbh, timeout=0) diff --git a/dbdimp.c b/dbdimp.c index ba8e844..005ad03 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -1309,7 +1309,7 @@ sqlite_db_progress_handler_dispatcher( void *handler ) return retval; } -void +int sqlite3_db_progress_handler(pTHX_ SV *dbh, int n_opcodes, SV *handler ) { D_imp_dbh(dbh); @@ -1329,6 +1329,7 @@ sqlite3_db_progress_handler(pTHX_ SV *dbh, int n_opcodes, SV *handler ) sqlite_db_progress_handler_dispatcher, handler_sv ); } + return TRUE; } /* Accesses the SQLite Online Backup API, and fills the currently loaded diff --git a/dbdimp.h b/dbdimp.h index 52f5628..7db74ab 100644 --- a/dbdimp.h +++ b/dbdimp.h @@ -82,7 +82,7 @@ void sqlite3_db_create_function(pTHX_ SV *dbh, const char *name, int argc, SV *f void sqlite3_db_enable_load_extension(pTHX_ SV *dbh, int onoff); void sqlite3_db_create_aggregate(pTHX_ SV *dbh, const char *name, int argc, SV *aggr ); void sqlite3_db_create_collation(pTHX_ SV *dbh, const char *name, SV *func); -void sqlite3_db_progress_handler(pTHX_ SV *dbh, int n_opcodes, SV *handler); +int sqlite3_db_progress_handler(pTHX_ SV *dbh, int n_opcodes, SV *handler); void sqlite_st_reset(pTHX_ SV *sth ); int sqlite_bind_col( SV *sth, imp_sth_t *imp_sth, SV *col, SV *ref, IV sql_type, SV *attribs ); int sqlite3_db_busy_timeout (pTHX_ SV *dbh, int timeout );