{"action":"opened","number":186,"pull_request":{"url":"https://api.github.com/repos/shirok/Gauche/pulls/186","id":63466081,"html_url":"https://github.com/shirok/Gauche/pull/186","diff_url":"https://github.com/shirok/Gauche/pull/186.diff","patch_url":"https://github.com/shirok/Gauche/pull/186.patch","issue_url":"https://api.github.com/repos/shirok/Gauche/issues/186","number":186,"state":"open","locked":false,"title":"Fix Scm_Peekc and GETC_SCRATCH (encoding=sjis, eucjp)","user":{"login":"Hamayama","id":4497079,"avatar_url":"https://avatars.githubusercontent.com/u/4497079?v=3","gravatar_id":"","url":"https://api.github.com/users/Hamayama","html_url":"https://github.com/Hamayama","followers_url":"https://api.github.com/users/Hamayama/followers","following_url":"https://api.github.com/users/Hamayama/following{/other_user}","gists_url":"https://api.github.com/users/Hamayama/gists{/gist_id}","starred_url":"https://api.github.com/users/Hamayama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hamayama/subscriptions","organizations_url":"https://api.github.com/users/Hamayama/orgs","repos_url":"https://api.github.com/users/Hamayama/repos","events_url":"https://api.github.com/users/Hamayama/events{/privacy}","received_events_url":"https://api.github.com/users/Hamayama/received_events","type":"User","site_admin":false},"body":"1. 文字列として不正なバイト列を入力したときに、peek が後の read に影響を与えないように\r\n   src/portapi.c の Scm_Peekc と GETC_SCRATCH を修正。\r\n   (プルリクエスト #177 と コミット 4a18aa1 dc5cc82 216440c にも関連あり)\r\n   Scm_Peekc では、p->ungotten に SCM_CHAR_INVALID を入れても、\r\n   空と判定されて情報が消えてしまうため対策。\r\n   また、GETC_SCRATCH では、後続バイトありのケースの SCM_CHAR_INVALID は、\r\n   バッファに残すと逆に Scm_Getc の結果が変わってしまったため対策。\r\n   - src/portapi.c\r\n\r\n\r\n2. Gauche の内部エンコーディングが sjis か eucjp のときに、\r\n   test/io2.scm でエラーで aborted になるため対策。\r\n   - test/io2.scm\r\n\r\n\r\n＜確認＞\r\nOS : Windows 8.1 (64bit)\r\n開発環境 : MSYS2/MinGW-w64 (64bit) (gcc version 5.3.0 (Rev1, Built by MSYS2 project))\r\n\r\n内部エンコーディング : utf-8\r\nTotal: 15986 tests, 15986 passed,     0 failed,     0 aborted.\r\n\r\n内部エンコーディング : sjis\r\nTotal: 15921 tests, 15915 passed,     6 failed,     0 aborted.\r\nTesting gettext ... failed\r\ndiscrepancies found.  Errors are:\r\ntest get-en: \"Menu|File|Quit\": expects \"Quit\" => got \"Menu|File|Quit\"\r\ntest gettext-en: \"Menu|File|Quit\": expects \"Quit\" => got \"Menu|File|Quit\"\r\ntest dcgettext-en: \"Menu|File|Quit\": expects \"Quit\" => got \"Menu|File|Quit\"\r\ntest get-en: \"Menu|File|Quit\": expects \"Quit\" => got \"Menu|File|Quit\"\r\ntest gettext-en: \"Menu|File|Quit\": expects \"Quit\" => got \"Menu|File|Quit\"\r\ntest dcgettext-en: \"Menu|File|Quit\": expects \"Quit\" => got \"Menu|File|Quit\"\r\n(上記6個のエラーは、iconv (ISO-8859-15→SJIS) が円記号(0x5C)を変換しようとして、\r\n エラーになるため、仕方ない)\r\n\r\n内部エンコーディング : eucjp\r\nTotal: 15916 tests, 15916 passed,     0 failed,     0 aborted.\r\n\r\n内部エンコーディング : none\r\nTotal: 15617 tests, 15617 passed,     0 failed,     0 aborted.\r\n","created_at":"2016-03-19T11:52:10Z","updated_at":"2016-03-19T11:52:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shirok/Gauche/pulls/186/commits","review_comments_url":"https://api.github.com/repos/shirok/Gauche/pulls/186/comments","review_comment_url":"https://api.github.com/repos/shirok/Gauche/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shirok/Gauche/issues/186/comments","statuses_url":"https://api.github.com/repos/shirok/Gauche/statuses/d00bbc78675c6768271b558be72b5234677c2222","head":{"label":"Hamayama:peek","ref":"peek","sha":"d00bbc78675c6768271b558be72b5234677c2222","user":{"login":"Hamayama","id":4497079,"avatar_url":"https://avatars.githubusercontent.com/u/4497079?v=3","gravatar_id":"","url":"https://api.github.com/users/Hamayama","html_url":"https://github.com/Hamayama","followers_url":"https://api.github.com/users/Hamayama/followers","following_url":"https://api.github.com/users/Hamayama/following{/other_user}","gists_url":"https://api.github.com/users/Hamayama/gists{/gist_id}","starred_url":"https://api.github.com/users/Hamayama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hamayama/subscriptions","organizations_url":"https://api.github.com/users/Hamayama/orgs","repos_url":"https://api.github.com/users/Hamayama/repos","events_url":"https://api.github.com/users/Hamayama/events{/privacy}","received_events_url":"https://api.github.com/users/Hamayama/received_events","type":"User","site_admin":false},"repo":{"id":52442486,"name":"Gauche","full_name":"Hamayama/Gauche","owner":{"login":"Hamayama","id":4497079,"avatar_url":"https://avatars.githubusercontent.com/u/4497079?v=3","gravatar_id":"","url":"https://api.github.com/users/Hamayama","html_url":"https://github.com/Hamayama","followers_url":"https://api.github.com/users/Hamayama/followers","following_url":"https://api.github.com/users/Hamayama/following{/other_user}","gists_url":"https://api.github.com/users/Hamayama/gists{/gist_id}","starred_url":"https://api.github.com/users/Hamayama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hamayama/subscriptions","organizations_url":"https://api.github.com/users/Hamayama/orgs","repos_url":"https://api.github.com/users/Hamayama/repos","events_url":"https://api.github.com/users/Hamayama/events{/privacy}","received_events_url":"https://api.github.com/users/Hamayama/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hamayama/Gauche","description":"Scheme Scripting Engine","fork":true,"url":"https://api.github.com/repos/Hamayama/Gauche","forks_url":"https://api.github.com/repos/Hamayama/Gauche/forks","keys_url":"https://api.github.com/repos/Hamayama/Gauche/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hamayama/Gauche/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hamayama/Gauche/teams","hooks_url":"https://api.github.com/repos/Hamayama/Gauche/hooks","issue_events_url":"https://api.github.com/repos/Hamayama/Gauche/issues/events{/number}","events_url":"https://api.github.com/repos/Hamayama/Gauche/events","assignees_url":"https://api.github.com/repos/Hamayama/Gauche/assignees{/user}","branches_url":"https://api.github.com/repos/Hamayama/Gauche/branches{/branch}","tags_url":"https://api.github.com/repos/Hamayama/Gauche/tags","blobs_url":"https://api.github.com/repos/Hamayama/Gauche/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hamayama/Gauche/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hamayama/Gauche/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hamayama/Gauche/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hamayama/Gauche/statuses/{sha}","languages_url":"https://api.github.com/repos/Hamayama/Gauche/languages","stargazers_url":"https://api.github.com/repos/Hamayama/Gauche/stargazers","contributors_url":"https://api.github.com/repos/Hamayama/Gauche/contributors","subscribers_url":"https://api.github.com/repos/Hamayama/Gauche/subscribers","subscription_url":"https://api.github.com/repos/Hamayama/Gauche/subscription","commits_url":"https://api.github.com/repos/Hamayama/Gauche/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hamayama/Gauche/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hamayama/Gauche/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hamayama/Gauche/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hamayama/Gauche/contents/{+path}","compare_url":"https://api.github.com/repos/Hamayama/Gauche/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hamayama/Gauche/merges","archive_url":"https://api.github.com/repos/Hamayama/Gauche/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hamayama/Gauche/downloads","issues_url":"https://api.github.com/repos/Hamayama/Gauche/issues{/number}","pulls_url":"https://api.github.com/repos/Hamayama/Gauche/pulls{/number}","milestones_url":"https://api.github.com/repos/Hamayama/Gauche/milestones{/number}","notifications_url":"https://api.github.com/repos/Hamayama/Gauche/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hamayama/Gauche/labels{/name}","releases_url":"https://api.github.com/repos/Hamayama/Gauche/releases{/id}","deployments_url":"https://api.github.com/repos/Hamayama/Gauche/deployments","created_at":"2016-02-24T13:00:38Z","updated_at":"2016-02-24T13:00:43Z","pushed_at":"2016-03-19T10:11:43Z","git_url":"git://github.com/Hamayama/Gauche.git","ssh_url":"git@github.com:Hamayama/Gauche.git","clone_url":"https://github.com/Hamayama/Gauche.git","svn_url":"https://github.com/Hamayama/Gauche","homepage":null,"size":29782,"stargazers_count":0,"watchers_count":0,"language":"Scheme","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"shirok:master","ref":"master","sha":"e6cf8ca04e4cee29f6bffe827980a14a98392289","user":{"login":"shirok","id":190598,"avatar_url":"https://avatars.githubusercontent.com/u/190598?v=3","gravatar_id":"","url":"https://api.github.com/users/shirok","html_url":"https://github.com/shirok","followers_url":"https://api.github.com/users/shirok/followers","following_url":"https://api.github.com/users/shirok/following{/other_user}","gists_url":"https://api.github.com/users/shirok/gists{/gist_id}","starred_url":"https://api.github.com/users/shirok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shirok/subscriptions","organizations_url":"https://api.github.com/users/shirok/orgs","repos_url":"https://api.github.com/users/shirok/repos","events_url":"https://api.github.com/users/shirok/events{/privacy}","received_events_url":"https://api.github.com/users/shirok/received_events","type":"User","site_admin":false},"repo":{"id":9486650,"name":"Gauche","full_name":"shirok/Gauche","owner":{"login":"shirok","id":190598,"avatar_url":"https://avatars.githubusercontent.com/u/190598?v=3","gravatar_id":"","url":"https://api.github.com/users/shirok","html_url":"https://github.com/shirok","followers_url":"https://api.github.com/users/shirok/followers","following_url":"https://api.github.com/users/shirok/following{/other_user}","gists_url":"https://api.github.com/users/shirok/gists{/gist_id}","starred_url":"https://api.github.com/users/shirok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shirok/subscriptions","organizations_url":"https://api.github.com/users/shirok/orgs","repos_url":"https://api.github.com/users/shirok/repos","events_url":"https://api.github.com/users/shirok/events{/privacy}","received_events_url":"https://api.github.com/users/shirok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shirok/Gauche","description":"Scheme Scripting Engine","fork":false,"url":"https://api.github.com/repos/shirok/Gauche","forks_url":"https://api.github.com/repos/shirok/Gauche/forks","keys_url":"https://api.github.com/repos/shirok/Gauche/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shirok/Gauche/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shirok/Gauche/teams","hooks_url":"https://api.github.com/repos/shirok/Gauche/hooks","issue_events_url":"https://api.github.com/repos/shirok/Gauche/issues/events{/number}","events_url":"https://api.github.com/repos/shirok/Gauche/events","assignees_url":"https://api.github.com/repos/shirok/Gauche/assignees{/user}","branches_url":"https://api.github.com/repos/shirok/Gauche/branches{/branch}","tags_url":"https://api.github.com/repos/shirok/Gauche/tags","blobs_url":"https://api.github.com/repos/shirok/Gauche/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shirok/Gauche/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shirok/Gauche/git/refs{/sha}","trees_url":"https://api.github.com/repos/shirok/Gauche/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shirok/Gauche/statuses/{sha}","languages_url":"https://api.github.com/repos/shirok/Gauche/languages","stargazers_url":"https://api.github.com/repos/shirok/Gauche/stargazers","contributors_url":"https://api.github.com/repos/shirok/Gauche/contributors","subscribers_url":"https://api.github.com/repos/shirok/Gauche/subscribers","subscription_url":"https://api.github.com/repos/shirok/Gauche/subscription","commits_url":"https://api.github.com/repos/shirok/Gauche/commits{/sha}","git_commits_url":"https://api.github.com/repos/shirok/Gauche/git/commits{/sha}","comments_url":"https://api.github.com/repos/shirok/Gauche/comments{/number}","issue_comment_url":"https://api.github.com/repos/shirok/Gauche/issues/comments{/number}","contents_url":"https://api.github.com/repos/shirok/Gauche/contents/{+path}","compare_url":"https://api.github.com/repos/shirok/Gauche/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shirok/Gauche/merges","archive_url":"https://api.github.com/repos/shirok/Gauche/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shirok/Gauche/downloads","issues_url":"https://api.github.com/repos/shirok/Gauche/issues{/number}","pulls_url":"https://api.github.com/repos/shirok/Gauche/pulls{/number}","milestones_url":"https://api.github.com/repos/shirok/Gauche/milestones{/number}","notifications_url":"https://api.github.com/repos/shirok/Gauche/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shirok/Gauche/labels{/name}","releases_url":"https://api.github.com/repos/shirok/Gauche/releases{/id}","deployments_url":"https://api.github.com/repos/shirok/Gauche/deployments","created_at":"2013-04-17T01:40:09Z","updated_at":"2016-03-08T07:02:20Z","pushed_at":"2016-03-19T11:46:36Z","git_url":"git://github.com/shirok/Gauche.git","ssh_url":"git@github.com:shirok/Gauche.git","clone_url":"https://github.com/shirok/Gauche.git","svn_url":"https://github.com/shirok/Gauche","homepage":null,"size":35355,"stargazers_count":228,"watchers_count":228,"language":"Scheme","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":8,"forks":39,"open_issues":8,"watchers":228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shirok/Gauche/pulls/186"},"html":{"href":"https://github.com/shirok/Gauche/pull/186"},"issue":{"href":"https://api.github.com/repos/shirok/Gauche/issues/186"},"comments":{"href":"https://api.github.com/repos/shirok/Gauche/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/shirok/Gauche/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/shirok/Gauche/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shirok/Gauche/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/shirok/Gauche/statuses/d00bbc78675c6768271b558be72b5234677c2222"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":48,"deletions":10,"changed_files":2}}