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 new Object::connect_unsafe(), Object::connect_notify_unsafe() and… #431

Merged
merged 1 commit into from Jan 26, 2019

Conversation

Projects
None yet
3 participants
@sdroege
Copy link
Member

sdroege commented Jan 25, 2019

… Closure::new_unsafe()

These allow to use non-Send/non-Sync closures and it's the job of the
caller to ensure that the closures are only used in a safe way.

Show resolved Hide resolved src/closure.rs Outdated
Show resolved Hide resolved src/object.rs Outdated
Show resolved Hide resolved src/object.rs Outdated
@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Jan 26, 2019

@sdroege Thanks, LVGFM

@sdroege sdroege force-pushed the sdroege:connect-unsafe branch 2 times, most recently from 27c9ad4 to cb43780 Jan 26, 2019

Show resolved Hide resolved src/closure.rs
Add new Object::connect_unsafe(), Object::connect_notify_unsafe() and…
… Closure::new_unsafe()

These allow to use non-Send/non-Sync/non-'static closures and it's the
job of the caller to ensure that the closures are only used in a safe
way.

Also clean up the calculation of the size of the allocated GClosure
object, and as a side-effect allocate 4 bytes less on 32 bit
architectures.

@sdroege sdroege force-pushed the sdroege:connect-unsafe branch from cb43780 to 8afc671 Jan 26, 2019

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Jan 26, 2019

@sdroege Thanks, 👍

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Jan 26, 2019

Sounds all good to me as well. Thanks!

@sdroege sdroege merged commit e5346be into gtk-rs:master Jan 26, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.