Subject: | A patch to small improvement (not a bug report) |
Hi,
Congrat to release a new version. I have been waiting for it.
And I have written a patch for dbdimp.c to improve performance and
readability.
This patch includes:
* DBI provides its own ppport.h but it too old to use a new useful APIs.
Use a new ppport.h and remove some macros.
* Fast perl collations in C, instead of sub{ $_[0] cmp $_[1] } in Perl.
Anyway, it is implemented by sv_cmp()/sv_cmp_locale().
* Remove some unnecessary codes:
av_undef(imp_dbh->functions), sqlite_quote(), etc.
* call_sv() with G_SCALAR or G_VOID always returns 1.
pp_entersub()/pp_leavesub()/pp_return() adjust return values unless
called in list context.
Changed to assert(retval == 1) currently, but it might be removed.
* "sv_2mortal(newRV(sv_2mortal((SV*)av)))" is the same as
"sv_2mortal(newRV_noinc((SV*)av))". The latter is always faster
and easy to understand.
* Calls AGGREGATOR->step() in void context.
* Use form()/Perl_form(), instead of sqlite3_snprintf().
It's an useful utility function.
* The attribute "unicode" is not a standard attribute, so
it should be renamed. I have proposed a new name, "sqlite_unicode".
I'll happy if I contribute this distribution.
Regards,
--
Goro Fuji (gfx) GFUJI at CPAN.org
Subject: | SQLite.pm.patch |
--- SQLite.pm~ 2009-04-23 19:12:05.000000000 +0900
+++ SQLite.pm 2009-04-30 09:18:38.025376000 +0900
@@ -95,11 +95,6 @@
# Hand off to the actual login function
DBD::SQLite::db::_login($dbh, $real, $user, $auth) or return undef;
- # Install perl collations
- my $perl_collation = sub { $_[0] cmp $_[1] };
- my $perl_locale_collation = sub { use locale; $_[0] cmp $_[1] };
- $dbh->func( "perl", $perl_collation, "create_collation" );
- $dbh->func( "perllocale", $perl_locale_collation, "create_collation" );
# HACK: Since PrintWarn = 0 doesn't seem to actually prevent warnings
# in DBD::SQLite we set Warn to false if PrintWarn is false.
Subject: | dbdimp.c.patch |
Message body is not shown because it is too large.