Skip to content
New issue

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

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

Already on GitHub? # to your account

Move get_rect helper to c_api #3303

Merged
merged 2 commits into from
Jan 25, 2025
Merged

Conversation

MightyJosip
Copy link
Member

This PR adds helper used to create the return value of Surface.get_(f)rect to public base api. So far that function was only used inside of Surface class, but since that same functionality is present in pygame._sdl2.Texture and pygame._sdl2.Image classes I moved it to public api to make it easier for implementation in the future (when we rewrite Texture/Image in C). That will also make it easier to implement extra stuff for those classes (like FRect support for both, or keyword support for Image.get_rect)

@MightyJosip MightyJosip requested a review from a team as a code owner January 23, 2025 11:25
Copy link
Member

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

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

Haven't tested, but this looks fine.

I got the same test error on one of my PRs, which makes even less sense for it to error than this one, so it's not this PRs fault.

@Starbuck5 Starbuck5 added Code quality/robustness Code quality and resilience to changes render/_sdl2 pygame._render or former pygame._sdl2 labels Jan 24, 2025
Copy link
Member

@damusss damusss left a comment

Choose a reason for hiding this comment

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

Makes sense, LGTM!

@damusss
Copy link
Member

damusss commented Jan 25, 2025

Joystick segfaulting doesn't really seem to have anything to do with this PR so I think it's safe to merge

@damusss damusss added this to the 2.5.3 milestone Jan 25, 2025
@damusss damusss merged commit 9dbecc5 into pygame-community:main Jan 25, 2025
24 of 25 checks passed
oddbookworm added a commit to oddbookworm/pygame-ce that referenced this pull request Jan 26, 2025
…Rect"

This reverts commit 9dbecc5, reversing
changes made to 8d527a1.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Code quality/robustness Code quality and resilience to changes render/_sdl2 pygame._render or former pygame._sdl2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants