GitHub PullRequestReviewCommentEvent at 2014-04-30 19:35:31
Repository: micropython
Actor: pfalcon
Payload: {"comment":{"url":"https://api.github.com/repos/micropython/micropython/pulls/comments/12161522","id":12161522,"diff_hunk":"@@ -27,6 +27,13 @@ STATIC void fdfile_print(void (*print)(void *env, const char *fmt, ...), void *e\n \n STATIC machine_int_t fdfile_read(mp_obj_t o_in, void *buf, machine_uint_t size, int *errcode) {\n     mp_obj_fdfile_t *o = o_in;\n+#ifdef _MSC_VER\n+    //in the CRT it's an error to read from a closed file descriptor","path":"unix/file.c","position":5,"original_position":5,"commit_id":"31d8367249833b7310c5b899cfb2cd1f0d7d07d9","original_commit_id":"4d47c7e65f71540a29edc34f502d71204d1fc485","user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?","gravatar_id":"132a61a5780a1a9ef3187a83e24ae363","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"body":"My productive suggestion would be actually see how CPython behaves with closed files, then add that to file.c in platform-independent way, wrapped in MICROPY_CPYTHON_COMPAT. Then if windows-specific handling still required, yes, have something like \"windows_helper.c\" which would provide more POSIXy wrappers for standard functions.\r\n","created_at":"2014-04-30T19:35:31Z","updated_at":"2014-04-30T19:35:31Z","html_url":"https://github.com/micropython/micropython/pull/529#discussion_r12161522","pull_request_url":"https://api.github.com/repos/micropython/micropython/pulls/529","_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython/pulls/comments/12161522"},"html":{"href":"https://github.com/micropython/micropython/pull/529#discussion_r12161522"},"pull_request":{"href":"https://api.github.com/repos/micropython/micropython/pulls/529"}}}}