Skip to content

Commit 2e97fdd

Browse files
committed
Merge pull request #2021 from chriseppstein/language_version
Expose the libsass language version via API.
2 parents 78a6a77 + 87fd6fe commit 2e97fdd

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

include/sass/base.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ ADDAPI char* ADDCALL sass_resolve_file (const char* path, const char* incs[]);
7979
// Get compiled libsass version
8080
ADDAPI const char* ADDCALL libsass_version(void);
8181

82+
// Get compiled libsass language
83+
ADDAPI const char* ADDCALL libsass_language_version(void);
84+
8285
#ifdef __cplusplus
8386
} // __cplusplus defined.
8487
#endif

include/sass/version.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
#define LIBSASS_VERSION "[NA]"
66
#endif
77

8+
#ifndef LIBSASS_LANGUAGE_VERSION
9+
#define LIBSASS_LANGUAGE_VERSION "[NA]"
10+
#endif
11+
812
#endif

include/sass/version.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
#define LIBSASS_VERSION "@PACKAGE_VERSION@"
66
#endif
77

8+
#ifndef LIBSASS_LANGUAGE_VERSION
9+
#define LIBSASS_LANGUAGE_VERSION "3.4"
10+
#endif
11+
812
#endif

src/sass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,10 @@ extern "C" {
6363
return LIBSASS_VERSION;
6464
}
6565

66+
// Get compiled libsass version
67+
const char* ADDCALL libsass_language_version(void)
68+
{
69+
return LIBSASS_LANGUAGE_VERSION;
70+
}
71+
6672
}

0 commit comments

Comments
 (0)