{"action":"closed","number":6,"pull_request":{"url":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/6","id":43234069,"html_url":"https://github.com/jcmoyer/rust-lua53/pull/6","diff_url":"https://github.com/jcmoyer/rust-lua53/pull/6.diff","patch_url":"https://github.com/jcmoyer/rust-lua53/pull/6.patch","issue_url":"https://api.github.com/repos/jcmoyer/rust-lua53/issues/6","number":6,"state":"closed","locked":false,"title":"Stable Rust, Closures, Docs","user":{"login":"SpaceManiac","id":222630,"avatar_url":"https://avatars.githubusercontent.com/u/222630?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceManiac","html_url":"https://github.com/SpaceManiac","followers_url":"https://api.github.com/users/SpaceManiac/followers","following_url":"https://api.github.com/users/SpaceManiac/following{/other_user}","gists_url":"https://api.github.com/users/SpaceManiac/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceManiac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceManiac/subscriptions","organizations_url":"https://api.github.com/users/SpaceManiac/orgs","repos_url":"https://api.github.com/users/SpaceManiac/repos","events_url":"https://api.github.com/users/SpaceManiac/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceManiac/received_events","type":"User","site_admin":false},"body":"Hi, I like your binding but found some room for improvement while playing around with it. Before I let myself go overboard, here's a PR with my suggested changes so far:\r\n\r\n- Change to compile on stable Rust (1.2)\r\n  - Use crates.io libc and deref coercions to replace the unstable features\r\n- Adjust type aliases to improve appearance in docs\r\n  - The docs were somewhat spotty before\r\n- Add LUA_SIGNATURE constant\r\n- Make submodules whose members are all re-exported private\r\n- Move 'convert' and 'state' submodules to root\r\n  - Makes paths shorter and removes need for another mod.rs\r\n- Add ThreadStatus::is_err convenience method\r\n- Make State::close() consume the State and Drop actually delete it\r\n  - It seems to me like close() should semantically consume the state, since it's unusable afterwards\r\n- Change callk, pcallk, load, dump, and yieldk to accept closures\r\n  - Exposes a safe interface rather than requiring library users to define `unsafe extern \"C\" fn`s\r\n  - `let mut dest = Vec::new(); state.dump(&mut |_, buf| { dest.extend(buf); 0 }, false);`\r\n- Change State::load_buffer to take a &[u8]\r\n  - Explicit size parameter is redundant, and this function can accept binary data\r\n\r\nI'm open to discussion on all of these points.","created_at":"2015-08-24T23:27:31Z","updated_at":"2015-09-11T08:22:11Z","closed_at":"2015-09-11T08:22:11Z","merged_at":null,"merge_commit_sha":"b9e976cd38899f72b3859b5ea09db54bb430494d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/6/commits","review_comments_url":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/6/comments","review_comment_url":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jcmoyer/rust-lua53/issues/6/comments","statuses_url":"https://api.github.com/repos/jcmoyer/rust-lua53/statuses/d4af914b5b3363aa5ce773e2cf1f02c393f6e4d1","head":{"label":"SpaceManiac:improvements","ref":"improvements","sha":"d4af914b5b3363aa5ce773e2cf1f02c393f6e4d1","user":{"login":"SpaceManiac","id":222630,"avatar_url":"https://avatars.githubusercontent.com/u/222630?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceManiac","html_url":"https://github.com/SpaceManiac","followers_url":"https://api.github.com/users/SpaceManiac/followers","following_url":"https://api.github.com/users/SpaceManiac/following{/other_user}","gists_url":"https://api.github.com/users/SpaceManiac/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceManiac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceManiac/subscriptions","organizations_url":"https://api.github.com/users/SpaceManiac/orgs","repos_url":"https://api.github.com/users/SpaceManiac/repos","events_url":"https://api.github.com/users/SpaceManiac/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceManiac/received_events","type":"User","site_admin":false},"repo":{"id":41331378,"name":"rust-lua53","full_name":"SpaceManiac/rust-lua53","owner":{"login":"SpaceManiac","id":222630,"avatar_url":"https://avatars.githubusercontent.com/u/222630?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceManiac","html_url":"https://github.com/SpaceManiac","followers_url":"https://api.github.com/users/SpaceManiac/followers","following_url":"https://api.github.com/users/SpaceManiac/following{/other_user}","gists_url":"https://api.github.com/users/SpaceManiac/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceManiac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceManiac/subscriptions","organizations_url":"https://api.github.com/users/SpaceManiac/orgs","repos_url":"https://api.github.com/users/SpaceManiac/repos","events_url":"https://api.github.com/users/SpaceManiac/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceManiac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SpaceManiac/rust-lua53","description":"Lua 5.3 bindings for Rust","fork":true,"url":"https://api.github.com/repos/SpaceManiac/rust-lua53","forks_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/forks","keys_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/teams","hooks_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/hooks","issue_events_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/issues/events{/number}","events_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/events","assignees_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/assignees{/user}","branches_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/branches{/branch}","tags_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/tags","blobs_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/statuses/{sha}","languages_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/languages","stargazers_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/stargazers","contributors_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/contributors","subscribers_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/subscribers","subscription_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/subscription","commits_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/contents/{+path}","compare_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/merges","archive_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/downloads","issues_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/issues{/number}","pulls_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/pulls{/number}","milestones_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/milestones{/number}","notifications_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/labels{/name}","releases_url":"https://api.github.com/repos/SpaceManiac/rust-lua53/releases{/id}","created_at":"2015-08-24T23:05:02Z","updated_at":"2015-08-25T18:42:46Z","pushed_at":"2015-09-11T08:20:33Z","git_url":"git://github.com/SpaceManiac/rust-lua53.git","ssh_url":"git@github.com:SpaceManiac/rust-lua53.git","clone_url":"https://github.com/SpaceManiac/rust-lua53.git","svn_url":"https://github.com/SpaceManiac/rust-lua53","homepage":"","size":197,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jcmoyer:master","ref":"master","sha":"2f3b6177f474db303db42340d4c4704724609437","user":{"login":"jcmoyer","id":1007628,"avatar_url":"https://avatars.githubusercontent.com/u/1007628?v=3","gravatar_id":"","url":"https://api.github.com/users/jcmoyer","html_url":"https://github.com/jcmoyer","followers_url":"https://api.github.com/users/jcmoyer/followers","following_url":"https://api.github.com/users/jcmoyer/following{/other_user}","gists_url":"https://api.github.com/users/jcmoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmoyer/subscriptions","organizations_url":"https://api.github.com/users/jcmoyer/orgs","repos_url":"https://api.github.com/users/jcmoyer/repos","events_url":"https://api.github.com/users/jcmoyer/events{/privacy}","received_events_url":"https://api.github.com/users/jcmoyer/received_events","type":"User","site_admin":false},"repo":{"id":26261123,"name":"rust-lua53","full_name":"jcmoyer/rust-lua53","owner":{"login":"jcmoyer","id":1007628,"avatar_url":"https://avatars.githubusercontent.com/u/1007628?v=3","gravatar_id":"","url":"https://api.github.com/users/jcmoyer","html_url":"https://github.com/jcmoyer","followers_url":"https://api.github.com/users/jcmoyer/followers","following_url":"https://api.github.com/users/jcmoyer/following{/other_user}","gists_url":"https://api.github.com/users/jcmoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmoyer/subscriptions","organizations_url":"https://api.github.com/users/jcmoyer/orgs","repos_url":"https://api.github.com/users/jcmoyer/repos","events_url":"https://api.github.com/users/jcmoyer/events{/privacy}","received_events_url":"https://api.github.com/users/jcmoyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcmoyer/rust-lua53","description":"Lua 5.3 bindings for Rust","fork":false,"url":"https://api.github.com/repos/jcmoyer/rust-lua53","forks_url":"https://api.github.com/repos/jcmoyer/rust-lua53/forks","keys_url":"https://api.github.com/repos/jcmoyer/rust-lua53/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcmoyer/rust-lua53/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcmoyer/rust-lua53/teams","hooks_url":"https://api.github.com/repos/jcmoyer/rust-lua53/hooks","issue_events_url":"https://api.github.com/repos/jcmoyer/rust-lua53/issues/events{/number}","events_url":"https://api.github.com/repos/jcmoyer/rust-lua53/events","assignees_url":"https://api.github.com/repos/jcmoyer/rust-lua53/assignees{/user}","branches_url":"https://api.github.com/repos/jcmoyer/rust-lua53/branches{/branch}","tags_url":"https://api.github.com/repos/jcmoyer/rust-lua53/tags","blobs_url":"https://api.github.com/repos/jcmoyer/rust-lua53/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcmoyer/rust-lua53/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcmoyer/rust-lua53/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcmoyer/rust-lua53/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcmoyer/rust-lua53/statuses/{sha}","languages_url":"https://api.github.com/repos/jcmoyer/rust-lua53/languages","stargazers_url":"https://api.github.com/repos/jcmoyer/rust-lua53/stargazers","contributors_url":"https://api.github.com/repos/jcmoyer/rust-lua53/contributors","subscribers_url":"https://api.github.com/repos/jcmoyer/rust-lua53/subscribers","subscription_url":"https://api.github.com/repos/jcmoyer/rust-lua53/subscription","commits_url":"https://api.github.com/repos/jcmoyer/rust-lua53/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcmoyer/rust-lua53/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcmoyer/rust-lua53/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcmoyer/rust-lua53/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcmoyer/rust-lua53/contents/{+path}","compare_url":"https://api.github.com/repos/jcmoyer/rust-lua53/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcmoyer/rust-lua53/merges","archive_url":"https://api.github.com/repos/jcmoyer/rust-lua53/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcmoyer/rust-lua53/downloads","issues_url":"https://api.github.com/repos/jcmoyer/rust-lua53/issues{/number}","pulls_url":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls{/number}","milestones_url":"https://api.github.com/repos/jcmoyer/rust-lua53/milestones{/number}","notifications_url":"https://api.github.com/repos/jcmoyer/rust-lua53/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcmoyer/rust-lua53/labels{/name}","releases_url":"https://api.github.com/repos/jcmoyer/rust-lua53/releases{/id}","created_at":"2014-11-06T08:39:07Z","updated_at":"2015-08-04T22:17:40Z","pushed_at":"2015-09-11T08:21:58Z","git_url":"git://github.com/jcmoyer/rust-lua53.git","ssh_url":"git@github.com:jcmoyer/rust-lua53.git","clone_url":"https://github.com/jcmoyer/rust-lua53.git","svn_url":"https://github.com/jcmoyer/rust-lua53","homepage":"","size":670,"stargazers_count":9,"watchers_count":9,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/6"},"html":{"href":"https://github.com/jcmoyer/rust-lua53/pull/6"},"issue":{"href":"https://api.github.com/repos/jcmoyer/rust-lua53/issues/6"},"comments":{"href":"https://api.github.com/repos/jcmoyer/rust-lua53/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jcmoyer/rust-lua53/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/jcmoyer/rust-lua53/statuses/d4af914b5b3363aa5ce773e2cf1f02c393f6e4d1"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":3,"review_comments":0,"commits":8,"additions":104,"deletions":99,"changed_files":9}}