{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift/pulls/comments/72681699","id":72681699,"diff_hunk":"@@ -25,9 +25,13 @@ public func _stdlib_mkstemps(_ template: inout String, _ suffixlen: CInt) -> CIn\n   var utf8 = template.nulTerminatedUTF8\n   let (fd, fileName) = utf8.withUnsafeMutableBufferPointer {\n     (utf8) -> (CInt, String) in\n-    let fd = mkstemps(UnsafeMutablePointer(utf8.baseAddress!), suffixlen)\n-    let fileName = String(cString: utf8.baseAddress!)\n-    return (fd, fileName)\n+    return utf8.baseAddress!.withMemoryRebound(\n+      to: CChar.self, capacity: Int(suffixlen)) {","path":"stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift","position":8,"original_position":8,"commit_id":"8c9a8e4b6da14c380b9bf03237cc370b053092c2","original_commit_id":"8c9a8e4b6da14c380b9bf03237cc370b053092c2","user":{"login":"atrick","id":2165663,"avatar_url":"https://avatars.githubusercontent.com/u/2165663?v=3","gravatar_id":"","url":"https://api.github.com/users/atrick","html_url":"https://github.com/atrick","followers_url":"https://api.github.com/users/atrick/followers","following_url":"https://api.github.com/users/atrick/following{/other_user}","gists_url":"https://api.github.com/users/atrick/gists{/gist_id}","starred_url":"https://api.github.com/users/atrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrick/subscriptions","organizations_url":"https://api.github.com/users/atrick/orgs","repos_url":"https://api.github.com/users/atrick/repos","events_url":"https://api.github.com/users/atrick/events{/privacy}","received_events_url":"https://api.github.com/users/atrick/received_events","type":"User","site_admin":false},"body":"Yeah, that's why I wanted your PR merged first. Unfortunately I didn't have permission to do it so had to post this older patch.","created_at":"2016-07-28T18:59:19Z","updated_at":"2016-07-28T18:59:19Z","html_url":"https://github.com/apple/swift/pull/3824#discussion_r72681699","pull_request_url":"https://api.github.com/repos/apple/swift/pulls/3824","_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/comments/72681699"},"html":{"href":"https://github.com/apple/swift/pull/3824#discussion_r72681699"},"pull_request":{"href":"https://api.github.com/repos/apple/swift/pulls/3824"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/3824","id":79233442,"html_url":"https://github.com/apple/swift/pull/3824","diff_url":"https://github.com/apple/swift/pull/3824.diff","patch_url":"https://github.com/apple/swift/pull/3824.patch","issue_url":"https://api.github.com/repos/apple/swift/issues/3824","number":3824,"state":"open","locked":false,"title":"Remove \"illegal\" UnsafePointer casts from the stdlib.","user":{"login":"atrick","id":2165663,"avatar_url":"https://avatars.githubusercontent.com/u/2165663?v=3","gravatar_id":"","url":"https://api.github.com/users/atrick","html_url":"https://github.com/atrick","followers_url":"https://api.github.com/users/atrick/followers","following_url":"https://api.github.com/users/atrick/following{/other_user}","gists_url":"https://api.github.com/users/atrick/gists{/gist_id}","starred_url":"https://api.github.com/users/atrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrick/subscriptions","organizations_url":"https://api.github.com/users/atrick/orgs","repos_url":"https://api.github.com/users/atrick/repos","events_url":"https://api.github.com/users/atrick/events{/privacy}","received_events_url":"https://api.github.com/users/atrick/received_events","type":"User","site_admin":false},"body":"Update for SE-0107: UnsafeRawPointer\r\n\r\nThis adds a \"mutating\" initialize to UnsafePointer to make\r\nImmutable -> Mutable conversions explicit.\r\n\r\nThese are quick fixes to stdlib, overlays, and test cases that are necessary\r\nin order to remove arbitrary UnsafePointer conversions.\r\n\r\nMany cases can be expressed better up by reworking the surrounding\r\ncode, but we first need a working starting point.","created_at":"2016-07-28T17:11:38Z","updated_at":"2016-07-28T18:59:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbb0a2fc1d3d7c5b433ac3fc5046f682cb4f8f7b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift/pulls/3824/commits","review_comments_url":"https://api.github.com/repos/apple/swift/pulls/3824/comments","review_comment_url":"https://api.github.com/repos/apple/swift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift/issues/3824/comments","statuses_url":"https://api.github.com/repos/apple/swift/statuses/8c9a8e4b6da14c380b9bf03237cc370b053092c2","head":{"label":"atrick:rawptr-stdlib","ref":"rawptr-stdlib","sha":"8c9a8e4b6da14c380b9bf03237cc370b053092c2","user":{"login":"atrick","id":2165663,"avatar_url":"https://avatars.githubusercontent.com/u/2165663?v=3","gravatar_id":"","url":"https://api.github.com/users/atrick","html_url":"https://github.com/atrick","followers_url":"https://api.github.com/users/atrick/followers","following_url":"https://api.github.com/users/atrick/following{/other_user}","gists_url":"https://api.github.com/users/atrick/gists{/gist_id}","starred_url":"https://api.github.com/users/atrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrick/subscriptions","organizations_url":"https://api.github.com/users/atrick/orgs","repos_url":"https://api.github.com/users/atrick/repos","events_url":"https://api.github.com/users/atrick/events{/privacy}","received_events_url":"https://api.github.com/users/atrick/received_events","type":"User","site_admin":false},"repo":{"id":47422455,"name":"swift","full_name":"atrick/swift","owner":{"login":"atrick","id":2165663,"avatar_url":"https://avatars.githubusercontent.com/u/2165663?v=3","gravatar_id":"","url":"https://api.github.com/users/atrick","html_url":"https://github.com/atrick","followers_url":"https://api.github.com/users/atrick/followers","following_url":"https://api.github.com/users/atrick/following{/other_user}","gists_url":"https://api.github.com/users/atrick/gists{/gist_id}","starred_url":"https://api.github.com/users/atrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrick/subscriptions","organizations_url":"https://api.github.com/users/atrick/orgs","repos_url":"https://api.github.com/users/atrick/repos","events_url":"https://api.github.com/users/atrick/events{/privacy}","received_events_url":"https://api.github.com/users/atrick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atrick/swift","description":"The Swift Programming Language","fork":true,"url":"https://api.github.com/repos/atrick/swift","forks_url":"https://api.github.com/repos/atrick/swift/forks","keys_url":"https://api.github.com/repos/atrick/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atrick/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atrick/swift/teams","hooks_url":"https://api.github.com/repos/atrick/swift/hooks","issue_events_url":"https://api.github.com/repos/atrick/swift/issues/events{/number}","events_url":"https://api.github.com/repos/atrick/swift/events","assignees_url":"https://api.github.com/repos/atrick/swift/assignees{/user}","branches_url":"https://api.github.com/repos/atrick/swift/branches{/branch}","tags_url":"https://api.github.com/repos/atrick/swift/tags","blobs_url":"https://api.github.com/repos/atrick/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atrick/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atrick/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/atrick/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atrick/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/atrick/swift/languages","stargazers_url":"https://api.github.com/repos/atrick/swift/stargazers","contributors_url":"https://api.github.com/repos/atrick/swift/contributors","subscribers_url":"https://api.github.com/repos/atrick/swift/subscribers","subscription_url":"https://api.github.com/repos/atrick/swift/subscription","commits_url":"https://api.github.com/repos/atrick/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/atrick/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/atrick/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/atrick/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/atrick/swift/contents/{+path}","compare_url":"https://api.github.com/repos/atrick/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atrick/swift/merges","archive_url":"https://api.github.com/repos/atrick/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atrick/swift/downloads","issues_url":"https://api.github.com/repos/atrick/swift/issues{/number}","pulls_url":"https://api.github.com/repos/atrick/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/atrick/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/atrick/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atrick/swift/labels{/name}","releases_url":"https://api.github.com/repos/atrick/swift/releases{/id}","deployments_url":"https://api.github.com/repos/atrick/swift/deployments","created_at":"2015-12-04T18:42:22Z","updated_at":"2016-03-15T21:26:31Z","pushed_at":"2016-07-28T17:49:10Z","git_url":"git://github.com/atrick/swift.git","ssh_url":"git@github.com:atrick/swift.git","clone_url":"https://github.com/atrick/swift.git","svn_url":"https://github.com/atrick/swift","homepage":"","size":107354,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apple:master","ref":"master","sha":"c3646f283914d949aed7bb156cebcc70c46cb5d2","user":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44838949,"name":"swift","full_name":"apple/swift","owner":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift","description":"The Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift","forks_url":"https://api.github.com/repos/apple/swift/forks","keys_url":"https://api.github.com/repos/apple/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift/teams","hooks_url":"https://api.github.com/repos/apple/swift/hooks","issue_events_url":"https://api.github.com/repos/apple/swift/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift/events","assignees_url":"https://api.github.com/repos/apple/swift/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift/tags","blobs_url":"https://api.github.com/repos/apple/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift/languages","stargazers_url":"https://api.github.com/repos/apple/swift/stargazers","contributors_url":"https://api.github.com/repos/apple/swift/contributors","subscribers_url":"https://api.github.com/repos/apple/swift/subscribers","subscription_url":"https://api.github.com/repos/apple/swift/subscription","commits_url":"https://api.github.com/repos/apple/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift/merges","archive_url":"https://api.github.com/repos/apple/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift/downloads","issues_url":"https://api.github.com/repos/apple/swift/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift/deployments","created_at":"2015-10-23T21:15:07Z","updated_at":"2016-07-28T18:41:46Z","pushed_at":"2016-07-28T18:49:22Z","git_url":"git://github.com/apple/swift.git","ssh_url":"git@github.com:apple/swift.git","clone_url":"https://github.com/apple/swift.git","svn_url":"https://github.com/apple/swift","homepage":"https://swift.org/","size":167681,"stargazers_count":32644,"watchers_count":32644,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4552,"mirror_url":null,"open_issues_count":107,"forks":4552,"open_issues":107,"watchers":32644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/3824"},"html":{"href":"https://github.com/apple/swift/pull/3824"},"issue":{"href":"https://api.github.com/repos/apple/swift/issues/3824"},"comments":{"href":"https://api.github.com/repos/apple/swift/issues/3824/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift/pulls/3824/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift/pulls/3824/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift/statuses/8c9a8e4b6da14c380b9bf03237cc370b053092c2"}}}}
{"actor":{"display_login":"atrick"}}