{"action":"created","issue":{"url":"https://api.github.com/repos/runrev/livecode/issues/2590","labels_url":"https://api.github.com/repos/runrev/livecode/issues/2590/labels{/name}","comments_url":"https://api.github.com/repos/runrev/livecode/issues/2590/comments","events_url":"https://api.github.com/repos/runrev/livecode/issues/2590/events","html_url":"https://github.com/runrev/livecode/pull/2590","id":95424272,"number":2590,"title":"libfoundation: Add new MC_DLLEXPORT_DEF macro.","user":{"login":"peter-b","id":47528,"avatar_url":"https://avatars.githubusercontent.com/u/47528?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-b","html_url":"https://github.com/peter-b","followers_url":"https://api.github.com/users/peter-b/followers","following_url":"https://api.github.com/users/peter-b/following{/other_user}","gists_url":"https://api.github.com/users/peter-b/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-b/subscriptions","organizations_url":"https://api.github.com/users/peter-b/orgs","repos_url":"https://api.github.com/users/peter-b/repos","events_url":"https://api.github.com/users/peter-b/events{/privacy}","received_events_url":"https://api.github.com/users/peter-b/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/runrev/livecode/labels/enhancement","name":"enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-16T12:34:50Z","updated_at":"2015-07-16T16:40:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/runrev/livecode/pulls/2590","html_url":"https://github.com/runrev/livecode/pull/2590","diff_url":"https://github.com/runrev/livecode/pull/2590.diff","patch_url":"https://github.com/runrev/livecode/pull/2590.patch"},"body":"The `used` attribute is needed for Emscripten builds to ensure that\r\nnative functions accessed by name via dlsym() and/or from JavaScript\r\nkeep their names and are not removed even when aggressive optimisation\r\nis used.\r\n\r\n`used` can only be attached to definitions, so it cannot be added to\r\n`MC_DLLEXPORT`, because that is attached to declarations.  It is also\r\nnot possible to move `MC_DLLEXPORT` from declarations to definitions,\r\nbecause on Windows, the `dllexport` attribute must be attached to\r\ndeclarations (it changes the storage type of the symbol to which it is\r\nattached).\r\n\r\nThis patch therefore adds a new `MC_DLLEXPORT_DEF` macro that must be\r\nattached to the definitions of exported functions or variables, while\r\n`MC_DLLEXPORT` is reserved for advance declarations (e.g. in header\r\nfiles).\r\n\r\nAll symbols that are declared `MC_DLLEXPORT` are now defined with\r\n`MC_DLLEXPORT_DEF`, and all uses of `MC_DLLEXPORT` on definitions are\r\nreplaced with `MC_DLLEXPORT_DEF`.\r\n\r\nSupercedes #2579."},"comment":{"url":"https://api.github.com/repos/runrev/livecode/issues/comments/122015647","html_url":"https://github.com/runrev/livecode/pull/2590#issuecomment-122015647","issue_url":"https://api.github.com/repos/runrev/livecode/issues/2590","id":122015647,"user":{"login":"livecode-vulcan","id":11739650,"avatar_url":"https://avatars.githubusercontent.com/u/11739650?v=3","gravatar_id":"","url":"https://api.github.com/users/livecode-vulcan","html_url":"https://github.com/livecode-vulcan","followers_url":"https://api.github.com/users/livecode-vulcan/followers","following_url":"https://api.github.com/users/livecode-vulcan/following{/other_user}","gists_url":"https://api.github.com/users/livecode-vulcan/gists{/gist_id}","starred_url":"https://api.github.com/users/livecode-vulcan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livecode-vulcan/subscriptions","organizations_url":"https://api.github.com/users/livecode-vulcan/orgs","repos_url":"https://api.github.com/users/livecode-vulcan/repos","events_url":"https://api.github.com/users/livecode-vulcan/events{/privacy}","received_events_url":"https://api.github.com/users/livecode-vulcan/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T16:40:41Z","updated_at":"2015-07-16T16:40:41Z","body":"💙 review by @livecodeali ok dfc28c0133616c8ec79f3c434b19b351053f47b1"}}