Bryan Duxbury
8fc413fbfd
THRIFT-554. multiple enums with the same key generate invalid code
...
This patch causes multiple enums with the same name to trigger a parser error.
Patch: Ben Taitelbaum
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982825 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 23:23:04 +00:00
Bryan Duxbury
20dbec7cfe
THRIFT-782. perl: Perl code for writing containers doesn't count length of write*Begin or write*End
...
This patch adds appropriate accounting of the start and end bytes when writing out container types.
Patch: Conrad Hughes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982812 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 22:28:13 +00:00
Bryan Duxbury
5226eeaaaa
THRIFT-751. java: Add clear() method to TBase
...
This patch adds a clear() method to the TBase interface and causes the compiler to generate implementations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982774 13f79535-47bb-0310-9956-ffa450edef68
2010-08-05 20:44:53 +00:00
Bryan Duxbury
c412a2fad4
THRIFT-133. add missing file to makefile.am
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@982359 13f79535-47bb-0310-9956-ffa450edef68
2010-08-04 18:51:57 +00:00
Bryan Duxbury
c687712d18
THRIFT-133. fix a small bug with smalltalk.prefix and smalltalk.package namespaces.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@980538 13f79535-47bb-0310-9956-ffa450edef68
2010-07-29 18:39:06 +00:00
Bryan Duxbury
e0ac3abd53
THRIFT-133. 'namespace ruby' should error out, or be an alias to 'namespace rb'
...
This patch causes 'namespace ruby' (or any unrecognized generator name) to produce an error.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@980498 13f79535-47bb-0310-9956-ffa450edef68
2010-07-29 16:24:41 +00:00
David Reiss
95c005a7c6
THRIFT-395. python: Add option to treat strings as UTF-8 unicode
...
Add the "utf8strings" option to the Python generator. If set, all
Thrift strings (not binary) will be expected to be unicode objects, not
str. They will be encoded as UTF-8 before serialization and decoded as
UTF-8 after deserialization.
The accelerator module for TBinaryProtocol is not affected.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@959516 13f79535-47bb-0310-9956-ffa450edef68
2010-07-01 05:36:25 +00:00
Bryan Duxbury
162b3ac646
THRFIT-804. java: CompareTo is broken for unions set to map, set, or list
...
This patch fixes TUnion's compareTo, and factors out the standard part of the comparison to TBaseHelper.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@957350 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 21:17:48 +00:00
Bryan Duxbury
656683c776
THRIFT-808. Segfault when constant declaration references a struct field that doesn't exist
...
This patch causes a useful error to be printed instead of an anonymous segfault.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@957270 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 16:57:51 +00:00
Bryan Duxbury
2e1aab5db7
THRIFT-767. rb: ruby compiler does not keep comments for enum values
...
This patch makes sure that we print an rdoc comment above each of the enum values.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@957268 13f79535-47bb-0310-9956-ffa450edef68
2010-06-23 16:54:17 +00:00
Bryan Duxbury
d58ccec660
THRIFT-768. java: Async client for Java
...
This patch adds an implementation of a fully-asynchronous client that makes use of NIO. Stubs for the async method calls are generated along with the existing synchronous ones.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@948492 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 16:34:48 +00:00
Bryan Duxbury
c8ee35805d
revert an unintentional commit to the java generator
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940861 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04 14:01:14 +00:00
Bryan Duxbury
a1e268c54b
THRIFT-770. build: Get 'make dist' to work without first compiling source code
...
This patch ditches the old print_version.sh method and instead generates the compiler's version.h via the Makefile.
Patch: Anthony Molinaro
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940630 13f79535-47bb-0310-9956-ffa450edef68
2010-05-03 21:33:00 +00:00
Bryan Duxbury
6a68187338
THRIFT-647. php: PHP library is missing install target
...
This patch adds a 'make install' target to a new PHP makefile.
Patch: Anthony Molinaro
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940325 13f79535-47bb-0310-9956-ffa450edef68
2010-05-02 22:39:31 +00:00
Bryan Duxbury
97d21c853d
THRIFT-760. java: Generated client code does not set or check the sequence ID in messages
...
The Java generated clients weren't paying attention to sequence ids. Now they are\!
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@938169 13f79535-47bb-0310-9956-ffa450edef68
2010-04-26 18:16:46 +00:00
Bryan Duxbury
0137af6bf1
THRIFT-611. Under Windows when compiling using MinGW, includes are incorrectly resolved due to '/' <-> '\' havoc.
...
This patch ensures the proper slashes are used based on the platform.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@937070 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 21:21:46 +00:00
Bryan Duxbury
321eb7a2bd
THRIFT-518. as3: Add the AS3 generator and library
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@937067 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 21:17:39 +00:00
Bryan Duxbury
15e2930ccf
THRIFT-761. java: Include the symbolic name of a typedef field in the field metadata
...
This patch adds a new isTypedef() method to FieldValueMetaData and converts MetaDataTest to a testcase in TestStruct.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@936588 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 01:05:02 +00:00
Bryan Duxbury
60229785cb
THRIFT-763. java: Variable capture bug in generated struct compareTo
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@936583 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 00:27:41 +00:00
Bryan Duxbury
0fab12e968
THRIFT-759. java: Make TBase implement Comparable
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@936581 13f79535-47bb-0310-9956-ffa450edef68
2010-04-22 00:22:34 +00:00
Bryan Duxbury
49b38015a6
THRIFT-753. java: Don't look up TFieldIdEnum values with a map
...
Instead of using a generated map, use a big switch statement.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930618 13f79535-47bb-0310-9956-ffa450edef68
2010-04-04 04:01:07 +00:00
Bryan Duxbury
b1f7f7973b
THRIFT-746. java: Generated services Iface/Client inner classes do not derive from base classes
...
This patch causes all generated Client classes to inherit from TServiceClient, an interface that provides a way to get the protocols the Client is using. Also, it causes a new TServiceClientFactory implementation to generated for each Service, which provides a generic, reflection-free way to get Clients. These changes make it easier to build generic pools of Client objects.
Patch: Mathias Herberts
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930601 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 23:19:52 +00:00
Bryan Duxbury
ea7910faf3
THRIFT-663. java: JavaBean code generator produces incorrect setter methods
...
This patch causes the beans option to suppress the builder-style setter methods. It also adds a new 'private-members' option that leaves the builder-style methods, but makes the actual instance variables private.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@930474 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 05:04:48 +00:00
Bryan Duxbury
5557beffae
THRIFT-723: java: Thrift buffers with set and map types in Java should implement Comparable
...
This makes structs that contain sets and maps in their hierarchy Comparable.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@928944 13f79535-47bb-0310-9956-ffa450edef68
2010-03-29 23:57:09 +00:00
Bryan Duxbury
15b7b28794
THRIFT-701. java: Generated classes take up more space in jar than needed
...
Use a static {} block instead of an anonymous inner class to define metaDataMap. This saves some space in jars generated by avoiding the internal class.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@926466 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 05:39:18 +00:00
Bryan Duxbury
3f4ca0e8fd
THRIFT-734. java: Can't use primitive types in service definitions for bean generated code
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@923566 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 03:13:26 +00:00
David Reiss
ac110e4f1c
cpp: Eliminate circular dependency between thrift libraries
...
Previously, Thrift.cpp contained TApplicationException, which was using
TProtocol methods, defined in TProtocol.h. This caused a circular
dependency since libprotocol depends on Thrift.h. This change moves
TApplicationException into its own file.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920682 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 05:20:07 +00:00
David Reiss
e574a065a9
THRIFT-660. php: Use the accelerator to write return values from servers
...
Previously, we only used the acclerator module for clients to
write calls and read returns. Now PHP servers will use it for
writing returns. We cannot use it to read calls on the server side
(without modifications), because the module requires that
the structure type be known before reading the message header.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920663 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 05:19:22 +00:00
David Reiss
4dd7801e90
THRIFT-655. Allow structs to be typedef'ed
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920657 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 05:19:08 +00:00
David Reiss
53c10e09e1
THRIFT-564. Support arbitrary annotations on struct fields
...
This is subtly different from a type annotation, since some bits of
metadata only make sense in the context of a single structure field,
like whether the field is required, or whether the C++ code should use
a pointer for it.
This change doesn't define any meaningful annotations. It just sets up
the parsing infrastructure.
I have no idea if $10 will work with older versions of yacc. It seems
to work fine with bison.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@919325 13f79535-47bb-0310-9956-ffa450edef68
2010-03-05 07:51:51 +00:00
Bryan Duxbury
4e7cf25b95
THRIFT-716. java: Field names can conflict with local variables in code for unions
...
This patch resolves the name clash issue by removing the unnecessary parameters from the generated method and using the protected variables directly instead.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@917130 13f79535-47bb-0310-9956-ffa450edef68
2010-02-28 05:19:38 +00:00
Bryan Duxbury
53cba3cfa2
THRIFT-689. java: Notify client of recoverable protocol errors on java server
...
When a protocol error occurs, the server will now send back a message containing the exception. Clients should be able to detect and rethrow these exceptions as appropriate.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@916825 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 21:38:42 +00:00
Bryan Duxbury
dee6d4260c
THRIFT-713. java: Java compareTo method throws NPE when any field isn't set.
...
This patch fixes a somewhat egregious bug in the generated compareTo for non-union structs and avoids possible NPEs.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@915499 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 19:06:25 +00:00
Bryan Duxbury
a34a4be080
remove an erroneously added newline in ruby generated structs
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911957 13f79535-47bb-0310-9956-ffa450edef68
2010-02-19 20:00:55 +00:00
Bryan Duxbury
39dadd6656
THRIFT-712. rb: Inspect should print binary fields as hex instead of escaped string
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911610 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 22:00:45 +00:00
Bryan Duxbury
0e4920c6b8
THRIFT-708. rb: Is set checking methods
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911557 13f79535-47bb-0310-9956-ffa450edef68
2010-02-18 20:28:27 +00:00
Bryan Duxbury
cd43a06405
THRIFT-703. Attempting to hash an unset union struct results in NPE
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911162 13f79535-47bb-0310-9956-ffa450edef68
2010-02-17 20:01:29 +00:00
Bryan Duxbury
33e190cd15
THRIFT-697. Union support in Ruby
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@910700 13f79535-47bb-0310-9956-ffa450edef68
2010-02-16 21:19:01 +00:00
T Jake Luciani
322caa2f92
THRIFT-550: Added javascript support
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@910158 13f79535-47bb-0310-9956-ffa450edef68
2010-02-15 03:24:55 +00:00
David Reiss
ba4bf4d512
THRIFT-691. haskell: Don't block required prelude definitions
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@903393 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 20:06:36 +00:00
David Reiss
3bb5e0581a
THRIFT-683. Remove profanity
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@902941 13f79535-47bb-0310-9956-ffa450edef68
2010-01-25 19:31:31 +00:00
Todd Lipcon
b6f4e56bb0
THRIFT-643. smalltalk: Generated code doesnt load on Squeak3.10.2-7179-basic and PharoCore-1.0-10491rc1 images
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@900660 13f79535-47bb-0310-9956-ffa450edef68
2010-01-19 05:18:55 +00:00
Bryan Duxbury
c4ad9be578
THRIFT-675. java: Generated findByValue() should just switch on value instead of mapping
...
This patch removes the map-based enum value lookup and replaces it with a static switch statement.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@899911 13f79535-47bb-0310-9956-ffa450edef68
2010-01-16 09:13:20 +00:00
Bryan Duxbury
9bfacd3680
THRIFT-678. html: HTML generator should include per-field docstrings
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@899722 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 17:27:52 +00:00
Bryan Duxbury
55b38bc3af
THRIFT-674. java: Generated read() should just switch directly on field.id
...
This patch gets rid of an unnecessary map lookup and null check in generated structs' read method, amounting a noticeable performance improvement.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@899721 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 17:20:04 +00:00
David Reiss
752529e9b4
THRIFT-560. haskell: Move to ByteString and compiler fixes
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@898012 13f79535-47bb-0310-9956-ffa450edef68
2010-01-11 19:12:56 +00:00
Bryan Duxbury
c2ec7cae04
THRIFT-670. java: Unions don't skip unrecognizable fields correctly
...
This patch adds a test and a fix for the bug.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@894924 13f79535-47bb-0310-9956-ffa450edef68
2009-12-31 18:59:15 +00:00
Bryan Duxbury
986d50fc71
THRIFT-668. java: Using a map in an exception type will generate a class that does not implement Comperable-> that will generate a stub that does not compile
...
The compiler was incorrectly assuming that exceptions were comparable. Now, exceptions are treated just like structs.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@894919 13f79535-47bb-0310-9956-ffa450edef68
2009-12-31 18:18:00 +00:00
Bryan Duxbury
2d80470bcb
THRIFT-632. java: Constants of enum types don't behave well
...
This patch causes constants of all types to be resolved differently by the compiler, and makes it so that constants of enum types contain a reference to the enum type so that code generators can produce the correct names.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@892358 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 19:41:11 +00:00
Bryan Duxbury
e533bace3d
THRIFT-653. java: Fix toString method for enums
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@892357 13f79535-47bb-0310-9956-ffa450edef68
2009-12-18 19:34:25 +00:00
Todd Lipcon
53ae9f39d5
THRIFT-622. Add appropriate licensing information to get Thrift ready for a release.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@887812 13f79535-47bb-0310-9956-ffa450edef68
2009-12-07 00:42:38 +00:00
Bryan Duxbury
9af23d9327
THRIFT-551. java: Enumeration doesn't generate real enum in Java
...
This patch makes the compiler generate actual Enum classes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@882211 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 17:26:38 +00:00
Bryan Duxbury
e476480691
THRIFT-628. java: Hash code method for _Fields objects does not behave as expected
...
This patch switches to using the hashcode of the actual field id, instead of the field id enumeration.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@881559 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 21:56:43 +00:00
David Reiss
559a49f03c
THRIFT-621. cpp: Fix generated files using "apache" namespaces
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@835739 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 04:52:10 +00:00
Bryan Duxbury
aa9fb5dc9d
THRIFT-623. java: Use a Java enum to represent field ids in generated structs
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@835538 13f79535-47bb-0310-9956-ffa450edef68
2009-11-12 20:52:25 +00:00
Bryan Duxbury
e2e4ea1dcf
THRIFT-624. java: compareTo is broken for Unions with binary fields
...
This patch adds a special case for byte[] values in TUnion. It also fixes a related bug in TBaseHelper for comparing two byte arrays.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@835065 13f79535-47bb-0310-9956-ffa450edef68
2009-11-11 21:01:35 +00:00
Bryan Duxbury
2845b16eb2
THRIFT-565. java: Structs containing typedefs for incomparable objects will be considered comparable
...
This patch causes the compiler to fully unwrap typedefs when determining comparability.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@834119 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 15:55:22 +00:00
Andrew McGeachie
3533dcbef8
THRIFT-613. Make generated objects implement the NSCoding protocol.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@832507 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 18:52:15 +00:00
Andrew McGeachie
72751724b5
THRIFT-521. Change @synthesize property declarations to @dynamic for happy compiling on OS X 10.6 as well as 10.5
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@830326 13f79535-47bb-0310-9956-ffa450edef68
2009-10-27 20:23:02 +00:00
David Reiss
8266e012c5
pynames
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@827893 13f79535-47bb-0310-9956-ffa450edef68
2009-10-21 06:09:16 +00:00
Bryan Duxbury
72fd472476
THRIFT-589. java: Add Field Name to Field ID Mapping
...
Java Thrift structs now have a static mapping of field name to field ID.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@825371 13f79535-47bb-0310-9956-ffa450edef68
2009-10-15 01:24:26 +00:00
Bryan Duxbury
364902eb56
THRIFT-529. java: Change generated constructors so that application code evolves better
...
Optional fields are now excluded from constructors.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@820857 13f79535-47bb-0310-9956-ffa450edef68
2009-10-02 00:56:53 +00:00
Bryan Duxbury
f18202fbd0
THRIFT-477. java: remove extra methods generated for collections
...
I have rolled back the patch originally applied in this issue.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@820831 13f79535-47bb-0310-9956-ffa450edef68
2009-10-01 22:52:25 +00:00
Bryan Duxbury
315a5dbe29
THRIFT-588. java: Generated .equals method throws NPE for thrift object
...
If other is null, then they're not equal.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@818998 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 20:28:35 +00:00
Bryan Duxbury
db40d26f4a
THRIFT-572. java: Union compareTo is broken
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@817317 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21 16:52:48 +00:00
Esteve Fernandez
0e8e6099e2
generate Twisted code in a separate directory (gen-py.twisted)
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@816340 13f79535-47bb-0310-9956-ffa450edef68
2009-09-17 19:19:11 +00:00
David Reiss
bb97bef0a1
THRIFT-584. php: Generate a better directory structure
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@815878 13f79535-47bb-0310-9956-ffa450edef68
2009-09-16 16:57:05 +00:00
David Reiss
a0bf2c1e08
THRIFT-583. python: Allow new-style classes for Interfaces
...
The original new-style class only affected structs, enums, and
exceptions.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@815874 13f79535-47bb-0310-9956-ffa450edef68
2009-09-16 16:50:00 +00:00
David Reiss
45603e9c6c
THRIFT-575. Allow required fields in function parameters
...
r665255 was a bit too aggressive. "optional" was causing confusion,
but there doesn't seem to be any harm in allowing "required".
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810713 13f79535-47bb-0310-9956-ffa450edef68
2009-09-02 22:15:55 +00:00
Bryan Duxbury
ab3666e6ca
THRIFT-409. java: Add "union" to Thrift
...
This patch introduces new IDL syntax for creating Unions, explicityly single-valued structs. While the parser changes are portable, this patch only includes the actual generated code changes for the Java library. Other libraries can continue to generate a struct with the same fields and remain compatible until they are able to implement the full shebang.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810300 13f79535-47bb-0310-9956-ffa450edef68
2009-09-01 23:03:47 +00:00
David Reiss
db5d589457
Minor whitespace fixes in the Java generator and gen-code
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@810255 13f79535-47bb-0310-9956-ffa450edef68
2009-09-01 21:36:46 +00:00
David Reiss
af81de0123
Revert r806014 "THRIFT-562. java: Java is inconsistent ..."
...
- It changed the semantics of default-presence fields.
- It messed up calls that accept exceptions.
- Full details on issue.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@808609 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27 20:27:09 +00:00
Bryan Duxbury
2c8cd944e5
THRIFT-562. java: Java is inconsistent checking for required fields
...
This patch makes the compiler act consistently regarding what it means to be required or optional. Additionally, it cleans up the tests to actually use the Fixtures class all over.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@806014 13f79535-47bb-0310-9956-ffa450edef68
2009-08-20 01:00:18 +00:00
Bryan Duxbury
c27cda57a0
THRIFT-558. java: Replace use of log4j by commons-logging in Java library and generated Java code
...
This patch switches Thrift to use slf4j instead of log4j.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@804349 13f79535-47bb-0310-9956-ffa450edef68
2009-08-14 20:04:15 +00:00
Mark Slee
f5a0b3dfc8
THRIFT-561: Add "register" to list of reserved keywords
...
Reviewed By: dreiss
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@803997 13f79535-47bb-0310-9956-ffa450edef68
2009-08-13 19:21:40 +00:00
Bryan Duxbury
3efce23369
THRIFT-115. java: Isset structure has a large memory footprint
...
Instead of the old __isset structure, there is now a bit vector for fields that require an isset flag.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@800510 13f79535-47bb-0310-9956-ffa450edef68
2009-08-03 19:37:26 +00:00
T Jake Luciani
4184e2be54
THRIFT-554: Perl improper namespace check for exception handling and writeMessageEnd missing on processor calls
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799484 13f79535-47bb-0310-9956-ffa450edef68
2009-07-31 01:31:00 +00:00
Bryan Duxbury
684b4f9aee
THRIFT-144. java: Generated classes should implement Comparable
...
If generated structs don't contain any incomparable child members, they implement Comparable.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799474 13f79535-47bb-0310-9956-ffa450edef68
2009-07-31 00:12:21 +00:00
Bryan Duxbury
ba71f8c7fc
THRIFT-540. java: Have set methods return reference to self
...
Issue title says it all, really.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799130 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 23:47:38 +00:00
Bryan Duxbury
3d5db203d5
THRIFT-479. java: Add javadocs for enum types
...
Fields now reference their enum class name in javadoc. Also, generated enum classes's members are now javadoc'd.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799128 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 23:44:44 +00:00
Bryan Duxbury
52297d5e2c
THRIFT-477. java: remove extra methods generated for collections
...
This patch removes the special extra methods for collections.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@799036 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29 19:46:00 +00:00
David Reiss
c8e300533c
THRIFT-413. Suppport for annotations on base types
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@798219 13f79535-47bb-0310-9956-ffa450edef68
2009-07-27 17:02:42 +00:00
Andrew McGeachie
0c8957114a
THRIFT-280. Server-side Cocoa implementation.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796538 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 21:14:19 +00:00
Andrew McGeachie
6efefc023a
THRIFT-59. Make sure we don't over-release strings after we deserialize them.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796518 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 20:14:31 +00:00
Andrew McGeachie
38e1a10c0d
THRIFT-545. Fix mem leak in generated 'description' method
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796391 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 17:22:03 +00:00
Andrew McGeachie
f2e03ba2e3
THRIFT-521. Generate objective-c 2.0 propery declarations on iphone and OS X 10.5 and greater.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796377 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 16:51:49 +00:00
Andrew McGeachie
7564925daa
THRIFT-520. Fix generation of cocoa constants when a namespace prefix is set.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796356 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 16:12:33 +00:00
Andrew McGeachie
645d7b8d50
THRIFT-344. Add a 'log_unexpected' option to the cocoa generator. off by default. when supplied, unexpected field IDs and types are logged when reading a struct.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796347 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 15:30:16 +00:00
Andrew McGeachie
6db89f2978
THRIFT-343. Import <Foundation/Foundation.h> instead of <Cocoa/Cocoa.h> to support iPhone
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796327 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 14:45:12 +00:00
Andrew McGeachie
330cfc13bc
THRIFT-59. Fix memory leak by releasing allocated objects after assigning to container.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@796320 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 14:33:17 +00:00
T Jake Luciani
f1fd2954b5
THRIFT-542: Perl compiler uses invalid method 'method_exists' and subsequent test
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@794938 13f79535-47bb-0310-9956-ffa450edef68
2009-07-17 01:34:50 +00:00
Bryan Duxbury
8f5827358b
THRIFT-543. java: Generate normal style java files should respect the "optional" keyword when serializing
...
As the summary suggests, this patch causes "optional" fields to be skipped if they are unset, even if they are primitives. As this patch is for the non-beans style generator, the user is expected to maintain the set/unset status themselves.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@793778 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14 01:42:09 +00:00
Bryan Duxbury
281d9dacb6
THRIFT-204. csharp: C# Partial Classes
...
C# structs are now generated as partial classes so they can be extended without wrapping.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@790730 13f79535-47bb-0310-9956-ffa450edef68
2009-07-02 20:15:05 +00:00
Bryan Duxbury
6fcaf84287
THRIFT-526. rb: Generated Ruby enums have no good way to get the names back out once you have a number.
...
enums generated in Ruby will now have a static map of enum values to names.
Patch by Adam Coffman (with slight modifications).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@788098 13f79535-47bb-0310-9956-ffa450edef68
2009-06-24 17:55:53 +00:00
David Reiss
3d6babc05c
THRIFT-524. erlang: Decapitalize file names in include directives
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@786334 13f79535-47bb-0310-9956-ffa450edef68
2009-06-18 23:30:03 +00:00
Bryan Duxbury
ef73b0e67a
THRIFT-378. java: Java servers do not turn internal errors into thrift exceptions
...
This patch causes Java servers to log internal server errors and return an INTERNAL_ERROR exception instead of just closing the connection.
Author: Jonathan Ellis
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@785713 13f79535-47bb-0310-9956-ffa450edef68
2009-06-17 16:43:25 +00:00
Bryan Duxbury
9e34741004
THRIFT-489. java: Java enum validation only validates explicitly assigned values
...
This patch puts all of an enum's values into the valid values set, fixing validation.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780091 13f79535-47bb-0310-9956-ffa450edef68
2009-05-29 20:15:02 +00:00
Bryan Duxbury
32194ab442
THRIFT-501. rb: File.dirname(...) requires cause warnings in some scenarios
...
This patch removes the File.dirname usage. Instead, you should put the directory that contains your _types.rb into the load path.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@776800 13f79535-47bb-0310-9956-ffa450edef68
2009-05-20 18:22:19 +00:00
Bryan Duxbury
1cc7a1369e
THRIFT-485. rb: Generated validate methods that reference external thrift files' types are not referenced correctly
...
This patch fully qualifies type names in two spots.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@771964 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 18:50:26 +00:00
Andrew McGeachie
853bdfea38
THRIFT-60. Make generated constants object extend NSObject.
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@771514 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 00:44:48 +00:00