{"action":"created","comment":{"url":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/comments/44856919","id":44856919,"diff_hunk":"@@ -172,57 +178,52 @@ PHP_MSHUTDOWN_FUNCTION(mailparse)\n \n static inline php_mimepart *mimemsg_get_object(zval *object TSRMLS_DC)\n {\n-\tzval **zpart;\n+\tzval *zpart;\n \tphp_mimepart *part;\n-\tint type;\n-\t\n \n \tif (Z_TYPE_P(object) != IS_OBJECT) {\n \t\treturn NULL;\n \t}\n \n-\tif (zend_hash_index_find(Z_OBJPROP_P(object), 0, (void**)&zpart) == FAILURE) {\n+\tif ((zpart = zend_hash_index_find(Z_OBJPROP_P(object), 0)) == NULL) {\n \t\treturn NULL;\n \t}\n \n-\tpart = zend_list_find(Z_LVAL_PP(zpart), &type);\n-\n-\tif (type != le_mime_part)\n+\tif ((mailparse_fetch_mimepart_resource(part, zpart)) == NULL) {\n \t\treturn NULL;\n+\t}\n \n \treturn part;\n }\n \n static int mailparse_mimemessage_populate(php_mimepart *part, zval *object TSRMLS_DC)\n {\n-\tzval *tmp;\n+\tzval tmp;\n \n-\tMAKE_STD_ZVAL(tmp);\n-\tmailparse_get_part_data(part, tmp TSRMLS_CC);\n-\tadd_property_zval(object, \"data\", tmp);\n-\tZ_DELREF_P(tmp);\n+\tmailparse_get_part_data(part, &tmp TSRMLS_CC);\n+\tadd_property_zval(object, \"data\", &tmp);\n+\tZ_DELREF_P(&tmp);","path":"mailparse.c","position":108,"original_position":108,"commit_id":"581123a9f27ee66ee442f55509a9ecb57e4bb9a7","original_commit_id":"581123a9f27ee66ee442f55509a9ecb57e4bb9a7","user":{"login":"laruence","id":382813,"avatar_url":"https://avatars.githubusercontent.com/u/382813?v=3","gravatar_id":"","url":"https://api.github.com/users/laruence","html_url":"https://github.com/laruence","followers_url":"https://api.github.com/users/laruence/followers","following_url":"https://api.github.com/users/laruence/following{/other_user}","gists_url":"https://api.github.com/users/laruence/gists{/gist_id}","starred_url":"https://api.github.com/users/laruence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laruence/subscriptions","organizations_url":"https://api.github.com/users/laruence/orgs","repos_url":"https://api.github.com/users/laruence/repos","events_url":"https://api.github.com/users/laruence/events{/privacy}","received_events_url":"https://api.github.com/users/laruence/received_events","type":"User","site_admin":false},"body":"maybe use zval_ptr_dtor is better, if the type is not REFCOUNTED, this may lead to segfault.","created_at":"2015-11-14T09:37:14Z","updated_at":"2015-11-14T09:37:14Z","html_url":"https://github.com/php/pecl-mail-mailparse/pull/1#discussion_r44856919","pull_request_url":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/comments/44856919"},"html":{"href":"https://github.com/php/pecl-mail-mailparse/pull/1#discussion_r44856919"},"pull_request":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1","id":42095121,"html_url":"https://github.com/php/pecl-mail-mailparse/pull/1","diff_url":"https://github.com/php/pecl-mail-mailparse/pull/1.diff","patch_url":"https://github.com/php/pecl-mail-mailparse/pull/1.patch","issue_url":"https://api.github.com/repos/php/pecl-mail-mailparse/issues/1","number":1,"state":"open","locked":false,"title":"PHP 7 Support","user":{"login":"Sean-Der","id":1302304,"avatar_url":"https://avatars.githubusercontent.com/u/1302304?v=3","gravatar_id":"","url":"https://api.github.com/users/Sean-Der","html_url":"https://github.com/Sean-Der","followers_url":"https://api.github.com/users/Sean-Der/followers","following_url":"https://api.github.com/users/Sean-Der/following{/other_user}","gists_url":"https://api.github.com/users/Sean-Der/gists{/gist_id}","starred_url":"https://api.github.com/users/Sean-Der/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sean-Der/subscriptions","organizations_url":"https://api.github.com/users/Sean-Der/orgs","repos_url":"https://api.github.com/users/Sean-Der/repos","events_url":"https://api.github.com/users/Sean-Der/events{/privacy}","received_events_url":"https://api.github.com/users/Sean-Der/received_events","type":"User","site_admin":false},"body":"All tests pass, and you can see code coverage status on my PR [here](https://github.com/Sean-Der/pecl-mail-mailparse/pull/3)","created_at":"2015-08-11T05:56:40Z","updated_at":"2015-11-14T09:37:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30da85068299c1bcbfde26a90a4c9c6bc968cec5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1/commits","review_comments_url":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1/comments","review_comment_url":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/php/pecl-mail-mailparse/issues/1/comments","statuses_url":"https://api.github.com/repos/php/pecl-mail-mailparse/statuses/581123a9f27ee66ee442f55509a9ecb57e4bb9a7","head":{"label":"Sean-Der:php7","ref":"php7","sha":"581123a9f27ee66ee442f55509a9ecb57e4bb9a7","user":{"login":"Sean-Der","id":1302304,"avatar_url":"https://avatars.githubusercontent.com/u/1302304?v=3","gravatar_id":"","url":"https://api.github.com/users/Sean-Der","html_url":"https://github.com/Sean-Der","followers_url":"https://api.github.com/users/Sean-Der/followers","following_url":"https://api.github.com/users/Sean-Der/following{/other_user}","gists_url":"https://api.github.com/users/Sean-Der/gists{/gist_id}","starred_url":"https://api.github.com/users/Sean-Der/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sean-Der/subscriptions","organizations_url":"https://api.github.com/users/Sean-Der/orgs","repos_url":"https://api.github.com/users/Sean-Der/repos","events_url":"https://api.github.com/users/Sean-Der/events{/privacy}","received_events_url":"https://api.github.com/users/Sean-Der/received_events","type":"User","site_admin":false},"repo":{"id":38735536,"name":"pecl-mail-mailparse","full_name":"Sean-Der/pecl-mail-mailparse","owner":{"login":"Sean-Der","id":1302304,"avatar_url":"https://avatars.githubusercontent.com/u/1302304?v=3","gravatar_id":"","url":"https://api.github.com/users/Sean-Der","html_url":"https://github.com/Sean-Der","followers_url":"https://api.github.com/users/Sean-Der/followers","following_url":"https://api.github.com/users/Sean-Der/following{/other_user}","gists_url":"https://api.github.com/users/Sean-Der/gists{/gist_id}","starred_url":"https://api.github.com/users/Sean-Der/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sean-Der/subscriptions","organizations_url":"https://api.github.com/users/Sean-Der/orgs","repos_url":"https://api.github.com/users/Sean-Der/repos","events_url":"https://api.github.com/users/Sean-Der/events{/privacy}","received_events_url":"https://api.github.com/users/Sean-Der/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sean-Der/pecl-mail-mailparse","description":"Email message manipulation","fork":true,"url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse","forks_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/forks","keys_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/teams","hooks_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/hooks","issue_events_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/issues/events{/number}","events_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/events","assignees_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/assignees{/user}","branches_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/branches{/branch}","tags_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/tags","blobs_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/statuses/{sha}","languages_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/languages","stargazers_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/stargazers","contributors_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/contributors","subscribers_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/subscribers","subscription_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/subscription","commits_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/contents/{+path}","compare_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/merges","archive_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/downloads","issues_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/issues{/number}","pulls_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/pulls{/number}","milestones_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/milestones{/number}","notifications_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/labels{/name}","releases_url":"https://api.github.com/repos/Sean-Der/pecl-mail-mailparse/releases{/id}","created_at":"2015-07-08T06:10:40Z","updated_at":"2015-07-08T06:10:41Z","pushed_at":"2015-07-24T05:46:00Z","git_url":"git://github.com/Sean-Der/pecl-mail-mailparse.git","ssh_url":"git@github.com:Sean-Der/pecl-mail-mailparse.git","clone_url":"https://github.com/Sean-Der/pecl-mail-mailparse.git","svn_url":"https://github.com/Sean-Der/pecl-mail-mailparse","homepage":"http://pecl.php.net/package/mailparse","size":1273,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"php:master","ref":"master","sha":"d79a9ecc8a739c0b5d8a60c3341ba31ab9239497","user":{"login":"php","id":25158,"avatar_url":"https://avatars.githubusercontent.com/u/25158?v=3","gravatar_id":"","url":"https://api.github.com/users/php","html_url":"https://github.com/php","followers_url":"https://api.github.com/users/php/followers","following_url":"https://api.github.com/users/php/following{/other_user}","gists_url":"https://api.github.com/users/php/gists{/gist_id}","starred_url":"https://api.github.com/users/php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php/subscriptions","organizations_url":"https://api.github.com/users/php/orgs","repos_url":"https://api.github.com/users/php/repos","events_url":"https://api.github.com/users/php/events{/privacy}","received_events_url":"https://api.github.com/users/php/received_events","type":"Organization","site_admin":false},"repo":{"id":34174677,"name":"pecl-mail-mailparse","full_name":"php/pecl-mail-mailparse","owner":{"login":"php","id":25158,"avatar_url":"https://avatars.githubusercontent.com/u/25158?v=3","gravatar_id":"","url":"https://api.github.com/users/php","html_url":"https://github.com/php","followers_url":"https://api.github.com/users/php/followers","following_url":"https://api.github.com/users/php/following{/other_user}","gists_url":"https://api.github.com/users/php/gists{/gist_id}","starred_url":"https://api.github.com/users/php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php/subscriptions","organizations_url":"https://api.github.com/users/php/orgs","repos_url":"https://api.github.com/users/php/repos","events_url":"https://api.github.com/users/php/events{/privacy}","received_events_url":"https://api.github.com/users/php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/php/pecl-mail-mailparse","description":"Email message manipulation","fork":false,"url":"https://api.github.com/repos/php/pecl-mail-mailparse","forks_url":"https://api.github.com/repos/php/pecl-mail-mailparse/forks","keys_url":"https://api.github.com/repos/php/pecl-mail-mailparse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php/pecl-mail-mailparse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php/pecl-mail-mailparse/teams","hooks_url":"https://api.github.com/repos/php/pecl-mail-mailparse/hooks","issue_events_url":"https://api.github.com/repos/php/pecl-mail-mailparse/issues/events{/number}","events_url":"https://api.github.com/repos/php/pecl-mail-mailparse/events","assignees_url":"https://api.github.com/repos/php/pecl-mail-mailparse/assignees{/user}","branches_url":"https://api.github.com/repos/php/pecl-mail-mailparse/branches{/branch}","tags_url":"https://api.github.com/repos/php/pecl-mail-mailparse/tags","blobs_url":"https://api.github.com/repos/php/pecl-mail-mailparse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php/pecl-mail-mailparse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php/pecl-mail-mailparse/git/refs{/sha}","trees_url":"https://api.github.com/repos/php/pecl-mail-mailparse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php/pecl-mail-mailparse/statuses/{sha}","languages_url":"https://api.github.com/repos/php/pecl-mail-mailparse/languages","stargazers_url":"https://api.github.com/repos/php/pecl-mail-mailparse/stargazers","contributors_url":"https://api.github.com/repos/php/pecl-mail-mailparse/contributors","subscribers_url":"https://api.github.com/repos/php/pecl-mail-mailparse/subscribers","subscription_url":"https://api.github.com/repos/php/pecl-mail-mailparse/subscription","commits_url":"https://api.github.com/repos/php/pecl-mail-mailparse/commits{/sha}","git_commits_url":"https://api.github.com/repos/php/pecl-mail-mailparse/git/commits{/sha}","comments_url":"https://api.github.com/repos/php/pecl-mail-mailparse/comments{/number}","issue_comment_url":"https://api.github.com/repos/php/pecl-mail-mailparse/issues/comments{/number}","contents_url":"https://api.github.com/repos/php/pecl-mail-mailparse/contents/{+path}","compare_url":"https://api.github.com/repos/php/pecl-mail-mailparse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php/pecl-mail-mailparse/merges","archive_url":"https://api.github.com/repos/php/pecl-mail-mailparse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php/pecl-mail-mailparse/downloads","issues_url":"https://api.github.com/repos/php/pecl-mail-mailparse/issues{/number}","pulls_url":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls{/number}","milestones_url":"https://api.github.com/repos/php/pecl-mail-mailparse/milestones{/number}","notifications_url":"https://api.github.com/repos/php/pecl-mail-mailparse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php/pecl-mail-mailparse/labels{/name}","releases_url":"https://api.github.com/repos/php/pecl-mail-mailparse/releases{/id}","created_at":"2015-04-18T17:07:48Z","updated_at":"2015-07-30T22:47:36Z","pushed_at":"2015-09-21T11:54:37Z","git_url":"git://github.com/php/pecl-mail-mailparse.git","ssh_url":"git@github.com:php/pecl-mail-mailparse.git","clone_url":"https://github.com/php/pecl-mail-mailparse.git","svn_url":"https://github.com/php/pecl-mail-mailparse","homepage":"http://pecl.php.net/package/mailparse","size":1228,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1"},"html":{"href":"https://github.com/php/pecl-mail-mailparse/pull/1"},"issue":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/issues/1"},"comments":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/php/pecl-mail-mailparse/statuses/581123a9f27ee66ee442f55509a9ecb57e4bb9a7"}}}}