Project

General

Profile

Misc #14395 ยป 0001-internal.h-add-BITFIELD-macro.patch

normalperson (Eric Wong), 01/24/2018 08:52 PM

View differences:

internal.h
# define FLEX_ARY_LEN 1 /* VALUE ary[1]; */
#endif
/*
* For declaring bitfields out of non-unsigned int types:
* struct date {
* BITFIELD(enum months) month:4;
* ...
* };
*/
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
# define BITFIELD(type) type
#else
# define BITFIELD(type) unsigned int
#endif
#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */
method.h
METHOD_VISI_MASK = 0x03
} rb_method_visibility_t;
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#define bits_t rb_method_visibility_t
#else
#define bits_t unsigned int
#endif
typedef struct rb_scope_visi_struct {
bits_t method_visi : 3;
BITFIELD(rb_method_visibility_t) method_visi : 3;
unsigned int module_func : 1;
} rb_scope_visibility_t;
#undef bits_t
/*! CREF (Class REFerence) */
typedef struct rb_cref_struct {
-
    (1-1/1)