Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize "extern" decls on AS_EXTERN #972

Merged
merged 2 commits into from
Jun 18, 2018
Merged

Standardize "extern" decls on AS_EXTERN #972

merged 2 commits into from
Jun 18, 2018

Conversation

Adlai-Holler
Copy link
Member

@Adlai-Holler Adlai-Holler commented Jun 16, 2018

  • First of a series of header/macro cleanups.
  • Need 1 "extern" decorator to rule them all.
  • EXTERN_C_BEGIN/EXTERN_C_END aren't sufficient because outside of c++ they don't do anything. In C you cannot declare multiple functions extern in one shot. You must decorate each function anyway, so why bother with these?
  • Foundation uses FOUNDATION_EXTERN, UIKit uses UIKIT_EXTERN on each function, and drops the BEGIN/END.
  • #define AS_EXTERN FOUNDATION_EXTERN
  • We don't need to bother with EXPORT because that only matters when compiling for win32. Not aware of any intentions to port to windows 😂 😂 😂 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥

The current definition of FOUNDATION_EXTERN is:

#if defined(__cplusplus)
#define FOUNDATION_EXTERN extern "C"
#else
#define FOUNDATION_EXTERN extern
#endif

Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghost
Copy link

ghost commented Jun 18, 2018

1 Warning
⚠️ This is a big PR, please consider splitting it up to ease code review.

Generated by 🚫 Danger

@Adlai-Holler Adlai-Holler merged commit dbe469a into master Jun 18, 2018
@Adlai-Holler Adlai-Holler deleted the AHExtern branch June 18, 2018 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants