{"action":"created","issue":{"url":"https://api.github.com/repos/servo/core-foundation-rs/issues/85","repository_url":"https://api.github.com/repos/servo/core-foundation-rs","labels_url":"https://api.github.com/repos/servo/core-foundation-rs/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/servo/core-foundation-rs/issues/85/comments","events_url":"https://api.github.com/repos/servo/core-foundation-rs/issues/85/events","html_url":"https://github.com/servo/core-foundation-rs/pull/85","id":180299340,"number":85,"title":"Rewrite all the bindings in a better way","user":{"login":"nox","id":123095,"avatar_url":"https://avatars.githubusercontent.com/u/123095?v=3","gravatar_id":"","url":"https://api.github.com/users/nox","html_url":"https://github.com/nox","followers_url":"https://api.github.com/users/nox/followers","following_url":"https://api.github.com/users/nox/following{/other_user}","gists_url":"https://api.github.com/users/nox/gists{/gist_id}","starred_url":"https://api.github.com/users/nox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nox/subscriptions","organizations_url":"https://api.github.com/users/nox/orgs","repos_url":"https://api.github.com/users/nox/repos","events_url":"https://api.github.com/users/nox/events{/privacy}","received_events_url":"https://api.github.com/users/nox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-30T13:06:16Z","updated_at":"2016-09-30T13:39:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/core-foundation-rs/pulls/85","html_url":"https://github.com/servo/core-foundation-rs/pull/85","diff_url":"https://github.com/servo/core-foundation-rs/pull/85.diff","patch_url":"https://github.com/servo/core-foundation-rs/pull/85.patch"},"body":"All the FFI functions have fancy types now and use references instead of raw pointers for arguments.\r\n\r\nNow, a `CFRef<T>` value represents a refcounted value to be released on `Drop`, `CFShared<T>` represents a shared value that can be retained to produce a new `CFRef<T>` (this will be a useful distinction for mutable types, where a bare `T` shouldn't be retainable to keep unique ownership).\r\n\r\nTo simplify things and avoid either having wrappers of wrappers of all methods behind traits, I put the safe and thin methods directly on the opaque FFI types.\r\n\r\nLet's begin the infinite bikeshedding!\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/core-foundation-rs/85)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/core-foundation-rs/issues/comments/250746614","html_url":"https://github.com/servo/core-foundation-rs/pull/85#issuecomment-250746614","issue_url":"https://api.github.com/repos/servo/core-foundation-rs/issues/85","id":250746614,"user":{"login":"nox","id":123095,"avatar_url":"https://avatars.githubusercontent.com/u/123095?v=3","gravatar_id":"","url":"https://api.github.com/users/nox","html_url":"https://github.com/nox","followers_url":"https://api.github.com/users/nox/followers","following_url":"https://api.github.com/users/nox/following{/other_user}","gists_url":"https://api.github.com/users/nox/gists{/gist_id}","starred_url":"https://api.github.com/users/nox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nox/subscriptions","organizations_url":"https://api.github.com/users/nox/orgs","repos_url":"https://api.github.com/users/nox/repos","events_url":"https://api.github.com/users/nox/events{/privacy}","received_events_url":"https://api.github.com/users/nox/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T13:39:30Z","updated_at":"2016-09-30T13:39:30Z","body":"> Why isn't it supposed to? links exists specifically for `-sys` crates.\r\n\r\nOh right. I can't read. What's the problem though since you have the FFI functions? Just don't use the impls. I don't understand your point about not being able to coexist with other things or whatever.\r\n\r\n> I don't see why any of that is incompatible with leaving the bindings unchanged and overhauling the core-foundation crate?\r\n\r\nNeeding at least 3 or 4 types per binding, compared to 1 per binding and `CFRef` and `CFShared`. And `core-graphics-rs` is a downstream user of that crate, so you end up with an explosion in the number of wrappers the more things you bind."}}
{"actor":{"display_login":"nox"}}