{"action":"created","comment":{"url":"https://api.github.com/repos/pybee/rubicon-objc/pulls/comments/135392201","pull_request_review_id":58804266,"id":135392201,"diff_hunk":"@@ -235,7 +238,8 @@ def ctype_for_encoding(encoding):\n \n def encoding_for_ctype(ctype):\n     \"\"\"Return the Objective-C type encoding for the given ctypes type.\"\"\"\n-    \n+    if isinstance(ctype, POINTER_TYPE):\n+        return b'^' + encoding_for_ctype(ctype._type_)","path":"rubicon/objc/types.py","position":16,"original_position":16,"commit_id":"0632baa1eb09d45ee24389790115303aecfa382b","original_commit_id":"0632baa1eb09d45ee24389790115303aecfa382b","user":{"login":"dgelessus","id":6641959,"avatar_url":"https://avatars0.githubusercontent.com/u/6641959?v=4","gravatar_id":"","url":"https://api.github.com/users/dgelessus","html_url":"https://github.com/dgelessus","followers_url":"https://api.github.com/users/dgelessus/followers","following_url":"https://api.github.com/users/dgelessus/following{/other_user}","gists_url":"https://api.github.com/users/dgelessus/gists{/gist_id}","starred_url":"https://api.github.com/users/dgelessus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgelessus/subscriptions","organizations_url":"https://api.github.com/users/dgelessus/orgs","repos_url":"https://api.github.com/users/dgelessus/repos","events_url":"https://api.github.com/users/dgelessus/events{/privacy}","received_events_url":"https://api.github.com/users/dgelessus/received_events","type":"User","site_admin":false},"body":"This should probably be in the `except KeyError` block below, so that pointer types that are in `_encoding_for_ctype_map` are looked up there. For example `POINTER(c_char)` should encode as `*`, not as `^c`.","created_at":"2017-08-26T16:24:13Z","updated_at":"2017-08-26T16:32:58Z","html_url":"https://github.com/pybee/rubicon-objc/pull/54#discussion_r135392201","pull_request_url":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/pybee/rubicon-objc/pulls/comments/135392201"},"html":{"href":"https://github.com/pybee/rubicon-objc/pull/54#discussion_r135392201"},"pull_request":{"href":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54","id":136734042,"html_url":"https://github.com/pybee/rubicon-objc/pull/54","diff_url":"https://github.com/pybee/rubicon-objc/pull/54.diff","patch_url":"https://github.com/pybee/rubicon-objc/pull/54.patch","issue_url":"https://api.github.com/repos/pybee/rubicon-objc/issues/54","number":54,"state":"open","locked":false,"title":"Added support for sending blocks to objc","user":{"login":"ojii","id":141122,"avatar_url":"https://avatars0.githubusercontent.com/u/141122?v=4","gravatar_id":"","url":"https://api.github.com/users/ojii","html_url":"https://github.com/ojii","followers_url":"https://api.github.com/users/ojii/followers","following_url":"https://api.github.com/users/ojii/following{/other_user}","gists_url":"https://api.github.com/users/ojii/gists{/gist_id}","starred_url":"https://api.github.com/users/ojii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojii/subscriptions","organizations_url":"https://api.github.com/users/ojii/orgs","repos_url":"https://api.github.com/users/ojii/repos","events_url":"https://api.github.com/users/ojii/events{/privacy}","received_events_url":"https://api.github.com/users/ojii/received_events","type":"User","site_admin":false},"body":"This adds support for sending blocks to objc. It supports both \"automagical python callable to objc block style\" (which in non-trivial cases can segfault due to python GC) as well as \"explicit create a block object style\" through the `rubicon.objc.Block`. \r\n\r\nMagical style (functions need to be fully annotated):\r\n\r\n```python\r\n\r\ndef myblock(arg1: arg1type, arg2: arg2type) -> return_type:\r\n    ...\r\n\r\nobjc_instance.ObjcMethod_(myblock)\r\n```\r\n\r\nExplicit style:\r\n\r\n```python\r\nfrom rubicon.objc import Block\r\n\r\nmyblock = Block(lambda a, b: ..., return_type, argtype1, argtype2)\r\nobjc_instance.ObjcMethod_(myblock)\r\n```","created_at":"2017-08-21T11:00:43Z","updated_at":"2017-08-26T16:32:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aee1bea0569dad30e689e8cfcf9f9889e1c5d4d0","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54/commits","review_comments_url":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54/comments","review_comment_url":"https://api.github.com/repos/pybee/rubicon-objc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pybee/rubicon-objc/issues/54/comments","statuses_url":"https://api.github.com/repos/pybee/rubicon-objc/statuses/0632baa1eb09d45ee24389790115303aecfa382b","head":{"label":"ojii:send-blocks-clean","ref":"send-blocks-clean","sha":"0632baa1eb09d45ee24389790115303aecfa382b","user":{"login":"ojii","id":141122,"avatar_url":"https://avatars0.githubusercontent.com/u/141122?v=4","gravatar_id":"","url":"https://api.github.com/users/ojii","html_url":"https://github.com/ojii","followers_url":"https://api.github.com/users/ojii/followers","following_url":"https://api.github.com/users/ojii/following{/other_user}","gists_url":"https://api.github.com/users/ojii/gists{/gist_id}","starred_url":"https://api.github.com/users/ojii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojii/subscriptions","organizations_url":"https://api.github.com/users/ojii/orgs","repos_url":"https://api.github.com/users/ojii/repos","events_url":"https://api.github.com/users/ojii/events{/privacy}","received_events_url":"https://api.github.com/users/ojii/received_events","type":"User","site_admin":false},"repo":{"id":98145540,"name":"rubicon-objc","full_name":"ojii/rubicon-objc","owner":{"login":"ojii","id":141122,"avatar_url":"https://avatars0.githubusercontent.com/u/141122?v=4","gravatar_id":"","url":"https://api.github.com/users/ojii","html_url":"https://github.com/ojii","followers_url":"https://api.github.com/users/ojii/followers","following_url":"https://api.github.com/users/ojii/following{/other_user}","gists_url":"https://api.github.com/users/ojii/gists{/gist_id}","starred_url":"https://api.github.com/users/ojii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojii/subscriptions","organizations_url":"https://api.github.com/users/ojii/orgs","repos_url":"https://api.github.com/users/ojii/repos","events_url":"https://api.github.com/users/ojii/events{/privacy}","received_events_url":"https://api.github.com/users/ojii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ojii/rubicon-objc","description":"A bridge interface between Python and Objective-C.","fork":true,"url":"https://api.github.com/repos/ojii/rubicon-objc","forks_url":"https://api.github.com/repos/ojii/rubicon-objc/forks","keys_url":"https://api.github.com/repos/ojii/rubicon-objc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ojii/rubicon-objc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ojii/rubicon-objc/teams","hooks_url":"https://api.github.com/repos/ojii/rubicon-objc/hooks","issue_events_url":"https://api.github.com/repos/ojii/rubicon-objc/issues/events{/number}","events_url":"https://api.github.com/repos/ojii/rubicon-objc/events","assignees_url":"https://api.github.com/repos/ojii/rubicon-objc/assignees{/user}","branches_url":"https://api.github.com/repos/ojii/rubicon-objc/branches{/branch}","tags_url":"https://api.github.com/repos/ojii/rubicon-objc/tags","blobs_url":"https://api.github.com/repos/ojii/rubicon-objc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ojii/rubicon-objc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ojii/rubicon-objc/git/refs{/sha}","trees_url":"https://api.github.com/repos/ojii/rubicon-objc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ojii/rubicon-objc/statuses/{sha}","languages_url":"https://api.github.com/repos/ojii/rubicon-objc/languages","stargazers_url":"https://api.github.com/repos/ojii/rubicon-objc/stargazers","contributors_url":"https://api.github.com/repos/ojii/rubicon-objc/contributors","subscribers_url":"https://api.github.com/repos/ojii/rubicon-objc/subscribers","subscription_url":"https://api.github.com/repos/ojii/rubicon-objc/subscription","commits_url":"https://api.github.com/repos/ojii/rubicon-objc/commits{/sha}","git_commits_url":"https://api.github.com/repos/ojii/rubicon-objc/git/commits{/sha}","comments_url":"https://api.github.com/repos/ojii/rubicon-objc/comments{/number}","issue_comment_url":"https://api.github.com/repos/ojii/rubicon-objc/issues/comments{/number}","contents_url":"https://api.github.com/repos/ojii/rubicon-objc/contents/{+path}","compare_url":"https://api.github.com/repos/ojii/rubicon-objc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ojii/rubicon-objc/merges","archive_url":"https://api.github.com/repos/ojii/rubicon-objc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ojii/rubicon-objc/downloads","issues_url":"https://api.github.com/repos/ojii/rubicon-objc/issues{/number}","pulls_url":"https://api.github.com/repos/ojii/rubicon-objc/pulls{/number}","milestones_url":"https://api.github.com/repos/ojii/rubicon-objc/milestones{/number}","notifications_url":"https://api.github.com/repos/ojii/rubicon-objc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ojii/rubicon-objc/labels{/name}","releases_url":"https://api.github.com/repos/ojii/rubicon-objc/releases{/id}","deployments_url":"https://api.github.com/repos/ojii/rubicon-objc/deployments","created_at":"2017-07-24T03:28:26Z","updated_at":"2017-08-20T14:49:32Z","pushed_at":"2017-08-21T10:58:45Z","git_url":"git://github.com/ojii/rubicon-objc.git","ssh_url":"git@github.com:ojii/rubicon-objc.git","clone_url":"https://github.com/ojii/rubicon-objc.git","svn_url":"https://github.com/ojii/rubicon-objc","homepage":null,"size":332,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"pybee:master","ref":"master","sha":"c6e517c8f978d633c5623b6dc16d53ef2f22a1c8","user":{"login":"pybee","id":5001767,"avatar_url":"https://avatars0.githubusercontent.com/u/5001767?v=4","gravatar_id":"","url":"https://api.github.com/users/pybee","html_url":"https://github.com/pybee","followers_url":"https://api.github.com/users/pybee/followers","following_url":"https://api.github.com/users/pybee/following{/other_user}","gists_url":"https://api.github.com/users/pybee/gists{/gist_id}","starred_url":"https://api.github.com/users/pybee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pybee/subscriptions","organizations_url":"https://api.github.com/users/pybee/orgs","repos_url":"https://api.github.com/users/pybee/repos","events_url":"https://api.github.com/users/pybee/events{/privacy}","received_events_url":"https://api.github.com/users/pybee/received_events","type":"Organization","site_admin":false},"repo":{"id":25337306,"name":"rubicon-objc","full_name":"pybee/rubicon-objc","owner":{"login":"pybee","id":5001767,"avatar_url":"https://avatars0.githubusercontent.com/u/5001767?v=4","gravatar_id":"","url":"https://api.github.com/users/pybee","html_url":"https://github.com/pybee","followers_url":"https://api.github.com/users/pybee/followers","following_url":"https://api.github.com/users/pybee/following{/other_user}","gists_url":"https://api.github.com/users/pybee/gists{/gist_id}","starred_url":"https://api.github.com/users/pybee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pybee/subscriptions","organizations_url":"https://api.github.com/users/pybee/orgs","repos_url":"https://api.github.com/users/pybee/repos","events_url":"https://api.github.com/users/pybee/events{/privacy}","received_events_url":"https://api.github.com/users/pybee/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pybee/rubicon-objc","description":"A bridge interface between Python and Objective-C.","fork":false,"url":"https://api.github.com/repos/pybee/rubicon-objc","forks_url":"https://api.github.com/repos/pybee/rubicon-objc/forks","keys_url":"https://api.github.com/repos/pybee/rubicon-objc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pybee/rubicon-objc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pybee/rubicon-objc/teams","hooks_url":"https://api.github.com/repos/pybee/rubicon-objc/hooks","issue_events_url":"https://api.github.com/repos/pybee/rubicon-objc/issues/events{/number}","events_url":"https://api.github.com/repos/pybee/rubicon-objc/events","assignees_url":"https://api.github.com/repos/pybee/rubicon-objc/assignees{/user}","branches_url":"https://api.github.com/repos/pybee/rubicon-objc/branches{/branch}","tags_url":"https://api.github.com/repos/pybee/rubicon-objc/tags","blobs_url":"https://api.github.com/repos/pybee/rubicon-objc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pybee/rubicon-objc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pybee/rubicon-objc/git/refs{/sha}","trees_url":"https://api.github.com/repos/pybee/rubicon-objc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pybee/rubicon-objc/statuses/{sha}","languages_url":"https://api.github.com/repos/pybee/rubicon-objc/languages","stargazers_url":"https://api.github.com/repos/pybee/rubicon-objc/stargazers","contributors_url":"https://api.github.com/repos/pybee/rubicon-objc/contributors","subscribers_url":"https://api.github.com/repos/pybee/rubicon-objc/subscribers","subscription_url":"https://api.github.com/repos/pybee/rubicon-objc/subscription","commits_url":"https://api.github.com/repos/pybee/rubicon-objc/commits{/sha}","git_commits_url":"https://api.github.com/repos/pybee/rubicon-objc/git/commits{/sha}","comments_url":"https://api.github.com/repos/pybee/rubicon-objc/comments{/number}","issue_comment_url":"https://api.github.com/repos/pybee/rubicon-objc/issues/comments{/number}","contents_url":"https://api.github.com/repos/pybee/rubicon-objc/contents/{+path}","compare_url":"https://api.github.com/repos/pybee/rubicon-objc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pybee/rubicon-objc/merges","archive_url":"https://api.github.com/repos/pybee/rubicon-objc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pybee/rubicon-objc/downloads","issues_url":"https://api.github.com/repos/pybee/rubicon-objc/issues{/number}","pulls_url":"https://api.github.com/repos/pybee/rubicon-objc/pulls{/number}","milestones_url":"https://api.github.com/repos/pybee/rubicon-objc/milestones{/number}","notifications_url":"https://api.github.com/repos/pybee/rubicon-objc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pybee/rubicon-objc/labels{/name}","releases_url":"https://api.github.com/repos/pybee/rubicon-objc/releases{/id}","deployments_url":"https://api.github.com/repos/pybee/rubicon-objc/deployments","created_at":"2014-10-17T03:59:01Z","updated_at":"2017-08-14T13:34:35Z","pushed_at":"2017-08-21T11:00:44Z","git_url":"git://github.com/pybee/rubicon-objc.git","ssh_url":"git@github.com:pybee/rubicon-objc.git","clone_url":"https://github.com/pybee/rubicon-objc.git","svn_url":"https://github.com/pybee/rubicon-objc","homepage":null,"size":283,"stargazers_count":87,"watchers_count":87,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":8,"forks":19,"open_issues":8,"watchers":87,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54"},"html":{"href":"https://github.com/pybee/rubicon-objc/pull/54"},"issue":{"href":"https://api.github.com/repos/pybee/rubicon-objc/issues/54"},"comments":{"href":"https://api.github.com/repos/pybee/rubicon-objc/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/pybee/rubicon-objc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pybee/rubicon-objc/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/pybee/rubicon-objc/statuses/0632baa1eb09d45ee24389790115303aecfa382b"}}}}
{"actor":{"display_login":"dgelessus"}}