Skip to content

Commit

Permalink
Expose the libsass language version via API.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseppstein committed Apr 21, 2016
1 parent 10d8292 commit 87fd6fe
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 87fd6fe

Please sign in to comment.