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

From: Nobuyoshi Nakada <nobu@...>
Date: 2016-01-27 09:19:17 UTC
List: ruby-core #73528
> duerst  2016-01-27 17:55:40 +0900 (Wed, 27 Jan 2016)
>
>   New Revision: 53669
>
>
> https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53669
>
>   Log:
>     * enc/unicode.c: Protect code point count by macro, in order to
>       be able to use the remaining bits for flags.
>       (with Kimihito Matsui)


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.

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