/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1999--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1999--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static SCM mark_trampoline (SCM); // Used for calling mark_smob
static size_t free_smob (SCM obj);
static SCM equal_p (SCM, SCM);
-
- // print_smob is the exception. It is unconditionally passed to
- // GUILE since the default output of, say, #<Context_mod 0x7352414>
- // would depend on memory layout, thus being unsuitable for regtest
- // comparisons unless filtered.
- static int print_smob (SCM, SCM, scm_print_state *);
+ int print_smob (SCM, scm_print_state *);
+ static int print_trampoline (SCM, SCM, scm_print_state *);
// type_p_name_ can be overriden in the Super class with a static
// const char [] string. This requires both a declaration in the
private:
SCM self_scm_;
SCM protection_cons_;
+ Smob (const Smob<Super> &); // Do not define! Not copyable!
+protected:
+ Smob () : self_scm_ (SCM_UNDEFINED), protection_cons_ (SCM_EOL) { };
public:
static size_t free_smob (SCM obj)
{
}
SCM unprotected_smobify_self ()
{
- self_scm_ = SCM_UNDEFINED;
self_scm_ = Smob_base<Super>::register_ptr (static_cast<Super *> (this));
return self_scm_;
}
return self_scm_;
}
void smobify_self () {
- protection_cons_ = SCM_EOL;
self_scm_ = unprotected_smobify_self ();
protect ();
}