GitHub PullRequestEvent at 2014-08-20 13:24:44
Repository: encrypted-core-data
Actor: gavin-black
Payload: {"action":"closed","number":106,"pull_request":{"url":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/106","id":20009009,"html_url":"https://github.com/project-imas/encrypted-core-data/pull/106","diff_url":"https://github.com/project-imas/encrypted-core-data/pull/106.diff","patch_url":"https://github.com/project-imas/encrypted-core-data/pull/106.patch","issue_url":"https://api.github.com/repos/project-imas/encrypted-core-data/issues/106","number":106,"state":"closed","locked":false,"title":"Corrected rounding errors when creating inserts for entity types","user":{"login":"rhodgkins","id":1810588,"avatar_url":"https://avatars.githubusercontent.com/u/1810588?v=2","gravatar_id":"daf57da14b17a2c9ce766bafdd16dbb9","url":"https://api.github.com/users/rhodgkins","html_url":"https://github.com/rhodgkins","followers_url":"https://api.github.com/users/rhodgkins/followers","following_url":"https://api.github.com/users/rhodgkins/following{/other_user}","gists_url":"https://api.github.com/users/rhodgkins/gists{/gist_id}","starred_url":"https://api.github.com/users/rhodgkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhodgkins/subscriptions","organizations_url":"https://api.github.com/users/rhodgkins/orgs","repos_url":"https://api.github.com/users/rhodgkins/repos","events_url":"https://api.github.com/users/rhodgkins/events{/privacy}","received_events_url":"https://api.github.com/users/rhodgkins/received_events","type":"User","site_admin":false},"body":"As `hash` returns a `NSUInteger`, using `%u` as the format string would mean that the longer integers would overflow. Using `%lu` and casting to a `unsigned long` ensures this does not happen. Also when fetching the entity type now uses `sqlite3_column_int64` to also ensure that no overflowing happens.\r\n\r\nThe following small program highlights the issue:\r\n```objective-c\r\n#import <Foundation/Foundation.h>\r\n\r\nint main()\r\n{\r\n\tNSUInteger hash = [@\"FullJob\" hash];\r\n\tNSLog(@\"NSNumber: %@\", [NSNumber numberWithUnsignedInteger:hash]);\r\n\tNSLog(@\"Unsigned long: %lu\", hash);\r\n\tNSLog(@\"Unsigned: %u\", hash);\r\n\r\n\treturn 0;\r\n}\r\n```\r\n\r\nWhich outputs the following:\r\n```\r\nNSNumber: 3653549451180044853\r\nUnsigned long: 3653549451180044853\r\nUnsigned: 1458106933\r\n```","created_at":"2014-08-19T21:01:05Z","updated_at":"2014-08-20T13:24:43Z","closed_at":"2014-08-20T13:24:43Z","merged_at":"2014-08-20T13:24:43Z","merge_commit_sha":"332faf3a499408bf85a0e30a6371a8816c671d4d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/106/commits","review_comments_url":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/106/comments","review_comment_url":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/comments/{number}","comments_url":"https://api.github.com/repos/project-imas/encrypted-core-data/issues/106/comments","statuses_url":"https://api.github.com/repos/project-imas/encrypted-core-data/statuses/c5d094d0216b705d14ba158d97ff8fe7ae36b4fb","head":{"label":"rhodgkins:master","ref":"master","sha":"c5d094d0216b705d14ba158d97ff8fe7ae36b4fb","user":{"login":"rhodgkins","id":1810588,"avatar_url":"https://avatars.githubusercontent.com/u/1810588?v=2","gravatar_id":"daf57da14b17a2c9ce766bafdd16dbb9","url":"https://api.github.com/users/rhodgkins","html_url":"https://github.com/rhodgkins","followers_url":"https://api.github.com/users/rhodgkins/followers","following_url":"https://api.github.com/users/rhodgkins/following{/other_user}","gists_url":"https://api.github.com/users/rhodgkins/gists{/gist_id}","starred_url":"https://api.github.com/users/rhodgkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhodgkins/subscriptions","organizations_url":"https://api.github.com/users/rhodgkins/orgs","repos_url":"https://api.github.com/users/rhodgkins/repos","events_url":"https://api.github.com/users/rhodgkins/events{/privacy}","received_events_url":"https://api.github.com/users/rhodgkins/received_events","type":"User","site_admin":false},"repo":{"id":20404187,"name":"encrypted-core-data","full_name":"rhodgkins/encrypted-core-data","owner":{"login":"rhodgkins","id":1810588,"avatar_url":"https://avatars.githubusercontent.com/u/1810588?v=2","gravatar_id":"daf57da14b17a2c9ce766bafdd16dbb9","url":"https://api.github.com/users/rhodgkins","html_url":"https://github.com/rhodgkins","followers_url":"https://api.github.com/users/rhodgkins/followers","following_url":"https://api.github.com/users/rhodgkins/following{/other_user}","gists_url":"https://api.github.com/users/rhodgkins/gists{/gist_id}","starred_url":"https://api.github.com/users/rhodgkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhodgkins/subscriptions","organizations_url":"https://api.github.com/users/rhodgkins/orgs","repos_url":"https://api.github.com/users/rhodgkins/repos","events_url":"https://api.github.com/users/rhodgkins/events{/privacy}","received_events_url":"https://api.github.com/users/rhodgkins/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhodgkins/encrypted-core-data","description":"iOS Core Data encrypted SQLite store using SQLCipher","fork":true,"url":"https://api.github.com/repos/rhodgkins/encrypted-core-data","forks_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/forks","keys_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/teams","hooks_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/hooks","issue_events_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/issues/events{/number}","events_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/events","assignees_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/assignees{/user}","branches_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/branches{/branch}","tags_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/tags","blobs_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/statuses/{sha}","languages_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/languages","stargazers_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/stargazers","contributors_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/contributors","subscribers_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/subscribers","subscription_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/subscription","commits_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/issues/comments/{number}","contents_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/contents/{+path}","compare_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/merges","archive_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/downloads","issues_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/issues{/number}","pulls_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/pulls{/number}","milestones_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/milestones{/number}","notifications_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/labels{/name}","releases_url":"https://api.github.com/repos/rhodgkins/encrypted-core-data/releases{/id}","created_at":"2014-06-02T13:10:04Z","updated_at":"2014-08-18T19:19:42Z","pushed_at":"2014-08-20T07:15:20Z","git_url":"git://github.com/rhodgkins/encrypted-core-data.git","ssh_url":"git@github.com:rhodgkins/encrypted-core-data.git","clone_url":"https://github.com/rhodgkins/encrypted-core-data.git","svn_url":"https://github.com/rhodgkins/encrypted-core-data","homepage":"","size":779,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"project-imas:master","ref":"master","sha":"f7db860ac50117a444a48c0acc70b994a88c9d31","user":{"login":"project-imas","id":2981991,"avatar_url":"https://avatars.githubusercontent.com/u/2981991?v=2","gravatar_id":"5168ece3cff9a26a20d400179fc2fe4f","url":"https://api.github.com/users/project-imas","html_url":"https://github.com/project-imas","followers_url":"https://api.github.com/users/project-imas/followers","following_url":"https://api.github.com/users/project-imas/following{/other_user}","gists_url":"https://api.github.com/users/project-imas/gists{/gist_id}","starred_url":"https://api.github.com/users/project-imas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-imas/subscriptions","organizations_url":"https://api.github.com/users/project-imas/orgs","repos_url":"https://api.github.com/users/project-imas/repos","events_url":"https://api.github.com/users/project-imas/events{/privacy}","received_events_url":"https://api.github.com/users/project-imas/received_events","type":"Organization","site_admin":false},"repo":{"id":5601299,"name":"encrypted-core-data","full_name":"project-imas/encrypted-core-data","owner":{"login":"project-imas","id":2981991,"avatar_url":"https://avatars.githubusercontent.com/u/2981991?v=2","gravatar_id":"5168ece3cff9a26a20d400179fc2fe4f","url":"https://api.github.com/users/project-imas","html_url":"https://github.com/project-imas","followers_url":"https://api.github.com/users/project-imas/followers","following_url":"https://api.github.com/users/project-imas/following{/other_user}","gists_url":"https://api.github.com/users/project-imas/gists{/gist_id}","starred_url":"https://api.github.com/users/project-imas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-imas/subscriptions","organizations_url":"https://api.github.com/users/project-imas/orgs","repos_url":"https://api.github.com/users/project-imas/repos","events_url":"https://api.github.com/users/project-imas/events{/privacy}","received_events_url":"https://api.github.com/users/project-imas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-imas/encrypted-core-data","description":"v2.0 - iOS Core Data encrypted SQLite store using SQLCipher","fork":false,"url":"https://api.github.com/repos/project-imas/encrypted-core-data","forks_url":"https://api.github.com/repos/project-imas/encrypted-core-data/forks","keys_url":"https://api.github.com/repos/project-imas/encrypted-core-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-imas/encrypted-core-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-imas/encrypted-core-data/teams","hooks_url":"https://api.github.com/repos/project-imas/encrypted-core-data/hooks","issue_events_url":"https://api.github.com/repos/project-imas/encrypted-core-data/issues/events{/number}","events_url":"https://api.github.com/repos/project-imas/encrypted-core-data/events","assignees_url":"https://api.github.com/repos/project-imas/encrypted-core-data/assignees{/user}","branches_url":"https://api.github.com/repos/project-imas/encrypted-core-data/branches{/branch}","tags_url":"https://api.github.com/repos/project-imas/encrypted-core-data/tags","blobs_url":"https://api.github.com/repos/project-imas/encrypted-core-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-imas/encrypted-core-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-imas/encrypted-core-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-imas/encrypted-core-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-imas/encrypted-core-data/statuses/{sha}","languages_url":"https://api.github.com/repos/project-imas/encrypted-core-data/languages","stargazers_url":"https://api.github.com/repos/project-imas/encrypted-core-data/stargazers","contributors_url":"https://api.github.com/repos/project-imas/encrypted-core-data/contributors","subscribers_url":"https://api.github.com/repos/project-imas/encrypted-core-data/subscribers","subscription_url":"https://api.github.com/repos/project-imas/encrypted-core-data/subscription","commits_url":"https://api.github.com/repos/project-imas/encrypted-core-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-imas/encrypted-core-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-imas/encrypted-core-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-imas/encrypted-core-data/issues/comments/{number}","contents_url":"https://api.github.com/repos/project-imas/encrypted-core-data/contents/{+path}","compare_url":"https://api.github.com/repos/project-imas/encrypted-core-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-imas/encrypted-core-data/merges","archive_url":"https://api.github.com/repos/project-imas/encrypted-core-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-imas/encrypted-core-data/downloads","issues_url":"https://api.github.com/repos/project-imas/encrypted-core-data/issues{/number}","pulls_url":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls{/number}","milestones_url":"https://api.github.com/repos/project-imas/encrypted-core-data/milestones{/number}","notifications_url":"https://api.github.com/repos/project-imas/encrypted-core-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-imas/encrypted-core-data/labels{/name}","releases_url":"https://api.github.com/repos/project-imas/encrypted-core-data/releases{/id}","created_at":"2012-08-29T14:02:22Z","updated_at":"2014-08-19T05:26:37Z","pushed_at":"2014-08-20T13:24:43Z","git_url":"git://github.com/project-imas/encrypted-core-data.git","ssh_url":"git@github.com:project-imas/encrypted-core-data.git","clone_url":"https://github.com/project-imas/encrypted-core-data.git","svn_url":"https://github.com/project-imas/encrypted-core-data","homepage":"","size":2052,"stargazers_count":277,"watchers_count":277,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":65,"mirror_url":null,"open_issues_count":18,"forks":65,"open_issues":18,"watchers":277,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/106"},"html":{"href":"https://github.com/project-imas/encrypted-core-data/pull/106"},"issue":{"href":"https://api.github.com/repos/project-imas/encrypted-core-data/issues/106"},"comments":{"href":"https://api.github.com/repos/project-imas/encrypted-core-data/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/project-imas/encrypted-core-data/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/project-imas/encrypted-core-data/statuses/c5d094d0216b705d14ba158d97ff8fe7ae36b4fb"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"gavin-black","id":464411,"avatar_url":"https://avatars.githubusercontent.com/u/464411?v=2","gravatar_id":"fe84459ce7feb6884ceee6cece731b83","url":"https://api.github.com/users/gavin-black","html_url":"https://github.com/gavin-black","followers_url":"https://api.github.com/users/gavin-black/followers","following_url":"https://api.github.com/users/gavin-black/following{/other_user}","gists_url":"https://api.github.com/users/gavin-black/gists{/gist_id}","starred_url":"https://api.github.com/users/gavin-black/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavin-black/subscriptions","organizations_url":"https://api.github.com/users/gavin-black/orgs","repos_url":"https://api.github.com/users/gavin-black/repos","events_url":"https://api.github.com/users/gavin-black/events{/privacy}","received_events_url":"https://api.github.com/users/gavin-black/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":3,"additions":17,"deletions":17,"changed_files":2}}