X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=flower%2Finclude%2Fguile-compatibility.hh;h=3d1f85a6ccc79464ce7b6866dd63b55c255e2c54;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=a3a1a511f0de492f1eb46d513a871dee2e8c16db;hpb=f08614bde08542f1cc1d3d931a6920af2ba65ac2;p=lilypond.git diff --git a/flower/include/guile-compatibility.hh b/flower/include/guile-compatibility.hh index a3a1a511f0..3d1f85a6cc 100644 --- a/flower/include/guile-compatibility.hh +++ b/flower/include/guile-compatibility.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2004--2005 Han-Wen Nienhuys + (c) 2004--2008 Han-Wen Nienhuys */ #ifndef GUILE_COMPATIBILITY_HH @@ -24,7 +24,7 @@ inline SCM scm_car (SCM x) abort (); return SCM_CAR (x); } -#define SCM_I_CONSP(x) SCM_CONSP(x) +#define SCM_I_CONSP(x) SCM_CONSP (x) inline SCM scm_caar (SCM x) { return SCM_CAAR (x); } inline SCM scm_cdar (SCM x) { return SCM_CDAR (x); } inline SCM scm_cadr (SCM x) { return SCM_CADR (x); } @@ -41,6 +41,8 @@ inline SCM scm_cadar (SCM x) { return SCM_CADAR (x); } #define scm_from_bool(x) (x ? SCM_BOOL_T : SCM_BOOL_F) #define scm_from_int(x) SCM_MAKINUM (x) #define scm_from_unsigned_integer(x) scm_uint2num (x) +#define scm_from_unsigned(x) scm_uint2num (x) +#define scm_from_uint32(x) scm_uint2num (x) #define scm_is_integer(x) SCM_INUMP (x) #define scm_is_string(x) SCM_STRINGP (x) #define scm_hash_table_p scm_vector_p @@ -52,6 +54,8 @@ inline int ly_c_number_p (SCM x) { return SCM_NUMBERP (x); } #define scm_is_number(x) (scm_number_p (x) == SCM_BOOL_T) inline int ly_scm2int (SCM x) { return scm_num2int (x, 0, "ly_scm2int"); } #define scm_to_int(x) (ly_scm2int (x)) +inline int ly_scm2unsigned (SCM x) { return scm_num2uint (x, 0, "ly_scm2unsigned"); } +#define scm_to_unsigned(x) (ly_scm2unsigned (x)) inline int ly_c_symbol_p (SCM x) { return SCM_SYMBOLP (x); } #define scm_is_symbol(x) ly_c_symbol_p (x) inline int ly_c_boolean_p (SCM x) { return SCM_BOOLP (x); } @@ -69,6 +73,11 @@ inline double ly_scm2double (SCM x) { return scm_num2dbl (x, "ly_scm2double"); } #define scm_to_double(x) (ly_scm2double (x)) #define scm_from_double(x) (scm_make_real (x)) -#endif /* SCM_MINOR_VERSION < 7 */ +#else /* !SCM_MINOR_VERSION < 7 */ + +#define scm_to_unsigned(x) scm_to_uint32 (x) +#define scm_from_unsigned(x) scm_from_unsigned_integer (x) + +#endif /* !SCM_MINOR_VERSION < 7 */ #endif /* GUILE_COMPATIBILITY_HH */