Skip to content

Clean up API decorations in H5api_adpt.h #5511

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

Merged
merged 4 commits into from
May 6, 2025

Conversation

derobins
Copy link
Member

@derobins derobins commented May 4, 2025

Reduces duplication in H5api_adpt.h

Some API decorations (used to hide __declspec on Windows, among other
things) have been renamed to be consistent and easier to read:

H5_DLLCPP(VAR)           --> H5CPP_DLL(VAR)
H5_HLDLL(VAR)            --> H5HL_DLL(VAR)
H5_HLCPPDLL(VAR)         --> H5CPP_HL_DLL(VAR)
H5_FCDLL(VAR)            --> H5FC_DLL(VAR)
H5_FCTESTDLL(VAR)        --> H5FC_TEST_DLL(VAR)
HDF5_HL_F90CSTUBDLL(VAR) --> H5FC_HL_DLL(VAR)

Fixes #5509

derobins added 2 commits May 4, 2025 04:46
This change also uses the shared markup (e.g., __declspec) in both
static and shared libraries as the shared markup is ignored when
building static libs.
Some API decorations (used to hide __declspec on Windows, among other
things) have been renamed:

    H5_DLLCPP(VAR)           --> H5CPP_DLL(VAR)
    H5_HLDLL(VAR)            --> H5HL_DLL(VAR)
    H5_HLCPPDLL(VAR)         --> H5CPP_HL_DLL(VAR)
    H5_FCDLL(VAR)            --> H5FC_DLL(VAR)
    H5_FCTESTDLL(VAR)        --> H5FC_TEST_DLL(VAR)
    HDF5_HL_F90CSTUBDLL(VAR) --> H5FC_HL_DLL(VAR)

The shared library decorations are also now used when building static
libraries (where they are meaningless and ignored).
Copy link
Collaborator

@qkoziol qkoziol left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

Copy link
Collaborator

@brtnfld brtnfld left a comment

Choose a reason for hiding this comment

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

LGTM

@lrknox lrknox merged commit 07e995d into HDFGroup:develop May 6, 2025
60 checks passed
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.

Simplify the API macros in H5api_adpt.h
6 participants