{"action":"created","comment":{"url":"https://api.github.com/repos/cmusatyalab/coda/pulls/comments/75055139","id":75055139,"diff_hunk":"@@ -0,0 +1,85 @@\n+/* BLURB lgpl\n+\n+                           Coda File System\n+                              Release 5\n+\n+          Copyright (c) 1987-2016 Carnegie Mellon University\n+                  Additional copyrights listed below\n+\n+This  code  is  distributed \"AS IS\" without warranty of any kind under\n+the  terms of the  GNU  Library General Public Licence  Version 2,  as\n+shown in the file LICENSE. The technical and financial contributors to\n+Coda are listed in the file CREDITS.\n+\n+\n+#*/\n+\n+\n+#ifndef _PACK_HELPER_\n+#define _PACK_HELPER_\n+#include <rpc2/rpc2.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <assert.h>\n+\n+#define _PAD(n)((((n)-1) | 3) + 1)","path":"lib-src/rpc2/include/rpc2/pack_helper.h","position":25,"original_position":25,"commit_id":"25b9610696753952ec82e0ca256a40036f9ca2b4","original_commit_id":"25b9610696753952ec82e0ca256a40036f9ca2b4","user":{"login":"jaharkes","id":394722,"avatar_url":"https://avatars.githubusercontent.com/u/394722?v=3","gravatar_id":"","url":"https://api.github.com/users/jaharkes","html_url":"https://github.com/jaharkes","followers_url":"https://api.github.com/users/jaharkes/followers","following_url":"https://api.github.com/users/jaharkes/following{/other_user}","gists_url":"https://api.github.com/users/jaharkes/gists{/gist_id}","starred_url":"https://api.github.com/users/jaharkes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaharkes/subscriptions","organizations_url":"https://api.github.com/users/jaharkes/orgs","repos_url":"https://api.github.com/users/jaharkes/repos","events_url":"https://api.github.com/users/jaharkes/events{/privacy}","received_events_url":"https://api.github.com/users/jaharkes/received_events","type":"User","site_admin":false},"body":"_PAD can move to pack-helper.c because the generated stubs define their own _PAD operation.","created_at":"2016-08-17T02:43:32Z","updated_at":"2016-08-17T02:43:32Z","html_url":"https://github.com/cmusatyalab/coda/pull/15#discussion_r75055139","pull_request_url":"https://api.github.com/repos/cmusatyalab/coda/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/cmusatyalab/coda/pulls/comments/75055139"},"html":{"href":"https://github.com/cmusatyalab/coda/pull/15#discussion_r75055139"},"pull_request":{"href":"https://api.github.com/repos/cmusatyalab/coda/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/cmusatyalab/coda/pulls/15","id":79835756,"html_url":"https://github.com/cmusatyalab/coda/pull/15","diff_url":"https://github.com/cmusatyalab/coda/pull/15.diff","patch_url":"https://github.com/cmusatyalab/coda/pull/15.patch","issue_url":"https://api.github.com/repos/cmusatyalab/coda/issues/15","number":15,"state":"open","locked":false,"title":"Add struct pack and unpack functions in RPC2 stub generator","user":{"login":"laosiaudi","id":3873971,"avatar_url":"https://avatars.githubusercontent.com/u/3873971?v=3","gravatar_id":"","url":"https://api.github.com/users/laosiaudi","html_url":"https://github.com/laosiaudi","followers_url":"https://api.github.com/users/laosiaudi/followers","following_url":"https://api.github.com/users/laosiaudi/following{/other_user}","gists_url":"https://api.github.com/users/laosiaudi/gists{/gist_id}","starred_url":"https://api.github.com/users/laosiaudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laosiaudi/subscriptions","organizations_url":"https://api.github.com/users/laosiaudi/orgs","repos_url":"https://api.github.com/users/laosiaudi/repos","events_url":"https://api.github.com/users/laosiaudi/events{/privacy}","received_events_url":"https://api.github.com/users/laosiaudi/received_events","type":"User","site_admin":false},"body":"**This simplifies the process when packing and unpacking structs in each RPC2 Stub,  reduces the amount of codes and makes it more readable.**  \r\n\r\n- Add auto-generated pack and unpack functions for structs defined in each rpc2 file. After being compiled and built, there will be an extra xx.helper.c generated for each xx.rpc2 file.It contains all the pack and unpack functions for the structs defined in xx.rpc2.\r\n\r\n- Add pack and unpacked functions for other standard types(int, double, string etc.). They are all declared in rpc2/pack_helper.h and defined in rpc2-src/pack_helper.c.\r\n\r\n- Also move the definitions of stub-predefined structs(CallCountEntry, MultiCallEntry, MultiStubWork) to rpc2.h and their pack and unpack functions are also declared in rpc2/pack_helper.h and defined in rpc2-src/pack_helper.c.","created_at":"2016-08-03T01:35:26Z","updated_at":"2016-08-17T02:43:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8353b52755608f6524bbf1aa75c9a6dd76b29150","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cmusatyalab/coda/pulls/15/commits","review_comments_url":"https://api.github.com/repos/cmusatyalab/coda/pulls/15/comments","review_comment_url":"https://api.github.com/repos/cmusatyalab/coda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cmusatyalab/coda/issues/15/comments","statuses_url":"https://api.github.com/repos/cmusatyalab/coda/statuses/25b9610696753952ec82e0ca256a40036f9ca2b4","head":{"label":"laosiaudi:master","ref":"master","sha":"25b9610696753952ec82e0ca256a40036f9ca2b4","user":{"login":"laosiaudi","id":3873971,"avatar_url":"https://avatars.githubusercontent.com/u/3873971?v=3","gravatar_id":"","url":"https://api.github.com/users/laosiaudi","html_url":"https://github.com/laosiaudi","followers_url":"https://api.github.com/users/laosiaudi/followers","following_url":"https://api.github.com/users/laosiaudi/following{/other_user}","gists_url":"https://api.github.com/users/laosiaudi/gists{/gist_id}","starred_url":"https://api.github.com/users/laosiaudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laosiaudi/subscriptions","organizations_url":"https://api.github.com/users/laosiaudi/orgs","repos_url":"https://api.github.com/users/laosiaudi/repos","events_url":"https://api.github.com/users/laosiaudi/events{/privacy}","received_events_url":"https://api.github.com/users/laosiaudi/received_events","type":"User","site_admin":false},"repo":{"id":64042755,"name":"coda","full_name":"laosiaudi/coda","owner":{"login":"laosiaudi","id":3873971,"avatar_url":"https://avatars.githubusercontent.com/u/3873971?v=3","gravatar_id":"","url":"https://api.github.com/users/laosiaudi","html_url":"https://github.com/laosiaudi","followers_url":"https://api.github.com/users/laosiaudi/followers","following_url":"https://api.github.com/users/laosiaudi/following{/other_user}","gists_url":"https://api.github.com/users/laosiaudi/gists{/gist_id}","starred_url":"https://api.github.com/users/laosiaudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laosiaudi/subscriptions","organizations_url":"https://api.github.com/users/laosiaudi/orgs","repos_url":"https://api.github.com/users/laosiaudi/repos","events_url":"https://api.github.com/users/laosiaudi/events{/privacy}","received_events_url":"https://api.github.com/users/laosiaudi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/laosiaudi/coda","description":"Coda is an advanced networked filesystem. It has been developed at CMU since 1987 by the systems group of M. Satyanarayanan in the SCS department.","fork":true,"url":"https://api.github.com/repos/laosiaudi/coda","forks_url":"https://api.github.com/repos/laosiaudi/coda/forks","keys_url":"https://api.github.com/repos/laosiaudi/coda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laosiaudi/coda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laosiaudi/coda/teams","hooks_url":"https://api.github.com/repos/laosiaudi/coda/hooks","issue_events_url":"https://api.github.com/repos/laosiaudi/coda/issues/events{/number}","events_url":"https://api.github.com/repos/laosiaudi/coda/events","assignees_url":"https://api.github.com/repos/laosiaudi/coda/assignees{/user}","branches_url":"https://api.github.com/repos/laosiaudi/coda/branches{/branch}","tags_url":"https://api.github.com/repos/laosiaudi/coda/tags","blobs_url":"https://api.github.com/repos/laosiaudi/coda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laosiaudi/coda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laosiaudi/coda/git/refs{/sha}","trees_url":"https://api.github.com/repos/laosiaudi/coda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laosiaudi/coda/statuses/{sha}","languages_url":"https://api.github.com/repos/laosiaudi/coda/languages","stargazers_url":"https://api.github.com/repos/laosiaudi/coda/stargazers","contributors_url":"https://api.github.com/repos/laosiaudi/coda/contributors","subscribers_url":"https://api.github.com/repos/laosiaudi/coda/subscribers","subscription_url":"https://api.github.com/repos/laosiaudi/coda/subscription","commits_url":"https://api.github.com/repos/laosiaudi/coda/commits{/sha}","git_commits_url":"https://api.github.com/repos/laosiaudi/coda/git/commits{/sha}","comments_url":"https://api.github.com/repos/laosiaudi/coda/comments{/number}","issue_comment_url":"https://api.github.com/repos/laosiaudi/coda/issues/comments{/number}","contents_url":"https://api.github.com/repos/laosiaudi/coda/contents/{+path}","compare_url":"https://api.github.com/repos/laosiaudi/coda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laosiaudi/coda/merges","archive_url":"https://api.github.com/repos/laosiaudi/coda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laosiaudi/coda/downloads","issues_url":"https://api.github.com/repos/laosiaudi/coda/issues{/number}","pulls_url":"https://api.github.com/repos/laosiaudi/coda/pulls{/number}","milestones_url":"https://api.github.com/repos/laosiaudi/coda/milestones{/number}","notifications_url":"https://api.github.com/repos/laosiaudi/coda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laosiaudi/coda/labels{/name}","releases_url":"https://api.github.com/repos/laosiaudi/coda/releases{/id}","deployments_url":"https://api.github.com/repos/laosiaudi/coda/deployments","created_at":"2016-07-24T01:12:07Z","updated_at":"2016-07-24T01:12:11Z","pushed_at":"2016-08-16T21:35:25Z","git_url":"git://github.com/laosiaudi/coda.git","ssh_url":"git@github.com:laosiaudi/coda.git","clone_url":"https://github.com/laosiaudi/coda.git","svn_url":"https://github.com/laosiaudi/coda","homepage":"http://coda.cs.cmu.edu/","size":13774,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cmusatyalab:master","ref":"master","sha":"3aedd4b0a97812ec34e62c9250f4a6874414cb5a","user":{"login":"cmusatyalab","id":3372991,"avatar_url":"https://avatars.githubusercontent.com/u/3372991?v=3","gravatar_id":"","url":"https://api.github.com/users/cmusatyalab","html_url":"https://github.com/cmusatyalab","followers_url":"https://api.github.com/users/cmusatyalab/followers","following_url":"https://api.github.com/users/cmusatyalab/following{/other_user}","gists_url":"https://api.github.com/users/cmusatyalab/gists{/gist_id}","starred_url":"https://api.github.com/users/cmusatyalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmusatyalab/subscriptions","organizations_url":"https://api.github.com/users/cmusatyalab/orgs","repos_url":"https://api.github.com/users/cmusatyalab/repos","events_url":"https://api.github.com/users/cmusatyalab/events{/privacy}","received_events_url":"https://api.github.com/users/cmusatyalab/received_events","type":"Organization","site_admin":false},"repo":{"id":56079727,"name":"coda","full_name":"cmusatyalab/coda","owner":{"login":"cmusatyalab","id":3372991,"avatar_url":"https://avatars.githubusercontent.com/u/3372991?v=3","gravatar_id":"","url":"https://api.github.com/users/cmusatyalab","html_url":"https://github.com/cmusatyalab","followers_url":"https://api.github.com/users/cmusatyalab/followers","following_url":"https://api.github.com/users/cmusatyalab/following{/other_user}","gists_url":"https://api.github.com/users/cmusatyalab/gists{/gist_id}","starred_url":"https://api.github.com/users/cmusatyalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmusatyalab/subscriptions","organizations_url":"https://api.github.com/users/cmusatyalab/orgs","repos_url":"https://api.github.com/users/cmusatyalab/repos","events_url":"https://api.github.com/users/cmusatyalab/events{/privacy}","received_events_url":"https://api.github.com/users/cmusatyalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cmusatyalab/coda","description":"Coda is an advanced networked filesystem. It has been developed at CMU since 1987 by the systems group of M. Satyanarayanan in the SCS department.","fork":false,"url":"https://api.github.com/repos/cmusatyalab/coda","forks_url":"https://api.github.com/repos/cmusatyalab/coda/forks","keys_url":"https://api.github.com/repos/cmusatyalab/coda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmusatyalab/coda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmusatyalab/coda/teams","hooks_url":"https://api.github.com/repos/cmusatyalab/coda/hooks","issue_events_url":"https://api.github.com/repos/cmusatyalab/coda/issues/events{/number}","events_url":"https://api.github.com/repos/cmusatyalab/coda/events","assignees_url":"https://api.github.com/repos/cmusatyalab/coda/assignees{/user}","branches_url":"https://api.github.com/repos/cmusatyalab/coda/branches{/branch}","tags_url":"https://api.github.com/repos/cmusatyalab/coda/tags","blobs_url":"https://api.github.com/repos/cmusatyalab/coda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmusatyalab/coda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmusatyalab/coda/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmusatyalab/coda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmusatyalab/coda/statuses/{sha}","languages_url":"https://api.github.com/repos/cmusatyalab/coda/languages","stargazers_url":"https://api.github.com/repos/cmusatyalab/coda/stargazers","contributors_url":"https://api.github.com/repos/cmusatyalab/coda/contributors","subscribers_url":"https://api.github.com/repos/cmusatyalab/coda/subscribers","subscription_url":"https://api.github.com/repos/cmusatyalab/coda/subscription","commits_url":"https://api.github.com/repos/cmusatyalab/coda/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmusatyalab/coda/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmusatyalab/coda/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmusatyalab/coda/issues/comments{/number}","contents_url":"https://api.github.com/repos/cmusatyalab/coda/contents/{+path}","compare_url":"https://api.github.com/repos/cmusatyalab/coda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmusatyalab/coda/merges","archive_url":"https://api.github.com/repos/cmusatyalab/coda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmusatyalab/coda/downloads","issues_url":"https://api.github.com/repos/cmusatyalab/coda/issues{/number}","pulls_url":"https://api.github.com/repos/cmusatyalab/coda/pulls{/number}","milestones_url":"https://api.github.com/repos/cmusatyalab/coda/milestones{/number}","notifications_url":"https://api.github.com/repos/cmusatyalab/coda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmusatyalab/coda/labels{/name}","releases_url":"https://api.github.com/repos/cmusatyalab/coda/releases{/id}","deployments_url":"https://api.github.com/repos/cmusatyalab/coda/deployments","created_at":"2016-04-12T16:26:33Z","updated_at":"2016-07-20T10:21:14Z","pushed_at":"2016-08-16T21:35:26Z","git_url":"git://github.com/cmusatyalab/coda.git","ssh_url":"git@github.com:cmusatyalab/coda.git","clone_url":"https://github.com/cmusatyalab/coda.git","svn_url":"https://github.com/cmusatyalab/coda","homepage":"http://coda.cs.cmu.edu/","size":15495,"stargazers_count":11,"watchers_count":11,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cmusatyalab/coda/pulls/15"},"html":{"href":"https://github.com/cmusatyalab/coda/pull/15"},"issue":{"href":"https://api.github.com/repos/cmusatyalab/coda/issues/15"},"comments":{"href":"https://api.github.com/repos/cmusatyalab/coda/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/cmusatyalab/coda/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/cmusatyalab/coda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cmusatyalab/coda/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/cmusatyalab/coda/statuses/25b9610696753952ec82e0ca256a40036f9ca2b4"}}}}
{"actor":{"display_login":"jaharkes"}}