kezhuw commented on code in PR #1893: URL: https://github.com/apache/zookeeper/pull/1893#discussion_r903470163
########## zookeeper-client/zookeeper-client-c/src/zookeeper.c: ########## @@ -1295,6 +1295,14 @@ static void log_env(zhandle_t *zh) { #endif } +/** + * Return string of "MAJOR.MINOR.PATCH" + */ +const char *zoo_version_str() +{ + return ZOO_VERSION; Review Comment: Will this compile if backported to 3.5 ? I saw `ifdef` in test code. I think it might be better to backport `ZOO_VERSION` also if `zoo_version_str` is backported. Is it ok to introduce a new macro in patch version ? @eolivelli @ztzg ########## zookeeper-client/zookeeper-client-c/include/zookeeper.h: ########## @@ -669,6 +669,20 @@ ZOOAPI sasl_callback_t *zoo_sasl_make_basic_callbacks(const char *user, #endif /* HAVE_CYRUS_SASL_H */ + +/** + * \brief return the zookeeper MAJOR.MINOR.PATCH version as a string + * + * This method allows a calling program to determine at runtime if the + * version of the dynamically loaded zookeeper library is the same as + * the version of the library when the calling program was compiled. Review Comment: It might be nice to mention `ZOO_VERSION` here. -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org