[ 
https://issues.apache.org/jira/browse/AVRO-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985811#action_12985811
 ] 

Douglas Creager commented on AVRO-744:
--------------------------------------

I like atoms, too.  That change shouldn't cause much of a problem with this 
patch — the two new functions are actually macros, which pass the field name to 
avro_record_get as-is.  So if you change avro_record_get to take in an atom, 
then get_field_value and set_field_value would start taking in atoms, too.

> Helper macros for extracting and setting record field values
> ------------------------------------------------------------
>
>                 Key: AVRO-744
>                 URL: https://issues.apache.org/jira/browse/AVRO-744
>             Project: Avro
>          Issue Type: New Feature
>          Components: c
>            Reporter: Douglas Creager
>            Assignee: Douglas Creager
>         Attachments: 
> 0001-Helper-macros-for-extracting-and-setting-record-fiel.patch
>
>
> I've created two helper macros that can be used to extract or set the value 
> of a record field using fewer function calls.  So instead of
> {code}
> int  rc;
> avro_datum_t  field;
> char  *value;
> rc = avro_record_get(record, "name", &field);
> rc = avro_string_get(field, &value);
> {code}
> you can do:
> {code}
> int  rc;
> char  *value;
> avro_record_get_field_value(rc, record, string, "name", &value);
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to