{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/cmark/issues/124","repository_url":"https://api.github.com/repos/jgm/cmark","labels_url":"https://api.github.com/repos/jgm/cmark/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/jgm/cmark/issues/124/comments","events_url":"https://api.github.com/repos/jgm/cmark/issues/124/events","html_url":"https://github.com/jgm/cmark/issues/124","id":151280991,"number":124,"title":"Docs and headers for rendering functions dont mention buffer ownership","user":{"login":"mikeando","id":46179,"avatar_url":"https://avatars.githubusercontent.com/u/46179?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeando","html_url":"https://github.com/mikeando","followers_url":"https://api.github.com/users/mikeando/followers","following_url":"https://api.github.com/users/mikeando/following{/other_user}","gists_url":"https://api.github.com/users/mikeando/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeando/subscriptions","organizations_url":"https://api.github.com/users/mikeando/orgs","repos_url":"https://api.github.com/users/mikeando/repos","events_url":"https://api.github.com/users/mikeando/events{/privacy}","received_events_url":"https://api.github.com/users/mikeando/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-27T02:06:49Z","updated_at":"2016-05-14T04:44:57Z","closed_at":null,"body":"It's not clear from the docs what the lifetime of the buffer for the result of calls to `cmark_render_html`\r\nand related calls are.\r\n\r\nI see a few options - and there's probably other possibilities too..\r\n\r\n1. The buffer is owned by the node that render is called on, and is free'd when that node is destroyed.\r\n2. The buffer is owned by the caller, and the caller is expected to free it.\r\n\r\nThe second would make more sense to me - but its certainly not clear from the docs or headers. \r\n\r\nThe code should simply say something like : \"It is the callers responsibility to destroy the returned buffer using `free`\".\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jgm/cmark/issues/comments/219200457","html_url":"https://github.com/jgm/cmark/issues/124#issuecomment-219200457","issue_url":"https://api.github.com/repos/jgm/cmark/issues/124","id":219200457,"user":{"login":"jgm","id":3044,"avatar_url":"https://avatars.githubusercontent.com/u/3044?v=3","gravatar_id":"","url":"https://api.github.com/users/jgm","html_url":"https://github.com/jgm","followers_url":"https://api.github.com/users/jgm/followers","following_url":"https://api.github.com/users/jgm/following{/other_user}","gists_url":"https://api.github.com/users/jgm/gists{/gist_id}","starred_url":"https://api.github.com/users/jgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgm/subscriptions","organizations_url":"https://api.github.com/users/jgm/orgs","repos_url":"https://api.github.com/users/jgm/repos","events_url":"https://api.github.com/users/jgm/events{/privacy}","received_events_url":"https://api.github.com/users/jgm/received_events","type":"User","site_admin":false},"created_at":"2016-05-14T04:44:57Z","updated_at":"2016-05-14T04:44:57Z","body":"Reopening since the documentatino can still be improved.\r\n"}}