{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/nan/issues/459","labels_url":"https://api.github.com/repos/nodejs/nan/issues/459/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/nan/issues/459/comments","events_url":"https://api.github.com/repos/nodejs/nan/issues/459/events","html_url":"https://github.com/nodejs/nan/pull/459","id":106423712,"number":459,"title":"Add helper method for accessing contents of typedarrays","user":{"login":"mikolalysenko","id":231686,"avatar_url":"https://avatars.githubusercontent.com/u/231686?v=3","gravatar_id":"","url":"https://api.github.com/users/mikolalysenko","html_url":"https://github.com/mikolalysenko","followers_url":"https://api.github.com/users/mikolalysenko/followers","following_url":"https://api.github.com/users/mikolalysenko/following{/other_user}","gists_url":"https://api.github.com/users/mikolalysenko/gists{/gist_id}","starred_url":"https://api.github.com/users/mikolalysenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikolalysenko/subscriptions","organizations_url":"https://api.github.com/users/mikolalysenko/orgs","repos_url":"https://api.github.com/users/mikolalysenko/repos","events_url":"https://api.github.com/users/mikolalysenko/events{/privacy}","received_events_url":"https://api.github.com/users/mikolalysenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/nodejs/nan/milestones/3","html_url":"https://github.com/nodejs/nan/milestones/2.1","labels_url":"https://api.github.com/repos/nodejs/nan/milestones/3/labels","id":1248627,"number":3,"title":"2.1","description":null,"creator":{"login":"kkoopa","id":4103081,"avatar_url":"https://avatars.githubusercontent.com/u/4103081?v=3","gravatar_id":"","url":"https://api.github.com/users/kkoopa","html_url":"https://github.com/kkoopa","followers_url":"https://api.github.com/users/kkoopa/followers","following_url":"https://api.github.com/users/kkoopa/following{/other_user}","gists_url":"https://api.github.com/users/kkoopa/gists{/gist_id}","starred_url":"https://api.github.com/users/kkoopa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkoopa/subscriptions","organizations_url":"https://api.github.com/users/kkoopa/orgs","repos_url":"https://api.github.com/users/kkoopa/repos","events_url":"https://api.github.com/users/kkoopa/events{/privacy}","received_events_url":"https://api.github.com/users/kkoopa/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":0,"state":"open","created_at":"2015-08-10T17:11:27Z","updated_at":"2015-09-21T19:29:11Z","due_on":null,"closed_at":null},"comments":39,"created_at":"2015-09-14T20:42:25Z","updated_at":"2015-10-05T16:47:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/nan/pulls/459","html_url":"https://github.com/nodejs/nan/pull/459","diff_url":"https://github.com/nodejs/nan/pull/459.diff","patch_url":"https://github.com/nodejs/nan/pull/459.patch"},"body":"This PR adds a portable helper method for reading the contents of a typedarray (ArrayBufferView) from C++, fixing https://github.com/nodejs/nan/issues/455.\r\n\r\nI tried to follow the API conventions from `Utf8String` for this module closely.  Note that this does not make a copy of the typedarray data or hold a reference to the underlying array object, so it would require the user to know what they are doing and not try to access these bytes outside the natural lifetime of the object."},"comment":{"url":"https://api.github.com/repos/nodejs/nan/issues/comments/145595693","html_url":"https://github.com/nodejs/nan/pull/459#issuecomment-145595693","issue_url":"https://api.github.com/repos/nodejs/nan/issues/459","id":145595693,"user":{"login":"mikolalysenko","id":231686,"avatar_url":"https://avatars.githubusercontent.com/u/231686?v=3","gravatar_id":"","url":"https://api.github.com/users/mikolalysenko","html_url":"https://github.com/mikolalysenko","followers_url":"https://api.github.com/users/mikolalysenko/followers","following_url":"https://api.github.com/users/mikolalysenko/following{/other_user}","gists_url":"https://api.github.com/users/mikolalysenko/gists{/gist_id}","starred_url":"https://api.github.com/users/mikolalysenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikolalysenko/subscriptions","organizations_url":"https://api.github.com/users/mikolalysenko/orgs","repos_url":"https://api.github.com/users/mikolalysenko/repos","events_url":"https://api.github.com/users/mikolalysenko/events{/privacy}","received_events_url":"https://api.github.com/users/mikolalysenko/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T16:47:15Z","updated_at":"2015-10-05T16:47:15Z","body":"The issue is not making the contents of the pointer const, but rather making the pointer itself const.  Returning a const pointer isn't needed since you can freely cast it to a non-const pointer.  While doing this would have no semantic effect, it does trigger a warning in gcc on Linux (but not in clang on OS X) which you would have to ignore.\r\n\r\nForcing users to ignore warnings seems like it could cause problems, especially if you are building with -Werror."}}