From 1f9a7c4e74cc3d5aaa9e5616122d9a4913d5c2b8 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 14 Nov 2004 14:26:25 +0000 Subject: [PATCH] * lily/grob-scheme.cc (LY_DEFINE): add new function ly:grob-key. * lily/include/global-context.hh (Context): take \score key upon init. * lily/context.cc (Context): take key argument in ctor. (create_context): new function --- ChangeLog | 3 ++- lily/grob-scheme.cc | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b79a8d1df0..f078e68997 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-11-14 Han-Wen Nienhuys + * lily/grob-scheme.cc (LY_DEFINE): add new function ly:grob-key. + * lily/include/object-key-undumper.hh (Module): new file. * lily/object-key-undumper.cc (Module): New file. Deserialize @@ -10,7 +12,6 @@ * lily/include/object-key-dumper.hh (class Object_key_dumper): new file. Serialize object keys. - * lily/object-key.cc (dump): new function. (as_scheme): new virtual function diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index d3a0d0a05f..6b7fdc2332 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -223,3 +223,14 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir", return scm_int2num (me->break_status_dir ()); } + +LY_DEFINE(ly_grob_key, "ly:grob-key", + 1,0,0, + (SCM grob), + "Return the object-key for @var{grob}." + ) +{ + Grob *me = unsmob_grob (grob); + SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "Grob"); + return me->get_key ()->self_scm (); +} -- 2.39.2