You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Evan Nemerson (JIRA)" <ji...@apache.org> on 2013/03/14 08:34:12 UTC
[jira] [Created] (THRIFT-1882) Use single include
Evan Nemerson created THRIFT-1882:
-------------------------------------
Summary: Use single include
Key: THRIFT-1882
URL: https://issues.apache.org/jira/browse/THRIFT-1882
Project: Thrift
Issue Type: Improvement
Components: C glib - Library
Reporter: Evan Nemerson
Priority: Minor
Currently, when using thrift_c_glib you have to include several headers. It would be nice if you could just include a single header, which would then include the other headers for you. Most projects I'm aware of, particularly those based on glib and gobject like thrift_c_glib is, use this method exclusively. It offers more flexibility by allowing the library to occasionally reorganize its headers and is much easier for consumers to deal with. Note this is particularly important for Vala bindings which are not distributed with the library they bind (https://live.gnome.org/Vala/UpstreamGuide#C_Headers).
I've created a patch which will have thrift/c_glib/thrift.h include all other necessary headers, and issue a warning if headers other than thrift/c_glib/thrift.h are included. This touches the compiler as well, but I think the library component is a more appropriate place for the bug.
I don't see anywhere to actually attach a patch (maybe it's coming after I click "Create"), so if nothing else you can find the patch here: https://github.com/nemequ/thrift/commit/a24b256c62ea65890f19f4a93f582ee6c35da53c
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira