{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/36044387","id":36044387,"diff_hunk":"@@ -5177,6 +5265,23 @@ void list_append_string(list_T *l, char_u *str, int len)\n   }\n }\n \n+/// Append given string to the list\n+///\n+/// Unlike list_append_string this function does not copy the string.\n+///\n+/// @param[out]  l    List to append to.\n+/// @param[in]   str  String to append.\n+void list_append_allocated_string(list_T *l, char *const str)\n+  FUNC_ATTR_NONNULL_ARG(1)","path":"src/nvim/eval.c","position":153,"original_position":153,"commit_id":"91e50dc3276a689fe507f9f14ea963bfc939cdd0","original_commit_id":"e68e6a38d6d1f6992384170853ff08b241e734db","user":{"login":"justinmk","id":1359421,"avatar_url":"https://avatars.githubusercontent.com/u/1359421?v=3","gravatar_id":"","url":"https://api.github.com/users/justinmk","html_url":"https://github.com/justinmk","followers_url":"https://api.github.com/users/justinmk/followers","following_url":"https://api.github.com/users/justinmk/following{/other_user}","gists_url":"https://api.github.com/users/justinmk/gists{/gist_id}","starred_url":"https://api.github.com/users/justinmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinmk/subscriptions","organizations_url":"https://api.github.com/users/justinmk/orgs","repos_url":"https://api.github.com/users/justinmk/repos","events_url":"https://api.github.com/users/justinmk/events{/privacy}","received_events_url":"https://api.github.com/users/justinmk/received_events","type":"User","site_admin":false},"body":"`list_append_string` can call `list_append_allocated_string()` instead of repeating the logic.","created_at":"2015-08-02T15:50:05Z","updated_at":"2015-08-02T15:50:05Z","html_url":"https://github.com/neovim/neovim/pull/3034#discussion_r36044387","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/3034","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/36044387"},"html":{"href":"https://github.com/neovim/neovim/pull/3034#discussion_r36044387"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3034"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/3034","id":40266273,"html_url":"https://github.com/neovim/neovim/pull/3034","diff_url":"https://github.com/neovim/neovim/pull/3034.diff","patch_url":"https://github.com/neovim/neovim/pull/3034.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/3034","number":3034,"state":"open","locked":false,"title":"[RFC] Add functions for dumping and restoring msgpack values","user":{"login":"ZyX-I","id":322097,"avatar_url":"https://avatars.githubusercontent.com/u/322097?v=3","gravatar_id":"","url":"https://api.github.com/users/ZyX-I","html_url":"https://github.com/ZyX-I","followers_url":"https://api.github.com/users/ZyX-I/followers","following_url":"https://api.github.com/users/ZyX-I/following{/other_user}","gists_url":"https://api.github.com/users/ZyX-I/gists{/gist_id}","starred_url":"https://api.github.com/users/ZyX-I/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZyX-I/subscriptions","organizations_url":"https://api.github.com/users/ZyX-I/orgs","repos_url":"https://api.github.com/users/ZyX-I/repos","events_url":"https://api.github.com/users/ZyX-I/events{/privacy}","received_events_url":"https://api.github.com/users/ZyX-I/received_events","type":"User","site_admin":false},"body":"After second commit the result is much more precise then what you can obtain by converting msgpack to Object and then to typval_T using standard converters.\r\n\r\nNew functions are needed for the plugin that reads and writes ShaDa files (#2506). Maybe they will be needed for other files in the future because e.g. persistent undo files are rather not extensible and rewriting the format with messagepack is easier then creating our own extensible binary format from scratch.\r\n\r\nNote about second commit: I am using recursive conversion of messagepack values to typval_T because messagepack parsing result cannot possibly be self-referencing. If needed I can make this non-recursive as well. I am using non-recursive stack-based loop for typval_T to messagepack conversion because typval_T values *can* reference itself and I do not like the idea of limiting conversion by some random value with reason “recursion depth exceeded”, direct checking whether container is self-referencing is much better.\r\n\r\nkvec_t is used because garray_T does not support `kv_pop` and I do not know any other structures in NeoVim source code which may fit in. But this means one realloc for each kv_push which increases stack size, garray_T may have done less reallocs. Do not think this will cause performance problems for the intended usage, especially with faster allocator.","created_at":"2015-07-17T20:01:47Z","updated_at":"2015-08-02T15:50:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0a90b40ab3aabd76c7457262efe9895fde32da0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/3034/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/3034/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/3034/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/91e50dc3276a689fe507f9f14ea963bfc939cdd0","head":{"label":"ZyX-I:msgpack-eval","ref":"msgpack-eval","sha":"91e50dc3276a689fe507f9f14ea963bfc939cdd0","user":{"login":"ZyX-I","id":322097,"avatar_url":"https://avatars.githubusercontent.com/u/322097?v=3","gravatar_id":"","url":"https://api.github.com/users/ZyX-I","html_url":"https://github.com/ZyX-I","followers_url":"https://api.github.com/users/ZyX-I/followers","following_url":"https://api.github.com/users/ZyX-I/following{/other_user}","gists_url":"https://api.github.com/users/ZyX-I/gists{/gist_id}","starred_url":"https://api.github.com/users/ZyX-I/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZyX-I/subscriptions","organizations_url":"https://api.github.com/users/ZyX-I/orgs","repos_url":"https://api.github.com/users/ZyX-I/repos","events_url":"https://api.github.com/users/ZyX-I/events{/privacy}","received_events_url":"https://api.github.com/users/ZyX-I/received_events","type":"User","site_admin":false},"repo":{"id":17312366,"name":"neovim","full_name":"ZyX-I/neovim","owner":{"login":"ZyX-I","id":322097,"avatar_url":"https://avatars.githubusercontent.com/u/322097?v=3","gravatar_id":"","url":"https://api.github.com/users/ZyX-I","html_url":"https://github.com/ZyX-I","followers_url":"https://api.github.com/users/ZyX-I/followers","following_url":"https://api.github.com/users/ZyX-I/following{/other_user}","gists_url":"https://api.github.com/users/ZyX-I/gists{/gist_id}","starred_url":"https://api.github.com/users/ZyX-I/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZyX-I/subscriptions","organizations_url":"https://api.github.com/users/ZyX-I/orgs","repos_url":"https://api.github.com/users/ZyX-I/repos","events_url":"https://api.github.com/users/ZyX-I/events{/privacy}","received_events_url":"https://api.github.com/users/ZyX-I/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ZyX-I/neovim","description":"vim's rebirth for the 21st century","fork":true,"url":"https://api.github.com/repos/ZyX-I/neovim","forks_url":"https://api.github.com/repos/ZyX-I/neovim/forks","keys_url":"https://api.github.com/repos/ZyX-I/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZyX-I/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZyX-I/neovim/teams","hooks_url":"https://api.github.com/repos/ZyX-I/neovim/hooks","issue_events_url":"https://api.github.com/repos/ZyX-I/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/ZyX-I/neovim/events","assignees_url":"https://api.github.com/repos/ZyX-I/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/ZyX-I/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/ZyX-I/neovim/tags","blobs_url":"https://api.github.com/repos/ZyX-I/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZyX-I/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZyX-I/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZyX-I/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZyX-I/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/ZyX-I/neovim/languages","stargazers_url":"https://api.github.com/repos/ZyX-I/neovim/stargazers","contributors_url":"https://api.github.com/repos/ZyX-I/neovim/contributors","subscribers_url":"https://api.github.com/repos/ZyX-I/neovim/subscribers","subscription_url":"https://api.github.com/repos/ZyX-I/neovim/subscription","commits_url":"https://api.github.com/repos/ZyX-I/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZyX-I/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZyX-I/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZyX-I/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZyX-I/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/ZyX-I/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZyX-I/neovim/merges","archive_url":"https://api.github.com/repos/ZyX-I/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZyX-I/neovim/downloads","issues_url":"https://api.github.com/repos/ZyX-I/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/ZyX-I/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/ZyX-I/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/ZyX-I/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZyX-I/neovim/labels{/name}","releases_url":"https://api.github.com/repos/ZyX-I/neovim/releases{/id}","created_at":"2014-03-01T10:04:37Z","updated_at":"2015-05-05T11:49:43Z","pushed_at":"2015-08-02T10:25:17Z","git_url":"git://github.com/ZyX-I/neovim.git","ssh_url":"git@github.com:ZyX-I/neovim.git","clone_url":"https://github.com/ZyX-I/neovim.git","svn_url":"https://github.com/ZyX-I/neovim","homepage":"http://neovim.org/","size":38287,"stargazers_count":6,"watchers_count":6,"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":6,"default_branch":"master"}},"base":{"label":"neovim:master","ref":"master","sha":"4d79edccdc0243a02a20ef46184b8f87f2bda290","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-08-02T13:58:03Z","pushed_at":"2015-08-02T10:25:18Z","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":81084,"stargazers_count":14411,"watchers_count":14411,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":990,"mirror_url":null,"open_issues_count":558,"forks":990,"open_issues":558,"watchers":14411,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3034"},"html":{"href":"https://github.com/neovim/neovim/pull/3034"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/3034"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/3034/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3034/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/3034/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/91e50dc3276a689fe507f9f14ea963bfc939cdd0"}}}}