when i review the avro's code. I find:
..............
#define avro_record_get_field_value(rc, rec, typ, fname, ...)   \
        do {                                                    \
                avro_datum_t  field = NULL;                     \
                (rc) = avro_record_get((rec), (fname), &field); \
                if (rc) break;                                  \
                (rc) = avro_##typ##_get(field, __VA_ARGS__);    \
        } while (0)

.............


I think, if the typ == enum that like this:
(rc) = avro_##typ##_get(field, __VA_ARGS__);  // avro_enum_get(field,);


To help solve this problem, CPP behaves specially for variable arguments used 
with the token paste operator, `##'. If instead you write
(rc) = avro_##typ##_get(field, ##__VA_ARGS__);


and if the variable arguments are omitted or empty, the `##' operator causes 
the preprocessor to remove the comma before it. I like avro! Come on! Keep it 
up!

Reply via email to