]> git.donarmstrong.com Git - lilypond.git/commitdiff
don't change signatures depending on NDEBUG
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Jan 2007 02:50:54 +0000 (03:50 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Jan 2007 02:50:54 +0000 (03:50 +0100)
lily/context.cc
lily/grob-property.cc
lily/include/context.hh
lily/include/grob.hh
lily/include/lily-guile-macros.hh
lily/include/prob.hh
lily/prob.cc

index 15bd3c5fb84a0a8c03deae29d0a9119fe8bf3a05..7e5ea8ae2ac0c83ee84e30de36f38f8d10590e34 100644 (file)
@@ -461,18 +461,8 @@ Context::add_alias (SCM sym)
 }
 
 void
-Context::internal_set_property (SCM sym, SCM val
-#ifndef NDEBUG
-                               , char const *file, int line, char const *fun
-#endif
-                               )
+Context::internal_set_property (SCM sym, SCM val)
 {
-#ifndef NDEBUG
-  (void) file;
-  (void) line;
-  (void) fun;
-#endif
-
   if (do_internal_type_checking_global)
     assert (type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")));
 
index 5e49d8e8ec4747e765c567d9629073bc68bd8c17..b62a6bb9f9f94f815221f2c1f7819d0276e24ec0 100644 (file)
@@ -53,7 +53,13 @@ Grob::get_property_alist_chain (SCM def) const
 
 extern void check_interfaces_for_property (Grob const *me, SCM sym);
 
-#ifndef NDEBUG
+#if 0
+
+/*
+  We can't change signatures depending on NDEBUG, since NDEBUG comes
+  over the command line and may be different per .cc file.  This
+  should be done through the macro expansion of get_property().
+ */
 void
 Grob::internal_set_property (SCM sym, SCM v, char const *file, int line, char const *fun)
 {
@@ -82,6 +88,8 @@ Grob::internal_set_property (SCM sym, SCM v, char const *file, int line, char co
                             sym, v, SCM_UNDEFINED));
 }
 #else
+
+
 void
 Grob::internal_set_property (SCM sym, SCM v)
 {
index 2cb0280ea128cb59076f7ce1d07463358fd007c2..39babf7b669751f9c2204b0701ace74159c621bf 100644 (file)
@@ -85,11 +85,7 @@ public:
   Context *where_defined (SCM name_sym, SCM *value) const;
   void unset_property (SCM var_sym);
 
-#ifndef NDEBUG
-  void internal_set_property (SCM var_sym, SCM value, char const *file, int line, char const *fun);
-#else
   void internal_set_property (SCM var_sym, SCM value);
-#endif
 
   Context *create_context (Context_def *, string, SCM);
   DECLARE_LISTENER (create_context_from_event);
index c66c58f2ddddb2ce7cc6b8bd9c80aa5e13be4fc4..bcd101b98ed971859e7f8e28631e347d38a291c3 100644 (file)
@@ -83,12 +83,7 @@ public:
   SCM internal_get_object (SCM symbol) const;
   void internal_set_object (SCM sym, SCM val);
   void internal_del_property (SCM symbol);
-
-#ifndef NDEBUG
-  void internal_set_property (SCM sym, SCM val, char const *file, int line, char const *fun);
-#else
   void internal_set_property (SCM sym, SCM val);
-#endif
 
   /* messages */  
   void warning (string) const;
index dec12d19bdf1942476c2f810d8159e342c3be082..555d65bfd3a6aa116923ec46456796184f582f37 100644 (file)
@@ -169,7 +169,11 @@ ly_add_function_documentation (SCM proc, char const *fname,
 #define del_property(x) internal_del_property (ly_symbol2scm (x))
 
 #ifndef NDEBUG
-#define set_property(x, y) internal_set_property (ly_symbol2scm (x), y, __FILE__, __LINE__, __FUNCTION__)
+/*
+  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)  
 #else
 #define set_property(x, y) internal_set_property (ly_symbol2scm (x), y)
 #endif
index 136dd3c9d6610833d03cb8353f42a3ef8a20f788..839edd4abacdff4c1be17a8cabd93267d66ef271 100644 (file)
@@ -42,12 +42,7 @@ public:
   SCM type () const { return type_; }
   SCM get_property_alist (bool mutble) const;
   SCM internal_get_property (SCM sym) const;
-
-#ifndef NDEBUG
-  void internal_set_property (SCM sym, SCM val, const char *file, int line, char const *fun);
-#else
   void internal_set_property (SCM sym, SCM val);
-#endif
 };
 DECLARE_UNSMOB(Prob,prob);
 SCM ly_prob_set_property_x (SCM system, SCM sym, SCM value);
index 7438de3dcb05fa6a1500db02cf3f672a07c8014e..e6facbddc5808f521d47bbfe4516d9d6159ddcc5 100644 (file)
@@ -158,18 +158,8 @@ Prob::internal_get_property (SCM sym) const
 }
 
 void
-Prob::internal_set_property (SCM sym, SCM val
-#ifndef NDEBUG
-                            , char const *file, int line, char const *fun
-#endif
-                            ) 
+Prob::internal_set_property (SCM sym, SCM val) 
 {
-#ifndef NDEBUG
-  (void) file;
-  (void) line;
-  (void) fun;
-#endif
-
   if (do_internal_type_checking_global)
     type_check_assignment (sym, val);