File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ restricting time connection establishment.
21
21
### Changed
22
22
- ` network::protocol::codec::IProtoType ` uses C language representation
23
23
- ` cbus::sync::std::ThreadWaker ` now uses internal thread FIFO queue when blocking threads on send.
24
+ - ` #[tarantool::proc] ` attribute doesn't add procs to a global array unless
25
+ ` stored_procs_slice ` feature is enabled.
26
+ - ` proc::all_procs ` will now panic if ` stored_procs_slice ` feature is disabled.
24
27
25
28
### Fixed
26
29
- ` tlua::{Push, PushInto, LuaRead} ` now work for HashSet & HashMap with custom hashers.
Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ mod stored_procs_slice {
101
101
// Linkme distributed_slice exports a symbol with the given name, so we must
102
102
// make sure the name is unique, so as not to conflict with distributed slices
103
103
// from other crates or any other global symbols.
104
+ /// *INTERNAL API* It is only marked `pub` because it needs to be accessed
105
+ /// from procedural macros.
104
106
#[ doc( hidden) ]
105
107
#[ :: linkme:: distributed_slice]
106
108
pub static TARANTOOL_MODULE_STORED_PROCS : [ Proc ] = [ ..] ;
@@ -111,11 +113,17 @@ mod stored_procs_slice {
111
113
/// The order of procs in the slice is undefined.
112
114
///
113
115
/// [`tarantool::proc`]: macro@crate::proc
116
+ #[ inline( always) ]
114
117
pub fn all_procs ( ) -> & ' static [ Proc ] {
115
118
& TARANTOOL_MODULE_STORED_PROCS
116
119
}
117
120
}
118
121
122
+ #[ cfg( not( feature = "stored_procs_slice" ) ) ]
123
+ pub fn all_procs ( ) -> & ' static [ Proc ] {
124
+ panic ! ( "`stored_procs_slice` feature is disabled, calling this function doesn't make sense" ) ;
125
+ }
126
+
119
127
////////////////////////////////////////////////////////////////////////////////
120
128
// module_name
121
129
////////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments