Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Translate C++ exceptions raised during entry, search, and suggestion iteration and query parsing; omit exception translation from simple Blob accessors

## [4.1.0] - 2026-11-05

### Added
Expand Down
84 changes: 42 additions & 42 deletions libzim/zim.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ cdef extern from "writer_headers.h" namespace "zim::writer":
cdef extern from "zim/search.h" namespace "zim":
cdef cppclass Query:
Query()
Query& setQuery(string query)
Query& setGeorange(float latitude, float longitude, float distance)
Query& setQuery(string query) except +
Query& setGeorange(float latitude, float longitude, float distance) except +


cdef extern from "zim/search_iterator.h" namespace "zim":
cdef cppclass SearchIterator:
SearchIterator()
SearchIterator operator++()
bint operator==(SearchIterator)
bint operator!=(SearchIterator)
string getPath()
string getTitle()
string getSnippet()
int getFileIndex()
SearchIterator operator++() except +
bint operator==(SearchIterator) except +
bint operator!=(SearchIterator) except +
string getPath() except +
string getTitle() except +
string getSnippet() except +
int getFileIndex() except +


# Import the python wrappers (ObjWrapper) from libwrapper.
Expand All @@ -130,15 +130,15 @@ cdef extern from "libwrapper.h" namespace "wrapper":
cdef cppclass Blob:
Blob() except +
Blob(const char* data, uint64_t size) except +
const char* data() except +
const char* end() except +
uint64_t size() except +
const char* data()
const char* end()
uint64_t size()

cdef cppclass Entry:
string getTitle()
string getTitle() except +
string getPath() except +

bint isRedirect()
bint isRedirect() except +
Item getItem(bint follow) except +
Item getRedirect() except +
Entry getRedirectEntry() except +
Expand All @@ -147,41 +147,41 @@ cdef extern from "libwrapper.h" namespace "wrapper":

cdef cppclass PathEntryIterator:
PathEntryIterator()
PathEntryIterator operator++()
bint operator==(PathEntryIterator)
bint operator!=(PathEntryIterator)
PathEntryIterator operator++() except +
bint operator==(PathEntryIterator) except +
bint operator!=(PathEntryIterator) except +
Entry getEntry() except +

cdef cppclass PathEntryRange:
PathEntryRange()
PathEntryIterator begin()
PathEntryIterator end()
PathEntryIterator begin() except +
PathEntryIterator end() except +
int size()

cdef cppclass TitleEntryIterator:
TitleEntryIterator()
TitleEntryIterator operator++()
bint operator==(TitleEntryIterator)
bint operator!=(TitleEntryIterator)
TitleEntryIterator operator++() except +
bint operator==(TitleEntryIterator) except +
bint operator!=(TitleEntryIterator) except +
Entry getEntry() except +

cdef cppclass TitleEntryRange:
TitleEntryRange()
TitleEntryIterator begin()
TitleEntryIterator end()
TitleEntryIterator begin() except +
TitleEntryIterator end() except +
int size()

cdef cppclass EfficientEntryIterator:
EfficientEntryIterator()
EfficientEntryIterator operator++()
bint operator==(EfficientEntryIterator)
bint operator!=(EfficientEntryIterator)
EfficientEntryIterator operator++() except +
bint operator==(EfficientEntryIterator) except +
bint operator!=(EfficientEntryIterator) except +
Entry getEntry() except +

cdef cppclass EfficientEntryRange:
EfficientEntryRange()
EfficientEntryIterator begin()
EfficientEntryIterator end()
EfficientEntryIterator begin() except +
EfficientEntryIterator end() except +
int size()

cdef cppclass Item:
Expand Down Expand Up @@ -262,23 +262,23 @@ cdef extern from "libwrapper.h" namespace "wrapper":
SearchResultSet getResults(int start, int count) except +

cdef cppclass SearchResultSet:
SearchIterator begin()
SearchIterator end()
SearchIterator begin() except +
SearchIterator end() except +
int size()

cdef cppclass SuggestionItem:
string getPath()
string getTitle()
string getSnippet()
bool hasSnippet()
string getPath() except +
string getTitle() except +
string getSnippet() except +
bool hasSnippet() except +

cdef cppclass SuggestionIterator:
SuggestionIterator()
SuggestionIterator operator++()
bint operator==(SuggestionIterator)
bint operator!=(SuggestionIterator)
SuggestionItem getSuggestionItem()
Entry getEntry()
SuggestionIterator operator++() except +
bint operator==(SuggestionIterator) except +
bint operator!=(SuggestionIterator) except +
SuggestionItem getSuggestionItem() except +
Entry getEntry() except +

cdef cppclass SuggestionSearcher:
SuggestionSearcher()
Expand All @@ -291,8 +291,8 @@ cdef extern from "libwrapper.h" namespace "wrapper":
SuggestionResultSet getResults(int start, int count) except +

cdef cppclass SuggestionResultSet:
SuggestionIterator begin()
SuggestionIterator end()
SuggestionIterator begin() except +
SuggestionIterator end() except +
int size()

cdef extern from "zim/version.h" namespace "zim":
Expand Down