bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #25525] Segfault using goops


From: Andy Wingo
Subject: Re: [bug #25525] Segfault using goops
Date: Fri, 02 Sep 2011 19:57:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi Stefan,

I appreciate very much your work on the bugs!  Your fixes have been
thoughtful and mostly correct, it seems to me.

In this case, your approach sounds about right.  There are a number of
style errors that need fixing, though:

    diff --git a/libguile/goops.c b/libguile/goops.c
    index c2eb88f..c33bf0c 100644
    --- a/libguile/goops.c
    +++ b/libguile/goops.c
    @@ -193,6 +193,7 @@ static SCM scm_make_extended_class_from_symbol (SCM 
type_name_sym,
                                                int applicablep);
     
     
    +

Please remove this empty-line insertion.

    @@ -437,16 +438,88 @@ remove_duplicate_slots (SCM l, SCM res, SCM 
slots_already_seen)
       return remove_duplicate_slots (SCM_CDR (l), res, slots_already_seen);
     }
     
    +static int has_class_super(SCM cplp)

"static int" on its own line, and a space before the paren, please.

    +{
    +  /* check to see if it is derived from <class> */
    +  for( ; scm_is_pair(cplp) ; cplp = SCM_CDR(cplp))

No spaces before the semicolons, and spaces before the parens.

    +    {
    +      if(SCM_CAR(cplp) == scm_class_class)
    +   {
    +     return 1;
    +   }    
    +    }
    +  return 0;
    +}

No tabs, only spaces please.

    +
    +
    +static void check_cpl(SCM slots, SCM bslots)

Same, and no need for two blank lines.

    +{
    +  for(;scm_is_pair(bslots) ; bslots = SCM_CDR(bslots))
    +    {
    +      SCM pt;
    +      SCM b = SCM_CAAR(bslots);
    +      
    +      for(pt = slots  ;scm_is_pair(pt) ; pt = SCM_CDR(pt))
    +   {
    +     if(SCM_CAAR(pt) == b)
    +       scm_misc_error ("init-object", "a predefined <class> inherrited 
field cannot be redefined", SCM_EOL);
    +     
    +   }
    +    }
    +}

Here we need spaces *after* each paren, and try to wrap lines to 72
chars, with a maximum of 80.  It is "inherited".

There are more style errors of this sort.  Can you post another patch
with these errors fixed?

Thanks,

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]