[libdbd-sqlite3-perl] 07/43: register perl tokenizer only if DBD::SQLite is compiled with -DSQLITE_ENABLE_FTS3_TOKENIZER
Salvatore Bonaccorso
carnil at debian.org
Tue Nov 15 15:27:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
carnil pushed a commit to branch master
in repository libdbd-sqlite3-perl.
commit d1fd6128e315fc5dd29dca32ed9eff0e166bddf0
Author: Kenichi Ishigaki <ishigaki at cpan.org>
Date: Tue Feb 16 12:55:38 2016 +0900
register perl tokenizer only if DBD::SQLite is compiled with -DSQLITE_ENABLE_FTS3_TOKENIZER
---
SQLite.xs | 4 ++++
dbdimp.c | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/SQLite.xs b/SQLite.xs
index 5b51aef..f20e511 100644
--- a/SQLite.xs
+++ b/SQLite.xs
@@ -288,7 +288,11 @@ register_fts3_perl_tokenizer(dbh)
ALIAS:
DBD::SQLite::db::sqlite_register_fts3_perl_tokenizer = 1
CODE:
+#if SQLITE_ENABLE_FTS3_TOKENIZER
RETVAL = sqlite_db_register_fts3_perl_tokenizer(aTHX_ dbh);
+#else
+ RETVAL = 0;
+#endif
OUTPUT:
RETVAL
diff --git a/dbdimp.c b/dbdimp.c
index d01f728..00e959b 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -2623,7 +2623,12 @@ sqlite_db_backup_to_file(pTHX_ SV *dbh, char *filename)
#endif
}
-#include "dbdimp_tokenizer.inc"
+#if SQLITE_VERSION_NUMBER < 3011000
+ #include "dbdimp_tokenizer.inc"
+#elif SQLITE_ENABLE_FTS3_TOKENIZER
+ #include "dbdimp_tokenizer.inc"
+#endif
+
#include "dbdimp_virtual_table.inc"
/* end */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdbd-sqlite3-perl.git
More information about the Pkg-perl-cvs-commits
mailing list