{"action":"created","comment":{"url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/comments/125189206","pull_request_review_id":47555827,"id":125189206,"diff_hunk":"@@ -13,18 +13,33 @@\n \n #if defined _WIN32 || defined __CYGWIN__\n     #ifdef BUILDING_PHPCPP\n-        #ifdef __GNUC__\n-            #define PHPCPP_EXPORT __attribute__ ((dllexport))\n-        #else\n-            #define PHPCPP_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.\n+        #ifdef BUILDING_SHARED\n+            #ifdef __GNUC__\n+                #define PHPCPP_EXPORT __attribute__ ((dllexport))\n+            #else\n+                #define PHPCPP_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.\n+            #endif\n+        #else /* build static library */\n+          #define PHPCPP_EXPORT\n         #endif\n+        #define DLL_EXPORT\n     #else\n-        #ifdef __GNUC__\n-            #define DLL_EXPORT __attribute__ ((dllimport))\n-        #else\n-            #define DLL_EXPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.\n+        #ifdef BUILDING_SHARED\n+            #ifdef __GNUC__\n+                #define DLL_EXPORT __attribute__ ((dllimport))\n+            #else\n+                #define DLL_EXPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.\n+            #endif\n+        #else /* build static library */\n+            #define DLL_EXPORT\n         #endif\n+        #define PHPCPP_EXPORT\n     #endif\n #else\n-    #define PHPCPP_EXPORT __attribute__ ((visibility (\"default\")))\n+    #ifdef BUILDING_SHARED\n+        #define PHPCPP_EXPORT __attribute__ ((visibility (\"default\")))\n+    #else /* build static library */\n+        #define PHPCPP_EXPORT\n+    #endif\n+    #define DLL_EXPORT","path":"include/visibility.h","position":41,"original_position":41,"commit_id":"68294488f926ee1786bd932a67e310f243fffe14","original_commit_id":"68294488f926ee1786bd932a67e310f243fffe14","user":{"login":"weltling","id":22016,"avatar_url":"https://avatars3.githubusercontent.com/u/22016?v=3","gravatar_id":"","url":"https://api.github.com/users/weltling","html_url":"https://github.com/weltling","followers_url":"https://api.github.com/users/weltling/followers","following_url":"https://api.github.com/users/weltling/following{/other_user}","gists_url":"https://api.github.com/users/weltling/gists{/gist_id}","starred_url":"https://api.github.com/users/weltling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weltling/subscriptions","organizations_url":"https://api.github.com/users/weltling/orgs","repos_url":"https://api.github.com/users/weltling/repos","events_url":"https://api.github.com/users/weltling/events{/privacy}","received_events_url":"https://api.github.com/users/weltling/received_events","type":"User","site_admin":false},"body":"This piece seems wrong. If the attribute is supported, DLL_EXPORT should be same as PHPCPP_EXPORT.\r\n\r\nIn general I see what you're striving to achieve, but it is not going to work well. An extension should define its own API inside it, using same specifier will still require additional compiler flags. Fe if there's a static phpcpp lib, get_module() inside the extension will still have to be DLL exported.\r\n\r\nThanks.","created_at":"2017-07-02T18:17:12Z","updated_at":"2017-07-02T18:17:12Z","html_url":"https://github.com/CopernicaMarketingSoftware/PHP-CPP/pull/324#discussion_r125189206","pull_request_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324","_links":{"self":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/comments/125189206"},"html":{"href":"https://github.com/CopernicaMarketingSoftware/PHP-CPP/pull/324#discussion_r125189206"},"pull_request":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324"}}},"pull_request":{"url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324","id":115899361,"html_url":"https://github.com/CopernicaMarketingSoftware/PHP-CPP/pull/324","diff_url":"https://github.com/CopernicaMarketingSoftware/PHP-CPP/pull/324.diff","patch_url":"https://github.com/CopernicaMarketingSoftware/PHP-CPP/pull/324.patch","issue_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/issues/324","number":324,"state":"open","locked":false,"title":"Added possibility to compile this library as a static or dynamic library","user":{"login":"atvise","id":7139658,"avatar_url":"https://avatars3.githubusercontent.com/u/7139658?v=3","gravatar_id":"","url":"https://api.github.com/users/atvise","html_url":"https://github.com/atvise","followers_url":"https://api.github.com/users/atvise/followers","following_url":"https://api.github.com/users/atvise/following{/other_user}","gists_url":"https://api.github.com/users/atvise/gists{/gist_id}","starred_url":"https://api.github.com/users/atvise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atvise/subscriptions","organizations_url":"https://api.github.com/users/atvise/orgs","repos_url":"https://api.github.com/users/atvise/repos","events_url":"https://api.github.com/users/atvise/events{/privacy}","received_events_url":"https://api.github.com/users/atvise/received_events","type":"User","site_admin":false},"body":"- visibility.h/Makefile - Added possibility to compile this library as a static or dynamic library\r\n- value.h - Fixed friend declarations because the must have also the PHPCPP_EXPORT declaration (C2375 redefinition; different linkage)\r\n- streams.h - Fixed extern thread_local stream definition because the can't have PHPCPP_EXPORT declaration (C2492 'deprecated': data with thread storage duration may not have dll interface)","created_at":"2017-04-14T08:15:01Z","updated_at":"2017-07-02T18:17:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f147f1e8017e8a083dd380b1242cf17b13efa1ea","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324/commits","review_comments_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324/comments","review_comment_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/issues/324/comments","statuses_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/statuses/68294488f926ee1786bd932a67e310f243fffe14","head":{"label":"atvise:add_static_build","ref":"add_static_build","sha":"68294488f926ee1786bd932a67e310f243fffe14","user":{"login":"atvise","id":7139658,"avatar_url":"https://avatars3.githubusercontent.com/u/7139658?v=3","gravatar_id":"","url":"https://api.github.com/users/atvise","html_url":"https://github.com/atvise","followers_url":"https://api.github.com/users/atvise/followers","following_url":"https://api.github.com/users/atvise/following{/other_user}","gists_url":"https://api.github.com/users/atvise/gists{/gist_id}","starred_url":"https://api.github.com/users/atvise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atvise/subscriptions","organizations_url":"https://api.github.com/users/atvise/orgs","repos_url":"https://api.github.com/users/atvise/repos","events_url":"https://api.github.com/users/atvise/events{/privacy}","received_events_url":"https://api.github.com/users/atvise/received_events","type":"User","site_admin":false},"repo":{"id":88244083,"name":"PHP-CPP","full_name":"atvise/PHP-CPP","owner":{"login":"atvise","id":7139658,"avatar_url":"https://avatars3.githubusercontent.com/u/7139658?v=3","gravatar_id":"","url":"https://api.github.com/users/atvise","html_url":"https://github.com/atvise","followers_url":"https://api.github.com/users/atvise/followers","following_url":"https://api.github.com/users/atvise/following{/other_user}","gists_url":"https://api.github.com/users/atvise/gists{/gist_id}","starred_url":"https://api.github.com/users/atvise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atvise/subscriptions","organizations_url":"https://api.github.com/users/atvise/orgs","repos_url":"https://api.github.com/users/atvise/repos","events_url":"https://api.github.com/users/atvise/events{/privacy}","received_events_url":"https://api.github.com/users/atvise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atvise/PHP-CPP","description":"Library to build PHP extensions with C++","fork":true,"url":"https://api.github.com/repos/atvise/PHP-CPP","forks_url":"https://api.github.com/repos/atvise/PHP-CPP/forks","keys_url":"https://api.github.com/repos/atvise/PHP-CPP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atvise/PHP-CPP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atvise/PHP-CPP/teams","hooks_url":"https://api.github.com/repos/atvise/PHP-CPP/hooks","issue_events_url":"https://api.github.com/repos/atvise/PHP-CPP/issues/events{/number}","events_url":"https://api.github.com/repos/atvise/PHP-CPP/events","assignees_url":"https://api.github.com/repos/atvise/PHP-CPP/assignees{/user}","branches_url":"https://api.github.com/repos/atvise/PHP-CPP/branches{/branch}","tags_url":"https://api.github.com/repos/atvise/PHP-CPP/tags","blobs_url":"https://api.github.com/repos/atvise/PHP-CPP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atvise/PHP-CPP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atvise/PHP-CPP/git/refs{/sha}","trees_url":"https://api.github.com/repos/atvise/PHP-CPP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atvise/PHP-CPP/statuses/{sha}","languages_url":"https://api.github.com/repos/atvise/PHP-CPP/languages","stargazers_url":"https://api.github.com/repos/atvise/PHP-CPP/stargazers","contributors_url":"https://api.github.com/repos/atvise/PHP-CPP/contributors","subscribers_url":"https://api.github.com/repos/atvise/PHP-CPP/subscribers","subscription_url":"https://api.github.com/repos/atvise/PHP-CPP/subscription","commits_url":"https://api.github.com/repos/atvise/PHP-CPP/commits{/sha}","git_commits_url":"https://api.github.com/repos/atvise/PHP-CPP/git/commits{/sha}","comments_url":"https://api.github.com/repos/atvise/PHP-CPP/comments{/number}","issue_comment_url":"https://api.github.com/repos/atvise/PHP-CPP/issues/comments{/number}","contents_url":"https://api.github.com/repos/atvise/PHP-CPP/contents/{+path}","compare_url":"https://api.github.com/repos/atvise/PHP-CPP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atvise/PHP-CPP/merges","archive_url":"https://api.github.com/repos/atvise/PHP-CPP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atvise/PHP-CPP/downloads","issues_url":"https://api.github.com/repos/atvise/PHP-CPP/issues{/number}","pulls_url":"https://api.github.com/repos/atvise/PHP-CPP/pulls{/number}","milestones_url":"https://api.github.com/repos/atvise/PHP-CPP/milestones{/number}","notifications_url":"https://api.github.com/repos/atvise/PHP-CPP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atvise/PHP-CPP/labels{/name}","releases_url":"https://api.github.com/repos/atvise/PHP-CPP/releases{/id}","deployments_url":"https://api.github.com/repos/atvise/PHP-CPP/deployments","created_at":"2017-04-14T07:25:20Z","updated_at":"2017-04-14T07:25:22Z","pushed_at":"2017-04-14T11:56:51Z","git_url":"git://github.com/atvise/PHP-CPP.git","ssh_url":"git@github.com:atvise/PHP-CPP.git","clone_url":"https://github.com/atvise/PHP-CPP.git","svn_url":"https://github.com/atvise/PHP-CPP","homepage":"http://www.php-cpp.com/","size":1835,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"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":"CopernicaMarketingSoftware:master","ref":"master","sha":"a5ca2f39c43b3bc67f62f73863a5c0c8beb45b2e","user":{"login":"CopernicaMarketingSoftware","id":6337366,"avatar_url":"https://avatars0.githubusercontent.com/u/6337366?v=3","gravatar_id":"","url":"https://api.github.com/users/CopernicaMarketingSoftware","html_url":"https://github.com/CopernicaMarketingSoftware","followers_url":"https://api.github.com/users/CopernicaMarketingSoftware/followers","following_url":"https://api.github.com/users/CopernicaMarketingSoftware/following{/other_user}","gists_url":"https://api.github.com/users/CopernicaMarketingSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/CopernicaMarketingSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CopernicaMarketingSoftware/subscriptions","organizations_url":"https://api.github.com/users/CopernicaMarketingSoftware/orgs","repos_url":"https://api.github.com/users/CopernicaMarketingSoftware/repos","events_url":"https://api.github.com/users/CopernicaMarketingSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/CopernicaMarketingSoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":12339519,"name":"PHP-CPP","full_name":"CopernicaMarketingSoftware/PHP-CPP","owner":{"login":"CopernicaMarketingSoftware","id":6337366,"avatar_url":"https://avatars0.githubusercontent.com/u/6337366?v=3","gravatar_id":"","url":"https://api.github.com/users/CopernicaMarketingSoftware","html_url":"https://github.com/CopernicaMarketingSoftware","followers_url":"https://api.github.com/users/CopernicaMarketingSoftware/followers","following_url":"https://api.github.com/users/CopernicaMarketingSoftware/following{/other_user}","gists_url":"https://api.github.com/users/CopernicaMarketingSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/CopernicaMarketingSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CopernicaMarketingSoftware/subscriptions","organizations_url":"https://api.github.com/users/CopernicaMarketingSoftware/orgs","repos_url":"https://api.github.com/users/CopernicaMarketingSoftware/repos","events_url":"https://api.github.com/users/CopernicaMarketingSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/CopernicaMarketingSoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CopernicaMarketingSoftware/PHP-CPP","description":"Library to build PHP extensions with C++","fork":false,"url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP","forks_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/forks","keys_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/teams","hooks_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/hooks","issue_events_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/issues/events{/number}","events_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/events","assignees_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/assignees{/user}","branches_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/branches{/branch}","tags_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/tags","blobs_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/git/refs{/sha}","trees_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/statuses/{sha}","languages_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/languages","stargazers_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/stargazers","contributors_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/contributors","subscribers_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/subscribers","subscription_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/subscription","commits_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/commits{/sha}","git_commits_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/git/commits{/sha}","comments_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/comments{/number}","issue_comment_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/issues/comments{/number}","contents_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/contents/{+path}","compare_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/merges","archive_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/downloads","issues_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/issues{/number}","pulls_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls{/number}","milestones_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/milestones{/number}","notifications_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/labels{/name}","releases_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/releases{/id}","deployments_url":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/deployments","created_at":"2013-08-24T06:55:45Z","updated_at":"2017-07-01T14:30:52Z","pushed_at":"2017-06-01T14:17:22Z","git_url":"git://github.com/CopernicaMarketingSoftware/PHP-CPP.git","ssh_url":"git@github.com:CopernicaMarketingSoftware/PHP-CPP.git","clone_url":"https://github.com/CopernicaMarketingSoftware/PHP-CPP.git","svn_url":"https://github.com/CopernicaMarketingSoftware/PHP-CPP","homepage":"http://www.php-cpp.com/","size":1860,"stargazers_count":856,"watchers_count":856,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":205,"mirror_url":null,"open_issues_count":48,"forks":205,"open_issues":48,"watchers":856,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324"},"html":{"href":"https://github.com/CopernicaMarketingSoftware/PHP-CPP/pull/324"},"issue":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/issues/324"},"comments":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/issues/324/comments"},"review_comments":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324/comments"},"review_comment":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/pulls/324/commits"},"statuses":{"href":"https://api.github.com/repos/CopernicaMarketingSoftware/PHP-CPP/statuses/68294488f926ee1786bd932a67e310f243fffe14"}}}}
{"actor":{"display_login":"weltling"}}