-
Notifications
You must be signed in to change notification settings - Fork 468
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
Don't mark useful functions as private #1349
Comments
After looking into it it seems that the version I was using had Would a PR changing them all to public be accepted? |
Yes it would be accepted, but I feel like we should add a warning to all of themwhich are public, along the lines of "only use this is you know what you are doing" or something, because some structs are really dangerous to use if you don't know what you are doing. |
Hey!
Great bindings and rust library for SDL that I've had extensive use of.
I have a problem though,
I wanted to call
SDL_PeepEvents
which gives me access to a rawsdl::sys::SDL_Event
, but since the rest of my code is structured around this crate's nicersdl::event::Event
, I would preferably like to be able to easily convert it as you are already doing internally.However, to my great disappointment, the functions
Event::to_ll
andEvent::from_ll
are marked as private, giving an unfortunate block to my adventures here. (UPDATE: see comment down below)While I understand that this is more close to sdl::sys, I still feel like it is poor library design to have useful functions marked as private, especially a library implementing useful stuff ti interfacing with a C-library.
I feel like a public
sys-glue
module of sorts could be in-place here where such private functions could be marked public, or just be marked public unsafe in the first place.Feels silly to have to fork this just to mark more functions as public if I need them in the future..
The text was updated successfully, but these errors were encountered: