Client: C++
Patch: James E. King, III <jim.king@simplivity.com>
This closes#626
Generated scructs will have virtual printTo(ostream&) method, used by
inline ostream operator<<.
Client: php
Patch: Randy Abernethy
The compiler is generating the namespace statement even when there isn't one, which blows up the PHP interpreter. Patch supresses service and type file output of namespace unless there actually is one.
Client: c_glib
Patch: Simon South <ssouth@simonsouth.com>
The compiler now correctly generates code for string lists (i.e. variables of type list<string>) that are
- Passed as a parameter to a service method,
- Returned from a service method or
- Assigned a default value.
Added a unit test that covers containers (initially only string lists) used as parameters to and return values from
service methods, and as members with default values inside structs.
This change gently refactors a handful of recently modified
functions to
- Wrap lines at 80 columns,
- Improve readability (making the layout of the compiler's source
code more closely match that of the code it's generating),
- Use more consistently the indent_up/indent_down and
scope_up/scope_down helper functions rather than embedding
formatting characters directly, and
- Improve slightly the formatting of the generated code.
This change moves variable declarations to the top of code blocks
in the generated code, resolving a number of "ISO C90 forbids mixed
declarations and code" warnings when building the unit tests.
Client: c_glib
Simon South <ssouth@simonsouth.com>
This closes#573
Here are additional changes that should really and truly resolve all the warnings generated when building the c_glib tutorial:
Compiler:
- Do not output a trailing comma in exception-enum definitions.
- Move variable declarations to avoid mixing declarations and code in generated code.
- Improve the readability of affected code blocks (and rely on indent_up and indent_down for indentation).
Library
- Use only C-style comments in headers included by clients.
Tutorial
- Move THRIFT_UNUSED_VAR calls to avoid mixing declarations and code.
Client: c_glib
Patch: Simon South <ssouth@simonsouth.com>
This closes#572
Tutorial:
- Silence unused-function warnings
- Remove spurious ";" from GObject type macro
Compiler:
- Suppress unused-var warnings in client initializers
- Omit spurious ";" after GObject type macros
Fixes a bug which adds an additional comma in the method signature
of methods with no (zero) parameters.
Signed-off-by: Kaspar Fenner <kaspar.fenner@siemens.com>
Client: Python
Patch: 软件工程师李飛 <lifei@7v1.net>
This closes#545
Python compiler generates wrong code if there is function throwing a typedef of exception with another namespace. We should use the real type name instead of the name of typedef.
Client: Java
Patch: notona <notona@gmail.com> & Jens Geyer
This closes#540
This change contains:
- the work of notona from GitHub PR 540
- additional changes I made to align THRIFT-3220 and THRIFT-3193