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

Fix 32bit pointer support #46

Merged
merged 4 commits into from
Aug 29, 2023
Merged

Fix 32bit pointer support #46

merged 4 commits into from
Aug 29, 2023

Conversation

Schamper
Copy link
Member

Fixes #45.

@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Merging #46 (3fe8d64) into main (f9a9f86) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #46   +/-   ##
=======================================
  Coverage   88.23%   88.23%           
=======================================
  Files          20       20           
  Lines        1709     1709           
=======================================
  Hits         1508     1508           
  Misses        201      201           
Flag Coverage Δ
unittests 88.23% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
dissect/cstruct/cstruct.py 89.74% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link

@Poeloe Poeloe left a comment

Choose a reason for hiding this comment

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

Maybe for the sake of preventing regression, add a test like:

    with patch("sys.maxsize", 2**64):
        c = cstruct.cstruct()
        assert c.pointer is c.uint64

    with patch("sys.maxsize", 2**32):
        c = cstruct.cstruct()
        assert c.pointer is c.uint32

    c = cstruct.cstruct(pointer="uint16")
    assert c.pointer is c.uint16

@Schamper Schamper requested a review from Poeloe August 29, 2023 09:21
Copy link

@Poeloe Poeloe left a comment

Choose a reason for hiding this comment

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

LGTM!

@Schamper Schamper merged commit 212160f into main Aug 29, 2023
18 checks passed
@Schamper Schamper deleted the fix-32-bit-pointers branch August 29, 2023 10:42
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.

Please consider 32bit support, if possible.
2 participants