This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SCM_NUM2LONG_DEF fix?


Janis Dzerins <jonis@mt.lv> writes:

<snip>
> >should be:
> >
> >  imode = SCM_NUM2LONG_DEF(3,mode,SCM_MAKINUM(0666));
> > 
> >and I prefer the former, and I've done things that way with, e.g.,
> >SCM_VALIDATE_INUM_DEF_COPY, too, as well as with analagous macros in
> >Scwm.  It handles the common case better.
> 
> Shame on me that I did not check use of this macro first. But I still
> see one little problem---with current definition it's impossible to get
> a default long larger than 2^30, right?
> 
> And, BTW, if i understand the scm_open_fdes correctly, there is a bug in
> it anyway: if mode is not passed, after the call to
> 
> 	imode = SCM_NUM2LONG_DEF(3,mode,0666);
> 
> imode will be (((0666)<<2)+2L) and as such passed to open syscall. I
> checked, and this sure is a BUG.

You're completely right... I don't know what I was thinking the other
day when I responded to your original message. 

Thanks!

> >And please hop on board with development of Guile... a great way to
> >start is by contributing documentation strings for the various
> >SCM_DEFINE procedures that still need them!
> 
> I *love* guile and I'll do what I can for it to be the extension
> language of choice for open-source and free-software developers.

Great... documentation would be a wonderful place to start making
contributions!  (Am I sounding like a broken record yet?)

Thanks,
Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]