{"action":"created","comment":{"url":"https://api.github.com/repos/radare/radare2/pulls/comments/61061039","id":61061039,"diff_hunk":"@@ -108,86 +108,96 @@ src |__________|_________|\n \tr_mem_copybits (dst, src, nbits);\n }\n \n-R_API ut64 r_mem_get_num(const ut8 *b, int size, int endian) {\n-        ut16 n16;\n-        ut32 n32;\n-        ut64 n64;\n-        switch (size) {\n-        case 1: return b[0];\n+R_API ut64 r_mem_get_num(const ut8 *b, int size) {\n+        // ASSUME BIG ENDIAN FOR ALL STREAMS\n+\tswitch (size) {\n+        case 1:\n+\t\treturn (ut64)(b[0]);\n+\t\tbreak;\n         case 2:\n-                r_mem_copyendian ((ut8*)&n16, b, 2, endian);\n-\t\treturn (ut64)n16;\n+                return (ut64)(((ut64)b[0] << 8) | ((ut64)b[1] << 0));\n+\t\tbreak;\n         case 4:\n-                r_mem_copyendian ((ut8*)&n32, b, 4, endian);\n-\t\treturn (ut64)n32;\n+                return (ut64)(((ut64)b[0] << 24) | ((ut64)b[1] << 16) | ((ut64)b[2] << 8) | ((ut64)b[3] << 0));","path":"libr/util/mem.c","position":24,"original_position":24,"commit_id":"d5294beb77506915674d82f1a85dc28df6a1b443","original_commit_id":"0fa5ca1dbebc6c8475fd2dc4c0fd4505464d7a6a","user":{"login":"radare","id":917142,"avatar_url":"https://avatars.githubusercontent.com/u/917142?v=3","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"body":"spaces vs tabs","created_at":"2016-04-26T10:11:02Z","updated_at":"2016-04-26T10:11:02Z","html_url":"https://github.com/radare/radare2/pull/4715#discussion_r61061039","pull_request_url":"https://api.github.com/repos/radare/radare2/pulls/4715","_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments/61061039"},"html":{"href":"https://github.com/radare/radare2/pull/4715#discussion_r61061039"},"pull_request":{"href":"https://api.github.com/repos/radare/radare2/pulls/4715"}}},"pull_request":{"url":"https://api.github.com/repos/radare/radare2/pulls/4715","id":67851223,"html_url":"https://github.com/radare/radare2/pull/4715","diff_url":"https://github.com/radare/radare2/pull/4715.diff","patch_url":"https://github.com/radare/radare2/pull/4715.patch","issue_url":"https://api.github.com/repos/radare/radare2/issues/4715","number":4715,"state":"open","locked":false,"title":"WIP - Totally remove host endianness dependence","user":{"login":"zamaudio","id":3164348,"avatar_url":"https://avatars.githubusercontent.com/u/3164348?v=3","gravatar_id":"","url":"https://api.github.com/users/zamaudio","html_url":"https://github.com/zamaudio","followers_url":"https://api.github.com/users/zamaudio/followers","following_url":"https://api.github.com/users/zamaudio/following{/other_user}","gists_url":"https://api.github.com/users/zamaudio/gists{/gist_id}","starred_url":"https://api.github.com/users/zamaudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zamaudio/subscriptions","organizations_url":"https://api.github.com/users/zamaudio/orgs","repos_url":"https://api.github.com/users/zamaudio/repos","events_url":"https://api.github.com/users/zamaudio/events{/privacy}","received_events_url":"https://api.github.com/users/zamaudio/received_events","type":"User","site_admin":false},"body":"Almost there, need to fix endian dependence for debugging, and test for regressions.","created_at":"2016-04-26T09:14:08Z","updated_at":"2016-04-26T10:11:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2f0dec28e640b5b7162cc188c4d78f1e2931a52","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/radare/radare2/pulls/4715/commits","review_comments_url":"https://api.github.com/repos/radare/radare2/pulls/4715/comments","review_comment_url":"https://api.github.com/repos/radare/radare2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radare/radare2/issues/4715/comments","statuses_url":"https://api.github.com/repos/radare/radare2/statuses/d5294beb77506915674d82f1a85dc28df6a1b443","head":{"label":"zamaudio:remove-endian-dependency","ref":"remove-endian-dependency","sha":"d5294beb77506915674d82f1a85dc28df6a1b443","user":{"login":"zamaudio","id":3164348,"avatar_url":"https://avatars.githubusercontent.com/u/3164348?v=3","gravatar_id":"","url":"https://api.github.com/users/zamaudio","html_url":"https://github.com/zamaudio","followers_url":"https://api.github.com/users/zamaudio/followers","following_url":"https://api.github.com/users/zamaudio/following{/other_user}","gists_url":"https://api.github.com/users/zamaudio/gists{/gist_id}","starred_url":"https://api.github.com/users/zamaudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zamaudio/subscriptions","organizations_url":"https://api.github.com/users/zamaudio/orgs","repos_url":"https://api.github.com/users/zamaudio/repos","events_url":"https://api.github.com/users/zamaudio/events{/privacy}","received_events_url":"https://api.github.com/users/zamaudio/received_events","type":"User","site_admin":false},"repo":{"id":42930504,"name":"radare2","full_name":"zamaudio/radare2","owner":{"login":"zamaudio","id":3164348,"avatar_url":"https://avatars.githubusercontent.com/u/3164348?v=3","gravatar_id":"","url":"https://api.github.com/users/zamaudio","html_url":"https://github.com/zamaudio","followers_url":"https://api.github.com/users/zamaudio/followers","following_url":"https://api.github.com/users/zamaudio/following{/other_user}","gists_url":"https://api.github.com/users/zamaudio/gists{/gist_id}","starred_url":"https://api.github.com/users/zamaudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zamaudio/subscriptions","organizations_url":"https://api.github.com/users/zamaudio/orgs","repos_url":"https://api.github.com/users/zamaudio/repos","events_url":"https://api.github.com/users/zamaudio/events{/privacy}","received_events_url":"https://api.github.com/users/zamaudio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zamaudio/radare2","description":"unix-like reverse engineering framework and commandline tools","fork":true,"url":"https://api.github.com/repos/zamaudio/radare2","forks_url":"https://api.github.com/repos/zamaudio/radare2/forks","keys_url":"https://api.github.com/repos/zamaudio/radare2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zamaudio/radare2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zamaudio/radare2/teams","hooks_url":"https://api.github.com/repos/zamaudio/radare2/hooks","issue_events_url":"https://api.github.com/repos/zamaudio/radare2/issues/events{/number}","events_url":"https://api.github.com/repos/zamaudio/radare2/events","assignees_url":"https://api.github.com/repos/zamaudio/radare2/assignees{/user}","branches_url":"https://api.github.com/repos/zamaudio/radare2/branches{/branch}","tags_url":"https://api.github.com/repos/zamaudio/radare2/tags","blobs_url":"https://api.github.com/repos/zamaudio/radare2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zamaudio/radare2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zamaudio/radare2/git/refs{/sha}","trees_url":"https://api.github.com/repos/zamaudio/radare2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zamaudio/radare2/statuses/{sha}","languages_url":"https://api.github.com/repos/zamaudio/radare2/languages","stargazers_url":"https://api.github.com/repos/zamaudio/radare2/stargazers","contributors_url":"https://api.github.com/repos/zamaudio/radare2/contributors","subscribers_url":"https://api.github.com/repos/zamaudio/radare2/subscribers","subscription_url":"https://api.github.com/repos/zamaudio/radare2/subscription","commits_url":"https://api.github.com/repos/zamaudio/radare2/commits{/sha}","git_commits_url":"https://api.github.com/repos/zamaudio/radare2/git/commits{/sha}","comments_url":"https://api.github.com/repos/zamaudio/radare2/comments{/number}","issue_comment_url":"https://api.github.com/repos/zamaudio/radare2/issues/comments{/number}","contents_url":"https://api.github.com/repos/zamaudio/radare2/contents/{+path}","compare_url":"https://api.github.com/repos/zamaudio/radare2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zamaudio/radare2/merges","archive_url":"https://api.github.com/repos/zamaudio/radare2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zamaudio/radare2/downloads","issues_url":"https://api.github.com/repos/zamaudio/radare2/issues{/number}","pulls_url":"https://api.github.com/repos/zamaudio/radare2/pulls{/number}","milestones_url":"https://api.github.com/repos/zamaudio/radare2/milestones{/number}","notifications_url":"https://api.github.com/repos/zamaudio/radare2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zamaudio/radare2/labels{/name}","releases_url":"https://api.github.com/repos/zamaudio/radare2/releases{/id}","deployments_url":"https://api.github.com/repos/zamaudio/radare2/deployments","created_at":"2015-09-22T11:48:19Z","updated_at":"2016-04-25T02:52:31Z","pushed_at":"2016-04-26T09:28:31Z","git_url":"git://github.com/zamaudio/radare2.git","ssh_url":"git@github.com:zamaudio/radare2.git","clone_url":"https://github.com/zamaudio/radare2.git","svn_url":"https://github.com/zamaudio/radare2","homepage":"http://www.radare.org/","size":57141,"stargazers_count":0,"watchers_count":0,"language":"C","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":"radare:master","ref":"master","sha":"f39b2ef0e293e64ad76a53685019873cedc21501","user":{"login":"radare","id":917142,"avatar_url":"https://avatars.githubusercontent.com/u/917142?v=3","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"repo":{"id":4869294,"name":"radare2","full_name":"radare/radare2","owner":{"login":"radare","id":917142,"avatar_url":"https://avatars.githubusercontent.com/u/917142?v=3","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/radare/radare2","description":"unix-like reverse engineering framework and commandline tools","fork":false,"url":"https://api.github.com/repos/radare/radare2","forks_url":"https://api.github.com/repos/radare/radare2/forks","keys_url":"https://api.github.com/repos/radare/radare2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radare/radare2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radare/radare2/teams","hooks_url":"https://api.github.com/repos/radare/radare2/hooks","issue_events_url":"https://api.github.com/repos/radare/radare2/issues/events{/number}","events_url":"https://api.github.com/repos/radare/radare2/events","assignees_url":"https://api.github.com/repos/radare/radare2/assignees{/user}","branches_url":"https://api.github.com/repos/radare/radare2/branches{/branch}","tags_url":"https://api.github.com/repos/radare/radare2/tags","blobs_url":"https://api.github.com/repos/radare/radare2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radare/radare2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radare/radare2/git/refs{/sha}","trees_url":"https://api.github.com/repos/radare/radare2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radare/radare2/statuses/{sha}","languages_url":"https://api.github.com/repos/radare/radare2/languages","stargazers_url":"https://api.github.com/repos/radare/radare2/stargazers","contributors_url":"https://api.github.com/repos/radare/radare2/contributors","subscribers_url":"https://api.github.com/repos/radare/radare2/subscribers","subscription_url":"https://api.github.com/repos/radare/radare2/subscription","commits_url":"https://api.github.com/repos/radare/radare2/commits{/sha}","git_commits_url":"https://api.github.com/repos/radare/radare2/git/commits{/sha}","comments_url":"https://api.github.com/repos/radare/radare2/comments{/number}","issue_comment_url":"https://api.github.com/repos/radare/radare2/issues/comments{/number}","contents_url":"https://api.github.com/repos/radare/radare2/contents/{+path}","compare_url":"https://api.github.com/repos/radare/radare2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radare/radare2/merges","archive_url":"https://api.github.com/repos/radare/radare2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radare/radare2/downloads","issues_url":"https://api.github.com/repos/radare/radare2/issues{/number}","pulls_url":"https://api.github.com/repos/radare/radare2/pulls{/number}","milestones_url":"https://api.github.com/repos/radare/radare2/milestones{/number}","notifications_url":"https://api.github.com/repos/radare/radare2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radare/radare2/labels{/name}","releases_url":"https://api.github.com/repos/radare/radare2/releases{/id}","deployments_url":"https://api.github.com/repos/radare/radare2/deployments","created_at":"2012-07-03T07:42:26Z","updated_at":"2016-04-25T20:37:04Z","pushed_at":"2016-04-26T09:28:32Z","git_url":"git://github.com/radare/radare2.git","ssh_url":"git@github.com:radare/radare2.git","clone_url":"https://github.com/radare/radare2.git","svn_url":"https://github.com/radare/radare2","homepage":"http://www.radare.org/","size":73574,"stargazers_count":2558,"watchers_count":2558,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":566,"mirror_url":null,"open_issues_count":708,"forks":566,"open_issues":708,"watchers":2558,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/4715"},"html":{"href":"https://github.com/radare/radare2/pull/4715"},"issue":{"href":"https://api.github.com/repos/radare/radare2/issues/4715"},"comments":{"href":"https://api.github.com/repos/radare/radare2/issues/4715/comments"},"review_comments":{"href":"https://api.github.com/repos/radare/radare2/pulls/4715/comments"},"review_comment":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radare/radare2/pulls/4715/commits"},"statuses":{"href":"https://api.github.com/repos/radare/radare2/statuses/d5294beb77506915674d82f1a85dc28df6a1b443"}}}}