(c) 2000--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "input-smob.hh"
-
-#include "string.hh"
+#include "input.hh"
+#include "source-file.hh"
+#include "std-string.hh"
#include "ly-smobs.icc"
static long input_tag;
static
-SCM mark_smob (SCM)
+SCM mark_smob (SCM s)
{
+ Input *sc = (Input *) SCM_CELL_WORD_1 (s);
+
+ if (Source_file *sf = sc->get_source_file ())
+ return sf->self_scm ();
+
return SCM_EOL;
}
static int
print_smob (SCM s, SCM port, scm_print_state *)
{
- String str = "#<location " + unsmob_input (s)->location_string () + ">";
+ string str = "#<location " + unsmob_input (s)->location_string () + ">";
scm_puts (str.c_str (), port);
return 1;
}