Skip to content

Add inflatelib_version - #28

Merged
Duncan Horn (dunhor) merged 7 commits into
mainfrom
dunhor/inflatelib_version
Aug 21, 2026
Merged

Add inflatelib_version#28
Duncan Horn (dunhor) merged 7 commits into
mainfrom
dunhor/inflatelib_version

Conversation

@dunhor

Copy link
Copy Markdown
Member

This adds an inflatelib_version to handle the scenarios where the version of the header used to compile a consumer against is not the same as the version of the library that it's linking against. I have also followed zlib's example of validating the major version inside the init function, failing if they differ.

Two other small issues that I noticed:

  • We're inconsistent with comment "types" in C files. Standardizes on /* ... */
  • While I don't think function implementations need INFLATELIB_EXPORT repeated, I'm pretty sure they do need the calling convention to match.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this all makes sense. Thanks!

We could conceivably simplify the version check to not use str* functions, but I'm not terribly worried about it

@dunhor

Copy link
Copy Markdown
Member Author

We could conceivably simplify the version check to not use str* functions, but I'm not terribly worried about it

I was going to respond... then realized the custom loop is really quite simple

Comment thread src/lib/inflate.c
@dunhor
Duncan Horn (dunhor) merged commit a1e2538 into main Aug 21, 2026
104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants