mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
Tidy
This commit is contained in:
parent
27dfab4fb2
commit
2d595f3bf2
1 changed files with 6 additions and 4 deletions
8
dbdimp.c
8
dbdimp.c
|
@ -1867,10 +1867,12 @@ sqlite_db_create_function(pTHX_ SV *dbh, const char *name, int argc, SV *func, i
|
||||||
croak_if_db_is_null();
|
croak_if_db_is_null();
|
||||||
|
|
||||||
/* warn("create_function %s with %d args\n", name, argc); */
|
/* warn("create_function %s with %d args\n", name, argc); */
|
||||||
|
if (SvOK(func)) {
|
||||||
rc = sqlite3_create_function( imp_dbh->db, name, argc, SQLITE_UTF8|flags,
|
rc = sqlite3_create_function( imp_dbh->db, name, argc, SQLITE_UTF8|flags,
|
||||||
SvOK(func) ? func_sv : NULL,
|
func_sv, _FUNC_DISPATCHER[imp_dbh->string_mode], NULL, NULL );
|
||||||
SvOK(func) ? _FUNC_DISPATCHER[imp_dbh->string_mode] : NULL,
|
} else {
|
||||||
NULL, NULL );
|
rc = sqlite3_create_function( imp_dbh->db, name, argc, SQLITE_UTF8|flags, NULL, NULL, NULL, NULL );
|
||||||
|
}
|
||||||
if ( rc != SQLITE_OK ) {
|
if ( rc != SQLITE_OK ) {
|
||||||
sqlite_error(dbh, rc, form("sqlite_create_function failed with error %s", sqlite3_errmsg(imp_dbh->db)));
|
sqlite_error(dbh, rc, form("sqlite_create_function failed with error %s", sqlite3_errmsg(imp_dbh->db)));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue