]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context-scheme.cc
Replace C++ (in)equality checks with proper SCM syntax
[lilypond.git] / lily / context-scheme.cc
index aaa5b529b3d8033ce83a4a94972f3f0f4d46c7ca..d4bd77296c70a078247f75ea8f66f4af20b1ca46 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1998--2014 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -21,6 +21,7 @@
 #include "context.hh"
 #include "context-def.hh"
 #include "dispatcher.hh"
+#include "grob-properties.hh"
 
 LY_DEFINE (ly_context_current_moment,
            "ly:context-current-moment",
@@ -70,7 +71,7 @@ LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition",
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
 
-  return updated_grob_properties (tr, name);
+  return Grob_property_info (tr, name).updated ();
 }
 
 LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
@@ -101,8 +102,8 @@ LY_DEFINE (ly_context_property, "ly:context-property",
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   Context *t = Context::unsmob (context);
-  SCM result = t->internal_get_property (sym);
-  return def != SCM_UNDEFINED && scm_is_null (result) ? def : result;
+  SCM result = t->get_property (sym);
+  return !SCM_UNBNDP (def) && scm_is_null (result) ? def : result;
 }
 
 LY_DEFINE (ly_context_set_property_x, "ly:context-set-property!",