openzim / libzim

Reference implementation of the ZIM specification
https://download.openzim.org/release/libzim/
GNU General Public License v2.0
163 stars 47 forks source link

Correctly try to open split files. #880

Closed mgautierfr closed 2 months ago

mgautierfr commented 3 months ago

Fix #879

First commit is not really related to this PR but recent gcc complain about the missing default destructor in test/archive.cpp. So I fix this in the same time. If you prefer, I can move it a different PR as it is not straightforward fix.

mgautierfr commented 3 months ago

It appears that the first commit is a bit too aggressive (without speaking potential ABI break). See https://github.com/openzim/libzim/actions/runs/8882043713/job/24385796413?pr=880 _data.get() should return a char* (according to this and this as we are cpp17) but it returns a char (*)[] on some platform (probably because they are not c++17 ready).

I have propose another PR #881 simply testing creation of std::shared_ptr<char> in test. I will removed the first commit of this PR.

mgautierfr commented 2 months ago

Please edit/clean-up the history of this PR (and rewrite the commit messages as needed).

Done

mgautierfr commented 2 months ago

New version (simpler) following your live advice.