[ruby-core:73530] Re: [ruby-cvs:60830] duerst:r53669 (trunk): * enc/unicode.c: Protect code point count by macro, in order to

From: Martin J. Dürst <duerst@...>
Date: 2016-01-27 09:55:06 UTC
List: ruby-core #73530
Hello Nobu,

On 2016/01/27 18:19, Nobuyoshi Nakada wrote:
>> duerst  2016-01-27 17:55:40 +0900 (Wed, 27 Jan 2016)
>>    New Revision: 53669

> Is this really intended?
>
>> +/* use bottom bytes for actual code point count; 3 bits is more than
> enough */ > +#define OnigCodePointCount(n) ((n)&0x111)
>
> I suspect that you may want to write `0b111`, but binary literal isn't
> available in C.

Very good catch, thanks! Fixed in r53670.

Regards,   Martin.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next