{"action":"created","comment":{"url":"https://api.github.com/repos/radare/radare2/pulls/comments/227703487","pull_request_review_id":167803344,"id":227703487,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzcwMzQ4Nw==","diff_hunk":"@@ -0,0 +1,33 @@\n+/* radare - LGPL - Copyright 2018 - pancake */\n+\n+#ifndef R_EVENT_H\n+#define R_EVENT_H\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+typedef struct r_event_t {\n+\tvoid *user;\n+\tRList *callbacks;\n+} REvent;\n+\n+typedef enum {\n+\tR_EVENT_META_SET = 0,\n+} REventType;\n+\n+typedef struct r_event_meta_t {\n+\tint type;\n+\tut64 addr;\n+\tconst char *string;\n+} REventMeta;\n+\n+typedef void (*REventCallback)(REvent *ev, REventType type, void *data);\n+\n+R_API REvent *r_event_new(void *user);\n+R_API void r_event_free(REvent *ev);\n+R_API void r_event_hook(REvent *ev, REventCallback cb);","path":"libr/include/r_util/r_event.h","position":29,"original_position":29,"commit_id":"48e563ced21e3f1096913e445ad8a1a2baf83f0c","original_commit_id":"48e563ced21e3f1096913e445ad8a1a2baf83f0c","user":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","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":"my idea was to handle the event type inside the callback. what other ppl think about this? this way its more versatile and you can do everything in one hook, and not having to create 200 hooks to handle all the possible events and not be able to detect when. you are missing an event","created_at":"2018-10-24T09:10:03Z","updated_at":"2018-10-24T09:10:03Z","html_url":"https://github.com/radare/radare2/pull/11914#discussion_r227703487","pull_request_url":"https://api.github.com/repos/radare/radare2/pulls/11914","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments/227703487"},"html":{"href":"https://github.com/radare/radare2/pull/11914#discussion_r227703487"},"pull_request":{"href":"https://api.github.com/repos/radare/radare2/pulls/11914"}},"in_reply_to_id":227683381},"pull_request":{"url":"https://api.github.com/repos/radare/radare2/pulls/11914","id":225227516,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1MjI3NTE2","html_url":"https://github.com/radare/radare2/pull/11914","diff_url":"https://github.com/radare/radare2/pull/11914.diff","patch_url":"https://github.com/radare/radare2/pull/11914.patch","issue_url":"https://api.github.com/repos/radare/radare2/issues/11914","number":11914,"state":"open","locked":false,"title":"WIP: Initial import of the REvent API ##refactor","user":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","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":"","created_at":"2018-10-24T00:19:28Z","updated_at":"2018-10-24T09:10:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"617f42b84648ef3e9bf7cacec9ffbe2299d74bdf","assignee":null,"assignees":[],"requested_reviewers":[{"login":"xarkes","id":10772605,"node_id":"MDQ6VXNlcjEwNzcyNjA1","avatar_url":"https://avatars0.githubusercontent.com/u/10772605?v=4","gravatar_id":"","url":"https://api.github.com/users/xarkes","html_url":"https://github.com/xarkes","followers_url":"https://api.github.com/users/xarkes/followers","following_url":"https://api.github.com/users/xarkes/following{/other_user}","gists_url":"https://api.github.com/users/xarkes/gists{/gist_id}","starred_url":"https://api.github.com/users/xarkes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xarkes/subscriptions","organizations_url":"https://api.github.com/users/xarkes/orgs","repos_url":"https://api.github.com/users/xarkes/repos","events_url":"https://api.github.com/users/xarkes/events{/privacy}","received_events_url":"https://api.github.com/users/xarkes/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/radare/radare2/milestones/33","html_url":"https://github.com/radare/radare2/milestone/33","labels_url":"https://api.github.com/repos/radare/radare2/milestones/33/labels","id":3611763,"node_id":"MDk6TWlsZXN0b25lMzYxMTc2Mw==","number":33,"title":"3.1.0","description":"","creator":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","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},"open_issues":76,"closed_issues":9,"state":"open","created_at":"2018-08-31T00:20:51Z","updated_at":"2018-10-24T00:51:47Z","due_on":"2018-11-24T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/radare/radare2/pulls/11914/commits","review_comments_url":"https://api.github.com/repos/radare/radare2/pulls/11914/comments","review_comment_url":"https://api.github.com/repos/radare/radare2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radare/radare2/issues/11914/comments","statuses_url":"https://api.github.com/repos/radare/radare2/statuses/48e563ced21e3f1096913e445ad8a1a2baf83f0c","head":{"label":"radare:event-api","ref":"event-api","sha":"48e563ced21e3f1096913e445ad8a1a2baf83f0c","user":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0ODY5Mjk0","name":"radare2","full_name":"radare/radare2","private":false,"owner":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","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},"html_url":"https://github.com/radare/radare2","description":"unix-like reverse engineering framework and commandline tools security","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":"2018-10-24T07:17:24Z","pushed_at":"2018-10-24T01:12:55Z","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":92120,"stargazers_count":8479,"watchers_count":8479,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1665,"mirror_url":null,"archived":false,"open_issues_count":1013,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":1665,"open_issues":1013,"watchers":8479,"default_branch":"master"}},"base":{"label":"radare:master","ref":"master","sha":"ce50039ce356f0103d62adb133842ebb7da5476f","user":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0ODY5Mjk0","name":"radare2","full_name":"radare/radare2","private":false,"owner":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","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},"html_url":"https://github.com/radare/radare2","description":"unix-like reverse engineering framework and commandline tools security","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":"2018-10-24T07:17:24Z","pushed_at":"2018-10-24T01:12:55Z","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":92120,"stargazers_count":8479,"watchers_count":8479,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1665,"mirror_url":null,"archived":false,"open_issues_count":1013,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":1665,"open_issues":1013,"watchers":8479,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/11914"},"html":{"href":"https://github.com/radare/radare2/pull/11914"},"issue":{"href":"https://api.github.com/repos/radare/radare2/issues/11914"},"comments":{"href":"https://api.github.com/repos/radare/radare2/issues/11914/comments"},"review_comments":{"href":"https://api.github.com/repos/radare/radare2/pulls/11914/comments"},"review_comment":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radare/radare2/pulls/11914/commits"},"statuses":{"href":"https://api.github.com/repos/radare/radare2/statuses/48e563ced21e3f1096913e445ad8a1a2baf83f0c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"radare"}}