{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/34243280","id":34243280,"diff_hunk":"@@ -164,6 +164,56 @@ Object vim_eval(String str, Error *err)\n   return rv;\n }\n \n+/// Call the given function with the given arguments stored in an array.\n+///\n+/// @param functionName The function to call\n+/// @param args the functions arguments packed in an Array\n+/// @param[out] err Details of an error that may have occurred\n+/// @return The result of the function call if it was successful\n+Object vim_call_function(String functionName, Array args, Error *err)\n+  FUNC_ATTR_DEFERRED\n+{\n+  Object retv = OBJECT_INIT;\n+  if (args.size > MAX_FUNC_ARGS) {\n+    api_set_error(err, Exception,\n+      _(\"Function called with too many arguments.\"));\n+    return retv;\n+  }\n+\n+  try_start();\n+  // Convert the arguments in args from Object to typval_T values\n+  typval_T vim_args[MAX_FUNC_ARGS + 1];\n+  size_t i = 0;  // also used for freeing the variables\n+  for (; i < args.size; i++) {\n+    if (!object_to_vim(args.items[i], &vim_args[i], err)) {\n+      api_set_error(err, Exception,","path":"src/nvim/api/vim.c","position":26,"original_position":26,"commit_id":"132dae9f1cd14bfc6aa7fc4d99cf9d190097656c","original_commit_id":"132dae9f1cd14bfc6aa7fc4d99cf9d190097656c","user":{"login":"saep","id":1560366,"avatar_url":"https://avatars.githubusercontent.com/u/1560366?v=3","gravatar_id":"","url":"https://api.github.com/users/saep","html_url":"https://github.com/saep","followers_url":"https://api.github.com/users/saep/followers","following_url":"https://api.github.com/users/saep/following{/other_user}","gists_url":"https://api.github.com/users/saep/gists{/gist_id}","starred_url":"https://api.github.com/users/saep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saep/subscriptions","organizations_url":"https://api.github.com/users/saep/orgs","repos_url":"https://api.github.com/users/saep/repos","events_url":"https://api.github.com/users/saep/events{/privacy}","received_events_url":"https://api.github.com/users/saep/received_events","type":"User","site_admin":false},"body":"Good point!","created_at":"2015-07-09T10:46:18Z","updated_at":"2015-07-09T10:46:18Z","html_url":"https://github.com/neovim/neovim/pull/2979#discussion_r34243280","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/2979","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/34243280"},"html":{"href":"https://github.com/neovim/neovim/pull/2979#discussion_r34243280"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2979"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/2979","id":39395326,"html_url":"https://github.com/neovim/neovim/pull/2979","diff_url":"https://github.com/neovim/neovim/pull/2979.diff","patch_url":"https://github.com/neovim/neovim/pull/2979.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/2979","number":2979,"state":"open","locked":false,"title":"[WIP] Add `vim_function` to remote API","user":{"login":"saep","id":1560366,"avatar_url":"https://avatars.githubusercontent.com/u/1560366?v=3","gravatar_id":"","url":"https://api.github.com/users/saep","html_url":"https://github.com/saep","followers_url":"https://api.github.com/users/saep/followers","following_url":"https://api.github.com/users/saep/following{/other_user}","gists_url":"https://api.github.com/users/saep/gists{/gist_id}","starred_url":"https://api.github.com/users/saep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saep/subscriptions","organizations_url":"https://api.github.com/users/saep/orgs","repos_url":"https://api.github.com/users/saep/repos","events_url":"https://api.github.com/users/saep/events{/privacy}","received_events_url":"https://api.github.com/users/saep/received_events","type":"User","site_admin":false},"body":"This pull request tries to solve #2972.\r\n\r\nThe call to [func_call](https://github.com/neovim/neovim/blob/master/src/nvim/eval.c#L7561) segfaults, though.","created_at":"2015-07-07T17:27:13Z","updated_at":"2015-07-09T10:46:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cdc47b35a6d852dfa71f1da286094654b53f519","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/2979/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/2979/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/2979/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/132dae9f1cd14bfc6aa7fc4d99cf9d190097656c","head":{"label":"saep:vim_function","ref":"vim_function","sha":"132dae9f1cd14bfc6aa7fc4d99cf9d190097656c","user":{"login":"saep","id":1560366,"avatar_url":"https://avatars.githubusercontent.com/u/1560366?v=3","gravatar_id":"","url":"https://api.github.com/users/saep","html_url":"https://github.com/saep","followers_url":"https://api.github.com/users/saep/followers","following_url":"https://api.github.com/users/saep/following{/other_user}","gists_url":"https://api.github.com/users/saep/gists{/gist_id}","starred_url":"https://api.github.com/users/saep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saep/subscriptions","organizations_url":"https://api.github.com/users/saep/orgs","repos_url":"https://api.github.com/users/saep/repos","events_url":"https://api.github.com/users/saep/events{/privacy}","received_events_url":"https://api.github.com/users/saep/received_events","type":"User","site_admin":false},"repo":{"id":30175065,"name":"neovim","full_name":"saep/neovim","owner":{"login":"saep","id":1560366,"avatar_url":"https://avatars.githubusercontent.com/u/1560366?v=3","gravatar_id":"","url":"https://api.github.com/users/saep","html_url":"https://github.com/saep","followers_url":"https://api.github.com/users/saep/followers","following_url":"https://api.github.com/users/saep/following{/other_user}","gists_url":"https://api.github.com/users/saep/gists{/gist_id}","starred_url":"https://api.github.com/users/saep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saep/subscriptions","organizations_url":"https://api.github.com/users/saep/orgs","repos_url":"https://api.github.com/users/saep/repos","events_url":"https://api.github.com/users/saep/events{/privacy}","received_events_url":"https://api.github.com/users/saep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saep/neovim","description":"vim out of the box","fork":true,"url":"https://api.github.com/repos/saep/neovim","forks_url":"https://api.github.com/repos/saep/neovim/forks","keys_url":"https://api.github.com/repos/saep/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saep/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saep/neovim/teams","hooks_url":"https://api.github.com/repos/saep/neovim/hooks","issue_events_url":"https://api.github.com/repos/saep/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/saep/neovim/events","assignees_url":"https://api.github.com/repos/saep/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/saep/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/saep/neovim/tags","blobs_url":"https://api.github.com/repos/saep/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saep/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saep/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/saep/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saep/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/saep/neovim/languages","stargazers_url":"https://api.github.com/repos/saep/neovim/stargazers","contributors_url":"https://api.github.com/repos/saep/neovim/contributors","subscribers_url":"https://api.github.com/repos/saep/neovim/subscribers","subscription_url":"https://api.github.com/repos/saep/neovim/subscription","commits_url":"https://api.github.com/repos/saep/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/saep/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/saep/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/saep/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/saep/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/saep/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saep/neovim/merges","archive_url":"https://api.github.com/repos/saep/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saep/neovim/downloads","issues_url":"https://api.github.com/repos/saep/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/saep/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/saep/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/saep/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saep/neovim/labels{/name}","releases_url":"https://api.github.com/repos/saep/neovim/releases{/id}","created_at":"2015-02-02T06:56:10Z","updated_at":"2015-02-02T06:56:15Z","pushed_at":"2015-07-08T06:02:41Z","git_url":"git://github.com/saep/neovim.git","ssh_url":"git@github.com:saep/neovim.git","clone_url":"https://github.com/saep/neovim.git","svn_url":"https://github.com/saep/neovim","homepage":"http://neovim.org","size":31949,"stargazers_count":0,"watchers_count":0,"language":"VimL","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"3955ffa3051076926c904f2e05a9057aac7ea936","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":"ambitious Vim-fork focused on extensibility and agility. Consider helping sustain Neovim development! ","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}","created_at":"2014-01-31T13:39:22Z","updated_at":"2015-07-09T09:32:38Z","pushed_at":"2015-07-09T09:48:23Z","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":76319,"stargazers_count":14072,"watchers_count":14072,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":965,"mirror_url":null,"open_issues_count":533,"forks":965,"open_issues":533,"watchers":14072,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2979"},"html":{"href":"https://github.com/neovim/neovim/pull/2979"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/2979"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/2979/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2979/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2979/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/132dae9f1cd14bfc6aa7fc4d99cf9d190097656c"}}}}