Commit Graph

96 Commits

Author SHA1 Message Date
Ulas Kirazci
0940015681 am 19c4090e: Merge "Allow NaN/+inf/-inf defaults in micro/nano."
* commit '19c4090eddf0eb4d65d1b41f283368c5e0f615a1':
  Allow NaN/+inf/-inf defaults in micro/nano.
2013-07-23 12:04:39 -07:00
Ulas Kirazci
49e4bdc1eb Merge "Allow NaN/+inf/-inf defaults in micro/nano." 2013-07-23 19:03:17 +00:00
Chris Smith
d98e9c4d0e Allow NaN/+inf/-inf defaults in micro/nano.
Adds support for default values of NaN, infinity and negative
infinity for floats and doubles in both the nano and micro
java compiler.

Change-Id: Ibc43e5ebb073e51d9a8181f3aa23b72e10015dca
2013-07-23 19:13:36 +01:00
Ulas Kirazci
521d472b7f am a400007e: Merge "Add contribution instructions for nano."
* commit 'a400007ed570bbcc638c05c59727b3527238ec70':
  Add contribution instructions for nano.
2013-07-19 15:26:19 -07:00
Ulas Kirazci
c01060c8ca Merge "Add contribution instructions for nano." 2013-07-19 22:24:14 +00:00
Ulas Kirazci
39799d09f1 Add contribution instructions for nano.
Change-Id: Ie110d182a84258ab5bb3ba1f67c6ada6be476c7e
2013-07-19 11:57:35 -07:00
Ulas Kirazci
12d1e72c16 am aad4b307: Merge "Update nano to serialize java keywords properly."
* commit 'aad4b3074456fb1acec6e64596d5c18d716ac146':
  Update nano to serialize java keywords properly.
2013-07-19 11:56:56 -07:00
Ulas Kirazci
86595020a8 Merge "Update nano to serialize java keywords properly." 2013-07-19 18:54:24 +00:00
Tom Chao
d4bb971d18 Update nano to serialize java keywords properly.
Change-Id: I7407d0fab609c336ecd73499e725aed0dd50f555
2013-07-19 09:30:56 -07:00
Ulas Kirazci
ba74aabea5 am 8cf17a8f: Merge "Make it possible to use MessageNano.mergeFrom without casting."
* commit '8cf17a8fbab128bda57c573e2ef7e0fafea39269':
  Make it possible to use MessageNano.mergeFrom without casting.
2013-07-09 10:26:12 -07:00
Ulas Kirazci
b8f5dad1c7 Merge "Make it possible to use MessageNano.mergeFrom without casting." 2013-07-09 17:23:52 +00:00
Ulas Kirazci
51f5dcfb1f am eda87c5c: Merge "Fix vanilla make build."
* commit 'eda87c5cad8cf84768bcb31d4762c6ec35a6b87d':
  Fix vanilla make build.
2013-07-09 10:15:50 -07:00
Wink Saville
ee011ab712 am 728a8b78: Merge "Fix the build"
* commit '728a8b78917ded5ea0f3f9c331810aedcb5353f9':
  Fix the build
2013-07-09 10:02:14 -07:00
Brian Duff
a9c4e082e0 Make it possible to use MessageNano.mergeFrom without casting.
You can now do:

  MyMessage foo = MessageNano.mergeFrom(new MyMessage(), bytes);

without having to cast the message returned from mergeFrom.

Change-Id: Ibb2ad327f75855d45352ad304c7f054f20dd29c9
2013-07-08 22:29:51 -07:00
Wink Saville
50acfdac08 am 0a1429cc: Merge "Nano support for extensions and unknown fields."
* commit '0a1429cc5ee4865550bcdddfae681a30cef58a5a':
  Nano support for extensions and unknown fields.
2013-06-25 09:56:06 -07:00
Wink Saville
499f47ffdb Merge "Nano support for extensions and unknown fields." 2013-06-25 16:53:07 +00:00
Brian Duff
5659cca8c8 Nano support for extensions and unknown fields.
You can use the processor option store_unknown_fields to switch
this support on:

  aprotoc --javanano_out=store_unknown_fields=true:/tmp/out

A separate option for extensions isn't required. Support
for unknown fields must be turned on to allow storing and
retrieving extensions, because they are just stored as
unknown fields. If unknown fields are switched on, extension
related code will be generated when a proto message includes
an extension range, or an extension is encountered.

By default, store_unknown_fields is false. No additional
code is generated, and the generator will error out if protos
contain extension ranges or extensions.

Change-Id: I1e034c9e8f3305612953f72438189a7da6ed2167
2013-06-24 16:02:12 -07:00
Wink Saville
ad5805216d am 9459b5c4: Merge "Fix enum field references with java_multiple_files."
* commit '9459b5c45b0ad33bea9376c2afb66cf93da610ac':
  Fix enum field references with java_multiple_files.
2013-06-07 14:46:45 -07:00
Wink Saville
661f87ceb8 Merge "Fix enum field references with java_multiple_files." 2013-06-07 21:45:14 +00:00
Brian Duff
a220fe61e1 Fix enum field references with java_multiple_files.
When the java_multiple_files option is on, enums are placed in java
class files based on the name of the original enum type. This fixes
field references to such enum values to point to the correct class
name when setting the default.

Change-Id: I51a2e251c0d0ab1e45a182ba849d314232a74bac
2013-06-07 14:00:05 -07:00
Wink Saville
5f492841b3 am 6f59b383: Merge "Add toString() method to MessageNano."
* commit '6f59b38386c8ff883c8e9e0a76068fa07d95bfb1':
  Add toString() method to MessageNano.
2013-06-06 16:31:35 -07:00
Wink Saville
63d4b5fd57 Merge "Add toString() method to MessageNano." 2013-06-06 23:30:07 +00:00
Wink Saville
1fa7217531 am 4e76e72b: Merge "Fix javanano compiler generating uncompileable java code. This happened for enums when java_multiple_files=true."
* commit '4e76e72b03f6dafc9ad650864b6a12b665801b9b':
  Fix javanano compiler generating uncompileable java code. This happened for enums when java_multiple_files=true.
2013-06-05 18:31:54 -07:00
Wink Saville
b0874cc632 Merge "Fix javanano compiler generating uncompileable java code. This happened for enums when java_multiple_files=true." 2013-06-06 01:29:31 +00:00
Brian Duff
296787577a Fix javanano compiler generating uncompileable java code. This happened
for enums when java_multiple_files=true.

Change-Id: Ia6fe1a51c6a46eb9a2f29527829794076b165cb7
Signed-off-by: Brian Duff <bduff@google.com>
2013-06-05 15:38:33 -07:00
Andrew Flynn
a16121550b Add toString() method to MessageNano.
- All of the real work for printing the proto is actually done in
  MessageNanoPrinter.
- Uses reflection to find proto-defined fields and prints those.
- Prints all fields, even defaults and nulls.
- Also added a simple test to make sure it handles all proto types well.
  Tried not to make the test too brittle (but hey it's testing a toString()
  so how flexible can it be)

Change-Id: I3e360ef8b0561041e010c1f3445ec45ecdcd2559
2013-06-04 13:26:58 -07:00
Wink Saville
16ab1961a1 am d29f87c7: Merge "Fix typos in protobuf readme."
* commit 'd29f87c79f34ecd6b7889cc49ca9e9d90c413634':
  Fix typos in protobuf readme.
2013-04-29 17:28:26 -07:00
Wink Saville
bb9b49029e Merge "Fix typos in protobuf readme." 2013-04-29 23:33:04 +00:00
Matt Thrailkill
adf95183f6 Fix typos in protobuf readme.
Change-Id: Ifa3c8674482ae9575df459a3e76e9f8b4a9296b5
Signed-off-by: Matt Thrailkill <mthrailkill@google.com>
2013-04-26 16:08:53 -07:00
Ficus Kirkpatrick
fbbe842a19 am e0ee97ea: Merge "Don\'t use Arrays.copyOf in generated code."
* commit 'e0ee97eaac9a0f3d74c42315a109cdc25f2fddc0':
  Don't use Arrays.copyOf in generated code.
2013-04-08 18:06:14 -07:00
Ficus Kirkpatrick
4349e11df9 Merge "Don't use Arrays.copyOf in generated code." 2013-04-09 00:19:09 +00:00
Ficus Kirkpatrick
314a302933 Don't use Arrays.copyOf in generated code.
It didn't appear until API 9 and is thus incompatible with Froyo.
Instead, allocate a new array and System.arraycopy inline.

Change-Id: I2e1cd07a4a762ef8edd5ec06ceaa1d38b302823d
2013-04-08 15:47:56 -07:00
Wink Saville
12ac3a7e7f am a6b79eb9: Merge "Prevent conflicts between local and proto variable names."
* commit 'a6b79eb9618fc1774aa18a0b365e48398f23808a':
  Prevent conflicts between local and proto variable names.
2013-04-04 07:00:02 -07:00
Ulas Kirazci
4380449c7a am fb8f78fe: Prevent conflicts between local and proto variable names.
* commit 'fb8f78fe6e2d757b813747d5d401a0eeb0cd478b':
  Prevent conflicts between local and proto variable names.
2013-04-04 06:05:54 -07:00
Ulas Kirazci
741f208bb9 Prevent conflicts between local and proto variable names.
Prefix access to proto variable names with "this.". Also remove unused
GenerateMergingCode.

Change-Id: I5f07d3252fc385c4174d9165b64785b40f676e17
2013-04-04 05:56:23 -07:00
Wink Saville
d4bb580f1b Merge "Prevent conflicts between local and proto variable names." 2013-04-04 12:55:13 +00:00
Ulas Kirazci
3234cee5ba Prevent conflicts between local and proto variable names.
Prefix access to proto variable names with "this.". Also remove unused
GenerateMergingCode.

Change-Id: I5f07d3252fc385c4174d9165b64785b40f676e17
2013-04-03 15:53:19 -07:00
Ulas Kirazci
86ce4717ee am 43325653: Nano protobufs.
* commit '43325653beb4e5b6923d0380a84bf7e204be5c22':
  Nano protobufs.
2013-04-03 14:03:21 -07:00
Ulas Kirazci
d6592c758c Nano protobufs.
Like micro protobufs except:

- No setter/getter/hazzer functions.
- Has state is not available. Outputs all fields != their default.
- CodedInputStream can only take byte[] (not InputStream).
- Repeated fields are in arrays, not ArrayList or Vector.
- Unset messages/groups are null, not "defaultInstance()".
- Required fields are always serialized.

To use:

- Link libprotobuf-java-2.3.0-nano runtime.
- Use LOCAL_PROTOC_OPTIMIZE_TYPE := nano

Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80
2013-04-03 13:23:39 -07:00
Wink Saville
08b6e50a9b am 216c9e86: Merge "Nano protobufs."
* commit '216c9e8681b9426e84c9e2222da5c0dd669261b2':
  Nano protobufs.
2013-04-01 18:05:23 -07:00
Wink Saville
64a842122c Merge "Nano protobufs." 2013-04-01 23:51:39 +00:00
Ulas Kirazci
2337023fd9 Nano protobufs.
Like micro protobufs except:

- No setter/getter/hazzer functions.
- Has state is not available. Outputs all fields != their default.
- CodedInputStream can only take byte[] (not InputStream).
- Repeated fields are in arrays, not ArrayList or Vector.
- Unset messages/groups are null, not "defaultInstance()".
- Required fields are always serialized.

To use:

- Link libprotobuf-java-2.3.0-nano runtime.
- Use LOCAL_PROTOC_OPTIMIZE_TYPE := nano

Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80
2013-04-01 14:55:45 -07:00
Ying Wang
c4e73a82ff am db9ab02c: (-s ours) Build against the NDK for x86 and mips too.
* commit 'db9ab02c090cdc5d2b31399867a4052351b8793d':
  Build against the NDK for x86 and mips too.
2012-12-14 18:40:47 -08:00
Ying Wang
c991c16e92 Build against the NDK for x86 and mips too.
Change-Id: I68963dc1c274c3dcf1038d4e21dc418f9554b78f
2012-12-14 18:19:15 -08:00
Przemyslaw Szczepaniak
610c2fd73d Add gnustl+rtti version of cpp full library
Adding new version of cpp  library,
'libprotobuf-cpp-2.3.0-full-gnustl-rtti'. Previously, c++ code
compiled against gnustl couldn't link with this library - having
both gnustl and stlport in same binary leads to nasty conflicts.

Bug: 7484202
Change-Id: Ic4fbbfc2839c4ce88bf605cf3d9cca47b146f965
2012-11-08 17:26:05 +00:00
Ying Wang
b67a8ec635 Build against the NDK for x86 and mips too.
Change-Id: I68963dc1c274c3dcf1038d4e21dc418f9554b78f
2012-09-07 09:30:03 -07:00
Ying Wang
ce12c0a2c2 am a6d94785: Retire LOCAL_NDK_VERSION.
* commit 'a6d94785fc7c80c33de99b5a65e6a5e3a2e93fb3':
  Retire LOCAL_NDK_VERSION.
2012-08-14 12:21:11 -07:00
Ying Wang
b74eb3fc65 Retire LOCAL_NDK_VERSION.
Bug: 6932421
Change-Id: Ieaad80daf4e6a4a7f058dd242f37a144e8ee9e76
2012-08-14 12:02:51 -07:00
Ying Wang
64227227e7 Retire LOCAL_NDK_VERSION.
Bug: 6932421
Change-Id: Ieaad80daf4e6a4a7f058dd242f37a144e8ee9e76
2012-08-14 10:28:02 -07:00
Ying Wang
4747b03ac1 Build the target protobuf libraries against the NDK
This change unbundled the protobuf target libraries, so they can be used
in unbundled branches.

Change-Id: Ic4948f27395b2c2b81ea120d9e2353ba9aad02a8
2012-06-15 14:37:32 -07:00