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

Improve API #157

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Improve API #157

wants to merge 4 commits into from

Conversation

AmjadHD
Copy link
Contributor

@AmjadHD AmjadHD commented Nov 16, 2023

No description provided.

* Remove special casing of `RectF` and `PointF`.
* Use `openarray` for `fillRects`, `drawRects` and `drawPoints`.
* allow passing `let` variables to proc expecting address.
* `copyEx` => `copy`.
@Araq
Copy link
Member

Araq commented Nov 17, 2023

The discardable don't improve the API. A check template that turns SDL_Return into an exception would. Then you can choose between discard foobar() # ignore the error and check foobar() # raises in case of error.

@AmjadHD
Copy link
Contributor Author

AmjadHD commented Nov 19, 2023

You can already do doAssert fooBar(), $sdl2.getError().

@Araq
Copy link
Member

Araq commented Nov 19, 2023

Yes but that could be improved.

@AmjadHD
Copy link
Contributor Author

AmjadHD commented Nov 19, 2023

I don't see how.

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