Skip to content

Commit

Permalink
Merge pull request #2021 from chriseppstein/language_version
Browse files Browse the repository at this point in the history
Expose the libsass language version via API.
  • Loading branch information
mgreter committed Apr 23, 2016
2 parents 78a6a77 + 87fd6fe commit 2e97fdd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/sass/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ ADDAPI char* ADDCALL sass_resolve_file (const char* path, const char* incs[]);
// Get compiled libsass version
ADDAPI const char* ADDCALL libsass_version(void);

// Get compiled libsass language
ADDAPI const char* ADDCALL libsass_language_version(void);

#ifdef __cplusplus
} // __cplusplus defined.
#endif
Expand Down
4 changes: 4 additions & 0 deletions include/sass/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
#define LIBSASS_VERSION "[NA]"
#endif

#ifndef LIBSASS_LANGUAGE_VERSION
#define LIBSASS_LANGUAGE_VERSION "[NA]"
#endif

#endif
4 changes: 4 additions & 0 deletions include/sass/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
#define LIBSASS_VERSION "@PACKAGE_VERSION@"
#endif

#ifndef LIBSASS_LANGUAGE_VERSION
#define LIBSASS_LANGUAGE_VERSION "3.4"
#endif

#endif
6 changes: 6 additions & 0 deletions src/sass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,10 @@ extern "C" {
return LIBSASS_VERSION;
}

// Get compiled libsass version
const char* ADDCALL libsass_language_version(void)
{
return LIBSASS_LANGUAGE_VERSION;
}

}

0 comments on commit 2e97fdd

Please sign in to comment.