Index: context.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/context.cc,v retrieving revision 1.78 diff -u -r1.78 context.cc --- context.cc 12 Feb 2006 16:40:02 -0000 1.78 +++ context.cc 26 Apr 2006 18:55:29 -0000 @@ -96,6 +96,7 @@ accepts_list_ = SCM_EOL; context_list_ = SCM_EOL; definition_ = SCM_EOL; + unique_ = -1; smobify_self (); @@ -236,6 +237,7 @@ Context *new_context = cdef->instantiate (ops, key); + new_context->unique_ = get_global_context()->new_unique(); new_context->id_string_ = id; add_context (new_context); apply_property_operations (new_context, ops); Index: global-context.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/global-context.cc,v retrieving revision 1.40 diff -u -r1.40 global-context.cc --- global-context.cc 31 Jan 2006 00:30:43 -0000 1.40 +++ global-context.cc 26 Apr 2006 18:55:29 -0000 @@ -204,3 +204,9 @@ else return Context::get_default_interpreter (); } + +int +Global_context::new_unique () +{ + return ++unique_count_; +} Index: include/context.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/context.hh,v retrieving revision 1.38 diff -u -r1.38 context.hh --- include/context.hh 16 Feb 2006 11:54:21 -0000 1.38 +++ include/context.hh 26 Apr 2006 18:55:29 -0000 @@ -29,6 +29,7 @@ friend class Context_handle; int iterator_count_; bool init_; + int unique_; protected: Context *daddy_context_; @@ -54,6 +55,7 @@ string id_string () const { return id_string_; } SCM children_contexts () const { return context_list_; } SCM default_child_context_name () const; + int get_unique() { return unique_; } Translator_group *implementation () const { return implementation_; } Context *get_parent_context () const; Index: include/global-context.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/global-context.hh,v retrieving revision 1.13 diff -u -r1.13 global-context.hh --- include/global-context.hh 6 Jan 2006 09:13:24 -0000 1.13 +++ include/global-context.hh 26 Apr 2006 18:55:29 -0000 @@ -16,6 +16,7 @@ { PQueue extra_mom_pq_; Output_def *output_def_; + int unique_count_; DECLARE_CLASSNAME(Global_context); @@ -39,6 +40,7 @@ virtual Moment now_mom () const; virtual Context *get_default_interpreter (); + int new_unique (); Moment previous_moment () const; protected: Moment final_mom_;