mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 14:48:32 -04:00
DBD-SQLite: fixed return value of create_aggregate
This commit is contained in:
parent
400dc2b884
commit
b78c888711
3 changed files with 8 additions and 4 deletions
|
@ -60,7 +60,7 @@ enable_load_extension(dbh, onoff)
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
static int
|
||||
create_aggregate(dbh, name, argc, aggr)
|
||||
SV *dbh
|
||||
char *name
|
||||
|
@ -70,8 +70,10 @@ create_aggregate(dbh, name, argc, aggr)
|
|||
DBD::SQLite::db::sqlite_create_aggregate = 1
|
||||
CODE:
|
||||
{
|
||||
sqlite3_db_create_aggregate(aTHX_ dbh, name, argc, aggr );
|
||||
RETVAL = sqlite3_db_create_aggregate(aTHX_ dbh, name, argc, aggr );
|
||||
}
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
static int
|
||||
create_collation(dbh, name, func)
|
||||
|
|
4
dbdimp.c
4
dbdimp.c
|
@ -1164,7 +1164,7 @@ sqlite_db_aggr_finalize_dispatcher( sqlite3_context *context )
|
|||
LEAVE;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
sqlite3_db_create_aggregate(pTHX_ SV *dbh, const char *name, int argc, SV *aggr_pkg )
|
||||
{
|
||||
D_imp_dbh(dbh);
|
||||
|
@ -1185,7 +1185,9 @@ sqlite3_db_create_aggregate(pTHX_ SV *dbh, const char *name, int argc, SV *aggr_
|
|||
{
|
||||
char* const errmsg = form("sqlite_create_aggregate failed with error %s", sqlite3_errmsg(imp_dbh->db));
|
||||
sqlite_error(dbh, (imp_xxh_t*)imp_dbh, retval, errmsg);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
2
dbdimp.h
2
dbdimp.h
|
@ -80,7 +80,7 @@ struct aggrInfo {
|
|||
|
||||
int sqlite3_db_create_function(pTHX_ SV *dbh, const char *name, int argc, SV *func);
|
||||
int 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 );
|
||||
int sqlite3_db_create_aggregate(pTHX_ SV *dbh, const char *name, int argc, SV *aggr );
|
||||
int sqlite3_db_create_collation(pTHX_ SV *dbh, const char *name, SV *func);
|
||||
int sqlite3_db_progress_handler(pTHX_ SV *dbh, int n_opcodes, SV *handler);
|
||||
void sqlite_st_reset(pTHX_ SV *sth );
|
||||
|
|
Loading…
Add table
Reference in a new issue