X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcxx-function-smob.cc;h=b17c4cb38aa2fa67b6589ee28e430c30c6b57894;hb=a78c70be8951804126d19eb74b344ae1858023e5;hp=f0d5beec1f952d6b087d1b9d5ffeb82bcf95b839;hpb=8e0022031a160d4d516b9fe53ac5c5adc7d5ae96;p=lilypond.git diff --git a/lily/cxx-function-smob.cc b/lily/cxx-function-smob.cc index f0d5beec1f..b17c4cb38a 100644 --- a/lily/cxx-function-smob.cc +++ b/lily/cxx-function-smob.cc @@ -10,7 +10,7 @@ #include "cxx-function-smob.hh" #include "ly-smobs.icc" -static long callback_tag; +static scm_t_bits callback_tag; static SCM mark_smob (SCM) @@ -25,8 +25,8 @@ print_smob (SCM, SCM port, scm_print_state *) return 1; } -static -scm_sizet free_smob (SCM) +static size_t +free_smob (SCM) { return 0; } @@ -35,16 +35,19 @@ scm_sizet free_smob (SCM) SCM cxx_function_type_p (SCM x) { - return (SCM_CELL_TYPE (x) == callback_tag) ? SCM_BOOL_T : SCM_BOOL_F; + return (SCM_CELL_TYPE (x)) == callback_tag ? SCM_BOOL_T : SCM_BOOL_F; } void init_cxx_function_smobs () { - callback_tag = scm_make_smob_type_mfpe ("callback", 0, - mark_smob, free_smob, - print_smob, 0); + callback_tag = scm_make_smob_type ("callback", 0); + scm_set_smob_mark (callback_tag, mark_smob); + scm_set_smob_free (callback_tag, free_smob); + scm_set_smob_print (callback_tag, print_smob); + scm_set_smob_equalp (callback_tag, 0); - scm_make_gsubr ("c++-function?", 1, 0, 0, (Scheme_function_unknown) cxx_function_type_p); + scm_c_define_gsubr ("c++-function?", 1, 0, 0, + (Scheme_function_unknown) cxx_function_type_p); } SCM