mirror of
https://github.com/MAGICGrants/flutter_libsparkmobile.git
synced 2026-01-09 21:17:56 -05:00
extern C for windows too
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
|
||||
using namespace spark;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FFI-friendly wrapper for spark::getAddress.
|
||||
*
|
||||
@@ -422,4 +426,8 @@ SparkFeeResult* estimateSparkFee(
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -4,15 +4,16 @@
|
||||
#include <stdint.h>
|
||||
#include "structs.h"
|
||||
|
||||
#ifndef FFI_PLUGIN_EXPORT
|
||||
#ifdef __cplusplus
|
||||
#define FFI_PLUGIN_EXPORT extern "C" __attribute__((visibility("default"))) __attribute__((used))
|
||||
#else
|
||||
#define FFI_PLUGIN_EXPORT __attribute__((visibility("default"))) __attribute__((used))
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#define FFI_PLUGIN_EXPORT __declspec(dllexport)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef FFI_PLUGIN_EXPORT
|
||||
#ifdef _WIN32
|
||||
#define FFI_PLUGIN_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define FFI_PLUGIN_EXPORT __attribute__((visibility("default"))) __attribute__((used))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
FFI_PLUGIN_EXPORT
|
||||
@@ -101,4 +102,8 @@ struct SparkFeeResult* estimateSparkFee(
|
||||
int privateRecipientsLength
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //ORG_FIRO_SPARK_DART_INTERFACE_H
|
||||
|
||||
Reference in New Issue
Block a user