mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 14:48:32 -04:00
DBD-SQLite: fixed return value of enable_load_extension
This commit is contained in:
parent
e471875089
commit
400dc2b884
3 changed files with 8 additions and 4 deletions
|
@ -47,7 +47,7 @@ create_function(dbh, name, argc, func)
|
||||||
sqlite3_db_create_function(aTHX_ dbh, name, argc, func );
|
sqlite3_db_create_function(aTHX_ dbh, name, argc, func );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static int
|
||||||
enable_load_extension(dbh, onoff)
|
enable_load_extension(dbh, onoff)
|
||||||
SV *dbh
|
SV *dbh
|
||||||
int onoff
|
int onoff
|
||||||
|
@ -55,8 +55,10 @@ enable_load_extension(dbh, onoff)
|
||||||
DBD::SQLite::db::sqlite_enable_load_extension = 1
|
DBD::SQLite::db::sqlite_enable_load_extension = 1
|
||||||
CODE:
|
CODE:
|
||||||
{
|
{
|
||||||
sqlite3_db_enable_load_extension(aTHX_ dbh, onoff );
|
RETVAL = sqlite3_db_enable_load_extension(aTHX_ dbh, onoff );
|
||||||
}
|
}
|
||||||
|
OUTPUT:
|
||||||
|
RETVAL
|
||||||
|
|
||||||
void
|
void
|
||||||
create_aggregate(dbh, name, argc, aggr)
|
create_aggregate(dbh, name, argc, aggr)
|
||||||
|
|
4
dbdimp.c
4
dbdimp.c
|
@ -960,7 +960,7 @@ sqlite3_db_create_function(pTHX_ SV *dbh, const char *name, int argc, SV *func )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
sqlite3_db_enable_load_extension(pTHX_ SV *dbh, int onoff )
|
sqlite3_db_enable_load_extension(pTHX_ SV *dbh, int onoff )
|
||||||
{
|
{
|
||||||
D_imp_dbh(dbh);
|
D_imp_dbh(dbh);
|
||||||
|
@ -971,7 +971,9 @@ sqlite3_db_enable_load_extension(pTHX_ SV *dbh, int onoff )
|
||||||
{
|
{
|
||||||
char* const errmsg = form("sqlite_enable_load_extension failed with error %s", sqlite3_errmsg(imp_dbh->db));
|
char* const errmsg = form("sqlite_enable_load_extension failed with error %s", sqlite3_errmsg(imp_dbh->db));
|
||||||
sqlite_error(dbh, (imp_xxh_t*)imp_dbh, retval, errmsg);
|
sqlite_error(dbh, (imp_xxh_t*)imp_dbh, retval, errmsg);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
2
dbdimp.h
2
dbdimp.h
|
@ -79,7 +79,7 @@ struct aggrInfo {
|
||||||
};
|
};
|
||||||
|
|
||||||
int sqlite3_db_create_function(pTHX_ SV *dbh, const char *name, int argc, SV *func);
|
int sqlite3_db_create_function(pTHX_ SV *dbh, const char *name, int argc, SV *func);
|
||||||
void sqlite3_db_enable_load_extension(pTHX_ SV *dbh, int onoff);
|
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 );
|
void 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_create_collation(pTHX_ SV *dbh, const char *name, SV *func);
|
||||||
int 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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue