chenBright commented on code in PR #3713:
URL: https://github.com/apache/brpc/pull/3713#discussion_r4481409683
##########
src/butil/find_cstr.h:
##########
@@ -103,58 +103,58 @@ struct StringMapThreadLocalTemp {
}
};
-extern thread_local StringMapThreadLocalTemp tls_stringmap_temp;
+StringMapThreadLocalTemp& tls_stringmap_temp();
template <typename T, typename C, typename A>
typename std::map<std::string, T, C, A>::const_iterator
find_cstr(const std::map<std::string, T, C, A>& m, const char* key) {
- return m.find(*tls_stringmap_temp.get_string(key));
+ return m.find(*tls_stringmap_temp().get_string(key));
Review Comment:
The supported `find_cstr` interfaces remain source-compatible. The changed
entity, `tls_stringmap_temp`, is internal storage rather than a supported
public API. We will clarify this distinction and the rebuild requirement in the
PR description, without introducing a transitional alias.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]