]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/smobs.hh
patch::: 1.5.1.jcn2
[lilypond.git] / lily / include / smobs.hh
index 3c46977016e7524ba27612e76686b42571acae45..a29547361678655216db03a42f27097a860682de 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -42,7 +42,7 @@
      DECLARE_SIMPLE_SMOBS;
      static SCM make_scm (void initdata) {
        Ssmob * sp = new Ssmob (initdata);
-       return sp->smobbed_self();
+       return sp->smobbed_self ();
      }
    private:
      Ssmob (initdata);
@@ -59,7 +59,7 @@
 
    class Csmob {
      DECLARE_SMOBS;
-     Csmob () { smobify_self(); }
+     Csmob () { smobify_self (); }
      Csmob (Csmob const & s) {
        // don't copy self_scm_
        smobify_self ();
@@ -75,7 +75,7 @@
 
    class Bla {
    Csmob *ptr;
-   ~Bla () {  scm_unprotect_object (ptr->self_scm_); }
+   ~Bla () {  scm_gc_unprotect_object (ptr->self_scm_); }
    
    };
 
@@ -95,8 +95,8 @@
 
    WARNING:
 
-   smobify_self() might trigger a GC, so make sure that objects are  
-   sane when you do smobify_self().
+   smobify_self () might trigger a GC, so make sure that objects are  
+   sane when you do smobify_self ().
 */
 
 #define DECLARE_SIMPLE_SMOBS(CL,dummy) \
@@ -104,22 +104,22 @@ protected: \
        friend class Non_existant_class ; \
        SCM smobbed_self () const; \
 private:\
-       static long smob_tag_;                                  \
+       static scm_t_bits smob_tag_;                            \
        static SCM mark_smob (SCM);                             \
-       static scm_sizet free_smob (SCM s);                     \
+       static size_t free_smob (SCM s);                        \
        static int print_smob (SCM s, SCM p, scm_print_state*); \
 public: \
        static SCM equal_p (SCM a, SCM b);\
        static CL * unsmob (SCM);\
        static SCM smob_p (SCM);\
-       static void init_smobs();                               \
+       static void init_smobs ();                              \
 private:
 
 
 #define DECLARE_SMOBS(CL,dummy)                                        \
-       DECLARE_SIMPLE_SMOBS(CL,dammy) \
+       DECLARE_SIMPLE_SMOBS (CL,dammy) \
 protected:\
-       virtual ~CL();\
+       virtual ~CL ();\
        SCM unprotected_smobify_self ();\
 private: \
        SCM smobify_self ();                                    \