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

refs #13054 correctly handle {.exportc,dynlib.} and {.exportcpp,dynlib.} #13136

Merged
merged 2 commits into from
Jan 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions lib/nimbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,13 @@ __AVR__
# define NIM_CAST(type, ptr) ((type)(ptr))
#endif


/* ------------------------------------------------------------------- */
#ifdef __cplusplus
# define NIM_EXTERNC extern "C"
#else
# define NIM_EXTERNC
#endif

#if defined(WIN32) || defined(_WIN32) /* only Windows has this mess... */
# define N_LIB_PRIVATE
Expand Down Expand Up @@ -208,11 +214,7 @@ __AVR__
# define N_FASTCALL_PTR(rettype, name) rettype (*name)
# define N_SAFECALL_PTR(rettype, name) rettype (*name)
# endif
# ifdef __cplusplus
# define N_LIB_EXPORT extern "C"
# else
# define N_LIB_EXPORT extern
# endif
# define N_LIB_EXPORT NIM_EXTERNC __attribute__((visibility("default")))
Araq marked this conversation as resolved.
Show resolved Hide resolved
# define N_LIB_IMPORT extern
#endif

Expand Down Expand Up @@ -520,12 +522,6 @@ typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == siz
}
#endif

#ifdef __cplusplus
# define NIM_EXTERNC extern "C"
#else
# define NIM_EXTERNC
#endif

#if defined(_MSC_VER)
# define NIM_ALIGN(x) __declspec(align(x))
#else
Expand Down