mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 06:38:12 -04:00
show warnings only when Warn is true
This commit is contained in:
parent
9f291b41d3
commit
5288da34ab
1 changed files with 4 additions and 2 deletions
6
dbdimp.c
6
dbdimp.c
|
@ -449,7 +449,8 @@ sqlite_db_STORE_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (strEQ(key, "unicode")) {
|
if (strEQ(key, "unicode")) {
|
||||||
warn("\"unicode\" attribute will be deprecated. Use \"sqlite_unicode\" instead.");
|
if (DBIc_has(imp_dbh, DBIcf_WARN))
|
||||||
|
warn("\"unicode\" attribute will be deprecated. Use \"sqlite_unicode\" instead.");
|
||||||
#if PERL_UNICODE_DOES_NOT_WORK_WELL
|
#if PERL_UNICODE_DOES_NOT_WORK_WELL
|
||||||
sqlite_trace(dbh, imp_dbh, 3, form("Unicode support is disabled for this version of perl."));
|
sqlite_trace(dbh, imp_dbh, 3, form("Unicode support is disabled for this version of perl."));
|
||||||
imp_dbh->unicode = 0;
|
imp_dbh->unicode = 0;
|
||||||
|
@ -485,7 +486,8 @@ sqlite_db_FETCH_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (strEQ(key, "unicode")) {
|
if (strEQ(key, "unicode")) {
|
||||||
warn("\"unicode\" attribute will be deprecated. Use \"sqlite_unicode\" instead.");
|
if (DBIc_has(imp_dbh, DBIcf_WARN))
|
||||||
|
warn("\"unicode\" attribute will be deprecated. Use \"sqlite_unicode\" instead.");
|
||||||
#if PERL_UNICODE_DOES_NOT_WORK_WELL
|
#if PERL_UNICODE_DOES_NOT_WORK_WELL
|
||||||
sqlite_trace(dbh, imp_dbh, 3, "Unicode support is disabled for this version of perl.");
|
sqlite_trace(dbh, imp_dbh, 3, "Unicode support is disabled for this version of perl.");
|
||||||
return sv_2mortal(newSViv(0));
|
return sv_2mortal(newSViv(0));
|
||||||
|
|
Loading…
Add table
Reference in a new issue