Forcing all of the functions under src/parse to be defined in header
files is silly and sometimes painful. Createa a "parse.cc" file for
functions that don't belong in header files. To start, move
generate_fingerprint there, because it requires including md5.h.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1004702 13f79535-47bb-0310-9956-ffa450edef68
This patch removes unnecessary enum value resolution code from all the individual generators. It's been unnecessary since forever ago when we made the compiler force the global resolution of values.
Patch: Christian Lavoie
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001966 13f79535-47bb-0310-9956-ffa450edef68
This patch fixes the type mappings to be more sane. It *will* break existing code, but the breakages should be well worth it.
Patch: Christian Lavoie
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@999700 13f79535-47bb-0310-9956-ffa450edef68
This patch makes the bindings compile with pedantic warning levels, and individually declares each required language extension.
Patch: Christian Lavoie
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@998955 13f79535-47bb-0310-9956-ffa450edef68
The recent enum change was causing enums to break if used as constant
values by the C++ generator. The problem was that we were searching for
the fully-qualified constant name (enum_name.VALUE_NAME) in the enum
values. This didn't affect Java because it just uses symbolic names in
the generated code. Fix it by grabbing the base name before doing the
search.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996610 13f79535-47bb-0310-9956-ffa450edef68
The recent enum change was causing t_enum::get_constant_by_name to fail
in t_const_value::get_integer. This was causing a difficult-to-debug
segfault. Check for failure and throw an exeception.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996609 13f79535-47bb-0310-9956-ffa450edef68
This patch causes the underlying ByteBuffer that backs a binary field to be hidden behind a default accessor that provides a byte[] interface. This should allow users who skipped 0.4 to update their generated code without breaking any of their other code. A new accessor has been added that allows a way down to the underlying ByteBuffer for those experts who want to take advantage.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996579 13f79535-47bb-0310-9956-ffa450edef68
This patch makes it illegal to refer to enum values by just their names in the IDL. Now, you must also provide the enum type's name as well.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996320 13f79535-47bb-0310-9956-ffa450edef68
Most of the other Thrift languages either have enum values that are
scoped to the type or emulate enums in that way. Now C++ does the same
by default. "enum Foo" in a .thrift file will be generated as Foo::type
so the values can be called Foo::value1, etc. The "pure_enums" compiler
option restores the old behavior.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996015 13f79535-47bb-0310-9956-ffa450edef68
yywrap is only needed if we need one lexer context to traverse multiple
input files. This feature isn't used by Thrift, so we disable it with
"option noyywrap". With yywrap disabled, there is no need to link to
libfl if flex is the lex implementation used.
With this patch, release tarballs can be built without lex.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991254 13f79535-47bb-0310-9956-ffa450edef68
- Make AX_BOOST_BASE warn instead of fataling if Boost is not found.
- If Boost is not found, disable compilation of the C++ library.
- Do not use CPPFLAGS or LDFLAGS from Boost when building the compiler.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991253 13f79535-47bb-0310-9956-ffa450edef68
Previously, the Ruby generated used boost::tokenizer to produce a
vector of namespace components from a dot-delimited namespace string.
We can do this manually with only a slight increase in complexity.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991251 13f79535-47bb-0310-9956-ffa450edef68
My combined patch for THRIFT-599 was committed, but it is preferable
commit the individual patches to preserve the more detailed log and
blame data. I'll recommit r987018 as a sequence of patches and r988722
as its own rev.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990957 13f79535-47bb-0310-9956-ffa450edef68
This patch adds a new method to t_generator that allows the compiler to avoid special cases in checking for sub-namespaces in the Thrift IDL.
Patch: Bruce Lowekamp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987565 13f79535-47bb-0310-9956-ffa450edef68
The only user-visible changes are to the client. Every thrift call now returns {NewClient, Result} instead of just Result.
Patch: David Reiss (assist to Anthony Molinaro)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987018 13f79535-47bb-0310-9956-ffa450edef68
A patch to the OCaml generator which uses default values defined in the .thrift file to initialize the members of the generated class.
Patch: Lev Walkin
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@985041 13f79535-47bb-0310-9956-ffa450edef68