{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/76512505","id":76512505,"diff_hunk":"@@ -407,6 +407,10 @@ endif()\n \n find_program(LUACHECK_PRG luacheck)\n \n+if(NOT GPERF_PRG)","path":"CMakeLists.txt","position":4,"original_position":4,"commit_id":"f27a37ed585852a49804f90db6f956bde4123e42","original_commit_id":"f27a37ed585852a49804f90db6f956bde4123e42","user":{"login":"fwalch","id":339435,"avatar_url":"https://avatars.githubusercontent.com/u/339435?v=3","gravatar_id":"","url":"https://api.github.com/users/fwalch","html_url":"https://github.com/fwalch","followers_url":"https://api.github.com/users/fwalch/followers","following_url":"https://api.github.com/users/fwalch/following{/other_user}","gists_url":"https://api.github.com/users/fwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/fwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwalch/subscriptions","organizations_url":"https://api.github.com/users/fwalch/orgs","repos_url":"https://api.github.com/users/fwalch/repos","events_url":"https://api.github.com/users/fwalch/events{/privacy}","received_events_url":"https://api.github.com/users/fwalch/received_events","type":"User","site_admin":false},"body":"Can be just:\r\n\r\n```\r\nfind_program(GPERF_PRG gperf)\r\n```\r\n\r\nIf the variable is already set,  it won't be overwritten by find_program.","created_at":"2016-08-27T08:10:00Z","updated_at":"2016-08-27T08:10:00Z","html_url":"https://github.com/neovim/neovim/pull/4934#discussion_r76512505","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/4934","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/76512505"},"html":{"href":"https://github.com/neovim/neovim/pull/4934#discussion_r76512505"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/4934"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/4934","id":74302294,"html_url":"https://github.com/neovim/neovim/pull/4934","diff_url":"https://github.com/neovim/neovim/pull/4934.diff","patch_url":"https://github.com/neovim/neovim/pull/4934.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/4934","number":4934,"state":"open","locked":false,"title":"[RFC] making the API callable from vimscript","user":{"login":"bfredl","id":1363104,"avatar_url":"https://avatars.githubusercontent.com/u/1363104?v=3","gravatar_id":"","url":"https://api.github.com/users/bfredl","html_url":"https://github.com/bfredl","followers_url":"https://api.github.com/users/bfredl/followers","following_url":"https://api.github.com/users/bfredl/following{/other_user}","gists_url":"https://api.github.com/users/bfredl/gists{/gist_id}","starred_url":"https://api.github.com/users/bfredl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfredl/subscriptions","organizations_url":"https://api.github.com/users/bfredl/orgs","repos_url":"https://api.github.com/users/bfredl/repos","events_url":"https://api.github.com/users/bfredl/events{/privacy}","received_events_url":"https://api.github.com/users/bfredl/received_events","type":"User","site_admin":false},"body":"ref #4091\r\n\r\nInstead of generating a `f_` wrapper per function, this implements a single `api_wrapper` function in analogy with `float_op_wrapper`. Extend the `functions` table to allow an extra argument to an implementation, this allows several builtin function to share a single implementation (as demonstrated this can be used in many cases for `float_op_wrapper` as well).\r\n\r\nThis reuses the handlers implemented for msgpack dispatch. This saves us from generating more code, but means the type checking will be more or less the same. A reason for generating separate `f_vim_...` wrappers could be to behave more like other builtins with automatic conversion to an int if an int is expected and such (so \"somestring\" becomes 0 without any error or warning). Though IMO this is not a problem as the names of these functions clearly stand out and hey proper typechecking is nice.\r\n\r\nStill the functions need to be inserted in to the table of builtins. We could use #3922 for this to autogenerate this and sort it into the table by  lua code. \r\n\r\nArguably buffer nrs should be identified with buffer \"handles\", otherwise would be a disaster. (It seems reasonable a nvim session would only have `<2^31` buffer creation events but I could be wrong...) I would also suggest 0 being a special value always meaning curbuf/curwin etc so one don't need to do `buffer_...(bufnr(''), ...)` for a one-off api call.\r\n\r\n\r\n","created_at":"2016-06-17T20:41:12Z","updated_at":"2016-08-27T08:10:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1d54479c7e3c34c01c87806b31f957c2af23ea0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/4934/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/4934/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/4934/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/f27a37ed585852a49804f90db6f956bde4123e42","head":{"label":"bfredl:api","ref":"api","sha":"f27a37ed585852a49804f90db6f956bde4123e42","user":{"login":"bfredl","id":1363104,"avatar_url":"https://avatars.githubusercontent.com/u/1363104?v=3","gravatar_id":"","url":"https://api.github.com/users/bfredl","html_url":"https://github.com/bfredl","followers_url":"https://api.github.com/users/bfredl/followers","following_url":"https://api.github.com/users/bfredl/following{/other_user}","gists_url":"https://api.github.com/users/bfredl/gists{/gist_id}","starred_url":"https://api.github.com/users/bfredl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfredl/subscriptions","organizations_url":"https://api.github.com/users/bfredl/orgs","repos_url":"https://api.github.com/users/bfredl/repos","events_url":"https://api.github.com/users/bfredl/events{/privacy}","received_events_url":"https://api.github.com/users/bfredl/received_events","type":"User","site_admin":false},"repo":{"id":21050434,"name":"neovim","full_name":"bfredl/neovim","owner":{"login":"bfredl","id":1363104,"avatar_url":"https://avatars.githubusercontent.com/u/1363104?v=3","gravatar_id":"","url":"https://api.github.com/users/bfredl","html_url":"https://github.com/bfredl","followers_url":"https://api.github.com/users/bfredl/followers","following_url":"https://api.github.com/users/bfredl/following{/other_user}","gists_url":"https://api.github.com/users/bfredl/gists{/gist_id}","starred_url":"https://api.github.com/users/bfredl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfredl/subscriptions","organizations_url":"https://api.github.com/users/bfredl/orgs","repos_url":"https://api.github.com/users/bfredl/repos","events_url":"https://api.github.com/users/bfredl/events{/privacy}","received_events_url":"https://api.github.com/users/bfredl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bfredl/neovim","description":"vim's rebirth for the 21st century","fork":true,"url":"https://api.github.com/repos/bfredl/neovim","forks_url":"https://api.github.com/repos/bfredl/neovim/forks","keys_url":"https://api.github.com/repos/bfredl/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bfredl/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bfredl/neovim/teams","hooks_url":"https://api.github.com/repos/bfredl/neovim/hooks","issue_events_url":"https://api.github.com/repos/bfredl/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/bfredl/neovim/events","assignees_url":"https://api.github.com/repos/bfredl/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/bfredl/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/bfredl/neovim/tags","blobs_url":"https://api.github.com/repos/bfredl/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bfredl/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bfredl/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/bfredl/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bfredl/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/bfredl/neovim/languages","stargazers_url":"https://api.github.com/repos/bfredl/neovim/stargazers","contributors_url":"https://api.github.com/repos/bfredl/neovim/contributors","subscribers_url":"https://api.github.com/repos/bfredl/neovim/subscribers","subscription_url":"https://api.github.com/repos/bfredl/neovim/subscription","commits_url":"https://api.github.com/repos/bfredl/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/bfredl/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/bfredl/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/bfredl/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/bfredl/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/bfredl/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bfredl/neovim/merges","archive_url":"https://api.github.com/repos/bfredl/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bfredl/neovim/downloads","issues_url":"https://api.github.com/repos/bfredl/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/bfredl/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/bfredl/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/bfredl/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bfredl/neovim/labels{/name}","releases_url":"https://api.github.com/repos/bfredl/neovim/releases{/id}","deployments_url":"https://api.github.com/repos/bfredl/neovim/deployments","created_at":"2014-06-20T19:51:31Z","updated_at":"2014-06-20T19:51:31Z","pushed_at":"2016-08-26T09:06:40Z","git_url":"git://github.com/bfredl/neovim.git","ssh_url":"git@github.com:bfredl/neovim.git","clone_url":"https://github.com/bfredl/neovim.git","svn_url":"https://github.com/bfredl/neovim","homepage":"http://neovim.org/","size":42012,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"neovim:master","ref":"master","sha":"97c6d80ca7364d571ade073a7fb498b180b54dd3","user":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"repo":{"id":16408992,"name":"neovim","full_name":"neovim/neovim","owner":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neovim/neovim","description":"Vim-fork focused on extensibility and agility.","fork":false,"url":"https://api.github.com/repos/neovim/neovim","forks_url":"https://api.github.com/repos/neovim/neovim/forks","keys_url":"https://api.github.com/repos/neovim/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neovim/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neovim/neovim/teams","hooks_url":"https://api.github.com/repos/neovim/neovim/hooks","issue_events_url":"https://api.github.com/repos/neovim/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/neovim/neovim/events","assignees_url":"https://api.github.com/repos/neovim/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/neovim/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/neovim/neovim/tags","blobs_url":"https://api.github.com/repos/neovim/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neovim/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neovim/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/neovim/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/neovim/neovim/languages","stargazers_url":"https://api.github.com/repos/neovim/neovim/stargazers","contributors_url":"https://api.github.com/repos/neovim/neovim/contributors","subscribers_url":"https://api.github.com/repos/neovim/neovim/subscribers","subscription_url":"https://api.github.com/repos/neovim/neovim/subscription","commits_url":"https://api.github.com/repos/neovim/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/neovim/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/neovim/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/neovim/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/neovim/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/neovim/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neovim/neovim/merges","archive_url":"https://api.github.com/repos/neovim/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neovim/neovim/downloads","issues_url":"https://api.github.com/repos/neovim/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/neovim/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/neovim/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/neovim/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neovim/neovim/labels{/name}","releases_url":"https://api.github.com/repos/neovim/neovim/releases{/id}","deployments_url":"https://api.github.com/repos/neovim/neovim/deployments","created_at":"2014-01-31T13:39:22Z","updated_at":"2016-08-27T04:31:08Z","pushed_at":"2016-08-27T02:52:53Z","git_url":"git://github.com/neovim/neovim.git","ssh_url":"git@github.com:neovim/neovim.git","clone_url":"https://github.com/neovim/neovim.git","svn_url":"https://github.com/neovim/neovim","homepage":"https://salt.bountysource.com/teams/neovim","size":70068,"stargazers_count":19748,"watchers_count":19748,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1397,"mirror_url":null,"open_issues_count":754,"forks":1397,"open_issues":754,"watchers":19748,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/4934"},"html":{"href":"https://github.com/neovim/neovim/pull/4934"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/4934"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/4934/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/4934/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/4934/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/f27a37ed585852a49804f90db6f956bde4123e42"}}}}
{"actor":{"display_login":"fwalch"}}