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

Add support for libc::time_t and related types #1562

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Apr 1, 2024

@sdroege
Copy link
Member Author

sdroege commented Apr 1, 2024

I'm not sure why but this breaks generation of safe bindings in unexpected ways

-#[doc(alias = "g_get_real_name")]
-#[doc(alias = "get_real_name")]
-pub fn real_name() -> std::ffi::OsString {
-    unsafe { from_glib_none(ffi::g_get_real_name()) }
-}
+//#[doc(alias = "g_get_real_name")]
+//#[doc(alias = "get_real_name")]
+//pub fn real_name() -> /*Unimplemented*/Basic: TimeT {
+//    unsafe { TODO: call ffi:g_get_real_name() }
+//}

For some reason OsStr and related are all mapped to TimeT now.

@sdroege
Copy link
Member Author

sdroege commented Apr 1, 2024

Ah, because we hardcode the tids in src/library.rs 🙄

@sdroege
Copy link
Member Author

sdroege commented Apr 1, 2024

Has some pending problems in https://gitlab.gnome.org/GNOME/glib/-/issues/3311 but from our side this "works" from what I can see.

@sdroege
Copy link
Member Author

sdroege commented Apr 1, 2024

@werdahias note that this just makes it "someone else's" problem, i.e. yours and somehow magically getting the correct type mappings in the libc crate.

@sdroege
Copy link
Member Author

sdroege commented Apr 3, 2024

@bilelmoussaoui What should we do about this? IMHO ready to be merged

@bilelmoussaoui bilelmoussaoui merged commit eb5be4f into gtk-rs:master Apr 3, 2024
7 checks passed
@sdroege sdroege deleted the time_t-etc branch September 5, 2024 13:04
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.

[Bug] time_t64 causes regeneration to fail for gio-sys
2 participants