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

Simplify KeyFile::to_data #287

Merged
merged 1 commit into from Jan 23, 2018

Conversation

Projects
None yet
3 participants
@EPashkin
Member

EPashkin commented Jan 23, 2018

It always return string https://developer.gnome.org/glib/stable/glib-Key-value-file-parser.html#g-key-file-to-data. Also it return normall null-terminated string so length unneeded.

cc @GuillaumeGomez, @sdroege

Based on #286

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Jan 23, 2018

I suppose you can remove the first commit now.

@EPashkin

This comment has been minimized.

Member

EPashkin commented Jan 23, 2018

It will not present in merge.

@EPashkin EPashkin changed the base branch from master to crate Jan 23, 2018

@EPashkin EPashkin changed the base branch from crate to master Jan 23, 2018

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Jan 23, 2018

Ok, now all good!

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Jan 23, 2018

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit f037825 into gtk-rs:master Jan 23, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@EPashkin EPashkin deleted the EPashkin:key_file_to_data branch Jan 23, 2018

ignore = true
[[object.function]]
name = "locale_from_utf8"
#gsize
#unusable

This comment has been minimized.

@sdroege

sdroege Jan 23, 2018

Member

Unusable seems a bit harsh. These can all be manually bound if we want

pub fn to_data(&self) -> String {
unsafe {
let ret = ffi::g_key_file_to_data(self.to_glib_none().0, ptr::null_mut(), ptr::null_mut());

This comment has been minimized.

@sdroege

sdroege Jan 23, 2018

Member

This can never fail?! Why is there a GError then :)

This comment has been minimized.

@sdroege

sdroege Jan 24, 2018

Member

Yes it can't fail, the GError is never ever used in the code. How weird!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment