/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org>
+ Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "guile-compatibility.hh"
#include "interval.hh"
#include "lily-guile-macros.hh"
-#include "ly-module.hh"
#include "std-vector.hh"
/** Conversion functions follow the GUILE naming convention, i.e.
SCM ly_deep_copy (SCM);
SCM ly_truncate_list (int k, SCM lst);
-extern SCM global_lily_module;
-
string gulp_file_to_string (const string &fn, bool must_exist, int size);
SCM ly_string2scm (string const &s);
SCM ly_assoc_get (SCM key, SCM alist, SCM default_value, SCM strict_checking = SCM_BOOL_F);
Interval ly_scm2interval (SCM);
Drul_array<Real> ly_scm2realdrul (SCM);
+SCM ly_memv (SCM, SCM);
Slice int_list_to_slice (SCM l);
SCM ly_interval2scm (Drul_array<Real>);
char *ly_scm2str0 (SCM str);
SCM ly_assoc_prepend_x (SCM alist, SCM key, SCM val);
inline bool ly_is_list (SCM x) { return scm_is_true (scm_list_p (x)); }
-inline bool ly_cheap_is_list (SCM x) { return scm_is_pair (x) || x == SCM_EOL; }
+inline bool ly_cheap_is_list (SCM x) { return scm_is_pair (x) || scm_is_null (x); }
+inline bool ly_is_module (SCM x) { return SCM_MODULEP (x); }
inline bool ly_is_procedure (SCM x) { return scm_is_true (scm_procedure_p (x)); }
inline bool ly_is_port (SCM x) { return scm_is_true (scm_port_p (x)); }
inline SCM ly_append2 (SCM x1, SCM x2)
{
- return scm_append (scm_listify (x1, x2, SCM_UNDEFINED));
+ return scm_append (scm_list_2 (x1, x2));
}
inline SCM ly_append3 (SCM x1, SCM x2, SCM x3)
{
- return scm_append (scm_listify (x1, x2, x3, SCM_UNDEFINED));
+ return scm_append (scm_list_3 (x1, x2, x3));
}
inline SCM ly_append4 (SCM x1, SCM x2, SCM x3, SCM x4)
{
- return scm_append (scm_listify (x1, x2, x3, x4, SCM_UNDEFINED));
+ return scm_append (scm_list_4 (x1, x2, x3, x4));
}
/*
inline SCM ly_cdr (SCM x) { return SCM_CDR (x); }
inline bool ly_is_pair (SCM x) { return SCM_I_CONSP (x); }
-#include "std-vector.hh"
-
template<class T>
SCM
ly_cxx_vector_to_list (vector<T> const &src)
SCM ly_offsets2scm (vector<Offset> os);
vector<Offset> ly_scm2offsets (SCM s);
+/* For backward compatability with Guile 1.8 */
+#if !HAVE_GUILE_HASH_FUNC
+typedef SCM (*scm_t_hash_fold_fn) (GUILE_ELLIPSIS);
+typedef SCM (*scm_t_hash_handle_fn) (GUILE_ELLIPSIS);
+#endif
+
#endif /* LILY_GUILE_HH */