X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Finclude%2Frust_types.h;h=68395c7cdef440851e17d4a193bf3ebeab0ada25;hb=3bbecbef21ec3bf3f4f665128cbf254d85374e6e;hp=e328836e1bc7416abc4c795b2402054632ace747;hpb=49e0a8ce7b2f8482ceca97049cf0f1471b7aa524;p=rust-lightning diff --git a/lightning-c-bindings/include/rust_types.h b/lightning-c-bindings/include/rust_types.h index e328836e..68395c7c 100644 --- a/lightning-c-bindings/include/rust_types.h +++ b/lightning-c-bindings/include/rust_types.h @@ -1,12 +1,14 @@ #if defined(__GNUC__) #define MUST_USE_STRUCT __attribute__((warn_unused)) +#define MUST_USE_RES __attribute__((warn_unused_result)) #else #define MUST_USE_STRUCT +#define MUST_USE_RES #endif -#if defined(__GNUC__) -#define MUST_USE_RES __attribute__((warn_unused_result)) +#if defined(__clang__) +#define NONNULL_PTR _Nonnull #else -#define MUST_USE_RES +#define NONNULL_PTR #endif struct nativeChannelHandshakeConfigOpaque; typedef struct nativeChannelHandshakeConfigOpaque LDKnativeChannelHandshakeConfig; @@ -16,12 +18,18 @@ struct nativeChannelConfigOpaque; typedef struct nativeChannelConfigOpaque LDKnativeChannelConfig; struct nativeUserConfigOpaque; typedef struct nativeUserConfigOpaque LDKnativeUserConfig; -struct nativeChainWatchedUtilOpaque; -typedef struct nativeChainWatchedUtilOpaque LDKnativeChainWatchedUtil; -struct nativeBlockNotifierOpaque; -typedef struct nativeBlockNotifierOpaque LDKnativeBlockNotifier; -struct nativeChainWatchInterfaceUtilOpaque; -typedef struct nativeChainWatchInterfaceUtilOpaque LDKnativeChainWatchInterfaceUtil; +struct nativeChainMonitorOpaque; +typedef struct nativeChainMonitorOpaque LDKnativeChainMonitor; +struct nativeChannelMonitorUpdateOpaque; +typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate; +struct nativeMonitorUpdateErrorOpaque; +typedef struct nativeMonitorUpdateErrorOpaque LDKnativeMonitorUpdateError; +struct nativeMonitorEventOpaque; +typedef struct nativeMonitorEventOpaque LDKnativeMonitorEvent; +struct nativeHTLCUpdateOpaque; +typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate; +struct nativeChannelMonitorOpaque; +typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor; struct nativeOutPointOpaque; typedef struct nativeOutPointOpaque LDKnativeOutPoint; struct LDKChannelKeys; @@ -38,16 +46,6 @@ struct nativePaymentSendFailureOpaque; typedef struct nativePaymentSendFailureOpaque LDKnativePaymentSendFailure; struct nativeChannelManagerReadArgsOpaque; typedef struct nativeChannelManagerReadArgsOpaque LDKnativeChannelManagerReadArgs; -struct nativeChannelMonitorUpdateOpaque; -typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate; -struct nativeMonitorUpdateErrorOpaque; -typedef struct nativeMonitorUpdateErrorOpaque LDKnativeMonitorUpdateError; -struct nativeMonitorEventOpaque; -typedef struct nativeMonitorEventOpaque LDKnativeMonitorEvent; -struct nativeHTLCUpdateOpaque; -typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate; -struct nativeChannelMonitorOpaque; -typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor; struct nativeDecodeErrorOpaque; typedef struct nativeDecodeErrorOpaque LDKnativeDecodeError; struct nativeInitOpaque; @@ -120,20 +118,31 @@ struct nativeCommitmentUpdateOpaque; typedef struct nativeCommitmentUpdateOpaque LDKnativeCommitmentUpdate; struct nativeMessageHandlerOpaque; typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler; +typedef struct LDKSocketDescriptor LDKSocketDescriptor; struct nativePeerHandleErrorOpaque; typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError; struct nativePeerManagerOpaque; typedef struct nativePeerManagerOpaque LDKnativePeerManager; struct nativeTxCreationKeysOpaque; typedef struct nativeTxCreationKeysOpaque LDKnativeTxCreationKeys; -struct nativePreCalculatedTxCreationKeysOpaque; -typedef struct nativePreCalculatedTxCreationKeysOpaque LDKnativePreCalculatedTxCreationKeys; struct nativeChannelPublicKeysOpaque; typedef struct nativeChannelPublicKeysOpaque LDKnativeChannelPublicKeys; struct nativeHTLCOutputInCommitmentOpaque; typedef struct nativeHTLCOutputInCommitmentOpaque LDKnativeHTLCOutputInCommitment; +struct nativeChannelTransactionParametersOpaque; +typedef struct nativeChannelTransactionParametersOpaque LDKnativeChannelTransactionParameters; +struct nativeCounterpartyChannelTransactionParametersOpaque; +typedef struct nativeCounterpartyChannelTransactionParametersOpaque LDKnativeCounterpartyChannelTransactionParameters; +struct nativeDirectedChannelTransactionParametersOpaque; +typedef struct nativeDirectedChannelTransactionParametersOpaque LDKnativeDirectedChannelTransactionParameters; struct nativeHolderCommitmentTransactionOpaque; typedef struct nativeHolderCommitmentTransactionOpaque LDKnativeHolderCommitmentTransaction; +struct nativeBuiltCommitmentTransactionOpaque; +typedef struct nativeBuiltCommitmentTransactionOpaque LDKnativeBuiltCommitmentTransaction; +struct nativeCommitmentTransactionOpaque; +typedef struct nativeCommitmentTransactionOpaque LDKnativeCommitmentTransaction; +struct nativeTrustedCommitmentTransactionOpaque; +typedef struct nativeTrustedCommitmentTransactionOpaque LDKnativeTrustedCommitmentTransaction; struct nativeInitFeaturesOpaque; typedef struct nativeInitFeaturesOpaque LDKnativeInitFeatures; struct nativeNodeFeaturesOpaque;