Ben Gertzfield
3400727fff
Fix undefined behavior in CheckBitsFit bit-shift on size_t
2016-04-29 15:15:09 -07:00
Wouter van Oortmerssen
f6330ab8f1
Fixed SkipByteOrderMark advancing cursor_ too early.
...
Change-Id: Ie60f01d935ca6b4aa6ce0eab7598602ac0758342
Tested: on Linux.
2016-04-22 11:27:35 -07:00
Wouter van Oortmerssen
fd542c71e3
Fixed float suffix not being added on implicit float defaults.
...
Change-Id: I8dcbb5e93836356511d411ef86452babd3dd3c0b
Tested: on Linux.
2016-04-20 12:06:32 -07:00
Wouter van Oortmerssen
4d7890c2c9
Fixed whole-number float default values missing a .0 suffix.
...
A previous commit that added "f" for C++/Java/C# would break
on gcc of constants like 3f, which are now output as 3.0f
Tested: on Linux
Change-Id: If9cabbe3c6d6948a5050b8b123bda9c06e181f52
2016-04-18 11:50:46 -07:00
Wouter van Oortmerssen
72fc45aa6a
Made user-defined attributes available in the reflection data.
...
Tested: on Linux.
Bug: 27923233
Change-Id: Ic16675650e4a8e138c163f1e2131a3aad7008ada
2016-04-11 17:36:56 -07:00
Wouter van Oortmerssen
83dc5ed4a7
Fixed JSON integers as strings not being parsed correctly.
...
Change-Id: If34aef46ef619e06de799cff14948b02e98da86d
Tested: on Linux.
2016-04-11 11:08:09 -07:00
Wouter van Oortmerssen
e6b79f0002
Added stream & idempotent annotations for RPCs.
...
Change-Id: Ia8651c1051808fdda0dc0ba52ec991777f868e88
Tested: on Linux.
2016-03-09 15:03:05 -08:00
Wouter van Oortmerssen
1a63eb46bb
Added RPC declarations to the schema parser.
...
This is the first step in RPC support. Actual code generation
to follow.
Change-Id: I96c40fec3db671d100dd9eb509a71c5cbe55bfb2
Tested: on Linux.
Bug: 20122696
2016-03-09 13:47:40 -08:00
Wouter van Oortmerssen
fbc8af40e3
Allow JSON numeric fields to be specified by a numeric data in a string.
...
Change-Id: I6a3fae1e71434a7384edc39b8602bd84a0432edb
Tested: on Linux.
Bug: 24140897
2016-03-07 17:22:51 -08:00
Nalinichandra Penke
cbab26673b
Fix #3775 : Skip unknown field names if they're quoted
2016-02-22 14:34:20 -06:00
Wouter van Oortmerssen
20c0082ee5
Fixed namespace code generation for C++
...
The code generator was assuming all declarations for the current
file sit in the same namepace. Now uses the "on demand" namespace
switching we had for the forward declarations.
Also fixed a bug related to namespace lookup.
Change-Id: Ib54a3efbc752cbb9590302fa0707c0c73448db3d
Tested: on Linux.
2016-02-17 11:26:38 -08:00
Wouter van Oortmerssen
d779308b3e
Fixed enum declaration values being parsed as int.
...
This caused values in the uint range to be made negative values.
Change-Id: Ia4284747f48508b589c034ff3aae0d141e96eb3c
Tested: on Linux.
2016-02-10 11:25:31 -08:00
Wouter van Oortmerssen
d75d29e2fe
Merge branch 'master' of https://github.com/google/flatbuffers
2016-01-19 14:10:49 -08:00
Wouter van Oortmerssen
049f3f7907
Added support for parsing JSON null value.
...
These cause the field in question to be skipped.
Bug: 16550393
Change-Id: Id05104e89818ee773b8a91fdcc86e18061b9a82f
Tested: on Linux.
2016-01-19 14:05:27 -08:00
Wouter van Oortmerssen
7d70082590
Merge pull request #3706 from evolutional/fix-3506
...
Check (& skip) of the utf-8 byte order mark
2016-01-19 11:10:07 -08:00
Wouter van Oortmerssen
6136dd490a
Merge pull request #3498 from ncpenke/gcc-4.4.3-support
...
Gcc 4.4.3 support
2016-01-19 10:27:57 -08:00
Oli Wilkinson
cbe8747b59
Added check (& skipping) of the utf-8 byte order mark (0xEF BB BF) at the beginning of the file
2016-01-18 20:14:39 +00:00
Chandra Penke
b63ebad49d
Fix #3497 : Add support for compiling in g++ 4.4 and 4.5
...
- Removed uses of lambda expressions
- Added custom defines for constexpr and nullptr
- Removed trailing comma of last value from generated enums
2016-01-09 06:30:50 -06:00
Wouter van Oortmerssen
586fdee89b
Merge pull request #3494 from parnic/fix-vs2012-static-analysis
...
Fixed MS static analysis warnings
2016-01-06 12:34:08 -08:00
Chris Pickett
30013b4ff8
Fixed MS static analysis warnings
...
Cleaned up a few warnings to allow VS2012 to compile idl_parser and idl_gen_text (for exporting binary protobuf blobs as JSON) cleanly under static analysis.
2016-01-05 13:38:59 -06:00
Chris Pickett
e0b2f81885
Fixed compile warning with VS2012
...
flatbuffers\src\idl_parser.cpp(1516): warning C4244: 'argument' : conversion from 'int' to 'char', possible loss of data
2016-01-05 10:58:40 -06:00
Chris Pickett
0e1601b80d
Fixed compile warning with VS2012
...
flatbuffers\src\idl_parser.cpp(1525): warning C4127: conditional expression is constant
flatbuffers\src\idl_parser.cpp(1546): warning C4127: conditional expression is constant
2016-01-05 10:58:21 -06:00
Wouter van Oortmerssen
a6a38f6035
Merge branch 'master' of https://github.com/google/flatbuffers
...
Fixed conflicts and added missing generated files.
Change-Id: I4321c798543292d814c2c9e8b238c203b7526c7b
2016-01-04 13:06:19 -08:00
Wouter van Oortmerssen
451272b618
Made error checking macros less prone to clashes.
...
Change-Id: Ieb252ce01446551699d935507bc95ee286fe1ddd
Tested: on Linux.
2015-12-29 16:33:00 -08:00
Nalinichandra Penke
13d0594b4c
Fix #2775 : Add parser option to skip unknown JSON fields
2015-12-22 00:02:19 -08:00
Wouter van Oortmerssen
40a33b1d06
Replaced exception handling in the parser with error checking.
...
This to allow the code to run on a greater range of build
configurations (that don't allow exceptions/RTTI).
If anyone ever doubts the usefulness of exception handling,
please show them this commit.
Change-Id: If7190babdde93c3f9cd97b8e1ab447bf0c81696d
Tested: on Linux.
2015-12-21 12:17:59 -08:00
Wouter van Oortmerssen
4dcaec7938
Fixed root_type not accepting namespaced types.
...
Change-Id: I272f377742cc0a2c1bfccaa641b54eb9a8c762b6
Tested: on Linux.
2015-12-09 16:41:12 -08:00
Wouter van Oortmerssen
45bda6e08d
Added --gen-all to generate code for a schema and all its includes.
...
Also refactored the way options are stored.
Change-Id: I709ac908cd2aba396c9c282725cf1d42ccce0882
Tested: on Linux.
2015-12-04 09:44:31 -08:00
Wouter van Oortmerssen
3881bbd651
Multiple schemas parsed by flatc are now parsed independently.
...
It used to be such that later schemas could depend on earlier
schemas. This was a convenience from days before include files
were implemented. Nowadays they cause subtle bugs rather than being
useful, so this functionality has been removed.
You now need to explicitly include files you depend upon.
Change-Id: Id8292c3c621fc38fbd796da2d2cbdd63efc230d1
Tested: on Linux.
2015-12-02 11:12:39 -08:00
Wouter van Oortmerssen
1075c80e8a
Fixed crash related to flatc parsing duplicate input files.
...
Thanks @Chaosvex for reporting.
Change-Id: I73f60ab0bf875a3e0849eaec5f42f6d036881094
Tested: on Linux.
2015-12-02 11:12:39 -08:00
Shuhei Tanuma
721d21923e
Don't hide function parameter
2015-11-07 11:36:32 +09:00
Wouter van Oortmerssen
4d7810424c
Allow structs to be parsed in JSON with out of order fields.
...
Also simplified the code and made it faster.
Change-Id: I1d83b1165a4a9a4380d1bfb5538769c012d2d367
Tested: on Linux.
2015-10-28 17:54:11 -07:00
Wouter van Oortmerssen
d236dea13d
Improved C++ asserts for nesting and not finishing buffers.
...
Change-Id: I82a392bd262b13e978df748bc54b7ac43aec1e15
Tested: on Linux.
2015-10-28 11:57:16 -07:00
Wouter van Oortmerssen
ace304513f
Fixes for JS generator in Xcode
2015-10-19 16:05:39 -07:00
Wouter van Oortmerssen
1917e577a2
Fixes for JS generator in VS
2015-10-19 15:55:28 -07:00
Wouter van Oortmerssen
94680f5483
Added support for imports and many other .proto features.
...
Change-Id: I6600021b7ec8c486794349511232c3e604421c5b
Tested: on Linux.
2015-10-13 14:01:55 -07:00
Wouter van Oortmerssen
2abe24b9dd
Made .proto parsing understand nested declarations.
...
Bug: 24401812
Change-Id: I196a03b8c5ef0bcd3c26178239c764e40ca1950d
Tested: on Linux.
2015-09-28 09:48:41 -07:00
Wouter van Oortmerssen
feb4816610
Fixed .proto translation making scalars into required fields.
...
Change-Id: If414d156b4e9bc7fead5f131823b2c419cdc4e2c
Tested: on Linux.
2015-09-25 09:21:31 -07:00
Wouter van Oortmerssen
aeff09d724
Fixed a clang warning about signed shifts.
...
Change-Id: I7c2bf87972ee0ba6811d6ed42e13300bff90e36f
2015-08-26 16:47:59 -07:00
Wouter van Oortmerssen
45cc503bbd
Changed maximum force_align to match the C++ code generator.
...
Change-Id: I7df2b0172f5de6f7bdbd8778361794004cd06062
Tested: on Linux.
2015-08-05 13:56:31 -07:00
Wouter van Oortmerssen
36c7e9a962
Fixed null root_table access in binary schema generation.
...
Change-Id: Ia2b7abc10bee52814e815befcad6a89697295d8f
Tested: on Linux.
2015-06-29 15:21:48 -07:00
Wouter van Oortmerssen
cb2b2be54e
Reflection: generically copy (parts of) FlatBuffers.
...
Change-Id: Ief3f1507c003079eac90c2bb6c2abd64a80a0a34
Tested: on Linux.
2015-06-29 15:18:51 -07:00
Wouter van Oortmerssen
1e6f8f5b8c
Fixed possible crash from reference to non-static variable.
...
Change-Id: I1842098a7ef461e2e92dd35d79d8ca303e814867
Tested: on Linux.
2015-06-22 10:23:42 -07:00
Wouter van Oortmerssen
622b8d05cf
Fixed warnings on Windows
2015-06-15 17:35:07 -07:00
Wouter van Oortmerssen
81312c2128
Initial reflection and resizing functionality.
...
Tested: on Linux.
Change-Id: I8f7bccf9b1ad87fea788f85e23fa69435758feca
2015-06-15 15:53:10 -07:00
Wouter van Oortmerssen
5f091c46ce
Allowing _ as first character of identifiers in .fbs/.json.
...
Change-Id: Ie2cb42632f6a907a38e10b2c9be1536cf330b2fa
Tested: on Linux.
2015-06-15 13:09:22 -07:00
Wouter van Oortmerssen
3b070310f0
Fixed -Wunused-result warning.
...
Change-Id: Iea5fab66047ac0a5057a743dbb1fdb27c063188c
Tested: on Linux.
2015-05-20 16:21:22 -07:00
rw
48dfc69ee6
Port FlatBuffers to Python.
...
Implement code generation and self-contained runtime library for Python.
The test suite verifies:
- Correctness of generated Python code by comparing output to that of
the other language ports.
- The exact bytes in the Builder buffer during many scenarios.
- Vtable deduplication correctness.
- Edge cases for table construction, via a fuzzer derived from the Go
implementation.
- All code is simultaneously valid in Python 2.6, 2.7, and 3.4.
The test suite includes benchmarks for:
- Building 'gold' data.
- Parsing 'gold' data.
- Deduplicating vtables.
All tests pass on this author's system for the following Python
implementations:
- CPython 2.6.7
- CPython 2.7.8
- CPython 3.4.2
- PyPy 2.5.0 (CPython 2.7.8 compatible)
2015-05-12 15:40:29 -07:00
Robert
4d213c2d06
Merge pull request #165 from rw/go-faster
...
Go speed improvements
2015-05-12 14:53:31 -07:00
Wouter van Oortmerssen
8896587faf
Fixed schemas inheriting namespace from included schemas.
...
Change-Id: Ib561430b235eddf4bfe20f68409e1dfdb359ef2b
Tested: on Linux.
2015-05-11 10:55:22 -07:00