aboutsummaryrefslogtreecommitdiff
path: root/xapian.i.in
AgeCommit message (Collapse)Author
2023-01-20Catch C++ xapian exceptions and raise them as scheme exceptions.Arun Isaac
Uncaught C++ exceptions crash the guile process without providing scheme code any opportunity to respond. * except.i, xapian/error.scm: New files. * xapian.i.in: Include except.i. * Makefile.am (SOURCES): Add xapian/error.scm. (xapian_wrap.cc xapian/wrap.scm &): Depend on except.i.
2022-06-20Makefile: Suffix libguilexapian with effective Guile version number.Arun Isaac
We need to distinguish between libguilexapian built for different versions of Guile. * Makefile.am (lib_LTLIBRARIES): Replace libguilexapian.la with libguilexapian-@GUILE_EFFECTIVE_VERSION@.la. (libguilexapian_la_SOURCES): Rename to libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_SOURCES. (libguilexapian_la_CXXFLAGS): Rename to libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_CXXFLAGS. (libguilexapian_la_LDFLAGS): Rename to libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS. (xapian.i): Substitute @GUILE_EFFECTIVE_VERSION@. (xapian/xapian.go): Depend on libguilexapian-@GUILE_EFFECTIVE_VERSION@.la instead of libguilexapian.la. * xapian.i.in: Load libguilexapian-@GUILE_EFFECTIVE_VERSION@.la instead of libguilexapian.la.
2021-09-07Add SWIG wrappers for bytevector method variants.Bob131
Several Xapian methods use `std::string' to represent opaque binary blobs. SWIG treats these as UTF-8 strings and converts them to an SCM representation via `scm_from_utf8_string', which will throw an error if the input is not valid UTF-8. This commit updates the SWIG interface file to add wrappers taking or returning bytevectors instead of strings for Xapian methods dealing with document values and bodies. * xapian.i.in (SWIG_bytevector, typemap_in_SWIG_bytevector, typemap_out_SWIG_bytevector): Add machinery for defining bytevector-variant wrappers of existing methods taking or returning std::string. * (Xapian::ValueIterator::get_value_bytes, Xapian::Document::get_value_bytes, Xapian::Document::add_value_bytes, Xapian::Document::get_data_bytes, Xapian::Document::set_data_bytes, Xapian::Database::get_metadata_bytes, Xapian::WritableDatabase::set_metadata_bytes, Xapian::Query::Query): Add bytevector variants of methods. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2020-02-26Load libguilexapian with absolute path or through a search path.Arun Isaac
* xapian.i: Rename to xapian.i.in. * xapian.i.in: Try loading libguilexapian with absolute path first. If it fails, then try searching using LD_LIBRARY_PATH and other mechanisms. * Makefile.am: Generate xapian.i from xapian.i.in.