{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/93812033","pull_request_review_id":13847866,"id":93812033,"diff_hunk":"@@ -21703,15 +22288,47 @@ call_user_func (\n   restore_search_patterns();\n }\n \n-/*\n- * Return TRUE if items in \"fc\" do not have \"copyID\".  That means they are not\n- * referenced from anywhere that is in use.\n- */\n+/// Unreference \"fc\": decrement the reference count and free it when it\n+/// becomes zero.  \"fp\" is detached from \"fc\".\n+///\n+/// @param[in]   force   When true, we are exiting.\n+static void funccal_unref(funccall_T *fc, ufunc_T *fp, bool force)\n+{\n+  funccall_T **pfc;\n+  int i;\n+\n+  if (fc == NULL) {\n+    return;\n+  }\n+\n+  if (--fc->fc_refcount <= 0 && (force || (\n+      fc->l_varlist.lv_refcount == DO_NOT_FREE_CNT\n+      && fc->l_vars.dv_refcount == DO_NOT_FREE_CNT\n+      && fc->l_avars.dv_refcount == DO_NOT_FREE_CNT))) {\n+    for (pfc = &previous_funccal; *pfc != NULL; pfc = &(*pfc)->caller) {\n+      if (fc == *pfc) {\n+        *pfc = fc->caller;\n+        free_funccal(fc, true);\n+        return;\n+      }\n+    }\n+  }\n+  for (i = 0; i < fc->fc_funcs.ga_len; i++) {\n+    if (((ufunc_T **)(fc->fc_funcs.ga_data))[i] == fp) {\n+      func_ptr_unref(fc->func);","path":"src/nvim/eval.c","position":2115,"original_position":2115,"commit_id":"f4a90f4de3a67fb0b7937a4a63cde00f902a08c7","original_commit_id":"f4a90f4de3a67fb0b7937a4a63cde00f902a08c7","user":{"login":"jamessan","id":112971,"avatar_url":"https://avatars.githubusercontent.com/u/112971?v=3","gravatar_id":"","url":"https://api.github.com/users/jamessan","html_url":"https://github.com/jamessan","followers_url":"https://api.github.com/users/jamessan/followers","following_url":"https://api.github.com/users/jamessan/following{/other_user}","gists_url":"https://api.github.com/users/jamessan/gists{/gist_id}","starred_url":"https://api.github.com/users/jamessan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamessan/subscriptions","organizations_url":"https://api.github.com/users/jamessan/orgs","repos_url":"https://api.github.com/users/jamessan/repos","events_url":"https://api.github.com/users/jamessan/events{/privacy}","received_events_url":"https://api.github.com/users/jamessan/received_events","type":"User","site_admin":false},"body":"This line shouldn't be here.  It was removed in 7.4.2143.","created_at":"2016-12-24T03:17:17Z","updated_at":"2016-12-24T03:17:50Z","html_url":"https://github.com/neovim/neovim/pull/5771#discussion_r93812033","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/5771","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/93812033"},"html":{"href":"https://github.com/neovim/neovim/pull/5771#discussion_r93812033"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/5771"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/5771","id":97899903,"html_url":"https://github.com/neovim/neovim/pull/5771","diff_url":"https://github.com/neovim/neovim/pull/5771.diff","patch_url":"https://github.com/neovim/neovim/pull/5771.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/5771","number":5771,"state":"open","locked":false,"title":"[WIP] Lambda Support","user":{"login":"brcolow","id":6589866,"avatar_url":"https://avatars.githubusercontent.com/u/6589866?v=3","gravatar_id":"","url":"https://api.github.com/users/brcolow","html_url":"https://github.com/brcolow","followers_url":"https://api.github.com/users/brcolow/followers","following_url":"https://api.github.com/users/brcolow/following{/other_user}","gists_url":"https://api.github.com/users/brcolow/gists{/gist_id}","starred_url":"https://api.github.com/users/brcolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brcolow/subscriptions","organizations_url":"https://api.github.com/users/brcolow/orgs","repos_url":"https://api.github.com/users/brcolow/repos","events_url":"https://api.github.com/users/brcolow/events{/privacy}","received_events_url":"https://api.github.com/users/brcolow/received_events","type":"User","site_admin":false},"body":"I am going to start porting some of the lambda patches. Hopefully I will have time to eventually do them all. Might be slow going.\r\n\r\n- [x] [1989](https://github.com/vim/vim/commit/b33c7eb5b813cb631b2b0ca5c4029e1788a09bde): map()/filter() funcref\r\n- [x] [2002](https://github.com/vim/vim/commit/a06ec8f345eabb66e5b7d7c0192cfebdde63115d): map()/filter() crash\r\n- [x] [2044](https://github.com/vim/vim/commit/069c1e7fa9f45a665064f7f2c17da84d6a48f544): lambda\r\n- [x] [2072](https://github.com/vim/vim/commit/72ab729c3dcdea0fba44d8e676602c847e841bcd): substitute() funcref\r\n- [x] [2076](https://github.com/vim/vim/commit/4f0383bc3fe5af0229fb66b53fe94329af783eff): lambda fix\r\n- [x] [2090](https://github.com/vim/vim/commit/df48fb456fb6bf63d94cad9b302ff01d8ee8d311): substitute() lambda support\r\n- [x] [2096](https://github.com/vim/vim/commit/b49edc11a1872fa99befa9a4a8ea6c8537868038): lambda\r\n- [x] [2104](https://github.com/vim/vim/commit/97baee80f0906ee2f651ee1215ec033e84f866ad): userfunc\r\n- [x] [2119](https://github.com/vim/vim/commit/1e96d9bf98f9ab84d5af7f98d6a961d91b17364f): closure\r\n- [x] [2120](https://github.com/vim/vim/commit/10ce39a0d52272a3dfff2feb8c631529f29e6740): closure\r\n- [x] [2121](https://github.com/vim/vim/commit/9532fe7fbe1b14531931e83bd9f8054efdcf7509): has('lambda')\r\n- [x] [2134](https://github.com/vim/vim/commit/b54c3ff3174dbb5dfbfcabdf95200b047beaa644): function()\r\n- [x] [2136](https://github.com/vim/vim/commit/580164481924ed8611eb79f0247a0eb1ca0b3b9a): closure\r\n- [x] [2137](https://github.com/vim/vim/commit/437bafe4c8a83ed71ee006eda7f54b65a90f0d4c): funcref()\r\n- [x] [2139](https://github.com/vim/vim/commit/0588d4f9d2741f35a271400a37fddbdd72d84219): delfunction crash\r\n- [x] [2141](https://github.com/vim/vim/commit/ba96e9af388804364425185b47eed14988302865)\r\n- [x] [2142](https://github.com/vim/vim/commit/8dd3a43d75550e9b5736066124c97697564f769e): funcref()\r\n- [x] [2143](https://github.com/vim/vim/commit/bc7ce675b2d1c9fb58c067eff3edd59abc30aba4): closure\r\n- [x] [2197](https://github.com/vim/vim/commit/c257487035f83aabe1c7e07f0552309e98f1bcb1): userfunc\r\n- [x] [2233](https://github.com/vim/vim/commit/843b884461de1c79a1d2748549776fb13fc94360): funcref() fix\r\n- [x] [2235](https://github.com/vim/vim/commit/989f592f7ffcbafdc4ec35cee4dc65bd053e2077): evalfunc\r\n- [ ] Allow lambdas to be used with jobs, timers, and dictwatchers.\r\n\r\nCurrent status:\r\n\r\nThere are 4 failing lua tests:\r\n\r\n```\r\n[  FAILED  ] 1 test, listed below:\r\n[  FAILED  ] ...im/test/functional/clipboard/clipboard_provider_spec.lua @ 327: clipboard usage with clipboard=unnamedplus and unnamed, yanks to both\r\n[  ERROR   ] 3 errors, listed below:\r\n[  ERROR   ] ...is/build/neovim/neovim/test/functional/core/job_spec.lua @ 306: jobs requires funcrefs for script-local (s:) functions\r\n[  ERROR   ] .../test/functional/legacy/055_list_and_dict_types_spec.lua @ 268: list and dictionary types dictionary function\r\n[  ERROR   ] .../test/functional/legacy/055_list_and_dict_types_spec.lua @ 286: list and dictionary types Function in script-local List or Dict\r\n```","created_at":"2016-12-14T07:23:50Z","updated_at":"2016-12-24T03:17:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ec99d6e9ffda02d2230737ea5a7b55a8adcffa4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/5771/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/5771/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/5771/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/f4a90f4de3a67fb0b7937a4a63cde00f902a08c7","head":{"label":"brcolow:lambda","ref":"lambda","sha":"f4a90f4de3a67fb0b7937a4a63cde00f902a08c7","user":{"login":"brcolow","id":6589866,"avatar_url":"https://avatars.githubusercontent.com/u/6589866?v=3","gravatar_id":"","url":"https://api.github.com/users/brcolow","html_url":"https://github.com/brcolow","followers_url":"https://api.github.com/users/brcolow/followers","following_url":"https://api.github.com/users/brcolow/following{/other_user}","gists_url":"https://api.github.com/users/brcolow/gists{/gist_id}","starred_url":"https://api.github.com/users/brcolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brcolow/subscriptions","organizations_url":"https://api.github.com/users/brcolow/orgs","repos_url":"https://api.github.com/users/brcolow/repos","events_url":"https://api.github.com/users/brcolow/events{/privacy}","received_events_url":"https://api.github.com/users/brcolow/received_events","type":"User","site_admin":false},"repo":{"id":48091740,"name":"neovim","full_name":"brcolow/neovim","owner":{"login":"brcolow","id":6589866,"avatar_url":"https://avatars.githubusercontent.com/u/6589866?v=3","gravatar_id":"","url":"https://api.github.com/users/brcolow","html_url":"https://github.com/brcolow","followers_url":"https://api.github.com/users/brcolow/followers","following_url":"https://api.github.com/users/brcolow/following{/other_user}","gists_url":"https://api.github.com/users/brcolow/gists{/gist_id}","starred_url":"https://api.github.com/users/brcolow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brcolow/subscriptions","organizations_url":"https://api.github.com/users/brcolow/orgs","repos_url":"https://api.github.com/users/brcolow/repos","events_url":"https://api.github.com/users/brcolow/events{/privacy}","received_events_url":"https://api.github.com/users/brcolow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brcolow/neovim","description":"Vim-fork focused on extensibility and agility. Consider helping sustain Neovim development! ","fork":true,"url":"https://api.github.com/repos/brcolow/neovim","forks_url":"https://api.github.com/repos/brcolow/neovim/forks","keys_url":"https://api.github.com/repos/brcolow/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brcolow/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brcolow/neovim/teams","hooks_url":"https://api.github.com/repos/brcolow/neovim/hooks","issue_events_url":"https://api.github.com/repos/brcolow/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/brcolow/neovim/events","assignees_url":"https://api.github.com/repos/brcolow/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/brcolow/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/brcolow/neovim/tags","blobs_url":"https://api.github.com/repos/brcolow/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brcolow/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brcolow/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/brcolow/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brcolow/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/brcolow/neovim/languages","stargazers_url":"https://api.github.com/repos/brcolow/neovim/stargazers","contributors_url":"https://api.github.com/repos/brcolow/neovim/contributors","subscribers_url":"https://api.github.com/repos/brcolow/neovim/subscribers","subscription_url":"https://api.github.com/repos/brcolow/neovim/subscription","commits_url":"https://api.github.com/repos/brcolow/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/brcolow/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/brcolow/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/brcolow/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/brcolow/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/brcolow/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brcolow/neovim/merges","archive_url":"https://api.github.com/repos/brcolow/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brcolow/neovim/downloads","issues_url":"https://api.github.com/repos/brcolow/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/brcolow/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/brcolow/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/brcolow/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brcolow/neovim/labels{/name}","releases_url":"https://api.github.com/repos/brcolow/neovim/releases{/id}","deployments_url":"https://api.github.com/repos/brcolow/neovim/deployments","created_at":"2015-12-16T06:21:17Z","updated_at":"2016-01-13T23:08:26Z","pushed_at":"2016-12-22T20:46:52Z","git_url":"git://github.com/brcolow/neovim.git","ssh_url":"git@github.com:brcolow/neovim.git","clone_url":"https://github.com/brcolow/neovim.git","svn_url":"https://github.com/brcolow/neovim","homepage":"https://salt.bountysource.com/teams/neovim","size":44871,"stargazers_count":0,"watchers_count":0,"language":"VimL","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"neovim:master","ref":"master","sha":"33319b1bf012652cd04e47bf9d5ac216408703e2","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-12-24T03:08:58Z","pushed_at":"2016-12-23T20:37:28Z","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":44846,"stargazers_count":21029,"watchers_count":21029,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1497,"mirror_url":null,"open_issues_count":803,"forks":1497,"open_issues":803,"watchers":21029,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/5771"},"html":{"href":"https://github.com/neovim/neovim/pull/5771"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/5771"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/5771/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/5771/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/5771/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/f4a90f4de3a67fb0b7937a4a63cde00f902a08c7"}}}}
{"actor":{"display_login":"jamessan"}}