Skip to content

Commit 744dc70

Browse files
committed
version: new function to export version in string format
Signed-off-by: Eduardo Silva <[email protected]>
1 parent f976f78 commit 744dc70

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

include/ctraces/ctr_version.h.in

+2
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@
3333
CTR_VERSION_PATCH)
3434
#define CTR_VERSION_STR "@CTR_VERSION_STR@"
3535

36+
char *ctr_version();
37+
3638
#endif

src/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ set(src
99
ctr_random.c
1010
ctr_utils.c
1111
ctr_attributes.c
12+
ctr_version.c
1213
ctr_mpack_utils.c
1314
# encoders
1415
ctr_encode_text.c

tests/basic.c

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ void test_basic()
2626
{
2727
struct ctrace *ctx;
2828

29+
printf("version => '%s'", ctr_version());
30+
2931
ctx = ctr_create(NULL);
3032
TEST_CHECK(ctx != NULL);
3133

0 commit comments

Comments
 (0)