From 8b571913ed346d296876973e3825a758581a8e0c Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 10 Sep 2026 15:11:00 +0500 Subject: [PATCH] api.h: format consistently for readibility --- src/ifcgeom/ifc_geom_api.h | 7 ++-- src/ifcgeom/kernels/ifc_geomlibrary_api.h | 21 ++++++----- .../serialization/ifc_geomserialization_api.h | 21 ++++++----- src/ifcparse/ifc_parse_api.h | 35 +++++++++---------- src/plugin/plugin_api.h | 21 ++++++----- src/serializers/serializers_api.h | 7 ++-- 6 files changed, 53 insertions(+), 59 deletions(-) diff --git a/src/ifcgeom/ifc_geom_api.h b/src/ifcgeom/ifc_geom_api.h index 380a202166..9f7b6c74f8 100644 --- a/src/ifcgeom/ifc_geom_api.h +++ b/src/ifcgeom/ifc_geom_api.h @@ -28,8 +28,7 @@ #else #define IFC_GEOM_API __declspec(dllimport) #endif -#else +#else // *nix + GCC-like compiler #define IFC_GEOM_API __attribute__((visibility("default"))) -#endif - -#endif +#endif // SWIG +#endif // IFC_GEOM_API_H diff --git a/src/ifcgeom/kernels/ifc_geomlibrary_api.h b/src/ifcgeom/kernels/ifc_geomlibrary_api.h index bac5f5799b..98369e9076 100644 --- a/src/ifcgeom/kernels/ifc_geomlibrary_api.h +++ b/src/ifcgeom/kernels/ifc_geomlibrary_api.h @@ -21,15 +21,14 @@ #define IFC_GEOMLIBRARY_API_H #ifdef SWIG -#define IFC_GEOMLIBRARY_API + #define IFC_GEOMLIBRARY_API #elif defined(_WIN32) -#ifdef IFC_GEOMLIBRARY_EXPORTS -#define IFC_GEOMLIBRARY_API __declspec(dllexport) -#else -#define IFC_GEOMLIBRARY_API __declspec(dllimport) -#endif -#else // simply assume *nix + GCC-like compiler -#define IFC_GEOMLIBRARY_API __attribute__((visibility("default"))) -#endif - -#endif + #ifdef IFC_GEOMLIBRARY_EXPORTS + #define IFC_GEOMLIBRARY_API __declspec(dllexport) + #else + #define IFC_GEOMLIBRARY_API __declspec(dllimport) + #endif +#else // *nix + GCC-like compiler + #define IFC_GEOMLIBRARY_API __attribute__((visibility("default"))) +#endif // SWIG +#endif // IFC_GEOMLIBRARY_API_H diff --git a/src/ifcgeom/serialization/ifc_geomserialization_api.h b/src/ifcgeom/serialization/ifc_geomserialization_api.h index 54e891ed3f..9a86aa85db 100644 --- a/src/ifcgeom/serialization/ifc_geomserialization_api.h +++ b/src/ifcgeom/serialization/ifc_geomserialization_api.h @@ -21,15 +21,14 @@ #define IFC_GEOMSERIALIZATION_API_H #ifdef SWIG -#define IFC_GEOMSERIALIZATION_API + #define IFC_GEOMSERIALIZATION_API #elif defined(_WIN32) -#ifdef IFC_GEOMSERIALIZATION_EXPORTS -#define IFC_GEOMSERIALIZATION_API __declspec(dllexport) -#else -#define IFC_GEOMSERIALIZATION_API __declspec(dllimport) -#endif -#else // simply assume *nix + GCC-like compiler -#define IFC_GEOMSERIALIZATION_API __attribute__((visibility("default"))) -#endif - -#endif + #ifdef IFC_GEOMSERIALIZATION_EXPORTS + #define IFC_GEOMSERIALIZATION_API __declspec(dllexport) + #else + #define IFC_GEOMSERIALIZATION_API __declspec(dllimport) + #endif +#else // *nix + GCC-like compiler + #define IFC_GEOMSERIALIZATION_API __attribute__((visibility("default"))) +#endif // SWIG +#endif // IFC_GEOMSERIALIZATION_API_H diff --git a/src/ifcparse/ifc_parse_api.h b/src/ifcparse/ifc_parse_api.h index f58695a21c..fb88a1eb59 100644 --- a/src/ifcparse/ifc_parse_api.h +++ b/src/ifcparse/ifc_parse_api.h @@ -21,22 +21,21 @@ #define IFC_PARSE_API_H #ifdef SWIG -#define IFC_PARSE_API -#define IFC_SCHEMA_API + #define IFC_PARSE_API + #define IFC_SCHEMA_API #elif defined(_WIN32) -#ifdef IFC_PARSE_EXPORTS -#define IFC_PARSE_API __declspec(dllexport) -#else -#define IFC_PARSE_API __declspec(dllimport) -#endif -#ifdef IFC_SCHEMA_EXPORTS -#define IFC_SCHEMA_API __declspec(dllexport) -#else -#define IFC_SCHEMA_API IFC_PARSE_API -#endif -#else // simply assume *nix + GCC-like compiler -#define IFC_PARSE_API __attribute__((visibility("default"))) -#define IFC_SCHEMA_API __attribute__((visibility("default"))) -#endif - -#endif + #ifdef IFC_PARSE_EXPORTS + #define IFC_PARSE_API __declspec(dllexport) + #else + #define IFC_PARSE_API __declspec(dllimport) + #endif + #ifdef IFC_SCHEMA_EXPORTS + #define IFC_SCHEMA_API __declspec(dllexport) + #else + #define IFC_SCHEMA_API IFC_PARSE_API + #endif +#else // *nix + GCC-like compiler + #define IFC_PARSE_API __attribute__((visibility("default"))) + #define IFC_SCHEMA_API __attribute__((visibility("default"))) +#endif // SWIG +#endif // IFC_PARSE_API_H diff --git a/src/plugin/plugin_api.h b/src/plugin/plugin_api.h index ae76d173ba..67efbb3aeb 100644 --- a/src/plugin/plugin_api.h +++ b/src/plugin/plugin_api.h @@ -21,15 +21,14 @@ #define PLUGIN_API_H #ifdef SWIG -#define PLUGIN_API + #define PLUGIN_API #elif defined(_WIN32) -#ifdef PLUGIN_EXPORTS -#define PLUGIN_API __declspec(dllexport) -#else -#define PLUGIN_API __declspec(dllimport) -#endif -#else -#define PLUGIN_API __attribute__((visibility("default"))) -#endif - -#endif + #ifdef PLUGIN_EXPORTS + #define PLUGIN_API __declspec(dllexport) + #else + #define PLUGIN_API __declspec(dllimport) + #endif +#else // *nix + GCC-like compiler + #define PLUGIN_API __attribute__((visibility("default"))) +#endif // SWIG +#endif // PLUGIN_API_H diff --git a/src/serializers/serializers_api.h b/src/serializers/serializers_api.h index 6188d4f82a..f0aea32fbe 100644 --- a/src/serializers/serializers_api.h +++ b/src/serializers/serializers_api.h @@ -28,8 +28,7 @@ #else #define SERIALIZERS_API __declspec(dllimport) #endif -#else +#else // *nix + GCC-like compiler #define SERIALIZERS_API __attribute__((visibility("default"))) -#endif - -#endif +#endif // SWIG +#endif // IFC_SERIALIZERS_API_H