Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various ctypes fixes #149

Merged
merged 2 commits into from
Dec 21, 2022
Merged

Various ctypes fixes #149

merged 2 commits into from
Dec 21, 2022

Conversation

cgohlke
Copy link
Contributor

@cgohlke cgohlke commented Dec 20, 2022

  • The default name of the shared library on Windows is tiff.dll in recent libtiff.
  • ctypes.util.find_library takes library names without any suffix.
  • Add libtiff_version_tuple.
  • tdir_t is defined as uint32_t in libtiff >= 4.5.0.
  • tsize_t is defined as SSIZE_T.

See also https://gitlab.com/libtiff/libtiff/-/blob/v4.5.0/libtiff/tiffio.h#L65-77

Tested on Python 3.11 64-bit on Windows 10 with libtiff 4.5.0.

Copy link
Owner

@pearu pearu left a comment

Choose a reason for hiding this comment

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

I have a small nit but otherwise looks good!

@coveralls
Copy link

coveralls commented Dec 20, 2022

Pull Request Test Coverage Report for Build 3744726931

  • 7 of 11 (63.64%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 32.894%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libtiff/libtiff_ctypes.py 7 11 63.64%
Totals Coverage Status
Change from base Build 3742537747: -0.7%
Covered Lines: 1699
Relevant Lines: 5165

💛 - Coveralls

Copy link
Owner

@pearu pearu left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

3 participants