X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Flily-guile-macros.hh;h=86d2517dee175fac6e1e8f7abd51d853900a3acd;hb=deabe8e6c21ae6080e13b269bab24901f74a2254;hp=aaa883ed15665e496f38900e9e06a6bd9345097a;hpb=92918346012f79ef9109ef0c391947af2d3165ca;p=lilypond.git diff --git a/lily/include/lily-guile-macros.hh b/lily/include/lily-guile-macros.hh index aaa883ed15..86d2517dee 100644 --- a/lily/include/lily-guile-macros.hh +++ b/lily/include/lily-guile-macros.hh @@ -195,36 +195,25 @@ void ly_check_name (string cxx, string fname); TODO: include modification callback support here, perhaps through intermediate Grob::instrumented_set_property( .. __LINE__ ). */ -#define set_property(x, y) internal_set_property (ly_symbol2scm (x), y) +#define set_property(x, y) instrumented_set_property (ly_symbol2scm (x), y, __FILE__, __LINE__, __FUNCTION__) #else #define set_property(x, y) internal_set_property (ly_symbol2scm (x), y) #endif -extern int function_argument_direction; -#define LY_FUNC_NOTE_FIRST_ARG(a) \ - SCM *first_arg_ptr = &a; - -#define LY_ASSERT_TYPE(pred, number) \ +#define LY_ASSERT_TYPE(pred, var, number) \ { \ - if (!pred (first_arg_ptr[(number-1)*function_argument_direction])) \ + if (!pred (var)) \ { \ scm_wrong_type_arg_msg(mangle_cxx_identifier (__FUNCTION__).c_str(), \ - number, first_arg_ptr[(number-1)*function_argument_direction], \ + number, var, \ predicate_to_typename ((void*) &pred).c_str()); \ } \ } -#define LY_ASSERT_SMOB(klass, number) LY_ASSERT_TYPE(klass::unsmob, number) - - -#define LY_ASSERT_FIRST_TYPE(pred, var) \ - LY_FUNC_NOTE_FIRST_ARG(var); \ - LY_ASSERT_TYPE(pred, 1); +#define LY_ASSERT_SMOB(klass, var, number) LY_ASSERT_TYPE(klass::unsmob, var, number) -#define LY_ASSERT_FIRST_SMOB(klass, var) \ - LY_ASSERT_FIRST_TYPE(klass::unsmob, var) #endif /* LILY_GUILE_MACROS_HH */