GitHub PullRequestReviewCommentEvent at 2014-07-23 00:45:25
Repository: micropython
Actor: dhylands
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/micropython/micropython/pulls/comments/15266149","id":15266149,"diff_hunk":"@@ -97,7 +97,7 @@ STATIC mp_obj_t stream_read(uint n_args, const mp_obj_t *args) {\n             }\n             int error;\n             mp_int_t out_sz = o->type->stream_p->read(o, p, more_bytes, &error);\n-            if (out_sz == -1) {\n+            if (out_sz < 0) {","path":"py/stream.c","position":5,"original_position":5,"commit_id":"1d8816c36bbb638cd9e5319f820d2b2cf22a9822","original_commit_id":"1d8816c36bbb638cd9e5319f820d2b2cf22a9822","user":{"login":"dhylands","id":127500,"avatar_url":"https://avatars.githubusercontent.com/u/127500?","gravatar_id":"61091f94cc81be8e6caa0fb4c6b15ddc","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"body":"When you can get micropython to run on any platform with a 16-bit address space and have enough space left over to allocate a buffer which is more than half of that address space, then I'll be really really really impressed.\r\n\r\nI'm perfectly happy with any solution which doesn't allow negative numbers into the for loop.","created_at":"2014-07-23T00:45:25Z","updated_at":"2014-07-23T00:45:25Z","html_url":"https://github.com/micropython/micropython/pull/767#discussion_r15266149","pull_request_url":"https://api.github.com/repos/micropython/micropython/pulls/767","_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython/pulls/comments/15266149"},"html":{"href":"https://github.com/micropython/micropython/pull/767#discussion_r15266149"},"pull_request":{"href":"https://api.github.com/repos/micropython/micropython/pulls/767"}}},"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/767","id":18687806,"html_url":"https://github.com/micropython/micropython/pull/767","diff_url":"https://github.com/micropython/micropython/pull/767.diff","patch_url":"https://github.com/micropython/micropython/pull/767.patch","issue_url":"https://api.github.com/repos/micropython/micropython/issues/767","number":767,"state":"closed","title":"Deal with reading a buffer less than what was allocated.","user":{"login":"dhylands","id":127500,"avatar_url":"https://avatars.githubusercontent.com/u/127500?","gravatar_id":"61091f94cc81be8e6caa0fb4c6b15ddc","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"body":"With this fix, file_long_read now passes.","created_at":"2014-07-21T23:52:59Z","updated_at":"2014-07-23T00:45:25Z","closed_at":"2014-07-22T10:01:24Z","merged_at":"2014-07-22T10:01:24Z","merge_commit_sha":"f6da77964a45afc27692daa7d2815757f5a8003b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/micropython/micropython/pulls/767/commits","review_comments_url":"https://api.github.com/repos/micropython/micropython/pulls/767/comments","review_comment_url":"https://api.github.com/repos/micropython/micropython/pulls/comments/{number}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/767/comments","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/1d8816c36bbb638cd9e5319f820d2b2cf22a9822","head":{"label":"dhylands:fix-short-read","ref":"fix-short-read","sha":"1d8816c36bbb638cd9e5319f820d2b2cf22a9822","user":{"login":"dhylands","id":127500,"avatar_url":"https://avatars.githubusercontent.com/u/127500?","gravatar_id":"61091f94cc81be8e6caa0fb4c6b15ddc","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"repo":{"id":15645703,"name":"micropython","full_name":"dhylands/micropython","owner":{"login":"dhylands","id":127500,"avatar_url":"https://avatars.githubusercontent.com/u/127500?","gravatar_id":"61091f94cc81be8e6caa0fb4c6b15ddc","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhylands/micropython","description":"The Micro Python project","fork":true,"url":"https://api.github.com/repos/dhylands/micropython","forks_url":"https://api.github.com/repos/dhylands/micropython/forks","keys_url":"https://api.github.com/repos/dhylands/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhylands/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhylands/micropython/teams","hooks_url":"https://api.github.com/repos/dhylands/micropython/hooks","issue_events_url":"https://api.github.com/repos/dhylands/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/dhylands/micropython/events","assignees_url":"https://api.github.com/repos/dhylands/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/dhylands/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/dhylands/micropython/tags","blobs_url":"https://api.github.com/repos/dhylands/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhylands/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhylands/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhylands/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhylands/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/dhylands/micropython/languages","stargazers_url":"https://api.github.com/repos/dhylands/micropython/stargazers","contributors_url":"https://api.github.com/repos/dhylands/micropython/contributors","subscribers_url":"https://api.github.com/repos/dhylands/micropython/subscribers","subscription_url":"https://api.github.com/repos/dhylands/micropython/subscription","commits_url":"https://api.github.com/repos/dhylands/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhylands/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhylands/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhylands/micropython/issues/comments/{number}","contents_url":"https://api.github.com/repos/dhylands/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/dhylands/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhylands/micropython/merges","archive_url":"https://api.github.com/repos/dhylands/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhylands/micropython/downloads","issues_url":"https://api.github.com/repos/dhylands/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/dhylands/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/dhylands/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/dhylands/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhylands/micropython/labels{/name}","releases_url":"https://api.github.com/repos/dhylands/micropython/releases{/id}","created_at":"2014-01-05T04:53:16Z","updated_at":"2014-06-17T19:54:13Z","pushed_at":"2014-07-22T16:17:04Z","git_url":"git://github.com/dhylands/micropython.git","ssh_url":"git@github.com:dhylands/micropython.git","clone_url":"https://github.com/dhylands/micropython.git","svn_url":"https://github.com/dhylands/micropython","homepage":null,"size":12394,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"micropython:master","ref":"master","sha":"512465bc66082a37cb696ef7c78e3ee878ffd92f","user":{"login":"micropython","id":6298560,"avatar_url":"https://avatars.githubusercontent.com/u/6298560?","gravatar_id":"8dd8c7e0c7f45b48c8e44a4e85672370","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"repo":{"id":15337142,"name":"micropython","full_name":"micropython/micropython","owner":{"login":"micropython","id":6298560,"avatar_url":"https://avatars.githubusercontent.com/u/6298560?","gravatar_id":"8dd8c7e0c7f45b48c8e44a4e85672370","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micropython/micropython","description":"The Micro Python project","fork":false,"url":"https://api.github.com/repos/micropython/micropython","forks_url":"https://api.github.com/repos/micropython/micropython/forks","keys_url":"https://api.github.com/repos/micropython/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micropython/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micropython/micropython/teams","hooks_url":"https://api.github.com/repos/micropython/micropython/hooks","issue_events_url":"https://api.github.com/repos/micropython/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/micropython/micropython/events","assignees_url":"https://api.github.com/repos/micropython/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/micropython/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/micropython/micropython/tags","blobs_url":"https://api.github.com/repos/micropython/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micropython/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micropython/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/micropython/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/micropython/micropython/languages","stargazers_url":"https://api.github.com/repos/micropython/micropython/stargazers","contributors_url":"https://api.github.com/repos/micropython/micropython/contributors","subscribers_url":"https://api.github.com/repos/micropython/micropython/subscribers","subscription_url":"https://api.github.com/repos/micropython/micropython/subscription","commits_url":"https://api.github.com/repos/micropython/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/micropython/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/micropython/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/micropython/micropython/issues/comments/{number}","contents_url":"https://api.github.com/repos/micropython/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/micropython/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micropython/micropython/merges","archive_url":"https://api.github.com/repos/micropython/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micropython/micropython/downloads","issues_url":"https://api.github.com/repos/micropython/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/micropython/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/micropython/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/micropython/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micropython/micropython/labels{/name}","releases_url":"https://api.github.com/repos/micropython/micropython/releases{/id}","created_at":"2013-12-20T11:47:07Z","updated_at":"2014-07-22T07:01:19Z","pushed_at":"2014-07-22T21:27:53Z","git_url":"git://github.com/micropython/micropython.git","ssh_url":"git@github.com:micropython/micropython.git","clone_url":"https://github.com/micropython/micropython.git","svn_url":"https://github.com/micropython/micropython","homepage":null,"size":32220,"stargazers_count":1084,"watchers_count":1084,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":146,"mirror_url":null,"open_issues_count":92,"forks":146,"open_issues":92,"watchers":1084,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython/pulls/767"},"html":{"href":"https://github.com/micropython/micropython/pull/767"},"issue":{"href":"https://api.github.com/repos/micropython/micropython/issues/767"},"comments":{"href":"https://api.github.com/repos/micropython/micropython/issues/767/comments"},"review_comments":{"href":"https://api.github.com/repos/micropython/micropython/pulls/767/comments"},"review_comment":{"href":"https://api.github.com/repos/micropython/micropython/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/micropython/micropython/pulls/767/commits"},"statuses":{"href":"https://api.github.com/repos/micropython/micropython/statuses/1d8816c36bbb638cd9e5319f820d2b2cf22a9822"}}}}