Probably this won't work out as Gambit has fixed integer values set to the values true and false that need to be this way <br><br>Though, there is some macro that equals (eq? #t v) that you could use for your interconversion, and equally you can make a routine something like SCMOBJ toBool(bool b) { return b ? ___TRUE : ___FALSE; } no?<br>
<br>In all cases the C ffi can do this autoconversion for you (for arguments/return values you declared as bool).<br><br>If you get to any nice solution on this one please let the ml know. :)<br><br>Btw, something I'd appreciate much to see documented on the wiki would be a complete reference on how to traverse and construct Scheme structures from C. So like, how do cdr, car, null?, cons, vector-ref, boolean values, fixnums etc.<br>
<br>Kind regards, Mikael<br><br><div class="gmail_quote">2012/2/1 REPLeffect <span dir="ltr"><<a href="mailto:repleffect@gmail.com">repleffect@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Would it be possible to get a configure option that will allow ___BOOL<br>
to be defined as bool instead of int? I understand at least some of<br>
the reasons behind defining it as int for compatibility with some<br>
compilers. It would just be nice to be able to chose to have it be<br>
bool instead.<br>
<br>
Perhaps there are ramifications which I have not considered. But it<br>
makes it nice for interfacing with my C++ code to have ___BOOL<br>
actually be bool (unless, of course, unconsidered ramifications would<br>
have detrimental effects on me -- in which case, please feel free to<br>
enlighten me) :-D<br>
_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</blockquote></div><br>