rexgen icon indicating copy to clipboard operation
rexgen copied to clipboard

JS_REGEX_BUILD_VERSION definition

Open frank-dittrich opened this issue 11 years ago • 1 comments

In an earlier revision, JS_REGEX_BUILD_VERSION was defined as 122. Now, /usr/local/include/librexgen/version.h has

#define JS_REGEX_MAJOR_VERSION 1
#define JS_REGEX_MINOR_VERSION 1
#define JS_REGEX_BUILD_VERSION DEV

Shouldn't that be:

#define JS_REGEX_BUILD_VERSION "DEV"

Still not optimal, since apparently JS_REGEX_BUILD_VERSION has been defined as an integer in the past, and now became a string, while JS_REGEX_MAJOR_VERSION and JS_REGEX_MINOR_VERSION didn't change.

For the run time version, rexgen_version() can be used. But sometimes, you want to report the rexgen version that has been used when building a binary stat uses librexgen.

May be you can do this now:

#define JS_REGEX_MAJOR_VERSION 1
#define JS_REGEX_MINOR_VERSION 2
#define JS_REGEX_BUILD_VERSION 0
#define JS_REGEX_BUILD_VERSION_SUFFIX "DEV"

and this later:

#define JS_REGEX_MAJOR_VERSION 1
#define JS_REGEX_MINOR_VERSION 2
#define JS_REGEX_BUILD_VERSION 1
#define JS_REGEX_BUILD_VERSION_SUFFIX ""

or something similar that makes sure JS_REGEX_BUILD_VERSION remains an integer.

frank-dittrich avatar Jul 12 '14 13:07 frank-dittrich

May be it is a good idea to define a version string for the complete build time version, like this

#define JS_REGEX_VERSION "1.2.1"

in addition to JS_REGEX_MAJOR_VERSION, JS_REGEX_MINOR_VERSION, ...

frank-dittrich avatar Jul 13 '14 13:07 frank-dittrich