From: Mats Kindahl Date: September 8 2010 12:06pm Subject: Re: [STYLE] use true/false in C++, not TRUE/FALSE List-Archive: http://lists.mysql.com/internals/38064 Message-Id: <4C877C5E.1080703@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 09/08/2010 01:15 PM, Konstantin Osipov wrote: > * Davi Arnaut [10/09/05 20:09]: > >> I haven't keep up with the thread, but I think the my_bool for C >> code is a bit of silliness. We should just stick to int where >> applicable and be done with it. >> > Sticking to int leads to pollution of return value range. > Our coding convention is that we always return 0/FALSE for > success, 1/TRUE for failure. > One way to avoid the problems that Mark points out is to redefine my_bool to be "int". This would work for all places where my_bool is used and IIRC, there are no places in ABIs where my_bool is used. If there are, it is easy to replace them with "unsigned char" to ensure that the ABI does not change. Just my few cents, Mats Kindahl