@@ -152,15 +152,26 @@ struct ArrowArrayStream {
152
152
// Storage class macros for Windows
153
153
// Allow overriding/aliasing with application-defined macros
154
154
#if !defined(ADBC_EXPORT )
155
- #if defined(_WIN32 )
156
- #if defined(ADBC_EXPORTING )
157
- #define ADBC_EXPORT __declspec(dllexport)
158
- #else
159
- #define ADBC_EXPORT __declspec(dllimport)
160
- #endif // defined(ADBC_EXPORTING)
161
- #else
162
- #define ADBC_EXPORT
163
- #endif // defined(_WIN32)
155
+ #if defined(_WIN32 )
156
+ #if defined(ADBC_EXPORTING )
157
+ #define ADBC_EXPORT __declspec(dllexport)
158
+ #else
159
+ #define ADBC_EXPORT __declspec(dllimport)
160
+ #endif // defined(ADBC_EXPORTING)
161
+
162
+ #if defined(__cplusplus )
163
+ #if defined(ADBC_EXPORTING )
164
+ #define ADBC_EXPORT_STRUCT __declspec(dllexport)
165
+ #else
166
+ #define ADBC_EXPORT_STRUCT __declspec(dllimport)
167
+ #endif // defined(ADBC_EXPORTING)
168
+ #else
169
+ #define ADBC_EXPORT_STRUCT
170
+ #endif // defined(__cplusplus)
171
+ #else
172
+ #define ADBC_EXPORT
173
+ #define ADBC_EXPORT_STRUCT
174
+ #endif // defined(_WIN32)
164
175
#endif // !defined(ADBC_EXPORT)
165
176
166
177
/// \defgroup adbc-error-handling Error Handling
@@ -266,7 +277,7 @@ typedef uint8_t AdbcStatusCode;
266
277
/// ADBC_ERROR_VENDOR_CODE_PRIVATE_DATA. Clients are required to initialize
267
278
/// this struct to avoid the possibility of uninitialized values confusing the
268
279
/// driver.
269
- struct ADBC_EXPORT AdbcError {
280
+ struct ADBC_EXPORT_STRUCT AdbcError {
270
281
/// \brief The error message.
271
282
char * message ;
272
283
@@ -347,7 +358,7 @@ struct ADBC_EXPORT AdbcError {
347
358
/// called.
348
359
///
349
360
/// \since ADBC API revision 1.1.0
350
- struct ADBC_EXPORT AdbcErrorDetail {
361
+ struct ADBC_EXPORT_STRUCT AdbcErrorDetail {
351
362
/// \brief The metadata key.
352
363
const char * key ;
353
364
/// \brief The binary metadata value.
@@ -805,7 +816,7 @@ const struct AdbcError* AdbcErrorFromArrayStream(struct ArrowArrayStream* stream
805
816
/// \brief An instance of a database.
806
817
///
807
818
/// Must be kept alive as long as any connections exist.
808
- struct ADBC_EXPORT AdbcDatabase {
819
+ struct ADBC_EXPORT_STRUCT AdbcDatabase {
809
820
/// \brief Opaque implementation-defined state.
810
821
/// This field is NULLPTR iff the connection is unintialized/freed.
811
822
void * private_data ;
@@ -828,7 +839,7 @@ struct ADBC_EXPORT AdbcDatabase {
828
839
/// Connections are not required to be thread-safe, but they can be
829
840
/// used from multiple threads so long as clients take care to
830
841
/// serialize accesses to a connection.
831
- struct ADBC_EXPORT AdbcConnection {
842
+ struct ADBC_EXPORT_STRUCT AdbcConnection {
832
843
/// \brief Opaque implementation-defined state.
833
844
/// This field is NULLPTR iff the connection is unintialized/freed.
834
845
void * private_data ;
@@ -866,7 +877,7 @@ struct ADBC_EXPORT AdbcConnection {
866
877
/// Statements are not required to be thread-safe, but they can be
867
878
/// used from multiple threads so long as clients take care to
868
879
/// serialize accesses to a statement.
869
- struct ADBC_EXPORT AdbcStatement {
880
+ struct ADBC_EXPORT_STRUCT AdbcStatement {
870
881
/// \brief Opaque implementation-defined state.
871
882
/// This field is NULLPTR iff the connection is unintialized/freed.
872
883
void * private_data ;
@@ -933,7 +944,7 @@ struct AdbcPartitions {
933
944
/// initialization routines. Drivers should populate this struct, and
934
945
/// applications can call ADBC functions through this struct, without
935
946
/// worrying about multiple definitions of the same symbol.
936
- struct ADBC_EXPORT AdbcDriver {
947
+ struct ADBC_EXPORT_STRUCT AdbcDriver {
937
948
/// \brief Opaque driver-defined state.
938
949
/// This field is NULL if the driver is unintialized/freed (but
939
950
/// it need not have a value even if the driver is initialized).
0 commit comments