You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by jeffglover <gi...@git.apache.org> on 2015/12/03 19:52:43 UTC

[GitHub] avro pull request: Protect from struct redefinition errors

GitHub user jeffglover opened a pull request:

    https://github.com/apache/avro/pull/62

    Protect from struct redefinition errors

    add ifdef guards around structs and codec_traits
    
    I am generating Avro schema files (avsc) from Avro IDL files (avdl), then generating the C++ .hh files. The avdl files contain many imports that are lost when going to avsc and therefore the resulting C++ header files lose the imports and redefine commonly used imports. I came up with a solution to put ifdef guards around these components so that multiple different header files may be included in the same C++ project without redefinition errors. Ideally I think that the C++ generated header files should "#include" dependent types, but I am not sure the best way to go about that. This seems like the best solution given the way Avro schema files work.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/decisionsciences/avro trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/avro/pull/62.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #62
    
----
commit 6bdd5fa1403dfc0ee918c4c7c9e22603c7ae697f
Author: Jeff Glover <je...@decisionsciencescorp.com>
Date:   2015-12-03T18:40:25Z

    Protect from struct redefinition errors
    
    add ifdef guards around structs and codec_traits

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] avro pull request: Protect from struct redefinition errors

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/avro/pull/62


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---