Hello 深蓝, Please file a bug report on https://issues.apache.org/jira/browse/AVRO describing this issue as you have done here, and also detailing a possible fix. Patches are welcome as well! :)
2011/9/25 深蓝 <[email protected]>: > 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! -- Harsh J
