diff --git a/setup.py b/setup.py index 4b4b6db46..eb9fc8a5d 100755 --- a/setup.py +++ b/setup.py @@ -758,6 +758,11 @@ def build_mupdf_unix( mupdf_local, env, build_type): env_add(env, 'XCFLAGS', archflags) env_add(env, 'XLIBS', archflags) + # Add compiler flags to handle C23 compatibility issues on macOS + if darwin: + env_add(env, 'XCFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype -Wno-macro-redefined -Wno-error=macro-redefined') + env_add(env, 'XCXXFLAGS', '-Wno-deprecated-non-prototype -Wno-error=deprecated-non-prototype -Wno-macro-redefined -Wno-error=macro-redefined') + # We specify a build directory path containing 'pymupdf' so that we # coexist with non-PyMuPDF builds (because PyMuPDF builds have a # different config.h). @@ -1094,7 +1099,7 @@ def sdist(): # We generate different wheels depending on g_flavour. # -version = '1.23.26' +version = '1.23.26.1' version_b = '1.23.22' tag_python = None diff --git a/src/__init__.py b/src/__init__.py index 8fc3f3c9f..c0b7f96f4 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -6780,7 +6780,10 @@ def uri_to_dict(uri): if ftab[1].startswith("page="): self.kind = LINK_GOTOR self.file_spec = ftab[0] - self.page = int(ftab[1][5:]) - 1 + page_part = ftab[1][5:] + if "&" in page_part: + page_part = page_part.split("&")[0] + self.page = int(page_part) - 1 else: self.is_uri = True self.kind = LINK_LAUNCH @@ -21730,7 +21733,7 @@ def int_rc(text): return int(text) VersionFitz = "1.23.10" # MuPDF version. -VersionBind = "1.23.26" # PyMuPDF version. +VersionBind = "1.23.26.1" # PyMuPDF version. VersionDate = "2024-02-29 00:00:01" VersionDate2 = VersionDate.replace('-', '').replace(' ', '').replace(':', '') version = (VersionBind, VersionFitz, VersionDate2) diff --git a/src_classic/helper-python.i b/src_classic/helper-python.i index 6ca431e18..87f0e6ae3 100644 --- a/src_classic/helper-python.i +++ b/src_classic/helper-python.i @@ -901,7 +901,10 @@ class linkDest(object): if ftab[1].startswith("page="): self.kind = LINK_GOTOR self.fileSpec = ftab[0] - self.page = int(ftab[1][5:]) - 1 + page_part = ftab[1][5:] + if "&" in page_part: + page_part = page_part.split("&")[0] + self.page = int(page_part) - 1 else: self.isUri = True self.kind = LINK_LAUNCH