This reverts commit 6c5ee6ad20.
This commit is being reverted since it broke compatibility with
Python 2.4, which is the latest version included in RHEL5 releases.
Client: build
patch: Jake Farrell
Updates boost and libevent configure messages, updates thrift help to display error and smaller message, moves help to --help or -help and takes care of // TODO(dreiss): Delete these when everyone is using the new hotness. Welcome to the new hotness everyone.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1391705 13f79535-47bb-0310-9956-ffa450edef68
Client: compiler
Patch: Jake Farrell
Converts compiler/cpp/src/windows/version.h to a template and automates uses of configure.ac version rather than a random #define version string.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1352767 13f79535-47bb-0310-9956-ffa450edef68
Client: cpp
Patch: dreiss
The goal of this diff is to allow Thrift strings to be used without
depending on std::string, since it looks like we're starting to move
away from std::string instead of moving to a better implementation.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1352765 13f79535-47bb-0310-9956-ffa450edef68
Client: delphi
Patch: Jens Geyer
Currently, IDL typedefs are translated into their base types and do not appear in the generated code at all
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1340873 13f79535-47bb-0310-9956-ffa450edef68
Client: py
Patch: Jake Farrell
Python PEP 3110 changed exception handling by replacing the ',' with 'as'. This was initially introduced in python 2.6 and in 3.0 the ',' usage is no longer suppported. Since exception handling through out the py lib uses the ',' it will need to be converted over to using the 'as' syntax for exceptions
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1339941 13f79535-47bb-0310-9956-ffa450edef68
Client: build
Patch: Andrew Cox
File modes of some non-script text files (e.g. .xml, .java, .cc) in the source tree include execute permissions (because these files have the svn:executable property).
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1339492 13f79535-47bb-0310-9956-ffa450edef68
Client: as3
Patch: Reverting
Reverting patch due to usage of non public library which breaks ability to export as3 client to maven central during a release.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1337007 13f79535-47bb-0310-9956-ffa450edef68
used unconditionally in the generated code. "from thrift.Thrift import *" included it before r1169492 but not since.
Reviewed By: dreiss
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1335325 13f79535-47bb-0310-9956-ffa450edef68
THRIFT-1578 C_GLib generated code does not compile
THRIFT-1582 Bad includes of nested thrift files in c_glib
Patch: José Antonio Santos
Minor Modificatons by roger:
- thrift prefix for includes
- g_object_unref instead of g_clear_object (needs glib>=2.28)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1331752 13f79535-47bb-0310-9956-ffa450edef68
To ensure there are no include path collisions the C and C++ header
include paths should include 'thrift' as the root leaf. This will
prevent having to place /usr/include/thrift into the compilers include
header search path, which might otherwise result in the compiler
accidentally picking up headers that it shouldn't.
e.g. #include <foo/bar.h> should be #include <thrift/foo/bar.h>
Change-Id: I48f2b0f549bda0fc81e85506ac857adc800b98a1
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325674 13f79535-47bb-0310-9956-ffa450edef68
Compiler: Ruby
Patch: Ilya Maykov
Fixed indentation of gen-rb files by wrapping each file
output stream in a class that keeps track of the indent
level instead of using the global indent.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1295423 13f79535-47bb-0310-9956-ffa450edef68
Library: Ruby
Patch: Ilya Maykov
This patch does 2 things:
1) Adds a "require 'thrift'" line to the *_types.rb and *_constants.rb files,
to be consistent with *_service.rb which was generating the thrift require
already.
2) Adds a "rubygems" option to the --gen rb compiler target. When this option
is specified, the compiler will add a "require 'rubygems'" line to the top
of each gen-rb file. Defaults to false.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1294949 13f79535-47bb-0310-9956-ffa450edef68
There was some incorrect else if logic added to the CPP generated code, which this patch replaces with the proper functionality.
Patch: Thomas Wiggins
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1292508 13f79535-47bb-0310-9956-ffa450edef68
Client: cpp
Patch: Diwaker Gupta
In CPP, all optional fields are guarded by the isset helper struct. On Java, however, the generated code takes advantage of nullable types: for containers, structs, exceptions, enums, and, notably, strings, the generator elides explicit use of an "isset" bit vector and instead emits checks of the form "field null". This leads to varying behavior between the two languages: an optional string field with a default value will have {{isset[fieldid]}} false on C, but the equivalent test in Java will be true.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236529 13f79535-47bb-0310-9956-ffa450edef68
Patch: Kieran Benton
changes by roger:
- use ServiceModel, DataContract only when wcf is enabled
- indent space vs tab
- remove issue on lib/cpp/README_WINDOWS
- add testStringMap on test/csharp/ThriftTest/TestServer.cs
- add build to test/csharp/ThriftTest/maketest.sh
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1232578 13f79535-47bb-0310-9956-ffa450edef68
This patch gives the generated code some variable-sized options for the isset bit vector. The compiler will attempt to use byte, short, int and long types before reverting to a BitSet for structs with a LOT of optional fields. This should save a fair amount of memory in a lot of cases.
Patch: Brian Bloniarz
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1221828 13f79535-47bb-0310-9956-ffa450edef68
Client:delphi
Patch: Kenjiro Fukumitsu
Add the function to delphi generator that generates constructor with parameters to initialize members,if the class is exception and have more than zero parameters.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1212226 13f79535-47bb-0310-9956-ffa450edef68
Client: cpp
Patch: Dave Watson
TSocket.send() was expecting a send() on the underlying socket
to fail by returning zero, but the actual behavior is to raise
an exception.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211736 13f79535-47bb-0310-9956-ffa450edef68
Client: cpp
Patch: Dave Watson
In generate_process_function(), service_func_name is always used as a
string literal. Therefore, construct it with the double quotes
built-in, rather than having to add them everywhere we use it.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210757 13f79535-47bb-0310-9956-ffa450edef68
Client: Objective-c
Patch: Hirano Satoshi
Adds -objc-arc flag to compiler and if used removes the retain/release/autorelease from generated code
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210732 13f79535-47bb-0310-9956-ffa450edef68
Client: delphi
Patch: Kenjiro Fukumitsu
Generated code cannot be compiled with Delphi 2009 due to the bug in constant initializer.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210728 13f79535-47bb-0310-9956-ffa450edef68
Client: java
Patch: Mike Riley
Adds program_name to the Constants file in java to match all other client libs.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210724 13f79535-47bb-0310-9956-ffa450edef68
Client: js
Patch: Mike Riley
Flips print out of constants and structs within the generator to allow for use of constants within the structs.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1204495 13f79535-47bb-0310-9956-ffa450edef68
Client: js
Patch: Hans Duedal
When serializing boolean types, false booleans are serialized as null instead of false switching to using loose compare instead
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1197955 13f79535-47bb-0310-9956-ffa450edef68
Client: delphi
Patch: Kenjiro Fukumitsu
Delphi compiler's naming check does not work properly with exception object in the function that generates struct writer.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1195747 13f79535-47bb-0310-9956-ffa450edef68
Client: delphi
Patch: Jens Geyer
The generated code lacks calls to ReadMapEnd, ReadListEnd and ReadSetEnd. Although actually no problem occurs with the BinaryProtocol, other protocols (like JSON) do some important things there.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1195466 13f79535-47bb-0310-9956-ffa450edef68
Client: delphi
Patch: Jens Geyer
Fixes build failure due to t_delphi_generator.cc:780: error: integer constant is too
large for 'long' type
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1189006 13f79535-47bb-0310-9956-ffa450edef68
Client: delphi
Patch: Kenjiro Fukumitsu
After recieved STOP,it calls additional ReadFieldEnd, which is different from the implementation of other language compiler.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1189005 13f79535-47bb-0310-9956-ffa450edef68
Client: delpi
Patch: Jens Geyer
Constants such as i32 = 0x80000000 produce a Delphi warning. The current code renders such values as positive integer, which needs an explicit typecast to satisfy the Delphi compiler.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1188494 13f79535-47bb-0310-9956-ffa450edef68
Client: cpp
Patch: Dave Watson
The thrift-generated code for C++ class objects does not provide any
initialization for enum values, so they wind up containing random/uninitialized
data. This causes problems when clients do not send argument data, as the server
receives random data rather than zero for unpassed args.
Enums should be initialized to zero.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1179909 13f79535-47bb-0310-9956-ffa450edef68
Client: py
Patch: Dave Watson
The thrift-generated Python service client allows overriding the default host/port by doing "-h host:port" on the command line. Oftentimes, you want to override the host but not the port, as most services run on well-defined ports.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1179905 13f79535-47bb-0310-9956-ffa450edef68
Client: py
Patch: Dave Watson
Fixed python code generation so that user-defined exceptions have a
base class of TException rather than Exception.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1179903 13f79535-47bb-0310-9956-ffa450edef68
This patch fixes the problem in the java generator (and removes an unnecessary comment). It also amends TestTUnion to catch this.
Patch: Armaan Sarkar
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1164202 13f79535-47bb-0310-9956-ffa450edef68
This patch makes StandardScheme write metadata, and adds tests against a static known-good Binary-serialized struct for a reference.
Patch: Armaan Sarkar
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1162917 13f79535-47bb-0310-9956-ffa450edef68