Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro >> mail # dev >> Report a bug!!


+
深蓝 2011-09-25, 14:26
Copy link to this message
-
Re: Report a bug!!
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
+
深蓝 2011-09-25, 14:27
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB