{"action":"created","comment":{"url":"https://api.github.com/repos/itheof/lib42/pulls/comments/82505574","pull_request_review_id":3410972,"id":82505574,"diff_hunk":"@@ -0,0 +1,66 @@\n+/* ************************************************************************** */\n+/*                                                                            */\n+/*                                                        :::      ::::::::   */\n+/*   cbuffer_push.c                                     :+:      :+:    :+:   */\n+/*                                                    +:+ +:+         +:+     */\n+/*   By: crenault <crenault@student.42.fr>          +#+  +:+       +#+        */\n+/*                                                +#+#+#+#+#+   +#+           */\n+/*   Created: 2016/10/05 16:12:42 by crenault          #+#    #+#             */\n+/*   Updated: 2016/10/06 00:09:10 by crenault         ###   ########.fr       */\n+/*                                                                            */\n+/* ************************************************************************** */\n+\n+#include \"cbuffer_42.h\"\n+#include \"memory_42.h\"\n+\n+inline static size_t\tmove_forward(size_t len, size_t n)\n+{\n+\tif (n >= len - 1)\n+\t\treturn (0);\n+\treturn (n + 1);\n+}\n+\n+inline static size_t\tmove_backward(size_t len, size_t n)","path":"src/cbuffer/cbuffer_push.c","position":23,"original_position":23,"commit_id":"90897a9306227cb0f1c854e086a13dc9d0b46e92","original_commit_id":"90897a9306227cb0f1c854e086a13dc9d0b46e92","user":{"login":"Kerollmops","id":3610253,"avatar_url":"https://avatars.githubusercontent.com/u/3610253?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerollmops","html_url":"https://github.com/Kerollmops","followers_url":"https://api.github.com/users/Kerollmops/followers","following_url":"https://api.github.com/users/Kerollmops/following{/other_user}","gists_url":"https://api.github.com/users/Kerollmops/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerollmops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerollmops/subscriptions","organizations_url":"https://api.github.com/users/Kerollmops/orgs","repos_url":"https://api.github.com/users/Kerollmops/repos","events_url":"https://api.github.com/users/Kerollmops/events{/privacy}","received_events_url":"https://api.github.com/users/Kerollmops/received_events","type":"User","site_admin":false},"body":"```c\r\n#define CBUFFER_MOVE_BACKWARD(l, n) ((n) ? (n) - 1 : (l) - 1)","created_at":"2016-10-08T16:33:51Z","updated_at":"2016-10-08T16:33:51Z","html_url":"https://github.com/itheof/lib42/pull/4#discussion_r82505574","pull_request_url":"https://api.github.com/repos/itheof/lib42/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/itheof/lib42/pulls/comments/82505574"},"html":{"href":"https://github.com/itheof/lib42/pull/4#discussion_r82505574"},"pull_request":{"href":"https://api.github.com/repos/itheof/lib42/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/itheof/lib42/pulls/4","id":88180133,"html_url":"https://github.com/itheof/lib42/pull/4","diff_url":"https://github.com/itheof/lib42/pull/4.diff","patch_url":"https://github.com/itheof/lib42/pull/4.patch","issue_url":"https://api.github.com/repos/itheof/lib42/issues/4","number":4,"state":"closed","locked":false,"title":"New circular buffer container","user":{"login":"Kerollmops","id":3610253,"avatar_url":"https://avatars.githubusercontent.com/u/3610253?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerollmops","html_url":"https://github.com/Kerollmops","followers_url":"https://api.github.com/users/Kerollmops/followers","following_url":"https://api.github.com/users/Kerollmops/following{/other_user}","gists_url":"https://api.github.com/users/Kerollmops/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerollmops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerollmops/subscriptions","organizations_url":"https://api.github.com/users/Kerollmops/orgs","repos_url":"https://api.github.com/users/Kerollmops/repos","events_url":"https://api.github.com/users/Kerollmops/events{/privacy}","received_events_url":"https://api.github.com/users/Kerollmops/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-06T00:16:14Z","updated_at":"2016-10-08T16:33:51Z","closed_at":"2016-10-06T12:18:08Z","merged_at":"2016-10-06T12:18:08Z","merge_commit_sha":"41fc955f6bec9f12eeb804ee658d1f7abd032f48","assignee":{"login":"Kerollmops","id":3610253,"avatar_url":"https://avatars.githubusercontent.com/u/3610253?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerollmops","html_url":"https://github.com/Kerollmops","followers_url":"https://api.github.com/users/Kerollmops/followers","following_url":"https://api.github.com/users/Kerollmops/following{/other_user}","gists_url":"https://api.github.com/users/Kerollmops/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerollmops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerollmops/subscriptions","organizations_url":"https://api.github.com/users/Kerollmops/orgs","repos_url":"https://api.github.com/users/Kerollmops/repos","events_url":"https://api.github.com/users/Kerollmops/events{/privacy}","received_events_url":"https://api.github.com/users/Kerollmops/received_events","type":"User","site_admin":false},"assignees":[{"login":"Kerollmops","id":3610253,"avatar_url":"https://avatars.githubusercontent.com/u/3610253?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerollmops","html_url":"https://github.com/Kerollmops","followers_url":"https://api.github.com/users/Kerollmops/followers","following_url":"https://api.github.com/users/Kerollmops/following{/other_user}","gists_url":"https://api.github.com/users/Kerollmops/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerollmops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerollmops/subscriptions","organizations_url":"https://api.github.com/users/Kerollmops/orgs","repos_url":"https://api.github.com/users/Kerollmops/repos","events_url":"https://api.github.com/users/Kerollmops/events{/privacy}","received_events_url":"https://api.github.com/users/Kerollmops/received_events","type":"User","site_admin":false},{"login":"itheof","id":8781784,"avatar_url":"https://avatars.githubusercontent.com/u/8781784?v=3","gravatar_id":"","url":"https://api.github.com/users/itheof","html_url":"https://github.com/itheof","followers_url":"https://api.github.com/users/itheof/followers","following_url":"https://api.github.com/users/itheof/following{/other_user}","gists_url":"https://api.github.com/users/itheof/gists{/gist_id}","starred_url":"https://api.github.com/users/itheof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itheof/subscriptions","organizations_url":"https://api.github.com/users/itheof/orgs","repos_url":"https://api.github.com/users/itheof/repos","events_url":"https://api.github.com/users/itheof/events{/privacy}","received_events_url":"https://api.github.com/users/itheof/received_events","type":"User","site_admin":false},{"login":"dkrmr","id":16935834,"avatar_url":"https://avatars.githubusercontent.com/u/16935834?v=3","gravatar_id":"","url":"https://api.github.com/users/dkrmr","html_url":"https://github.com/dkrmr","followers_url":"https://api.github.com/users/dkrmr/followers","following_url":"https://api.github.com/users/dkrmr/following{/other_user}","gists_url":"https://api.github.com/users/dkrmr/gists{/gist_id}","starred_url":"https://api.github.com/users/dkrmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkrmr/subscriptions","organizations_url":"https://api.github.com/users/dkrmr/orgs","repos_url":"https://api.github.com/users/dkrmr/repos","events_url":"https://api.github.com/users/dkrmr/events{/privacy}","received_events_url":"https://api.github.com/users/dkrmr/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/itheof/lib42/pulls/4/commits","review_comments_url":"https://api.github.com/repos/itheof/lib42/pulls/4/comments","review_comment_url":"https://api.github.com/repos/itheof/lib42/pulls/comments{/number}","comments_url":"https://api.github.com/repos/itheof/lib42/issues/4/comments","statuses_url":"https://api.github.com/repos/itheof/lib42/statuses/90897a9306227cb0f1c854e086a13dc9d0b46e92","head":{"label":"itheof:circular_buffer","ref":"circular_buffer","sha":"90897a9306227cb0f1c854e086a13dc9d0b46e92","user":{"login":"itheof","id":8781784,"avatar_url":"https://avatars.githubusercontent.com/u/8781784?v=3","gravatar_id":"","url":"https://api.github.com/users/itheof","html_url":"https://github.com/itheof","followers_url":"https://api.github.com/users/itheof/followers","following_url":"https://api.github.com/users/itheof/following{/other_user}","gists_url":"https://api.github.com/users/itheof/gists{/gist_id}","starred_url":"https://api.github.com/users/itheof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itheof/subscriptions","organizations_url":"https://api.github.com/users/itheof/orgs","repos_url":"https://api.github.com/users/itheof/repos","events_url":"https://api.github.com/users/itheof/events{/privacy}","received_events_url":"https://api.github.com/users/itheof/received_events","type":"User","site_admin":false},"repo":{"id":69962679,"name":"lib42","full_name":"itheof/lib42","owner":{"login":"itheof","id":8781784,"avatar_url":"https://avatars.githubusercontent.com/u/8781784?v=3","gravatar_id":"","url":"https://api.github.com/users/itheof","html_url":"https://github.com/itheof","followers_url":"https://api.github.com/users/itheof/followers","following_url":"https://api.github.com/users/itheof/following{/other_user}","gists_url":"https://api.github.com/users/itheof/gists{/gist_id}","starred_url":"https://api.github.com/users/itheof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itheof/subscriptions","organizations_url":"https://api.github.com/users/itheof/orgs","repos_url":"https://api.github.com/users/itheof/repos","events_url":"https://api.github.com/users/itheof/events{/privacy}","received_events_url":"https://api.github.com/users/itheof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/itheof/lib42","description":null,"fork":true,"url":"https://api.github.com/repos/itheof/lib42","forks_url":"https://api.github.com/repos/itheof/lib42/forks","keys_url":"https://api.github.com/repos/itheof/lib42/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itheof/lib42/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itheof/lib42/teams","hooks_url":"https://api.github.com/repos/itheof/lib42/hooks","issue_events_url":"https://api.github.com/repos/itheof/lib42/issues/events{/number}","events_url":"https://api.github.com/repos/itheof/lib42/events","assignees_url":"https://api.github.com/repos/itheof/lib42/assignees{/user}","branches_url":"https://api.github.com/repos/itheof/lib42/branches{/branch}","tags_url":"https://api.github.com/repos/itheof/lib42/tags","blobs_url":"https://api.github.com/repos/itheof/lib42/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itheof/lib42/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itheof/lib42/git/refs{/sha}","trees_url":"https://api.github.com/repos/itheof/lib42/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itheof/lib42/statuses/{sha}","languages_url":"https://api.github.com/repos/itheof/lib42/languages","stargazers_url":"https://api.github.com/repos/itheof/lib42/stargazers","contributors_url":"https://api.github.com/repos/itheof/lib42/contributors","subscribers_url":"https://api.github.com/repos/itheof/lib42/subscribers","subscription_url":"https://api.github.com/repos/itheof/lib42/subscription","commits_url":"https://api.github.com/repos/itheof/lib42/commits{/sha}","git_commits_url":"https://api.github.com/repos/itheof/lib42/git/commits{/sha}","comments_url":"https://api.github.com/repos/itheof/lib42/comments{/number}","issue_comment_url":"https://api.github.com/repos/itheof/lib42/issues/comments{/number}","contents_url":"https://api.github.com/repos/itheof/lib42/contents/{+path}","compare_url":"https://api.github.com/repos/itheof/lib42/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itheof/lib42/merges","archive_url":"https://api.github.com/repos/itheof/lib42/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itheof/lib42/downloads","issues_url":"https://api.github.com/repos/itheof/lib42/issues{/number}","pulls_url":"https://api.github.com/repos/itheof/lib42/pulls{/number}","milestones_url":"https://api.github.com/repos/itheof/lib42/milestones{/number}","notifications_url":"https://api.github.com/repos/itheof/lib42/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itheof/lib42/labels{/name}","releases_url":"https://api.github.com/repos/itheof/lib42/releases{/id}","deployments_url":"https://api.github.com/repos/itheof/lib42/deployments","created_at":"2016-10-04T12:26:59Z","updated_at":"2016-10-04T12:27:01Z","pushed_at":"2016-10-08T16:30:46Z","git_url":"git://github.com/itheof/lib42.git","ssh_url":"git@github.com:itheof/lib42.git","clone_url":"https://github.com/itheof/lib42.git","svn_url":"https://github.com/itheof/lib42","homepage":null,"size":309,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"itheof:master","ref":"master","sha":"bf5ea8a837350244956b9e64c3b38a177453ceea","user":{"login":"itheof","id":8781784,"avatar_url":"https://avatars.githubusercontent.com/u/8781784?v=3","gravatar_id":"","url":"https://api.github.com/users/itheof","html_url":"https://github.com/itheof","followers_url":"https://api.github.com/users/itheof/followers","following_url":"https://api.github.com/users/itheof/following{/other_user}","gists_url":"https://api.github.com/users/itheof/gists{/gist_id}","starred_url":"https://api.github.com/users/itheof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itheof/subscriptions","organizations_url":"https://api.github.com/users/itheof/orgs","repos_url":"https://api.github.com/users/itheof/repos","events_url":"https://api.github.com/users/itheof/events{/privacy}","received_events_url":"https://api.github.com/users/itheof/received_events","type":"User","site_admin":false},"repo":{"id":69962679,"name":"lib42","full_name":"itheof/lib42","owner":{"login":"itheof","id":8781784,"avatar_url":"https://avatars.githubusercontent.com/u/8781784?v=3","gravatar_id":"","url":"https://api.github.com/users/itheof","html_url":"https://github.com/itheof","followers_url":"https://api.github.com/users/itheof/followers","following_url":"https://api.github.com/users/itheof/following{/other_user}","gists_url":"https://api.github.com/users/itheof/gists{/gist_id}","starred_url":"https://api.github.com/users/itheof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itheof/subscriptions","organizations_url":"https://api.github.com/users/itheof/orgs","repos_url":"https://api.github.com/users/itheof/repos","events_url":"https://api.github.com/users/itheof/events{/privacy}","received_events_url":"https://api.github.com/users/itheof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/itheof/lib42","description":null,"fork":true,"url":"https://api.github.com/repos/itheof/lib42","forks_url":"https://api.github.com/repos/itheof/lib42/forks","keys_url":"https://api.github.com/repos/itheof/lib42/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itheof/lib42/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itheof/lib42/teams","hooks_url":"https://api.github.com/repos/itheof/lib42/hooks","issue_events_url":"https://api.github.com/repos/itheof/lib42/issues/events{/number}","events_url":"https://api.github.com/repos/itheof/lib42/events","assignees_url":"https://api.github.com/repos/itheof/lib42/assignees{/user}","branches_url":"https://api.github.com/repos/itheof/lib42/branches{/branch}","tags_url":"https://api.github.com/repos/itheof/lib42/tags","blobs_url":"https://api.github.com/repos/itheof/lib42/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itheof/lib42/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itheof/lib42/git/refs{/sha}","trees_url":"https://api.github.com/repos/itheof/lib42/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itheof/lib42/statuses/{sha}","languages_url":"https://api.github.com/repos/itheof/lib42/languages","stargazers_url":"https://api.github.com/repos/itheof/lib42/stargazers","contributors_url":"https://api.github.com/repos/itheof/lib42/contributors","subscribers_url":"https://api.github.com/repos/itheof/lib42/subscribers","subscription_url":"https://api.github.com/repos/itheof/lib42/subscription","commits_url":"https://api.github.com/repos/itheof/lib42/commits{/sha}","git_commits_url":"https://api.github.com/repos/itheof/lib42/git/commits{/sha}","comments_url":"https://api.github.com/repos/itheof/lib42/comments{/number}","issue_comment_url":"https://api.github.com/repos/itheof/lib42/issues/comments{/number}","contents_url":"https://api.github.com/repos/itheof/lib42/contents/{+path}","compare_url":"https://api.github.com/repos/itheof/lib42/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itheof/lib42/merges","archive_url":"https://api.github.com/repos/itheof/lib42/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itheof/lib42/downloads","issues_url":"https://api.github.com/repos/itheof/lib42/issues{/number}","pulls_url":"https://api.github.com/repos/itheof/lib42/pulls{/number}","milestones_url":"https://api.github.com/repos/itheof/lib42/milestones{/number}","notifications_url":"https://api.github.com/repos/itheof/lib42/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itheof/lib42/labels{/name}","releases_url":"https://api.github.com/repos/itheof/lib42/releases{/id}","deployments_url":"https://api.github.com/repos/itheof/lib42/deployments","created_at":"2016-10-04T12:26:59Z","updated_at":"2016-10-04T12:27:01Z","pushed_at":"2016-10-08T16:30:46Z","git_url":"git://github.com/itheof/lib42.git","ssh_url":"git@github.com:itheof/lib42.git","clone_url":"https://github.com/itheof/lib42.git","svn_url":"https://github.com/itheof/lib42","homepage":null,"size":309,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/itheof/lib42/pulls/4"},"html":{"href":"https://github.com/itheof/lib42/pull/4"},"issue":{"href":"https://api.github.com/repos/itheof/lib42/issues/4"},"comments":{"href":"https://api.github.com/repos/itheof/lib42/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/itheof/lib42/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/itheof/lib42/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/itheof/lib42/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/itheof/lib42/statuses/90897a9306227cb0f1c854e086a13dc9d0b46e92"}}}}
{"actor":{"display_login":"Kerollmops"}}