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 unix socket address #98

Merged
merged 6 commits into from Apr 6, 2018

Conversation

Projects
None yet
5 participants
@antoyo
Member

antoyo commented Apr 1, 2018

This adds the UnixSocketAddress type.
I'm not sure about how Anonymous works, so I'm not sure how to test this variant but the other works well.

Show outdated Hide outdated Gir.toml
@@ -0,0 +1,50 @@
use std::ptr;

This comment has been minimized.

@EPashkin

EPashkin Apr 1, 2018

Member

Please add header with copyrights

@EPashkin

EPashkin Apr 1, 2018

Member

Please add header with copyrights

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 1, 2018

Member

@antoyo Looks good for me, thanks.

Member

EPashkin commented Apr 1, 2018

@antoyo Looks good for me, thanks.

@antoyo

This comment has been minimized.

Show comment
Hide comment
@antoyo

antoyo Apr 1, 2018

Member

Thanks for your comments.
I've fixed most of the issues: the one for get_path() should be fixed soon.

Member

antoyo commented Apr 1, 2018

Thanks for your comments.
I've fixed most of the issues: the one for get_path() should be fixed soon.

antoyo added some commits Apr 1, 2018

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 1, 2018

Member

AddressType seems like a weird name for this. It's more a UnixSocketAddressPath or something. It's a type plus a path or other identifier.

Member

sdroege commented on src/unix_socket_address.rs in fbea3f2 Apr 1, 2018

AddressType seems like a weird name for this. It's more a UnixSocketAddressPath or something. It's a type plus a path or other identifier.

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 1, 2018

Member

For enum imports I usually prefer to do that locally inside the function that uses it, otherwise it's too easy to shadow other things.

Member

sdroege commented on src/unix_socket_address.rs in fbea3f2 Apr 1, 2018

For enum imports I usually prefer to do that locally inside the function that uses it, otherwise it's too easy to shadow other things.

let path = unsafe {
let path = ffi::g_unix_socket_address_get_path(self.to_glib_none().0);
slice::from_raw_parts(path as *mut u8, self.get_path_len())

This comment has been minimized.

@tmiasko

tmiasko Apr 2, 2018

Contributor

path and path-as-array properties of GUnixSocketAddress are writeable so returning reference returned from here is kinda unsafe. EDIT: Nevermind, they are construct only.

@tmiasko

tmiasko Apr 2, 2018

Contributor

path and path-as-array properties of GUnixSocketAddress are writeable so returning reference returned from here is kinda unsafe. EDIT: Nevermind, they are construct only.

@antoyo

This comment has been minimized.

Show comment
Hide comment
@antoyo

antoyo Apr 5, 2018

Member

So, I've fixed all the mentioned issues.
Is something missing?

Member

antoyo commented Apr 5, 2018

So, I've fixed all the mentioned issues.
Is something missing?

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 6, 2018

Member

Nothing from me

Member

sdroege commented Apr 6, 2018

Nothing from me

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 6, 2018

Member

LGFM

Member

EPashkin commented Apr 6, 2018

LGFM

@GuillaumeGomez GuillaumeGomez merged commit 353642a into gtk-rs:master Apr 6, 2018

2 checks passed

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

@antoyo antoyo deleted the antoyo:feature/unix-socket-address branch Apr 6, 2018

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