{"action":"created","comment":{"url":"https://api.github.com/repos/gtk-rs/gir/pulls/comments/207457629","pull_request_review_id":143073483,"id":207457629,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzQ1NzYyOQ==","diff_hunk":"@@ -137,6 +137,89 @@ pub fn analyze<F: Borrow<library::Function>>(\n     funcs\n }\n \n+fn fixup_special_functions(\n+    env: &Env,\n+    name: &str,\n+    type_tid: library::TypeId,\n+    parameters: &mut Parameters\n+) {\n+    // Workaround for some _hash() / _compare() / _equal() functions taking\n+    // \"gconstpointer\" as arguments instead of the actual type\n+    if name == \"hash\" && parameters.c_parameters.len() == 1 {\n+        if parameters.c_parameters[0].c_type == \"gconstpointer\" {\n+            use analysis::ffi_type;\n+\n+            parameters.rust_parameters[0].typ = type_tid;\n+            parameters.c_parameters[0].typ = type_tid;\n+            parameters.c_parameters[0].instance_parameter = true;\n+            parameters.c_parameters[0].ref_mode = RefMode::ByRef;\n+            parameters.c_parameters[0].transfer = Transfer::None;\n+            let glib_name = env.library.type_(type_tid).get_glib_name().unwrap();\n+            let ffi_name = ffi_type::fix_name(env, type_tid, &glib_name).unwrap();\n+            parameters.transformations[0] = Transformation {\n+                ind_c: 0,\n+                ind_rust: Some(0),\n+                transformation_type: TransformationType::ToGlibPointer {\n+                    name: parameters.rust_parameters[0].name.clone(),\n+                    instance_parameter: true,\n+                    transfer: Transfer::None,\n+                    ref_mode: RefMode::ByRef,\n+                    to_glib_extra: String::new(),\n+                    explicit_target_type: format!(\"*mut {}\", ffi_name),","path":"src/analysis/functions.rs","position":41,"original_position":41,"commit_id":"f7af553c3d59ca609810154ea9ecffcb4ddbcb24","original_commit_id":"f7af553c3d59ca609810154ea9ecffcb4ddbcb24","user":{"login":"sdroege","id":301846,"node_id":"MDQ6VXNlcjMwMTg0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/301846?v=4","gravatar_id":"","url":"https://api.github.com/users/sdroege","html_url":"https://github.com/sdroege","followers_url":"https://api.github.com/users/sdroege/followers","following_url":"https://api.github.com/users/sdroege/following{/other_user}","gists_url":"https://api.github.com/users/sdroege/gists{/gist_id}","starred_url":"https://api.github.com/users/sdroege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdroege/subscriptions","organizations_url":"https://api.github.com/users/sdroege/orgs","repos_url":"https://api.github.com/users/sdroege/repos","events_url":"https://api.github.com/users/sdroege/events{/privacy}","received_events_url":"https://api.github.com/users/sdroege/received_events","type":"User","site_admin":false},"body":"> Maybe better use \"*const\" here, as we IMHO always implemented it too\r\n\r\nI think that's not implemented for `Shared`, not sure. Will check","created_at":"2018-08-03T07:04:43Z","updated_at":"2018-08-03T07:04:43Z","html_url":"https://github.com/gtk-rs/gir/pull/627#discussion_r207457629","pull_request_url":"https://api.github.com/repos/gtk-rs/gir/pulls/627","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/gtk-rs/gir/pulls/comments/207457629"},"html":{"href":"https://github.com/gtk-rs/gir/pull/627#discussion_r207457629"},"pull_request":{"href":"https://api.github.com/repos/gtk-rs/gir/pulls/627"}},"in_reply_to_id":207433926},"pull_request":{"url":"https://api.github.com/repos/gtk-rs/gir/pulls/627","id":205672225,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjcyMjI1","html_url":"https://github.com/gtk-rs/gir/pull/627","diff_url":"https://github.com/gtk-rs/gir/pull/627.diff","patch_url":"https://github.com/gtk-rs/gir/pull/627.patch","issue_url":"https://api.github.com/repos/gtk-rs/gir/issues/627","number":627,"state":"open","locked":false,"title":"Improve deriving of trait impls","user":{"login":"sdroege","id":301846,"node_id":"MDQ6VXNlcjMwMTg0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/301846?v=4","gravatar_id":"","url":"https://api.github.com/users/sdroege","html_url":"https://github.com/sdroege","followers_url":"https://api.github.com/users/sdroege/followers","following_url":"https://api.github.com/users/sdroege/following{/other_user}","gists_url":"https://api.github.com/users/sdroege/gists{/gist_id}","starred_url":"https://api.github.com/users/sdroege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdroege/subscriptions","organizations_url":"https://api.github.com/users/sdroege/orgs","repos_url":"https://api.github.com/users/sdroege/repos","events_url":"https://api.github.com/users/sdroege/events{/privacy}","received_events_url":"https://api.github.com/users/sdroege/received_events","type":"User","site_admin":false},"body":"See https://github.com/gtk-rs/glib/pull/367 for context\r\n\r\nThis is WIP","created_at":"2018-08-02T09:30:15Z","updated_at":"2018-08-03T07:04:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b8707c1d439780f94981de5eb950768d4a5a987","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gtk-rs/gir/pulls/627/commits","review_comments_url":"https://api.github.com/repos/gtk-rs/gir/pulls/627/comments","review_comment_url":"https://api.github.com/repos/gtk-rs/gir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gtk-rs/gir/issues/627/comments","statuses_url":"https://api.github.com/repos/gtk-rs/gir/statuses/f7af553c3d59ca609810154ea9ecffcb4ddbcb24","head":{"label":"sdroege:derive","ref":"derive","sha":"f7af553c3d59ca609810154ea9ecffcb4ddbcb24","user":{"login":"sdroege","id":301846,"node_id":"MDQ6VXNlcjMwMTg0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/301846?v=4","gravatar_id":"","url":"https://api.github.com/users/sdroege","html_url":"https://github.com/sdroege","followers_url":"https://api.github.com/users/sdroege/followers","following_url":"https://api.github.com/users/sdroege/following{/other_user}","gists_url":"https://api.github.com/users/sdroege/gists{/gist_id}","starred_url":"https://api.github.com/users/sdroege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdroege/subscriptions","organizations_url":"https://api.github.com/users/sdroege/orgs","repos_url":"https://api.github.com/users/sdroege/repos","events_url":"https://api.github.com/users/sdroege/events{/privacy}","received_events_url":"https://api.github.com/users/sdroege/received_events","type":"User","site_admin":false},"repo":{"id":87104742,"node_id":"MDEwOlJlcG9zaXRvcnk4NzEwNDc0Mg==","name":"gir","full_name":"sdroege/gir","owner":{"login":"sdroege","id":301846,"node_id":"MDQ6VXNlcjMwMTg0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/301846?v=4","gravatar_id":"","url":"https://api.github.com/users/sdroege","html_url":"https://github.com/sdroege","followers_url":"https://api.github.com/users/sdroege/followers","following_url":"https://api.github.com/users/sdroege/following{/other_user}","gists_url":"https://api.github.com/users/sdroege/gists{/gist_id}","starred_url":"https://api.github.com/users/sdroege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdroege/subscriptions","organizations_url":"https://api.github.com/users/sdroege/orgs","repos_url":"https://api.github.com/users/sdroege/repos","events_url":"https://api.github.com/users/sdroege/events{/privacy}","received_events_url":"https://api.github.com/users/sdroege/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sdroege/gir","description":null,"fork":true,"url":"https://api.github.com/repos/sdroege/gir","forks_url":"https://api.github.com/repos/sdroege/gir/forks","keys_url":"https://api.github.com/repos/sdroege/gir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdroege/gir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdroege/gir/teams","hooks_url":"https://api.github.com/repos/sdroege/gir/hooks","issue_events_url":"https://api.github.com/repos/sdroege/gir/issues/events{/number}","events_url":"https://api.github.com/repos/sdroege/gir/events","assignees_url":"https://api.github.com/repos/sdroege/gir/assignees{/user}","branches_url":"https://api.github.com/repos/sdroege/gir/branches{/branch}","tags_url":"https://api.github.com/repos/sdroege/gir/tags","blobs_url":"https://api.github.com/repos/sdroege/gir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdroege/gir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdroege/gir/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdroege/gir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdroege/gir/statuses/{sha}","languages_url":"https://api.github.com/repos/sdroege/gir/languages","stargazers_url":"https://api.github.com/repos/sdroege/gir/stargazers","contributors_url":"https://api.github.com/repos/sdroege/gir/contributors","subscribers_url":"https://api.github.com/repos/sdroege/gir/subscribers","subscription_url":"https://api.github.com/repos/sdroege/gir/subscription","commits_url":"https://api.github.com/repos/sdroege/gir/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdroege/gir/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdroege/gir/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdroege/gir/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdroege/gir/contents/{+path}","compare_url":"https://api.github.com/repos/sdroege/gir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdroege/gir/merges","archive_url":"https://api.github.com/repos/sdroege/gir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdroege/gir/downloads","issues_url":"https://api.github.com/repos/sdroege/gir/issues{/number}","pulls_url":"https://api.github.com/repos/sdroege/gir/pulls{/number}","milestones_url":"https://api.github.com/repos/sdroege/gir/milestones{/number}","notifications_url":"https://api.github.com/repos/sdroege/gir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdroege/gir/labels{/name}","releases_url":"https://api.github.com/repos/sdroege/gir/releases{/id}","deployments_url":"https://api.github.com/repos/sdroege/gir/deployments","created_at":"2017-04-03T18:02:54Z","updated_at":"2017-04-03T18:02:55Z","pushed_at":"2018-08-02T21:50:10Z","git_url":"git://github.com/sdroege/gir.git","ssh_url":"git@github.com:sdroege/gir.git","clone_url":"https://github.com/sdroege/gir.git","svn_url":"https://github.com/sdroege/gir","homepage":null,"size":1666,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gtk-rs:master","ref":"master","sha":"36244ddaf378dc14f5cd4c32a1e9b6940e463ebd","user":{"login":"gtk-rs","id":11757045,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzU3MDQ1","avatar_url":"https://avatars2.githubusercontent.com/u/11757045?v=4","gravatar_id":"","url":"https://api.github.com/users/gtk-rs","html_url":"https://github.com/gtk-rs","followers_url":"https://api.github.com/users/gtk-rs/followers","following_url":"https://api.github.com/users/gtk-rs/following{/other_user}","gists_url":"https://api.github.com/users/gtk-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/gtk-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtk-rs/subscriptions","organizations_url":"https://api.github.com/users/gtk-rs/orgs","repos_url":"https://api.github.com/users/gtk-rs/repos","events_url":"https://api.github.com/users/gtk-rs/events{/privacy}","received_events_url":"https://api.github.com/users/gtk-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":37824715,"node_id":"MDEwOlJlcG9zaXRvcnkzNzgyNDcxNQ==","name":"gir","full_name":"gtk-rs/gir","owner":{"login":"gtk-rs","id":11757045,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzU3MDQ1","avatar_url":"https://avatars2.githubusercontent.com/u/11757045?v=4","gravatar_id":"","url":"https://api.github.com/users/gtk-rs","html_url":"https://github.com/gtk-rs","followers_url":"https://api.github.com/users/gtk-rs/followers","following_url":"https://api.github.com/users/gtk-rs/following{/other_user}","gists_url":"https://api.github.com/users/gtk-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/gtk-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtk-rs/subscriptions","organizations_url":"https://api.github.com/users/gtk-rs/orgs","repos_url":"https://api.github.com/users/gtk-rs/repos","events_url":"https://api.github.com/users/gtk-rs/events{/privacy}","received_events_url":"https://api.github.com/users/gtk-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gtk-rs/gir","description":"Tool to generate rust bindings and user API for glib-based libraries","fork":false,"url":"https://api.github.com/repos/gtk-rs/gir","forks_url":"https://api.github.com/repos/gtk-rs/gir/forks","keys_url":"https://api.github.com/repos/gtk-rs/gir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gtk-rs/gir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gtk-rs/gir/teams","hooks_url":"https://api.github.com/repos/gtk-rs/gir/hooks","issue_events_url":"https://api.github.com/repos/gtk-rs/gir/issues/events{/number}","events_url":"https://api.github.com/repos/gtk-rs/gir/events","assignees_url":"https://api.github.com/repos/gtk-rs/gir/assignees{/user}","branches_url":"https://api.github.com/repos/gtk-rs/gir/branches{/branch}","tags_url":"https://api.github.com/repos/gtk-rs/gir/tags","blobs_url":"https://api.github.com/repos/gtk-rs/gir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gtk-rs/gir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gtk-rs/gir/git/refs{/sha}","trees_url":"https://api.github.com/repos/gtk-rs/gir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gtk-rs/gir/statuses/{sha}","languages_url":"https://api.github.com/repos/gtk-rs/gir/languages","stargazers_url":"https://api.github.com/repos/gtk-rs/gir/stargazers","contributors_url":"https://api.github.com/repos/gtk-rs/gir/contributors","subscribers_url":"https://api.github.com/repos/gtk-rs/gir/subscribers","subscription_url":"https://api.github.com/repos/gtk-rs/gir/subscription","commits_url":"https://api.github.com/repos/gtk-rs/gir/commits{/sha}","git_commits_url":"https://api.github.com/repos/gtk-rs/gir/git/commits{/sha}","comments_url":"https://api.github.com/repos/gtk-rs/gir/comments{/number}","issue_comment_url":"https://api.github.com/repos/gtk-rs/gir/issues/comments{/number}","contents_url":"https://api.github.com/repos/gtk-rs/gir/contents/{+path}","compare_url":"https://api.github.com/repos/gtk-rs/gir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gtk-rs/gir/merges","archive_url":"https://api.github.com/repos/gtk-rs/gir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gtk-rs/gir/downloads","issues_url":"https://api.github.com/repos/gtk-rs/gir/issues{/number}","pulls_url":"https://api.github.com/repos/gtk-rs/gir/pulls{/number}","milestones_url":"https://api.github.com/repos/gtk-rs/gir/milestones{/number}","notifications_url":"https://api.github.com/repos/gtk-rs/gir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gtk-rs/gir/labels{/name}","releases_url":"https://api.github.com/repos/gtk-rs/gir/releases{/id}","deployments_url":"https://api.github.com/repos/gtk-rs/gir/deployments","created_at":"2015-06-21T20:29:55Z","updated_at":"2018-08-02T05:30:20Z","pushed_at":"2018-08-02T21:50:13Z","git_url":"git://github.com/gtk-rs/gir.git","ssh_url":"git@github.com:gtk-rs/gir.git","clone_url":"https://github.com/gtk-rs/gir.git","svn_url":"https://github.com/gtk-rs/gir","homepage":"","size":1656,"stargazers_count":45,"watchers_count":45,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":25,"open_issues":67,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gtk-rs/gir/pulls/627"},"html":{"href":"https://github.com/gtk-rs/gir/pull/627"},"issue":{"href":"https://api.github.com/repos/gtk-rs/gir/issues/627"},"comments":{"href":"https://api.github.com/repos/gtk-rs/gir/issues/627/comments"},"review_comments":{"href":"https://api.github.com/repos/gtk-rs/gir/pulls/627/comments"},"review_comment":{"href":"https://api.github.com/repos/gtk-rs/gir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gtk-rs/gir/pulls/627/commits"},"statuses":{"href":"https://api.github.com/repos/gtk-rs/gir/statuses/f7af553c3d59ca609810154ea9ecffcb4ddbcb24"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sdroege"}}