From 34205af801f321140b90e42d15486415e9cecd0f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 18 Mar 2022 03:28:25 +0000 Subject: [PATCH] Tag some type aliases with `(C-not exported)` Type aliases are now more robustly being exported in the C bindings generator, which requires ensuring we don't include some type aliases which make no sense in bindings. --- lightning/src/ln/channelmanager.rs | 4 ++++ lightning/src/ln/peer_handler.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 674977faa..52911036f 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -878,6 +878,8 @@ impl PendingOutboundPayment { /// issues such as overly long function definitions. Note that the ChannelManager can take any /// type that implements KeysInterface for its keys manager, but this type alias chooses the /// concrete type of the KeysManager. +/// +/// (C-not exported) as Arcs don't make sense in bindings pub type SimpleArcChannelManager = ChannelManager, Arc, Arc, Arc, Arc>; /// SimpleRefChannelManager is a type alias for a ChannelManager reference, and is the reference @@ -888,6 +890,8 @@ pub type SimpleArcChannelManager = ChannelManager = ChannelManager; /// Manager which keeps track of a number of channels and sends messages to the appropriate diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index b910d4bf7..3050bcb2a 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -376,6 +376,8 @@ struct PeerHolder { /// lifetimes). Other times you can afford a reference, which is more efficient, in which case /// SimpleRefPeerManager is the more appropriate type. Defining these type aliases prevents /// issues such as overly long function definitions. +/// +/// (C-not exported) as Arcs don't make sense in bindings pub type SimpleArcPeerManager = PeerManager>, Arc, Arc, Arc>>, Arc, Arc>; /// SimpleRefPeerManager is a type alias for a PeerManager reference, and is the reference @@ -384,6 +386,8 @@ pub type SimpleArcPeerManager = PeerManager = PeerManager, &'e NetGraphMsgHandler<&'g NetworkGraph, &'h C, &'f L>, &'f L, IgnoringMessageHandler>; /// A PeerManager manages a set of peers, described by their [`SocketDescriptor`] and marshalls -- 2.39.5