1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Have version' return PACKAGE_VERSION'.

* libguile/version.c (scm_version): Return `PACKAGE_VERSION' instead of
  "MAJOR.MINOR.MICRO".
This commit is contained in:
Ludovic Courtès 2008-11-10 23:46:29 +01:00
parent 613ed506cb
commit 857a263e4f

View file

@ -86,19 +86,7 @@ SCM_DEFINE (scm_version, "version", 0, 0, 0,
"@end lisp") "@end lisp")
#define FUNC_NAME s_scm_version #define FUNC_NAME s_scm_version
{ {
return scm_from_locale_string (PACKAGE_VERSION);
char version_str[3 * 4 + 3];
#if SCM_MAJOR_VERSION > 9999 \
|| SCM_MINOR_VERSION > 9999 \
|| SCM_MICRO_VERSION > 9999
# error version string may overflow buffer
#endif
sprintf (version_str, "%d.%d.%d",
SCM_MAJOR_VERSION,
SCM_MINOR_VERSION,
SCM_MICRO_VERSION);
return scm_from_locale_string (version_str);
} }
#undef FUNC_NAME #undef FUNC_NAME