{"action":"created","comment":{"url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/comments/25249837","id":25249837,"diff_hunk":"@@ -466,7 +469,7 @@ static int cheat_parse_hacks_code(char *code, m64p_cheat_code **hack)\n     while ((token = strtok_compat(input, \",\", &saveptr))) {\n         input = NULL;\n \n-        ret = sscanf(token, \"%08X %04X\", &hackbuf[num_codes].address,\n+        ret = sscanf(token, \"%08\" SCNx32 \" %04X\", &hackbuf[num_codes].address,","path":"src/main/cheat.c","position":15,"original_position":15,"commit_id":"b0709063843492ef7567d8c64101a3040dca8973","original_commit_id":"b0709063843492ef7567d8c64101a3040dca8973","user":{"login":"wareya","id":585488,"avatar_url":"https://avatars.githubusercontent.com/u/585488?v=3","gravatar_id":"","url":"https://api.github.com/users/wareya","html_url":"https://github.com/wareya","followers_url":"https://api.github.com/users/wareya/followers","following_url":"https://api.github.com/users/wareya/following{/other_user}","gists_url":"https://api.github.com/users/wareya/gists{/gist_id}","starred_url":"https://api.github.com/users/wareya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wareya/subscriptions","organizations_url":"https://api.github.com/users/wareya/orgs","repos_url":"https://api.github.com/users/wareya/repos","events_url":"https://api.github.com/users/wareya/events{/privacy}","received_events_url":"https://api.github.com/users/wareya/received_events","type":"User","site_admin":false},"body":"I think that expands to \"%08lx %04X\".\r\n\r\nsscanf is x vs X agnostic, yes?","created_at":"2015-02-24T13:00:58Z","updated_at":"2015-02-24T13:00:58Z","html_url":"https://github.com/mupen64plus/mupen64plus-core/pull/84#discussion_r25249837","pull_request_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84","_links":{"self":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/comments/25249837"},"html":{"href":"https://github.com/mupen64plus/mupen64plus-core/pull/84#discussion_r25249837"},"pull_request":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84"}}},"pull_request":{"url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84","id":29856049,"html_url":"https://github.com/mupen64plus/mupen64plus-core/pull/84","diff_url":"https://github.com/mupen64plus/mupen64plus-core/pull/84.diff","patch_url":"https://github.com/mupen64plus/mupen64plus-core/pull/84.patch","issue_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/issues/84","number":84,"state":"open","locked":false,"title":"Use [u]intN_t for Nintendo 64 data","user":{"login":"Nebuleon","id":2391500,"avatar_url":"https://avatars.githubusercontent.com/u/2391500?v=3","gravatar_id":"","url":"https://api.github.com/users/Nebuleon","html_url":"https://github.com/Nebuleon","followers_url":"https://api.github.com/users/Nebuleon/followers","following_url":"https://api.github.com/users/Nebuleon/following{/other_user}","gists_url":"https://api.github.com/users/Nebuleon/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebuleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebuleon/subscriptions","organizations_url":"https://api.github.com/users/Nebuleon/orgs","repos_url":"https://api.github.com/users/Nebuleon/repos","events_url":"https://api.github.com/users/Nebuleon/events{/privacy}","received_events_url":"https://api.github.com/users/Nebuleon/received_events","type":"User","site_admin":false},"body":"The Nintendo 64 uses various data with exact bit counts (8-bit, 16-bit, 32-bit, 64-bit). `char`, `unsigned char`, `short`, `unsigned short`, `int`, `unsigned int`, `long`, `unsigned long`, `long long` and `unsigned long long` may be the required number of bits, but this is not guaranteed. This patch series uses `<stdint.h>` to provide types with exact bit counts for variables holding various types of Nintendo 64 data instead of the types above:\r\n\r\n* integer registers and Coprocessors 0 and 1 registers (`int64_t`, `int32_t`);\r\n* addresses (`uint32_t`);\r\n* MIPS III opcodes (`uint32_t`) and instruction fields (`int16_t`, `uint32_t`);\r\n* memory accesses (`uint8_t`, `uint16_t`, `uint32_t`, `uint64_t`);\r\n* saved states;\r\n* the byte-swap utility functions (`uint16_t`, `uint32_t`, `uint64_t`);\r\n* the ROM header (`uint8_t`, `uint16_t`, `uint32_t`).\r\n\r\nThis follows in the footsteps of recent code @bsmiles32 has worked on, which has been using these types. It should not modify mupen64plus's behavior on platforms where the size of an `int`-based type matches the new intN_t type for it, only further cement the bit widths for those variables that need them.\r\n\r\nTo print out these intN_t quantities, I have made a fixup commit to use `PRIX8`, `PRIX16` and `PRIX32` from `<inttypes.h>` where appropriate.\r\n\r\nThis patch series starts creating 32-bit and 64-bit constants with **`INT32_C()`** and **`INT64_C()`**. Not every constant is like that now, but the macros append the proper suffix for constants with exact bit counts on the architecture being compiled for. I mainly used the macros for bitwise operations and to initialise the values of registers with exact bit counts, except the value `0`.\r\n\r\nThe Hacktarux JIT/x86, Hacktarux JIT/amd64 and New Dynarec/ARM are not modified, due to `unsigned int` and `unsigned long long` having the appropriate widths for their platforms already. There may be a problem with 32-bit-on-amd64 builds, due to the size of pointers differing from the size of ints and longs; this could be fixed up by the use of `uintptr_t`. This is left unhandled in my intN_t branch.\r\n\r\nI'd like some feedback particularly related to build successes or failures on Windows, 32-bit-on-amd64 and ARM, and the use of `INTn_C()`. If things break, I'll try my best to remake the patches.","created_at":"2015-02-23T23:15:42Z","updated_at":"2015-02-24T13:00:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbe99ee9d6180bb6bcea58fd9288afd59c5affd1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84/commits","review_comments_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84/comments","review_comment_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/issues/84/comments","statuses_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/statuses/b0709063843492ef7567d8c64101a3040dca8973","head":{"label":"Nebuleon:intN_t","ref":"intN_t","sha":"b0709063843492ef7567d8c64101a3040dca8973","user":{"login":"Nebuleon","id":2391500,"avatar_url":"https://avatars.githubusercontent.com/u/2391500?v=3","gravatar_id":"","url":"https://api.github.com/users/Nebuleon","html_url":"https://github.com/Nebuleon","followers_url":"https://api.github.com/users/Nebuleon/followers","following_url":"https://api.github.com/users/Nebuleon/following{/other_user}","gists_url":"https://api.github.com/users/Nebuleon/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebuleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebuleon/subscriptions","organizations_url":"https://api.github.com/users/Nebuleon/orgs","repos_url":"https://api.github.com/users/Nebuleon/repos","events_url":"https://api.github.com/users/Nebuleon/events{/privacy}","received_events_url":"https://api.github.com/users/Nebuleon/received_events","type":"User","site_admin":false},"repo":{"id":23326107,"name":"mupen64plus-core","full_name":"Nebuleon/mupen64plus-core","owner":{"login":"Nebuleon","id":2391500,"avatar_url":"https://avatars.githubusercontent.com/u/2391500?v=3","gravatar_id":"","url":"https://api.github.com/users/Nebuleon","html_url":"https://github.com/Nebuleon","followers_url":"https://api.github.com/users/Nebuleon/followers","following_url":"https://api.github.com/users/Nebuleon/following{/other_user}","gists_url":"https://api.github.com/users/Nebuleon/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebuleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebuleon/subscriptions","organizations_url":"https://api.github.com/users/Nebuleon/orgs","repos_url":"https://api.github.com/users/Nebuleon/repos","events_url":"https://api.github.com/users/Nebuleon/events{/privacy}","received_events_url":"https://api.github.com/users/Nebuleon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nebuleon/mupen64plus-core","description":"Core module of the Mupen64Plus project","fork":true,"url":"https://api.github.com/repos/Nebuleon/mupen64plus-core","forks_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/forks","keys_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/teams","hooks_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/hooks","issue_events_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/issues/events{/number}","events_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/events","assignees_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/assignees{/user}","branches_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/branches{/branch}","tags_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/tags","blobs_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/statuses/{sha}","languages_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/languages","stargazers_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/stargazers","contributors_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/contributors","subscribers_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/subscribers","subscription_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/subscription","commits_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/contents/{+path}","compare_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/merges","archive_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/downloads","issues_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/issues{/number}","pulls_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/pulls{/number}","milestones_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/milestones{/number}","notifications_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/labels{/name}","releases_url":"https://api.github.com/repos/Nebuleon/mupen64plus-core/releases{/id}","created_at":"2014-08-25T19:36:37Z","updated_at":"2015-02-15T03:26:34Z","pushed_at":"2015-02-23T22:48:02Z","git_url":"git://github.com/Nebuleon/mupen64plus-core.git","ssh_url":"git@github.com:Nebuleon/mupen64plus-core.git","clone_url":"https://github.com/Nebuleon/mupen64plus-core.git","svn_url":"https://github.com/Nebuleon/mupen64plus-core","homepage":"","size":10136,"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":"mupen64plus:master","ref":"master","sha":"e1639f91f96db8344c425226e0d4a3c6178b54b4","user":{"login":"mupen64plus","id":6205049,"avatar_url":"https://avatars.githubusercontent.com/u/6205049?v=3","gravatar_id":"","url":"https://api.github.com/users/mupen64plus","html_url":"https://github.com/mupen64plus","followers_url":"https://api.github.com/users/mupen64plus/followers","following_url":"https://api.github.com/users/mupen64plus/following{/other_user}","gists_url":"https://api.github.com/users/mupen64plus/gists{/gist_id}","starred_url":"https://api.github.com/users/mupen64plus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mupen64plus/subscriptions","organizations_url":"https://api.github.com/users/mupen64plus/orgs","repos_url":"https://api.github.com/users/mupen64plus/repos","events_url":"https://api.github.com/users/mupen64plus/events{/privacy}","received_events_url":"https://api.github.com/users/mupen64plus/received_events","type":"Organization","site_admin":false},"repo":{"id":15262758,"name":"mupen64plus-core","full_name":"mupen64plus/mupen64plus-core","owner":{"login":"mupen64plus","id":6205049,"avatar_url":"https://avatars.githubusercontent.com/u/6205049?v=3","gravatar_id":"","url":"https://api.github.com/users/mupen64plus","html_url":"https://github.com/mupen64plus","followers_url":"https://api.github.com/users/mupen64plus/followers","following_url":"https://api.github.com/users/mupen64plus/following{/other_user}","gists_url":"https://api.github.com/users/mupen64plus/gists{/gist_id}","starred_url":"https://api.github.com/users/mupen64plus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mupen64plus/subscriptions","organizations_url":"https://api.github.com/users/mupen64plus/orgs","repos_url":"https://api.github.com/users/mupen64plus/repos","events_url":"https://api.github.com/users/mupen64plus/events{/privacy}","received_events_url":"https://api.github.com/users/mupen64plus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mupen64plus/mupen64plus-core","description":"Core module of the Mupen64Plus project","fork":false,"url":"https://api.github.com/repos/mupen64plus/mupen64plus-core","forks_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/forks","keys_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/teams","hooks_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/hooks","issue_events_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/issues/events{/number}","events_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/events","assignees_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/assignees{/user}","branches_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/branches{/branch}","tags_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/tags","blobs_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/statuses/{sha}","languages_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/languages","stargazers_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/stargazers","contributors_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/contributors","subscribers_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/subscribers","subscription_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/subscription","commits_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/contents/{+path}","compare_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/merges","archive_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/downloads","issues_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/issues{/number}","pulls_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls{/number}","milestones_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/milestones{/number}","notifications_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/labels{/name}","releases_url":"https://api.github.com/repos/mupen64plus/mupen64plus-core/releases{/id}","created_at":"2013-12-17T18:41:09Z","updated_at":"2015-02-22T22:29:52Z","pushed_at":"2015-02-22T22:29:52Z","git_url":"git://github.com/mupen64plus/mupen64plus-core.git","ssh_url":"git@github.com:mupen64plus/mupen64plus-core.git","clone_url":"https://github.com/mupen64plus/mupen64plus-core.git","svn_url":"https://github.com/mupen64plus/mupen64plus-core","homepage":"","size":11254,"stargazers_count":70,"watchers_count":70,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":4,"forks":20,"open_issues":4,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84"},"html":{"href":"https://github.com/mupen64plus/mupen64plus-core/pull/84"},"issue":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/issues/84"},"comments":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/issues/84/comments"},"review_comments":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84/comments"},"review_comment":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/pulls/84/commits"},"statuses":{"href":"https://api.github.com/repos/mupen64plus/mupen64plus-core/statuses/b0709063843492ef7567d8c64101a3040dca8973"}}}}