Merge pull request #226 from kiwix/new_api_libzim

suggestions method return a unique_ptr instead of a raw pointer.
This commit is contained in:
Matthieu Gautier 2019-05-28 16:48:04 +02:00 committed by GitHub
commit 91a0e100cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
language: cpp language: cpp
dist: trusty dist: xenial
sudo: false sudo: true
cache: ccache cache: ccache
before_install: before_install:
- PATH=$PATH:$HOME/bin - PATH=$PATH:$HOME/bin

View File

@ -765,7 +765,7 @@ bool Reader::searchSuggestionsSmart(const string& prefix,
this->suggestions.clear(); this->suggestions.clear();
this->suggestionsOffset = this->suggestions.begin(); this->suggestionsOffset = this->suggestions.begin();
/* Try to search in the title using fulltext search database */ /* Try to search in the title using fulltext search database */
const zim::Search* suggestionSearch const auto suggestionSearch
= this->getZimFileHandler()->suggestions(prefix, 0, suggestionsCount); = this->getZimFileHandler()->suggestions(prefix, 0, suggestionsCount);
if (suggestionSearch->get_matches_estimated()) { if (suggestionSearch->get_matches_estimated()) {

View File

@ -3,7 +3,6 @@
set -e set -e
REPO_NAME=${TRAVIS_REPO_SLUG#*/} REPO_NAME=${TRAVIS_REPO_SLUG#*/}
ARCHIVE_NAME=deps_${TRAVIS_OS_NAME}_${PLATFORM}_${REPO_NAME}.tar.xz
# Ninja # Ninja
cd $HOME cd $HOME
@ -13,6 +12,7 @@ then
wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip
unzip ninja-mac.zip ninja unzip ninja-mac.zip ninja
ARCHIVE_NAME=deps_osx_${PLATFORM}_${REPO_NAME}.tar.xz
else else
wget https://bootstrap.pypa.io/get-pip.py wget https://bootstrap.pypa.io/get-pip.py
python3.5 get-pip.py --user python3.5 get-pip.py --user
@ -22,6 +22,7 @@ else
wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
unzip ninja-linux.zip ninja unzip ninja-linux.zip ninja
ARCHIVE_NAME=deps_linux_xenial_${PLATFORM}_${REPO_NAME}.tar.xz
fi fi
mkdir -p $HOME/bin mkdir -p $HOME/bin
@ -31,3 +32,4 @@ cp ninja $HOME/bin
cd ${HOME} cd ${HOME}
wget http://tmp.kiwix.org/ci/${ARCHIVE_NAME} wget http://tmp.kiwix.org/ci/${ARCHIVE_NAME}
tar xf ${HOME}/${ARCHIVE_NAME} tar xf ${HOME}/${ARCHIVE_NAME}
sudo ln -s travis ../ci_builder