In ruby.h
, there are a lot of function macros defined like this:
static inline int
#if defined(HAVE_PROTOTYPES)
rb_type(VALUE obj)
#else
rb_type(obj)
VALUE obj;
#endif
{
if (FIXNUM_P(obj)) return T_FIXNUM;
if (obj == Qnil) return T_NIL;
if (obj == Qfalse) return T_FALSE;
if (obj == Qtrue) return T_TRUE;
if (obj == Qundef) return T_UNDEF;
if (SYMBOL_P(obj)) return T_SYMBOL;
return BUILTIN_TYPE(obj);
}
If HAVE_PROTOTYPES==1
, from my understanding, this function will be like this:
static inline int rb_type(VALUE obj)
{
...
}
Yet, if HAVE_PROPOTYPES==0
, the function definition will be like this:
static inline int rb_type(VALUE obj)
VALUE obj;
{
...
}
I don't understand if this is grammatically correct. How should I understand it?