}
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?")));
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)
{
sym, v, SCM_UNDEFINED));
}
#else
+
+
void
Grob::internal_set_property (SCM sym, SCM v)
{
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);
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;
#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
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);
}
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);