{"action":"created","comment":{"url":"https://api.github.com/repos/deltachat/deltachat-core/pulls/comments/159140635","pull_request_review_id":86047598,"id":159140635,"diff_hunk":"@@ -42,12 +42,16 @@ typedef struct mrarray_t    mrarray_t;\n  */\n typedef struct mrchatlist_t\n {\n+#ifndef PY_CFFI","path":"src/mrchatlist.h","position":4,"original_position":4,"commit_id":"15f3ec293046f585f856d080ddd71ba8e1aa9ad8","original_commit_id":"15f3ec293046f585f856d080ddd71ba8e1aa9ad8","user":{"login":"r10s","id":9800740,"avatar_url":"https://avatars2.githubusercontent.com/u/9800740?v=4","gravatar_id":"","url":"https://api.github.com/users/r10s","html_url":"https://github.com/r10s","followers_url":"https://api.github.com/users/r10s/followers","following_url":"https://api.github.com/users/r10s/following{/other_user}","gists_url":"https://api.github.com/users/r10s/gists{/gist_id}","starred_url":"https://api.github.com/users/r10s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r10s/subscriptions","organizations_url":"https://api.github.com/users/r10s/orgs","repos_url":"https://api.github.com/users/r10s/repos","events_url":"https://api.github.com/users/r10s/events{/privacy}","received_events_url":"https://api.github.com/users/r10s/received_events","type":"User","site_admin":false},"body":"maybe we can git rid of these #ifdef's see my other comment.","created_at":"2017-12-31T13:49:54Z","updated_at":"2017-12-31T13:52:14Z","html_url":"https://github.com/deltachat/deltachat-core/pull/83#discussion_r159140635","pull_request_url":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/deltachat/deltachat-core/pulls/comments/159140635"},"html":{"href":"https://github.com/deltachat/deltachat-core/pull/83#discussion_r159140635"},"pull_request":{"href":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83","id":160587804,"html_url":"https://github.com/deltachat/deltachat-core/pull/83","diff_url":"https://github.com/deltachat/deltachat-core/pull/83.diff","patch_url":"https://github.com/deltachat/deltachat-core/pull/83.patch","issue_url":"https://api.github.com/repos/deltachat/deltachat-core/issues/83","number":83,"state":"open","locked":false,"title":"WIP: First stop towards python bindings","user":{"login":"flub","id":146720,"avatar_url":"https://avatars3.githubusercontent.com/u/146720?v=4","gravatar_id":"","url":"https://api.github.com/users/flub","html_url":"https://github.com/flub","followers_url":"https://api.github.com/users/flub/followers","following_url":"https://api.github.com/users/flub/following{/other_user}","gists_url":"https://api.github.com/users/flub/gists{/gist_id}","starred_url":"https://api.github.com/users/flub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flub/subscriptions","organizations_url":"https://api.github.com/users/flub/orgs","repos_url":"https://api.github.com/users/flub/repos","events_url":"https://api.github.com/users/flub/events{/privacy}","received_events_url":"https://api.github.com/users/flub/received_events","type":"User","site_admin":false},"body":"DO NOT MERGE\r\n\r\nThis is a very rough first stab at compiling CFFI Python bindings for deltachat-core.  It compiles and generates some bindings, but that's about it.\r\n\r\n1. I've done this as a PR in this repo instead of a new one.  It makes header modifications easier and means I don't have to worry about copyrights.  It may even make sense to leave the raw bindings here but it can always be moved out later.\r\n\r\n2. This runs the header files through the preprocessor (`gcc -E`) using the `PY_CFFI` symbol to end up with something which is parsable by cffi.  I think this will stay but the implementation cleaned up somewhat and the number of ifdefs reduced.\r\n\r\n3. I've effectively made the structs opaque/private for cffi.  I did this as otherwise I had to worry about defining opaque structs for pthread_t and related friends.  Since you consider them private anyway maybe it's better to do that right away and properly instead of my cffi-specific hack here (I guess with `typedef _mrmailbox mrmailbox_t;` + mrmailbox-private.h etc?)\r\n\r\n4. I've chopped up the included headers with ifdef.  That's just temporarily, once we have opaque structs and all public.h files are parsable by cffi only the external includes need to be ifdef'ed out.\r\n\r\n5. I have no idea what `clist` is supposed to be and where it comes from.  I've defined it as an opaque struct and it seems to work.  I'd know better what to do with it if I knew more about it.\r\n\r\n6. Mostly as an aside, some header files seem to have incomplete includes, e.g. `mrmsg.h` uses `time_t` but doesn't include `time.h`.","created_at":"2017-12-30T12:17:37Z","updated_at":"2017-12-31T13:52:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"362f14b962ded02d0c06888213190b3e5c9b47a6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83/commits","review_comments_url":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83/comments","review_comment_url":"https://api.github.com/repos/deltachat/deltachat-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deltachat/deltachat-core/issues/83/comments","statuses_url":"https://api.github.com/repos/deltachat/deltachat-core/statuses/15f3ec293046f585f856d080ddd71ba8e1aa9ad8","head":{"label":"flub:cffi","ref":"cffi","sha":"15f3ec293046f585f856d080ddd71ba8e1aa9ad8","user":{"login":"flub","id":146720,"avatar_url":"https://avatars3.githubusercontent.com/u/146720?v=4","gravatar_id":"","url":"https://api.github.com/users/flub","html_url":"https://github.com/flub","followers_url":"https://api.github.com/users/flub/followers","following_url":"https://api.github.com/users/flub/following{/other_user}","gists_url":"https://api.github.com/users/flub/gists{/gist_id}","starred_url":"https://api.github.com/users/flub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flub/subscriptions","organizations_url":"https://api.github.com/users/flub/orgs","repos_url":"https://api.github.com/users/flub/repos","events_url":"https://api.github.com/users/flub/events{/privacy}","received_events_url":"https://api.github.com/users/flub/received_events","type":"User","site_admin":false},"repo":{"id":115721313,"name":"deltachat-core","full_name":"flub/deltachat-core","owner":{"login":"flub","id":146720,"avatar_url":"https://avatars3.githubusercontent.com/u/146720?v=4","gravatar_id":"","url":"https://api.github.com/users/flub","html_url":"https://github.com/flub","followers_url":"https://api.github.com/users/flub/followers","following_url":"https://api.github.com/users/flub/following{/other_user}","gists_url":"https://api.github.com/users/flub/gists{/gist_id}","starred_url":"https://api.github.com/users/flub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flub/subscriptions","organizations_url":"https://api.github.com/users/flub/orgs","repos_url":"https://api.github.com/users/flub/repos","events_url":"https://api.github.com/users/flub/events{/privacy}","received_events_url":"https://api.github.com/users/flub/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flub/deltachat-core","description":"Create your own, email-compatible messenger.","fork":true,"url":"https://api.github.com/repos/flub/deltachat-core","forks_url":"https://api.github.com/repos/flub/deltachat-core/forks","keys_url":"https://api.github.com/repos/flub/deltachat-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flub/deltachat-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flub/deltachat-core/teams","hooks_url":"https://api.github.com/repos/flub/deltachat-core/hooks","issue_events_url":"https://api.github.com/repos/flub/deltachat-core/issues/events{/number}","events_url":"https://api.github.com/repos/flub/deltachat-core/events","assignees_url":"https://api.github.com/repos/flub/deltachat-core/assignees{/user}","branches_url":"https://api.github.com/repos/flub/deltachat-core/branches{/branch}","tags_url":"https://api.github.com/repos/flub/deltachat-core/tags","blobs_url":"https://api.github.com/repos/flub/deltachat-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flub/deltachat-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flub/deltachat-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/flub/deltachat-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flub/deltachat-core/statuses/{sha}","languages_url":"https://api.github.com/repos/flub/deltachat-core/languages","stargazers_url":"https://api.github.com/repos/flub/deltachat-core/stargazers","contributors_url":"https://api.github.com/repos/flub/deltachat-core/contributors","subscribers_url":"https://api.github.com/repos/flub/deltachat-core/subscribers","subscription_url":"https://api.github.com/repos/flub/deltachat-core/subscription","commits_url":"https://api.github.com/repos/flub/deltachat-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/flub/deltachat-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/flub/deltachat-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/flub/deltachat-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/flub/deltachat-core/contents/{+path}","compare_url":"https://api.github.com/repos/flub/deltachat-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flub/deltachat-core/merges","archive_url":"https://api.github.com/repos/flub/deltachat-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flub/deltachat-core/downloads","issues_url":"https://api.github.com/repos/flub/deltachat-core/issues{/number}","pulls_url":"https://api.github.com/repos/flub/deltachat-core/pulls{/number}","milestones_url":"https://api.github.com/repos/flub/deltachat-core/milestones{/number}","notifications_url":"https://api.github.com/repos/flub/deltachat-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flub/deltachat-core/labels{/name}","releases_url":"https://api.github.com/repos/flub/deltachat-core/releases{/id}","deployments_url":"https://api.github.com/repos/flub/deltachat-core/deployments","created_at":"2017-12-29T12:37:41Z","updated_at":"2017-12-29T12:37:44Z","pushed_at":"2017-12-30T11:56:04Z","git_url":"git://github.com/flub/deltachat-core.git","ssh_url":"git@github.com:flub/deltachat-core.git","clone_url":"https://github.com/flub/deltachat-core.git","svn_url":"https://github.com/flub/deltachat-core","homepage":"","size":6928,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"deltachat:master","ref":"master","sha":"1849bd886258d0aaed3eae483820e1aa580ac8f6","user":{"login":"deltachat","id":29453316,"avatar_url":"https://avatars0.githubusercontent.com/u/29453316?v=4","gravatar_id":"","url":"https://api.github.com/users/deltachat","html_url":"https://github.com/deltachat","followers_url":"https://api.github.com/users/deltachat/followers","following_url":"https://api.github.com/users/deltachat/following{/other_user}","gists_url":"https://api.github.com/users/deltachat/gists{/gist_id}","starred_url":"https://api.github.com/users/deltachat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deltachat/subscriptions","organizations_url":"https://api.github.com/users/deltachat/orgs","repos_url":"https://api.github.com/users/deltachat/repos","events_url":"https://api.github.com/users/deltachat/events{/privacy}","received_events_url":"https://api.github.com/users/deltachat/received_events","type":"Organization","site_admin":false},"repo":{"id":63239710,"name":"deltachat-core","full_name":"deltachat/deltachat-core","owner":{"login":"deltachat","id":29453316,"avatar_url":"https://avatars0.githubusercontent.com/u/29453316?v=4","gravatar_id":"","url":"https://api.github.com/users/deltachat","html_url":"https://github.com/deltachat","followers_url":"https://api.github.com/users/deltachat/followers","following_url":"https://api.github.com/users/deltachat/following{/other_user}","gists_url":"https://api.github.com/users/deltachat/gists{/gist_id}","starred_url":"https://api.github.com/users/deltachat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deltachat/subscriptions","organizations_url":"https://api.github.com/users/deltachat/orgs","repos_url":"https://api.github.com/users/deltachat/repos","events_url":"https://api.github.com/users/deltachat/events{/privacy}","received_events_url":"https://api.github.com/users/deltachat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deltachat/deltachat-core","description":"Create your own, email-compatible messenger.","fork":false,"url":"https://api.github.com/repos/deltachat/deltachat-core","forks_url":"https://api.github.com/repos/deltachat/deltachat-core/forks","keys_url":"https://api.github.com/repos/deltachat/deltachat-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deltachat/deltachat-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deltachat/deltachat-core/teams","hooks_url":"https://api.github.com/repos/deltachat/deltachat-core/hooks","issue_events_url":"https://api.github.com/repos/deltachat/deltachat-core/issues/events{/number}","events_url":"https://api.github.com/repos/deltachat/deltachat-core/events","assignees_url":"https://api.github.com/repos/deltachat/deltachat-core/assignees{/user}","branches_url":"https://api.github.com/repos/deltachat/deltachat-core/branches{/branch}","tags_url":"https://api.github.com/repos/deltachat/deltachat-core/tags","blobs_url":"https://api.github.com/repos/deltachat/deltachat-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deltachat/deltachat-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deltachat/deltachat-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/deltachat/deltachat-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deltachat/deltachat-core/statuses/{sha}","languages_url":"https://api.github.com/repos/deltachat/deltachat-core/languages","stargazers_url":"https://api.github.com/repos/deltachat/deltachat-core/stargazers","contributors_url":"https://api.github.com/repos/deltachat/deltachat-core/contributors","subscribers_url":"https://api.github.com/repos/deltachat/deltachat-core/subscribers","subscription_url":"https://api.github.com/repos/deltachat/deltachat-core/subscription","commits_url":"https://api.github.com/repos/deltachat/deltachat-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/deltachat/deltachat-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/deltachat/deltachat-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/deltachat/deltachat-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/deltachat/deltachat-core/contents/{+path}","compare_url":"https://api.github.com/repos/deltachat/deltachat-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deltachat/deltachat-core/merges","archive_url":"https://api.github.com/repos/deltachat/deltachat-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deltachat/deltachat-core/downloads","issues_url":"https://api.github.com/repos/deltachat/deltachat-core/issues{/number}","pulls_url":"https://api.github.com/repos/deltachat/deltachat-core/pulls{/number}","milestones_url":"https://api.github.com/repos/deltachat/deltachat-core/milestones{/number}","notifications_url":"https://api.github.com/repos/deltachat/deltachat-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deltachat/deltachat-core/labels{/name}","releases_url":"https://api.github.com/repos/deltachat/deltachat-core/releases{/id}","deployments_url":"https://api.github.com/repos/deltachat/deltachat-core/deployments","created_at":"2016-07-13T11:14:52Z","updated_at":"2017-12-27T17:43:31Z","pushed_at":"2017-12-31T13:24:12Z","git_url":"git://github.com/deltachat/deltachat-core.git","ssh_url":"git@github.com:deltachat/deltachat-core.git","clone_url":"https://github.com/deltachat/deltachat-core.git","svn_url":"https://github.com/deltachat/deltachat-core","homepage":"","size":6871,"stargazers_count":80,"watchers_count":80,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":7,"open_issues":29,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83"},"html":{"href":"https://github.com/deltachat/deltachat-core/pull/83"},"issue":{"href":"https://api.github.com/repos/deltachat/deltachat-core/issues/83"},"comments":{"href":"https://api.github.com/repos/deltachat/deltachat-core/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/deltachat/deltachat-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deltachat/deltachat-core/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/deltachat/deltachat-core/statuses/15f3ec293046f585f856d080ddd71ba8e1aa9ad8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"r10s"}}